Skip to content

feat(tab): searchable new tab launcher palette on Cmd+T and add tab - #414

Merged
simion merged 2 commits into
simion:mainfrom
nvkvin:feature/tab-quick-search
Oct 20, 2026
Merged

simion merged 2 commits into
simion:mainfrom
nvkvin:feature/tab-quick-search

Conversation

@nvkvin

@nvkvin nvkvin commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

What

Replaces the TabBar and PaneHeader dropdown "+" menu with a searchable new-tab launcher palette (NewTabPalette), triggered by Cmd+T or by clicking the + button in either the TabBar or any split pane header.

• Provides instant search filtering across default shell, scratchpad tabs (Scratchpad, Scratchpad with prompt), installed agents (Claude, Gemini, Codex, OpenCode, Amp, Qwen, etc.), and recently closed tabs.
• Supports running arbitrary commands directly in the new shell tab by typing a query not matching predefined items, executing the command in the shell upon Enter.
• Supports split panes seamlessly: opening from a split pane header or shortcut targets the active pane leaf for new shells, scratchpads, and resumed closed tabs.
• Supports keyboard navigation (Up, Down, Enter, Escape) and restores previous focus cleanly on close.
• Localized in English and Simplified Chinese (zh-CN).

How it works

• NewTabPalette renders via Radix Dialog with an unstyled input.
Radix autofocus handling captures the previous active element to restore focus upon dismissal.
• Passing custom command queries sends initialInput to addPaneTab on a cli: "shell" tab.
TerminalPane writes initialInput (terminated with \r) to the PTY on the first prompt burst, matching the AuxTerminal pattern.
• resumeClosedTab and openScratchTab now accept an optional paneId parameter to direct the created tab into the originating split pane.
• TabBar and PaneHeader now invoke openNewTabPalette({ paneId }) rather than mounting a Radix DropdownMenu.
• Updated e2e/helpers.ts and e2e/specs/tabs-layout.e2e.ts to accommodate the palette dialog alongside traditional menu overlays.

Testing

• Unit tests: NewTabPalette.test.ts (14 cases covering filtering, command action fallback, selection, and paneId propagation), CommandPalette.coverage.test.ts.
• Full unit test suite passed: npm test (215 test files, 3,450 tests passed).
• E2E typecheck passed: npm run typecheck:e2e (0 errors).
• Production build passed: npm run build cleanly compiled.
• Rust tests passed: cargo test --manifest-path src-tauri/Cargo.toml (1,419 tests passed).
• Manual test: exercised by hand in local development build.
Verified Cmd+T and the + button open the searchable new tab launcher palette.
Verified filtering, keyboard navigation (Up/Down/Enter/Escape), scratchpad tabs, recently closed tab restore into targeted split pane, and typing arbitrary commands (e.g. echo some text) to launch and run them interactively in the terminal.

@simion

simion commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Filtering, the Cmd+T wiring, and the new run-arbitrary-command path all check out with no blocking bugs. One regression: the new palette drops the old hasProject guard on the project scratchpad entry, so a project-less task can create an orphaned project_ scratchpad. Thanks for the contribution!

— Simion's agent here, he'll take a look at this shortly.

…o project

Omit the project scratchpad launcher entry when task has no project_id, preventing project-less tasks from creating orphaned project_ scratchpads.

Refs simion#414
@nvkvin

nvkvin commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Pushed commit ea9b07f9 to guard the project scratchpad launcher option with hasProject = !!task?.project_id.
Tasks without an associated project now omit the project scratchpad entry, matching NewTabMenuItems.
Added unit tests covering both the project-less and project-associated cases in NewTabPalette.test.ts.

@simion simion left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Clean fix, hasProject guard restored correctly. Thanks for the contribution!

— Simion's agent here, he'll take a look at this shortly.

@simion
simion merged commit a6d8832 into simion:main Oct 20, 2026
6 of 7 checks passed
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.

2 participants