fix(ui): restore live escape handling in PTY flows#173
Conversation
Greptile SummaryThis PR restores live escape key handling in PTY flows by: (1) adding an
Confidence Score: 5/5Safe to merge — all findings are non-blocking style suggestions with no correctness or reliability impact. Both open comments are P2 (style/consistency) and do not affect runtime behaviour. The escape actions are idempotent so the dual-path handling causes no visible bugs. The PR is well-tested with new PTY integration coverage. No files require special attention; the style notes in StatusBar.tsx and useAppKeyboardShortcuts.ts are minor clean-up opportunities. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
K[Keyboard event] --> MT{F10 pressed?}
MT -- yes --> MH[handleMenuToggleShortcut
open/close file menu]
MT -- no --> PM{pagerMode?}
PM -- yes --> PS[handlePagerShortcut
q / Esc → quit
space/b/d/u/arrows → scroll]
PM -- no --> HS{showHelp?}
HS -- yes + Esc --> CH[closeHelp]
HS -- no / other key --> MS{activeMenuId?}
MS -- yes --> MN[handleMenuShortcut
Esc → closeMenu
arrows → navigate
enter → activate]
MS -- no --> FS{focusArea = filter?}
FS -- yes + Esc with content --> CF[clearFilter]
FS -- yes + Esc empty --> FF[focusFiles]
FS -- yes + other key --> CI[consume — let input widget type]
FS -- no --> AS[handleAppShortcut
Esc → requestQuit
/ → focusFilter
q → quit
0/1/2 → layout
etc.]
K2[Keyboard event to focused input] --> ID{StatusBar input focused?}
ID -- yes + Esc with content --> OFI[onFilterInput '' → clearFilter]
ID -- yes + Esc empty --> OFS[onFilterSubmit → focusFiles]
ID -- no --> PASS[event not intercepted]
Reviews (1): Last reviewed commit: "fix(ui): restore live escape handling in..." | Re-trigger Greptile |
b0d89d9 to
5bc9afa
Compare
Summary
escapeandescin the app shortcut layer and by letting the focused filter input clear or exit directlybun test src/ui/AppHost.interactions.test.tsxandbun run test:integration