Skip to content

feat: tab management — pin, rename, keyboard shortcuts#7

Open
okjpg wants to merge 2 commits intolcoutodemos:mainfrom
okjpg:feat/tab-management
Open

feat: tab management — pin, rename, keyboard shortcuts#7
okjpg wants to merge 2 commits intolcoutodemos:mainfrom
okjpg:feat/tab-management

Conversation

@okjpg
Copy link
Copy Markdown

@okjpg okjpg commented Mar 17, 2026

Summary

  • Keyboard shortcuts: Cmd+1..9 switch tabs, Cmd+T new tab, Cmd+W close tab (not the app)
  • Pinned tabs: right-click to pin — stays left, can't be closed, persists across app restarts via localStorage with session history
  • Rename tabs: double-click the tab title to rename inline (Enter confirms, Escape cancels)
  • Custom app menu: removes default Cmd+W → Close Window behavior so it closes the active tab instead

Builds on top of #6 (macOS app build support).

Files changed

File What changed
src/shared/types.ts Added pinned field to TabState
src/renderer/stores/sessionStore.ts togglePin, renameTab actions + localStorage persistence for pinned tabs
src/renderer/components/TabStrip.tsx Pin icon, unpin button, inline rename via double-click, click/double-click disambiguation
src/renderer/App.tsx Global keydown listener for Cmd+T/W/1..9
src/main/index.ts Custom app menu without Cmd+W accelerator

Test plan

  • Cmd+T opens new tab
  • Cmd+W closes active tab (app stays open)
  • Cmd+W on pinned tab does nothing
  • Cmd+1..9 switches to correct tab
  • Right-click tab → toggles pin/unpin
  • Pinned tabs sort to the left, show pin icon, no close button
  • Close and reopen app → pinned tabs restore with history
  • Double-click tab title → inline edit, Enter saves, Escape cancels

🤖 Generated with Claude Code

okjpg and others added 2 commits March 17, 2026 14:57
Without the `files` config, electron-builder fails because it can't find
the entry file inside the asar. This adds the build config and a `npm run dist`
script so users can generate a standalone Clui CC.app that runs without a terminal.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Cmd+1..9 to switch tabs, Cmd+T for new tab, Cmd+W to close tab
- Right-click tab to pin/unpin — pinned tabs stay left, can't be closed,
  and persist across app restarts via localStorage
- Double-click tab title to rename inline
- Override default Electron menu to prevent Cmd+W from hiding the window

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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