feat(app): close settings with Escape - #2828
Open
mcowger wants to merge 3 commits into
Open
Conversation
Contributor
|
| Filename | Overview |
|---|---|
| packages/app/src/hooks/use-keyboard-shortcuts.ts | Executes Settings exit navigation, including the Open Project fallback, while deferring Escape to active overlays. |
| packages/app/src/keyboard/route-shortcut.ts | Routes the desktop Settings agent-interrupt shortcut to the existing last-workspace action. |
| packages/app/src/lib/overlay-root.ts | Exposes whether the web overlay registry currently contains an active overlay. |
| packages/app/src/keyboard/route-shortcut.test.ts | Covers desktop Settings routing and preservation of compact-layout behavior. |
| packages/app/e2e/browser/settings-navigation.spec.ts | Verifies that pressing Escape leaves Settings in the browser harness. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
E[Escape pressed] --> S{Non-compact Settings?}
S -- No --> I[Keep agent-interrupt behavior]
S -- Yes --> O{Active web overlay?}
O -- Yes --> H[Overlay handles Escape]
O -- No --> W{Remembered workspace?}
W -- Yes --> N[Navigate to workspace]
W -- No --> P[Replace route with Open Project]
Reviews (4): Last reviewed commit: "Merge branch 'main' into loyal-vulture" | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
No issue number was provided.
Type of change
Reasoning
On desktop and web, pressing Escape in Settings was routed as an agent-interrupt shortcut and left the Settings screen open. Route Escape to the existing Settings exit path instead.
Goals
Non-goals
QA
npx vitest run packages/app/src/keyboard/route-shortcut.test.ts packages/app/src/keyboard/keyboard-shortcuts.test.ts --bail=1— 137 tests passed.npm run test:e2e --workspace=@getpaseo/app -- settings-navigation.spec.ts --grep "pressing Escape closes settings"— 1 test passed in the real browser/Metro/daemon harness.npm run typecheck --workspace=@getpaseo/app— passed.npm run lintand targeted format checks — passed.Checklist
npm run typecheckpassesnpm run lintpassesnpm run formatpasses