Skip to content

Allow keyboard pass-through from selection prompt#493

Merged
aidenybai merged 4 commits into
mainfrom
cursor/keyboard-prompt-pass-through-pr
Jun 26, 2026
Merged

Allow keyboard pass-through from selection prompt#493
aidenybai merged 4 commits into
mainfrom
cursor/keyboard-prompt-pass-through-pr

Conversation

@aidenybai

@aidenybai aidenybai commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Let arrow keys continue navigation from the keyboard-selection discard prompt instead of getting stuck
  • Let bare action shortcuts such as s and Enter pass through from that prompt
  • Simplify the key handling by reusing the existing arrow-navigation clearing and bare-key shortcut resolution paths
  • Preserve focused prompt button Enter behavior for Copy/Yes

Tests

  • pnpm --filter react-grab exec playwright test e2e/keyboard-navigation.spec.ts --reporter=list
  • pnpm --filter react-grab run typecheck
  • pnpm --filter react-grab run test:unit

Notes

  • To create a real PR after the earlier direct push to main, I reverted the prompt commits on main with a normal revert commit and reapplied them on this cursor/ branch.
Open in Web Open in Cursor 

Summary by cubic

Allow keyboard pass-through from the discard-selection prompt in react-grab. Arrow keys continue navigation and dismiss the prompt only after a successful move; bare shortcuts (e.g., s, Enter) run their actions, and Enter on Copy/Yes still works.

  • Refactors
    • Handle pass-through first in keydown via tryHandleKeyboardSelectionPromptPassThrough; extracted getBareKeyShortcut and isKeyboardSelectionPromptButtonEnter; added allowPendingKeyboardSelection to tryHandleArrowNavigation and only clear navigation/dismiss the prompt after a valid move.
    • Expanded e2e tests for Enter and s pass-through and for arrow navigation clearing the prompt; added showKeyboardSelectionDiscardPrompt.

Written for commit c486897. Summary will update on new commits.

Review in cubic

cursoragent and others added 2 commits June 26, 2026 10:46
Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-grab-storybook Ready Ready Preview, Comment Jun 26, 2026 11:10am
react-grab-website Ready Ready Preview, Comment Jun 26, 2026 11:10am

@pkg-pr-new

pkg-pr-new Bot commented Jun 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@react-grab/cli@493
npm i https://pkg.pr.new/grab@493
npm i https://pkg.pr.new/react-grab@493

commit: c486897

@aidenybai aidenybai marked this pull request as ready for review June 26, 2026 10:49
Comment thread packages/react-grab/src/core/index.tsx Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Re-trigger cubic

Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 142654b. Configure here.

Comment thread packages/react-grab/src/core/index.tsx Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/react-grab/src/core/index.tsx Outdated
Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
@aidenybai aidenybai merged commit b6ea6cc into main Jun 26, 2026
19 checks passed
@aidenybai aidenybai deleted the cursor/keyboard-prompt-pass-through-pr branch June 26, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants