Skip to content

feat(tasks): Cmd+Option+Left/Right to cycle task tabs - #99

Open
wise-toddler wants to merge 8 commits into
debuglebowski:mainfrom
wise-toddler:fix/task-tab-shortcuts
Open

feat(tasks): Cmd+Option+Left/Right to cycle task tabs#99
wise-toddler wants to merge 8 commits into
debuglebowski:mainfrom
wise-toddler:fix/task-tab-shortcuts

Conversation

@wise-toddler

@wise-toddler wise-toddler commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add Cmd+Option+Left / Cmd+Option+Right to cycle through open task tabs in the top tab bar (wrap-around at edges, skips the home tab).
  • Suppress the new cycle shortcuts inside text inputs (INPUT, TEXTAREA, SELECT, contentEditable, role="textbox", CodeMirror, xterm, Milkdown, ProseMirror) so they don't hijack the macOS "move by word" cursor behavior.

Closes

Closes #98

Notes on the diff

This branch also includes two small unrelated fixes that the typecheck on main currently fails without:

  • fix(transport): add missing resolve-task route stub — registers a 501 stub for the missing module imported by rest-api/index.ts.
  • fix(app): add missing ws and @trpc/server deps for host-capability-server — adds runtime deps already used by packages/apps/app/src/main/host-capability-server.ts.

Happy to split these out into a separate PR if preferred.

Test plan

  • pnpm typecheck passes
  • pnpm --filter @slayzone/app test:e2e e2e/core/16-tab-management.spec.ts — 11/11 pass, including 4 new cases for the shortcuts above.
  • Manual: with multiple task tabs open, Cmd+Option+Left and Cmd+Option+Right cycle through them and wrap at the edges.
  • Manual: shortcuts do NOT fire while typing in an input, textarea, contentEditable field, CodeMirror editor, xterm terminal, Milkdown/ProseMirror editor, or native <select>.
  • Manual: with only the home tab open, the cycle shortcuts are a no-op.

Greptile Summary

This PR adds task-tab cycling shortcuts for the app shell. The main changes are:

  • New Cmd+Option+Left and Cmd+Option+Right bindings for previous and next task tab navigation.
  • Wrap-around tab cycling that skips the home tab.
  • Shortcut guards for text fields and editor surfaces.
  • Shortcut definitions for the new customizable tab actions.
  • E2E coverage for cycling, wrapping, home-tab behavior, and input suppression.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
packages/apps/app/src/renderer/src/app-shell/useAppShortcuts.ts Adds explicit disabled-shortcut handling and task-tab cycling handlers with text/editor guards.
packages/shared/shortcuts/src/definitions.ts Adds customizable shortcut definitions for next and previous task tab navigation.
packages/apps/app/e2e/core/16-tab-management.spec.ts Adds tests for task-tab cycling, wrap-around behavior, home-tab behavior, and input suppression.

Reviews (3): Last reviewed commit: "fix(shortcuts): respect explicit null ov..." | Re-trigger Greptile

Context used:

  • Context used - CLAUDE.md (source)
  • Context used - AGENTS.md (source)

Comment thread packages/apps/app/src/renderer/src/app-shell/useAppShortcuts.ts Outdated
Comment thread packages/shared/shortcuts/src/definitions.ts Outdated
@wise-toddler
wise-toddler marked this pull request as draft June 26, 2026 19:13
@wise-toddler wise-toddler changed the title feat(tasks): Cmd+Option+Left/Right and Cmd+1..9 to switch task tabs feat(tasks): Cmd+Option+Left/Right to cycle task tabs Jun 26, 2026
@wise-toddler
wise-toddler marked this pull request as ready for review June 29, 2026 20:49
Comment thread packages/apps/app/src/renderer/src/app-shell/useAppShortcuts.ts
@wise-toddler

Copy link
Copy Markdown
Contributor Author

Hey @debuglebowski — could you take a look when you get a chance? 🙏

Quick notes:

  • Scope: narrow feature — just Cmd+Option+Left/Right to cycle task tabs (matching macOS convention). Wraps at edges, guarded against text inputs (INPUT/TEXTAREA/SELECT/contentEditable/role="textbox"/CodeMirror/xterm/Milkdown/ProseMirror) so it doesn't hijack the native "move by word" cursor behavior. Closes feat: Cmd+Option+Left/Right to switch between open task tabs (top bar) #98.
  • Tests: 4 new Playwright cases added to e2e/core/16-tab-management.spec.ts (forward+wrap, backward+wrap, input-guard, home→first/last). 11/11 pass locally.
  • Red checks: the 4 dry-run / Build (*) failures are unrelated — they need MACOS_CERTIFICATE / signing secrets which fork PRs can't access (GitHub policy). All actual code-validating checks are green (check, check-windows, workflow-lint, Greptile Review). They'll go green once merged into main where the secrets exist.
  • Two small bundled fixes: fix(transport): resolve-task route stub and fix(app): missing ws + @trpc/server deps — these fix pre-existing typecheck breakage on main that would otherwise block CI. Happy to split them into a separate PR if you'd prefer.

Let me know if you'd like any changes 🙂

…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.
@wise-toddler
wise-toddler force-pushed the fix/task-tab-shortcuts branch from cd0f300 to 6b8b3e0 Compare July 26, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Cmd+Option+Left/Right to switch between open task tabs (top bar)

1 participant