feat(tasks): Cmd+Option+Left/Right to cycle task tabs#99
Open
wise-toddler wants to merge 9 commits into
Open
Conversation
…wski#98) Original issue debuglebowski#98 asked for Cmd+1..9 as indexed jumps to the Nth task tab. The Chrome-style "Cmd+9 = last tab" branch was an over-interpretation of the spec. Restore Cmd+9 to indexed behavior: jump to the 9th task tab if it exists, otherwise no-op. - Delete the `last-task-tab` shortcut definition. - Drop the dedicated `last-task-tab` handler; extend the indexed handler from `mod+1..8` to `mod+1..9`. - Replace the "Cmd+9 = last" e2e test with an indexed-jump test (Cmd+3 with 3 tabs, Cmd+9 is a no-op).
…wski#98) Original issue debuglebowski#98 listed numeric jumps as a 'bonus'. User confirmed only Cmd+Option+Left/Right is wanted. Restored main's switch-tab-1-9 behavior verbatim.
| [visibleTabs.length, toFullIndex, toVisibleIndex, setActiveTabIndex] | ||
| ) | ||
|
|
||
| useGuardedHotkeys( |
Contributor
There was a problem hiding this comment.
next-task-tab and prev-task-tab are registered as customizable shortcuts, but this call reads them through the local getKeys() helper that treats a null override as missing and falls back to the default key. When a user disables Cmd+Option+Right or Cmd+Option+Left in shortcut settings, the handler is still bound to the default and can still switch task tabs while the user expected it to be unbound. Please make this path preserve explicit null overrides instead of falling back to the default.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/apps/app/src/renderer/src/app-shell/useAppShortcuts.ts
Line: 213
Comment:
**Disabled shortcuts still fire**
`next-task-tab` and `prev-task-tab` are registered as customizable shortcuts, but this call reads them through the local `getKeys()` helper that treats a `null` override as missing and falls back to the default key. When a user disables Cmd+Option+Right or Cmd+Option+Left in shortcut settings, the handler is still bound to the default and can still switch task tabs while the user expected it to be unbound. Please make this path preserve explicit `null` overrides instead of falling back to the default.
How can I resolve this? If you propose a fix, please make it concise.
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.
Summary
Cmd+Option+Left/Cmd+Option+Rightto cycle through open task tabs in the top tab bar (wrap-around at edges, skips the home tab).Closes
Closes #98
Notes on the diff
This branch also includes two small unrelated fixes that the typecheck on
maincurrently fails without:fix(transport): add missing resolve-task route stub— registers a 501 stub for the missing module imported byrest-api/index.ts.fix(app): add missing ws and @trpc/server deps for host-capability-server— adds runtime deps already used bypackages/apps/app/src/main/host-capability-server.ts.Happy to split these out into a separate PR if preferred.
Test plan
pnpm typecheckpassespnpm --filter @slayzone/app test:e2e e2e/core/16-tab-management.spec.ts— 11/11 pass, including 4 new cases for the shortcuts above.Cmd+Option+LeftandCmd+Option+Rightcycle through them and wrap at the edges.<select>.Greptile Summary
This PR adds keyboard cycling for task tabs and a few support fixes. The main changes are:
Confidence Score: 4/5
This is close, but the shortcut disabling path should be fixed before merging.
packages/apps/app/src/renderer/src/app-shell/useAppShortcuts.ts
Important Files Changed
Prompt To Fix All With AI
Reviews (2): Last reviewed commit: "revert(shortcuts): drop Cmd+1..9 changes..." | Re-trigger Greptile
Context used: