Skip to content

feat(desktop/hotkeys): restore Cmd+Alt+Arrow for tab/workspace nav#3472

Merged
saddlepaddle merged 1 commit intomainfrom
hotkeys-restore-tab-workspace-defaults
Apr 15, 2026
Merged

feat(desktop/hotkeys): restore Cmd+Alt+Arrow for tab/workspace nav#3472
saddlepaddle merged 1 commit intomainfrom
hotkeys-restore-tab-workspace-defaults

Conversation

@saddlepaddle
Copy link
Copy Markdown
Collaborator

@saddlepaddle saddlepaddle commented Apr 15, 2026

Summary

Flip the Cmd+Alt+Arrow (mac) / Ctrl+Shift+Alt+Arrow (win/linux) chords back to tab/workspace navigation, which is how they worked before #3403 retired them in favor of directional pane focus.

  • Cmd+Alt+Left / Right → Previous / Next Tab
  • Cmd+Alt+Up / Down → Previous / Next Workspace
  • FOCUS_PANE_{LEFT,RIGHT,UP,DOWN} — registered but unbound. Users who want directional pane focus rebind in Settings → Keyboard. Same shape feat(desktop/hotkeys): unbound defaults + restore prev/next tab & workspace #3422 used when it re-registered PREV/NEXT_TAB + PREV/NEXT_WORKSPACE as unbound.
  • PREV_TAB_ALT / NEXT_TAB_ALT (Ctrl+Tab / Ctrl+Shift+Tab) — unchanged.

The SCROLL_TO_BOTTOM collision fix

buildRegisteredAppChords uses a Map keyed by canonical chord. When two hotkeys hash to the same chord, the later entry silently overwrites the earlier one in the reverse index — no error, the loser just stops responding.

Before this PR, on Windows/Linux SCROLL_TO_BOTTOM and FOCUS_PANE_DOWN both claimed ctrl+shift+alt+down, silently breaking FOCUS_PANE_DOWN (pre-existing latent bug — see the abandoned commit 9fae2612d which proposed the same fix). Restoring NEXT_WORKSPACE to ctrl+shift+alt+down would just move the bug from "breaks pane nav" to "breaks workspace nav".

Moving SCROLL_TO_BOTTOM on Windows/Linux from ctrl+shift+alt+down to ctrl+end resolves both. Mac SCROLL_TO_BOTTOM (meta+shift+down) is untouched.

User override safety

Any user who previously overrode PREV_TAB, NEXT_TAB, PREV_WORKSPACE, NEXT_WORKSPACE, or any FOCUS_PANE_* keeps their override — defaults are just fallbacks. Users on stock defaults get the new (restored) values.

Test plan

  • Cmd+Alt+Left/Right cycles tabs in both v1 and v2 workspaces
  • Cmd+Alt+Up/Down cycles workspaces in the sidebar
  • Ctrl+Tab / Ctrl+Shift+Tab still cycles tabs (PREV_TAB_ALT / NEXT_TAB_ALT unchanged)
  • FOCUS_PANE_* appear in Settings → Keyboard as Unassigned; binding one and verifying directional pane focus still works
  • On Windows/Linux, SCROLL_TO_BOTTOM responds to Ctrl+End (not Ctrl+Shift+Alt+Down anymore)
  • bun run typecheck --filter @superset/desktop clean

Summary by CodeRabbit

  • New Features

    • Added keyboard shortcuts to navigate between workspaces.
    • Added keyboard shortcuts to switch between tabs.
  • Improvements

    • Simplified scroll-to-bottom shortcut for Windows/Linux.
    • Adjusted keyboard shortcuts for pane navigation across all platforms.

Summary by cubic

Restore Cmd+Alt+Arrow on mac and Ctrl+Shift+Alt+Arrow on Windows/Linux for tab and workspace navigation. Unbind pane-focus arrows by default and move SCROLL_TO_BOTTOM to Ctrl+End on Windows/Linux to avoid a collision.

  • New Features

    • Cmd+Alt+Left/Right → previous/next tab; Cmd+Alt+Up/Down → previous/next workspace.
    • Pane focus (FOCUS_PANE_*) is registered but unassigned; users can bind in Settings → Keyboard.
    • Ctrl+Tab / Ctrl+Shift+Tab for tab cycling unchanged.
    • Existing user overrides are preserved.
  • Bug Fixes

    • Windows/Linux: SCROLL_TO_BOTTOM changed to Ctrl+End to remove a duplicate binding with workspace navigation.

Written for commit f643a96. Summary will update on new commits.

Flip Cmd+Alt+Arrow (mac) / Ctrl+Shift+Alt+Arrow (win/linux) back to
the pre-#3403 behavior:

- Cmd+Alt+Left / Right → Previous / Next Tab
- Cmd+Alt+Up / Down   → Previous / Next Workspace

FOCUS_PANE_{LEFT,RIGHT,UP,DOWN} remain registered but are now
unbound by default — users who want directional pane focus can
rebind them in Settings → Keyboard. PREV_TAB_ALT / NEXT_TAB_ALT
(Ctrl+Tab / Ctrl+Shift+Tab) are unchanged.

Also move SCROLL_TO_BOTTOM on Windows/Linux from ctrl+shift+alt+down
to ctrl+end to avoid the silent collision with NEXT_WORKSPACE that
this restoration would otherwise introduce. buildRegisteredAppChords
uses a Map keyed by canonical chord, so duplicate chords silently
clobber each other in the reverse lookup. mac SCROLL_TO_BOTTOM
(meta+shift+down) is unchanged.

Registered users who previously overrode any of these IDs keep their
overrides — defaults are just fallbacks.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 15, 2026

📝 Walkthrough

Walkthrough

Updated hotkey bindings in the desktop application's registry for multiple navigation commands. PREV_WORKSPACE, NEXT_WORKSPACE, PREV_TAB, and NEXT_TAB now have explicit key assignments on macOS and Windows/Linux. SCROLL_TO_BOTTOM uses a simpler binding on Windows/Linux. Pane navigation hotkeys are now disabled across all platforms.

Changes

Cohort / File(s) Summary
Hotkey Registry Updates
apps/desktop/src/renderer/hotkeys/registry.ts
Updated platform-specific bindings for workspace/tab navigation, scroll behavior, and pane focus commands. Workspace/tab navigation now have explicit directional bindings; pane focus commands are globally disabled; scroll shortcut simplified for Windows/Linux.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Hop-hop! With arrow keys so bright,
Navigation flows left and right,
Workspaces and tabs, now swift and free,
Yet pane commands rest quietly—
A keyboard dance, refined and tight! 🎹

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: restoring Cmd+Alt+Arrow hotkeys for tab and workspace navigation, which is the primary objective of this PR.
Description check ✅ Passed The PR description comprehensively covers all required template sections: summary, type of change (implicit as a feature), testing plan with checkboxes, and additional context about collision fixes and user safety.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotkeys-restore-tab-workspace-defaults

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
apps/desktop/src/renderer/hotkeys/registry.ts (1)

104-119: Add a regression test for per-platform default-chord uniqueness.

This fix is entirely data-driven. A small test that canonicalizes each platform's non-null defaults and fails on duplicates would catch future silent overwrites in buildRegisteredAppChords before they ship.

Also applies to: 329-333, 353-392

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/desktop/src/renderer/hotkeys/registry.ts` around lines 104 - 119, Add a
regression test that ensures per-platform default chord keys are unique by
canonicalizing non-null defaults for each platform (mac, windows, linux) across
the hotkey registry entries (e.g., PREV_WORKSPACE, NEXT_WORKSPACE and other
entries covered at lines ~329-333 and ~353-392) or by invoking
buildRegisteredAppChords and inspecting its output; the test should collect each
platform's key strings into a Set and fail/assert when a duplicate canonical key
is detected so future data edits cannot silently overwrite per-platform chords.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/desktop/src/renderer/hotkeys/registry.ts`:
- Around line 104-119: Add a regression test that ensures per-platform default
chord keys are unique by canonicalizing non-null defaults for each platform
(mac, windows, linux) across the hotkey registry entries (e.g., PREV_WORKSPACE,
NEXT_WORKSPACE and other entries covered at lines ~329-333 and ~353-392) or by
invoking buildRegisteredAppChords and inspecting its output; the test should
collect each platform's key strings into a Set and fail/assert when a duplicate
canonical key is detected so future data edits cannot silently overwrite
per-platform chords.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ea274ab3-190b-4224-b591-35f8ab396dc8

📥 Commits

Reviewing files that changed from the base of the PR and between 87d6e93 and f643a96.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/hotkeys/registry.ts

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 15, 2026

Greptile Summary

This PR restores Cmd+Alt+Arrow (Mac) / Ctrl+Shift+Alt+Arrow (Win/Linux) to their pre-#3403 role as tab and workspace navigation shortcuts, while leaving the four FOCUS_PANE_* actions unbound (registered with null keys) so users can assign them in Settings → Keyboard. It also resolves a pre-existing silent collision in buildRegisteredAppChords: on Windows/Linux SCROLL_TO_BOTTOM and FOCUS_PANE_DOWN both previously claimed ctrl+shift+alt+down, with the Map silently discarding one. The fix moves SCROLL_TO_BOTTOM to ctrl+end on Windows/Linux.

  • Tab/workspace navigation restoredPREV_TAB / NEXT_TAB and PREV_WORKSPACE / NEXT_WORKSPACE are re-assigned defaults; no new chord collisions exist in the registry.
  • FOCUS_PANE_{LEFT,RIGHT,UP,DOWN} unbound — all four keys set to null; the builder correctly skips them, so they appear as "Unassigned" in Settings.
  • SCROLL_TO_BOTTOM chord change on Win/Linuxctrl+shift+alt+downctrl+end. The collision fix is sound, but ctrl+end is a common ANSI sequence in terminal emulators, so this default may silently intercept it when a terminal pane is focused. Consider ctrl+shift+end or null.

Confidence Score: 4/5

Safe to merge; the one open question is whether ctrl+end is an acceptable default for SCROLL_TO_BOTTOM on Windows/Linux

The tab/workspace restoration and the Map-collision fix are both correct and well-reasoned. The only concrete concern is the ctrl+end default for SCROLL_TO_BOTTOM — it resolves the previous collision but introduces a new potential conflict with a common ANSI terminal sequence. This is a trade-off worth discussing before merge, but it does not break the primary navigation paths restored by this PR and the user can rebind.

apps/desktop/src/renderer/hotkeys/registry.ts — specifically the SCROLL_TO_BOTTOM Win/Linux default

Important Files Changed

Filename Overview
apps/desktop/src/renderer/hotkeys/registry.ts Restores Cmd+Alt+Arrow tab/workspace shortcuts, leaves FOCUS_PANE_* unbound, and moves SCROLL_TO_BOTTOM to ctrl+end on Win/Linux to resolve a Map-key collision — the new binding may shadow a common terminal escape sequence

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[KeyboardEvent fired] --> B[eventToChord]
    B --> C{chord in registeredAppChords?}
    C -- yes --> D[resolveHotkeyFromEvent returns HotkeyId]
    C -- no --> E[null — passed through]
    D --> F{HotkeyId}
    F --> G[PREV_TAB / NEXT_TAB]
    F --> H[PREV_WORKSPACE / NEXT_WORKSPACE]
    F --> I[SCROLL_TO_BOTTOM ctrl+end Win/Linux]
    F --> J[FOCUS_PANE_* null unbound]
    G --> K[useWorkspaceHotkeys cycle tabs]
    H --> L[useDashboardSidebarShortcuts cycle workspaces]
    I --> M[useTerminalHotkeys scrollToBottom xterm]
    J --> N[visible in Settings as Unassigned]
Loading

Comments Outside Diff (1)

  1. apps/desktop/src/renderer/hotkeys/registry.ts, line 329-338 (link)

    P2 ctrl+end may shadow common terminal shortcut

    ctrl+end is a widely-used key in terminal emulators on Windows/Linux — it generates the ANSI \e[1;5F sequence that applications like vim, less, and readline use for "go to end of buffer / end of file". Because useTerminalHotkeys registers SCROLL_TO_BOTTOM with { enabled: isFocused, preventDefault: true }, the scroll callback will fire whenever the terminal pane has focus, running alongside whatever escape sequence xterm.js has already dispatched to the PTY.

    The previous binding (ctrl+shift+alt+down) was unusual enough that it rarely appeared in real terminal workflows. ctrl+end is much more common; assigning it as a default will silently intercept it from users relying on that key in vim/less/etc.

    Two options worth considering:

    • Use a chord that is less terminal-adjacent, e.g. ctrl+shift+end (uncommon in shell/editor workflows)
    • Leave it unbound (null) by default, letting users bind it themselves in Settings → Keyboard (same approach as FOCUS_PANE_* in this PR)

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Reviews (1): Last reviewed commit: "feat(desktop/hotkeys): restore Cmd+Alt+A..." | Re-trigger Greptile

@saddlepaddle saddlepaddle merged commit 1294a7d into main Apr 15, 2026
7 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch
  • ⚠️ Electric Fly.io app

Thank you for your contribution! 🎉

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

MocA-Love pushed a commit to MocA-Love/superset that referenced this pull request Apr 15, 2026
…uperset-sh#3472)

Flip Cmd+Alt+Arrow (mac) / Ctrl+Shift+Alt+Arrow (win/linux) back to
the pre-superset-sh#3403 behavior:

- Cmd+Alt+Left / Right → Previous / Next Tab
- Cmd+Alt+Up / Down   → Previous / Next Workspace

FOCUS_PANE_{LEFT,RIGHT,UP,DOWN} remain registered but are now
unbound by default — users who want directional pane focus can
rebind them in Settings → Keyboard. PREV_TAB_ALT / NEXT_TAB_ALT
(Ctrl+Tab / Ctrl+Shift+Tab) are unchanged.

Also move SCROLL_TO_BOTTOM on Windows/Linux from ctrl+shift+alt+down
to ctrl+end to avoid the silent collision with NEXT_WORKSPACE that
this restoration would otherwise introduce. buildRegisteredAppChords
uses a Map keyed by canonical chord, so duplicate chords silently
clobber each other in the reverse lookup. mac SCROLL_TO_BOTTOM
(meta+shift+down) is unchanged.

Registered users who previously overrode any of these IDs keep their
overrides — defaults are just fallbacks.
MocA-Love added a commit to MocA-Love/superset that referenced this pull request Apr 15, 2026
chore(upstream): PR5 hotkeys — v1 directional pane focus + Cmd+Alt+Arrow restoration (superset-sh#3460 superset-sh#3472)
MocA-Love added a commit to MocA-Love/superset that referenced this pull request Apr 15, 2026
-s ours merge to record that upstream commits a3e34bf through
de70163 (13 commits) are semantically already present on origin/main
via the PR1-6 cherry-pick series (PRs #176, #177, #178, #179, #180,
#182), plus fork-adaptation fixes layered on top.

This merge target is de70163 specifically (not upstream/main) so
newer upstream commits (9fff075 and later) remain visible in future
behind counts.

Upstream commits covered by this audit merge:
- a3e34bf  fix(desktop): restore cmd+click requirement for v1 terminal file links (superset-sh#3457)  [PR1/#176]
- 57557f8  fix(desktop): gate v2 workspace children on collection readiness (superset-sh#3464)       [PR1/#176]
- 4ee2e61  fix(desktop): use native clipboard for copy path in v2 sidebar (superset-sh#3462)         [PR1/#176]
- 87d6e93  feat(desktop): close settings with Escape key (superset-sh#3466)                          [PR1/#176]
- 9c7f5f4  chore(desktop): auto-restart host-service on bundle change in dev (superset-sh#3461)      [PR1/#176]
- 93140d9  fix(mcp): accept MCP resource URL as valid OAuth audience (superset-sh#3459)              [PR2/#177]
- be9e000  fix(desktop): drive tray menu off events, fetch real org name (superset-sh#3458)          [PR2/#177]
- c5f791e  feat(v2): unify workspace delete through host-service (superset-sh#3443)                  [PR3/#178]
- 2c24d93  feat(desktop): paginated branch picker with checkout + open actions (superset-sh#3397)    [PR4/#179]
- 2bf1049  feat(desktop/hotkeys): v1 directional pane focus + best-effort v1 override migrator (superset-sh#3460)  [PR5/#180]
- 1294a7d  feat(desktop/hotkeys): restore Cmd+Alt+Arrow for tab/workspace nav (superset-sh#3472)    [PR5/#180]
- de70163  feat(desktop): v2 review tab first pass — PR info, checks, comments (superset-sh#3463)    [PR6/#182]

Intentionally skipped (version bump, fork has independent versioning):
- 1e23353  chore(desktop): bump version to 1.5.5 (superset-sh#3473)

Fork-adaptation fixes layered on top of the cherry-picks:
- PR1: host-service-coordinator alias import fix, settings Escape
       selector narrowing (role-based + popper wrapper), Escape
       close uses replace navigation
- PR2: dual quit mode preservation (requestQuit "release"/"stop"),
       trayUpdateToken guard for stale async fetchHostInfo results
- PR4: ChangesHeader.normalizeBranchName regex rewrite (lint false
       positive), worktree add uses fullRef for remote-tracking
       refs, syncTimedOut reset on pendingId change, GIT_REFS.md
       barrel example fix
- PR5: migrate.ts re-sanitize of existing localStorage overrides
       (v2 marker bump intent), FOCUS_PANE_* enabled:isActive for
       KeepAliveWorkspaces, CATEGORY_ORDER merges Navigation (upstream)
       and Browser (fork)
- PR6: normalizeThreadsToComments flattens all thread.comments (not
       just first), CommentPane overrides <a> (openUrl) and <img>
       (SafeImage), zero-badge suppression, pr-null comments gate

Fork features verified intact (Explore agent audit of combined
36d4de4..35d95f3 range):
- BROWSER_RELOAD / BROWSER_HARD_RELOAD hotkeys
- dual quit mode menu in tray
- v1 terminal cold-restore + retry reconnect (out of range but
  unaffected)
- KeepAliveWorkspaces (FOCUS_PANE_* gated on isActive)
- useCommandPalette + addMemoTab in v2 workspace
- host-service-coordinator rename alias pattern
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.

1 participant