Repository navigation
fix(shortcuts): switch panes with Mod+Shift+arrows from the empty message box - #827
Conversation
…sage box The chat view puts the focus in the message box, and devswha#298 leaves Mod+Shift+arrows to every text field, so the pane shortcut worked from the terminal but never from chat. An empty field has nothing to select: the arrows now switch panes from it. A field with text keeps them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to The change enables pane switching from an empty composer while preserving draft selection; no concrete user-facing regression is established, so it appears ready for normal checks. Pre-merge checks |
|
Change
Mod+Shift+↑/↓ switch panes from the terminal view, but not from the chat view. The chat view puts the focus in the message box, and #298 leaves Mod+Shift+arrows to every text field (
keepsArrowsForText), so in chat the shortcut never reachesselectAdjacentPane.#298 kept the arrows in the message box for two reasons: they select text, and switching would leave a message behind. An empty field has neither, so
keepsArrowsForTextnow returnsfalsewhen the target'svalueis"". A field with text keeps the arrows as before. Contenteditable targets have novalueand are unchanged.One condition in
src/lib/shortcuts.ts, plus tests,docs/guide.mdand a changelog line.Validation
scripts/ui-regression.ts: new check after the switch to chat. From the empty message box, Ctrl+Shift+↓ leaves the pane; with a draft, it stays.Timed out: the empty message box leaves the pane.PASS pane shortcut from the empty message box; a draft keeps text selection, and the full script passes.src/lib/shortcuts.test.ts: empty textarea and empty text input switch panes; fields with text keep the arrows. The new expectations fail without the fix.bun run generate:types --check,bun run typecheck,bun run build,bun run test:unit(2720 pass, 0 fail).ui-regression.tsruns failed earlier, at the palette checka scroll under a resting pointer leaves the arrow's selection alone(line 308), with and without this change. The other runs passed it.🤖 Generated with Claude Code