Uh oh!
There was an error while loading. Please reload this page.
Improve terminal navigation shortcuts and streamline git action PR flow - #42
Conversation
WalkthroughAdds platform-aware terminal navigation shortcut handling via a new Changes
Sequence DiagramsequenceDiagram
actor User
participant Drawer as ThreadTerminalDrawer
participant Keybindings
participant Terminal as TerminalViewport
User->>Drawer: Press arrow key + modifier
Drawer->>Keybindings: terminalNavigationShortcutData(event, platform)
alt Navigation shortcut detected
Keybindings-->>Drawer: Return navigation sequence
Drawer->>Drawer: preventDefault & stopPropagation
Drawer->>Drawer: sendTerminalInput(sequence, "Failed to move cursor")
Drawer->>Terminal: Write navigation data
Terminal-->>User: Cursor moves
else No shortcut match
Keybindings-->>Drawer: Return null
Drawer->>Drawer: Continue to other handlers (clear shortcut, default)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Add terminal navigation shortcut handling and unify terminal input writing in |
Greptile SummaryEnhanced terminal with keyboard shortcuts for cursor navigation by adding support for platform-specific word and line movement using modifier keys with arrow keys.
Confidence Score: 5/5
Important Files Changed
Flowchartflowchart TD
A[Keyboard Event] --> B{terminalNavigationShortcutData}
B --> C{Is Shift Key?}
C -->|Yes| D[Return null]
C -->|No| E{Is ArrowLeft/Right?}
E -->|No| D
E -->|Yes| F{Platform?}
F -->|macOS| G{Modifier Key?}
F -->|non-macOS| H{Modifier Key?}
G -->|Option/Alt only| I[Word Movement<br/>ESC+b or ESC+f]
G -->|Cmd/Meta only| J[Line Movement<br/>Ctrl-A or Ctrl-E]
G -->|Other| D
H -->|Ctrl only| I
H -->|Alt only| I
H -->|Other| D
I --> K[sendTerminalInput]
J --> K
K --> L[api.terminal.write]
L --> M[Terminal Updates Cursor]
Last reviewed commit: 9547718 |
- handle platform-specific modifier+arrow combos in terminal input - reuse terminal write path for clear and navigation actions - add shortcut tests for macOS and non-macOS mappings
35f153c to
9547718Compare@greptileai review |
juliusmarminge
commented
Feb 16, 2026
juliusmarminge
commented
Feb 16, 2026
@greptileai review |
- guard terminal clear/navigation shortcut handlers to only process `keydown` - add tests verifying `keyup` events are ignored
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/web/src/keybindings.test.ts (1)
357-366: Consider adding a test for Alt+Arrow on non-macOS platforms.The implementation at
keybindings.tslines 265-267 supports Alt+Arrow for word movement on non-macOS platforms, but this behavior isn't covered by tests. Adding a test would ensure this code path remains functional.🧪 Suggested test addition
it("maps Ctrl+Arrow on non-macOS to word movement", () => { assert.strictEqual( terminalNavigationShortcutData(event({ key: "ArrowLeft", ctrlKey: true }), "Win32"), "\u001bb", ); assert.strictEqual( terminalNavigationShortcutData(event({ key: "ArrowRight", ctrlKey: true }), "Linux"), "\u001bf", ); }); ++ it("maps Alt+Arrow on non-macOS to word movement", () => {+ assert.strictEqual(+ terminalNavigationShortcutData(event({ key: "ArrowLeft", altKey: true }), "Win32"),+ "\u001bb",+ );+ assert.strictEqual(+ terminalNavigationShortcutData(event({ key: "ArrowRight", altKey: true }), "Linux"),+ "\u001bf",+ );+ });
…icker Port upstream commits 3d35868..f70cb5d: - Add pull-request thread setup for local and worktree modes (pingdotgg#42) - Refine branch picker behavior and gate /checkout-pr by thread type (pingdotgg#43) Includes PR resolution via GitHub CLI, worktree-aware PR checkout, shared branch picker filtering, deferred query, conditional virtualization, and /checkout-pr gating to local draft threads only.
The fork hid its version-control surface because the Moatless backend did not serve it. It does now: stacked actions, pull-request resolution and thread preparation, VCS status and refs, ref switching and diff preview are all answered, so the flag was hiding a feature that works. Removed the `versionControl` entry and both gates that named it, following the flag table's own rule — a surface is turned on by deleting its flag, not by setting it to true, so no gate is left that can never be false. Claude Opus 5 via Claude Code. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
…otgg#39/pingdotgg#42) Theme import dialog, theme preview label, environment-artwork toggle, Linux keyring/KWallet remediation messages, and the thread-title generation prompts (they primed the model with the product name for titles the user reads). Internal identifiers, env vars, the protocol scheme, and the legacy userData migration dir name are deliberately untouched (pingdotgg#40 keychain/data-dir rotation hazard). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
adds basic terminal navigation
Summary by CodeRabbit
New Features
Tests