Repository navigation
Fix omnibar backspace/arrow key loss after prefix deletion - #1413
Conversation
The SwiftUI TextField lost arrow-key and backspace handlers when the
query prefix (">") was deleted, because the scope transition tore down
the .onKeyPress modifiers. Using an NSViewRepresentable with an AppKit
field editor keeps navigation commands (up/down/enter/escape) on the
native delegate, making them immune to SwiftUI scope changes.
Fixes #1409
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis change replaces the SwiftUI TextField-based command palette search input with a custom NSViewRepresentable that bridges an AppKit NSTextField into SwiftUI. The new implementation introduces CommandPaletteNativeTextField and CommandPaletteSearchFieldRepresentable to handle advanced keyboard navigation, focus management, and callback routing. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ar-backspace-arrow Fix omnibar backspace/arrow key loss after prefix deletion
Summary
TextFieldin the command palette with a native AppKitNSTextFieldviaNSViewRepresentable>prefix) tears down.onKeyPressmodifiershandleCommandPaletteControlNavigationKeyhelperTest plan
>somecommand, then backspace to delete the>— arrow keys and enter should still workFixes #1409
🤖 Generated with Claude Code
Summary by cubic
Fixes the command palette losing arrow keys, backspace, enter, and escape after deleting the ">" prefix by replacing the SwiftUI text field with a native AppKit text field. Fixes #1409.
Bug Fixes
Refactors
Written for commit 48ec609. Summary will update on new commits.
Summary by CodeRabbit
Release Notes