feat: Add split tab keyboard shortcut (to mirror Superhuman)#171
Conversation
Greptile SummaryThis PR adds Tab / Shift+Tab keyboard navigation for inbox split tabs in Superhuman keyboard mode, mirroring Superhuman's section-cycling UX. It wires up ARIA roles (
Confidence Score: 5/5Safe to merge — the shortcut is narrowly gated and the prior concerns raised in review threads have been correctly addressed in this revision. The Tab handler is guarded by three independent conditions (isSuperhuman, !showSettings, mode === normal), so it cannot fire in Gmail mode, settings, or while compose is open. The options.focusTab flag on cycleSplit correctly restricts focusSplitTab to the new Superhuman path and leaves the Gmail backtick/tilde flow untouched. E2E tests cover all three cases, and the expectNoVisibleBoxShadow helper is robust to Chromium-normalised computed values. No files require special attention.
|
| Filename | Overview |
|---|---|
| src/renderer/components/SplitTabs.tsx | Adds splitId, role=tab, aria-selected, and data-split-tab-id props to Tab buttons and wraps the container in role=tablist — clean ARIA/DOM hookup enabling both the keyboard shortcut and the E2E tests to target tabs by role/data attribute. |
| src/renderer/hooks/useKeyboardShortcuts.ts | Introduces focusSplitTab helper and a Tab/Shift+Tab case gated behind isSuperhuman && !showSettings && mode === normal. The options.focusTab flag on cycleSplit correctly prevents focusSplitTab from firing during Gmail backtick/tilde cycling, and the mode === normal guard prevents Tab from being swallowed when compose is open. |
| tests/e2e/inbox-tabs.spec.ts | Adds three well-structured E2E tests for Tab cycling in Superhuman mode, Gmail mode native Tab pass-through, and compose-mode non-interception. Uses Zustand store helpers to set bindings and inspect currentSplitId without relying on brittle UI coupling. |
Reviews (8): Last reviewed commit: "Simplify focusSplitTab to a direct attri..." | Re-trigger Greptile
|
nice, recommend using /reviewloop to handle the review comments, and consider the /review skill in gstack as well. will plan to get this in soon |
Replace querySelectorAll + linear scan with a single
querySelector('[data-split-tab-id="..."]'), using CSS.escape since custom
split IDs are user-derived.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
all comments are addressed 👍 |
Summary
Test Plan