* WIP: Changes before auto-review fixes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add custom title support for terminal panes
Users can set a custom title on individual terminal panes via the
right-click context menu ("Set Title...") or by clicking an existing
title. Titles display as a minimal floating label at the top of each
pane with inline editing (Enter to save, Escape to cancel). An X
button on hover removes the title.
Titles persist across restarts via titlesByLeafId in
TerminalLayoutSnapshot, piggybacking on the existing session:set flow.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: address review findings for pane title feature
- Guard rename input against double-submit on Enter/Escape + blur race
- Memoize persistLayoutSnapshot with useCallback to prevent keyboard
listener re-registration on every render
- Eagerly update paneTitlesRef in onPaneClosed so persistLayoutSnapshot
sees correct data before React flushes state
- Document portal rendering's implicit dependency on paneTitles state
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: write pane titles in shutdown snapshot even when buffers are empty
captureBuffers had an early return when no terminal scrollback content
existed, which skipped writing titlesByLeafId to the layout snapshot.
This caused titles to be lost on restart for fresh or cleared panes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: remove design doc from PR
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add consistent gaps between worktree cards
Use TanStack Virtual's built-in `gap` option (8px) instead of padding
on the wrapper div. The virtualizer accounts for the gap directly in
its position calculations, guaranteeing consistent spacing between
cards regardless of estimation/measurement mismatches.
* test: update estimate tests for virtualizer gap change
* feat: auto-reveal active file in explorer on tab switch
Adds useFileExplorerAutoReveal hook that scrolls the file explorer to
show the active editor file when switching tabs, mirroring VS Code's
explorer.autoReveal behavior. Files already visible in the tree get
scrolled to directly; files with collapsed ancestors trigger the reveal
machinery with flash disabled to avoid visual noise.
* refactor: extract file explorer handlers to fix max-lines lint rule
Move handleClick, handleDoubleClick, and handleWheelCapture into a
dedicated useFileExplorerHandlers hook to bring FileExplorer.tsx under
the 400-line limit.
* feat: add unified TabsSlice and tab bar UX improvements
Introduce content-agnostic Tab/TabGroup model (Step 1 of unified tabs
migration). TabsSlice coexists alongside legacy TerminalSlice/EditorSlice
and provides unified CRUD, neighbor selection, preview replacement, pin
support, and session hydration from both legacy and unified formats.
Also fixes several tab bar UX issues:
- Tab bar always visible (even with 1 tab)
- New terminal tabs appear at end of tab bar, not index 0
- Closing last terminal with editor files open switches to editor view
instead of deactivating the worktree
- New terminal tabs receive focus immediately
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: extract tabs-helpers, tabs-hydration, and reconcile-order modules
Split tabs.ts (503 countable lines) and useTerminalTabs.ts (325 countable
lines) to stay under the max-lines lint limit without eslint-disable:
- tabs-helpers.ts: pure lookup/update functions + generic patchTab helper
- tabs-hydration.ts: session hydration for unified and legacy formats
- reconcile-order.ts: shared tab order reconciliation (was duplicated in
TabBar.tsx, useTerminalTabs unifiedTabs memo, handleNewTab, and
handleCloseTabsToRight)
Includes tests for all three extracted modules (29 new tests).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: move tab bar into the titlebar row
Render the TabBar inside the titlebar via a React portal, sharing the
same row as the "Orca" title. The left section of the titlebar matches
the sidebar width so tabs start exactly where the sidebar ends.
This saves ~36px of vertical space by eliminating the separate tab bar
row. Empty space after tabs remains window-draggable; individual tabs
and the "+" button opt out with -webkit-app-region: no-drag.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: prevent middle-click paste when closing tabs
Close tabs on auxclick instead of mousedown for middle-click. Closing on
mousedown removed the tab element before mouseup fired, causing the
mouseup to fall through to the terminal canvas and trigger an X11
primary selection paste on Linux.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: extract terminal tab actions to fix lint errors
Memoize `tabs` and `worktreeFiles` to fix useMemo unstable dependency
warnings. Extract action callbacks (close, activate, create, etc.) into
terminal-tab-actions.ts to bring useTerminalTabs.ts under the 300-line
max-lines limit.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Reposition the star button below the shortcuts section at the page
bottom. Hide it entirely once the user has both added a repo and
starred the project, so it doesn't distract returning users.
* fix(renderer): fix unescaped quote lint error in GeneralPane
* refactor: replace allowPrerelease workaround with generic feed URL
Use electron-updater's generic provider pointed at GitHub's
/releases/latest/download/ so the manifest always comes from the latest
stable release. This eliminates the client-side RC filtering, the GitHub
releases API fallback, and the manual-download path entirely.
Persist edit-mode files in the workspace session so they are restored
on restart. Diffs and conflict views are intentionally excluded as they
depend on transient git state.
* fix: fall back to stable release when electron-updater picks an RC
When the latest GitHub release is an RC, electron-updater (with
allowPrerelease enabled) reports it as available and never considers
older stable releases. Previously the code simply rejected the RC and
sent not-available, silently hiding real stable updates.
Now the update-available handler calls findFallbackReleaseVersion()
when it detects a prerelease, which queries the GitHub releases API
(filtering out prereleases/drafts) to find the newest stable version
newer than what's running and offers it as a manual download.
* fix: persist check timestamp when RC fallback fetch fails
The .catch path in the update-available RC handler was missing
recordCompletedUpdateCheck(), which meant a failed GitHub API call
during fallback would not persist the check timestamp. On next app
launch the interval check could fire immediately instead of waiting
the full 36 hours.
* feat: improve terminal compatibility with default fonts across platforms
Add cross-platform monospace font fallback chain (SF Mono, Menlo, Monaco,
Cascadia Mono, Consolas, DejaVu Sans Mono, Liberation Mono) so the terminal
renders correctly on macOS, Windows, and Linux out of the box.
- Platform-aware default font in settings (SF Mono / Cascadia Mono / DejaVu)
- buildFontFamily deduplicates user font against full fallback chain
- Error handling for pty spawn failures with user-facing error banner
- Zero-dimension diagnostic when terminal container has no layout
- WebGL context loss / unavailability logging for debugging
* feat: improve terminal font fallback and pty error handling
- Add cross-platform terminal font fallbacks
- Surface pty spawn errors to terminal UI
- Fix max-lines eslint error in TerminalPane
- Fix curly braces eslint error in constants.ts
Without this, a failed restart is a silent no-op. Now all three
call sites (settings pane, auto-restart, and "Restart Now" toast
action) surface the failure to the user and reset autoRestartAfterDownload
to avoid a stuck state.
Move editor autosave/save-queue logic out of EditorPanel into a
standalone controller that survives tab switches without keeping
the full editor UI mounted. Add updater lifecycle events so
beforeunload guards step aside during quitAndInstall, preventing
stale dirty-file prompts from blocking app restarts.
* feat: save dirty editor files before auto-update quitAndInstall
Dispatch a custom event from the preload quitAndInstall to flush unsaved
editor buffers before Electron's quitAndInstall bypasses the normal close
sequence. The EditorPanel claims the event, saves all dirty files via the
existing queueSave path, and resolves/rejects so the updater knows whether
it is safe to proceed.
* fix: address review findings
- Wrap save-before-update in try/catch so a save failure never silently
prevents the update from installing
- Move detail.claim() inside try/catch to prevent promise hang on
unexpected errors
- Add duplicate dirty tab detection to reject when the same file is
dirty in multiple tabs (prevents silent write races)
- Cap module-scoped caches (combinedDiffViewStateCache, combinedDiffScrollTopCache)
at 20 entries with LRU eviction to prevent unbounded memory growth
- Promote generationRef to useState for use in React key prop so key changes
are properly tracked by React's rendering cycle
- Show user-friendly guidance instead of raw git stderr when worktree
deletion fails due to changed files, directing users to Force Delete.
- Extract toast message logic to reusable getDeleteWorktreeToastCopy
function with comprehensive test coverage.