feat: floating workspace shortcuts and tab shortcut affordances
Summary
Adds keyboard-shortcut visibility and floating-workspace shortcut support across the tab bar and floating terminal. The original default-agent chip is one piece of a broader set of shortcut affordances in this branch.
1. Floating workspace shortcuts
- New keybinding actions
floatingWorkspace.maximize/floatingWorkspace.minimize. - A one-shot timestamped "open maximized" intent so the global shortcut can open the floating panel directly into maximized state.
App.tsxhandles the maximize chord when the panel is closed;FloatingTerminalPanelhandles maximize/minimize/rename plus digit-based visible-tab selection.- Under
terminal-first, digit tab-selection is intentionally left to the focused terminal (covered byFloatingTerminalPanel.test.tsx), while panel chrome (rename/maximize/minimize) stays owned by the floating panel.
2. Shortcut UI affordances across tab surfaces
- New
useOptionalShortcutLabelhook returnsnullfor unbound actions (noUnassignedplaceholder), driving conditional shortcut chips. - New Tab
+menu: the configured default agent row (settings.defaultTuiAgent) shows thetab.newAgentchip; no chip fornull/Auto,'blank', unbound, or non-default rows. - Tab/editor context menus and the "Open Markdown…" entry show shortcut chips only when bound.
- Floating window controls show live shortcut hints in tooltips.
3. Tab close affordances + i18n
EditorFileTabCloseButtonwith tooltip + shortcut combo; filename tooltip remains on the focusable tab root so hover and keyboard focus both reveal it.- New
Close tablocale keys translated fores,ja,ko,zh(plusen).
Before / After (default agent chip)
| Before (default = Auto) | After (default = Codex) |
|---|---|
![]() |
![]() |
Review fixes addressed
- A11y (Copilot): restored the filename tooltip trigger onto the focusable tab root (regression where it moved to a non-focusable
<span>); updatedtab-title-tooltip.test.tsxto assert the trigger on the root. - i18n (Copilot): translated the new
Close tabstrings fores/ja/ko/zhinstead of leaving English. - Test guard (CodeRabbit):
QuickLaunchButton.test.tsrowMarkupnow asserts both indices are found before slicing. - Digit-selection (CodeRabbit): evaluated and intentionally not changed —
terminal-firstdeliberately leaves digit tab-switching to the terminal, enforced by an existing test.
Cross-platform
- macOS default binds
tab.newAgentto⌘⌥T; Linux/Windows remain unbound unless the user assigns a binding, in which case the assigned label appears.
Test Plan
- [x]
pnpm exec vitest run --config config/vitest.config.tsforQuickLaunchButton,tab-title-tooltip,EditorFileTab,EditorFileTabContextMenu,FloatingTerminalPanel— all pass - [x]
pnpm run typecheck:web— exit 0 - [x]
pnpm exec oxlint <touched files>— exit 0 - [x] Manual: set a concrete default agent, open the New Tab
+menu, verify the chip appears only beside that agent row (see screenshots)
Ready to review this PR? Stage has broken it down into 9 individual chapters for you:
Chapters generated by Stage for commit 4a0ffbe071c5cd382746ffdb8baa334aebcf81ef on Jun 22, 2026 9:54pm UTC.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 8235a1ef-b060-4788-9f0b-af83544ec38d
📥 Commits
Reviewing files that changed from the base of the PR and between f691aeb584d6370d99d2476916c5572b9f3043ea and 8141bca97760a92e8ab2b47dfd6ec495c19bf9ac.
📒 Files selected for processing (4)
src/renderer/src/components/floating-terminal/FloatingTerminalPanel.test.tsxsrc/renderer/src/components/floating-terminal/FloatingTerminalPanel.tsxsrc/shared/keybindings.test.tssrc/shared/keybindings.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- src/shared/keybindings.test.ts
- src/renderer/src/components/floating-terminal/FloatingTerminalPanel.tsx
- src/renderer/src/components/floating-terminal/FloatingTerminalPanel.test.tsx
📝 Walkthrough
Walkthrough
This PR extends the floating workspace panel with keyboard shortcut support for maximize, minimize, tab rename, and digit-based visible-tab selection. It introduces two new keybinding actions (floatingWorkspace.maximize, floatingWorkspace.minimize), a one-shot timestamped intent mechanism so the panel can open directly into maximized state when triggered by the global shortcut, and a corresponding handler in App.tsx. FloatingTerminalPanel gains a floating-chrome shortcut matcher and action dispatcher for these new actions, alongside a visibleFloatingTabOrder filter for index-based tab switching. Separately, a new nullable useOptionalShortcutLabel hook drives conditional shortcut hints in tooltips and context menus across tab bar components including SortableTab, EditorFileTabCloseButton, SortableTabContextMenu, EditorFileTabContextMenu, TabBar, and QuickLaunchButton. English, Spanish, Japanese, Korean, and Chinese locales are updated with new "Close tab" translations.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | ⚠️ Warning | Docstring coverage is 6.67% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title accurately captures the main scope: floating workspace shortcuts and tab shortcut UI affordances are the core changes across multiple files. |
| Description check | ✅ Passed | The description covers all required template sections with substantial content: Summary explains the user-visible changes clearly, Screenshots are provided with before/after comparisons, Testing includes all required checks and test coverage, AI Review Report documents cross-platform considerations and fixes addressed, Security Audit and Notes sections are present with relevant details. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
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.
Comment @coderabbitai help to get the list of available commands.
this is a great feature. will land it once you have it ready
ty! I just marked it ready for review
Addressed in 4a0ffbe07:
- Fixed tooltip trigger a11y (back on focusable tab root + test asserts root)
- Translated
Close tablocales (es/ja/ko/zh) - Added
rowMarkupguards - Updated title/body to full scope
- Left terminal-first digit selection unchanged; CodeRabbit withdrew
- No new actionable comments since ready (only docstring-coverage warning)

