Reset defaultBaseRef to null on repo change so effectiveBaseRef becomes
falsy until the IPC resolves, preventing branch compare from firing with
a stale cross-repo value. Also fix loading→error→loading flicker by only
resetting to loading state on first request or when base ref changes.
* refactor: enable split groups
* Fix split groups terminal host rollout
* refactor: remove split groups from add-tab menu
* refactor: dark-launch split groups with correctness fixes
* refactor: eliminate useEffect anti-patterns across 5 components
- MonacoEditor, RichMarkdownEditor: assign callback/prop refs directly
during render instead of via useEffect, so ProseMirror and Monaco
handlers always read the current closure rather than a one-render-
stale copy.
- SettingsFormControls (FontAutocomplete): replace useEffect that reset
highlightedIndex on filteredSuggestions/open changes with the
"adjusting state during render" pattern (track prevOpen /
prevFilteredSuggestions), so the correct item is highlighted on the
same paint as the dropdown opens or the filter updates.
- ChecksPanel: replace useEffect that reset 5 local state fields on
activeWorktreeId change with the "adjusting during render" pattern
(track prevActiveWorktreeId), so stale title/loading UI from the
previous worktree is cleared before the first paint of the new one.
- SshPassphraseDialog: split one useEffect that both reset form state
and focused the input into (a) during-render state reset and (b) a
focused DOM-only useEffect, so the cleared input is visible
immediately rather than after a post-paint effect flush.
* fix: resync font autocomplete highlight on value change
The debounced onUpdate serialization feeds back through the content prop,
and if the user types between the debounce firing and the useEffect
running, the stale prop triggers setContent — resetting the cursor.
Skip the destructive setContent when the content prop matches our own
last serialization (lastCommittedMarkdownRef).
compareVersions returns 0 for both genuinely equal versions and
unparseable strings. In the localIndex === -1 fallback path, skipping
on >= 0 (instead of just > 0) avoids showing stale rich cards when
the version relationship is ambiguous.
Show rich changelog entries at the user's current version (they may not
have seen the card yet). When the local version isn't in the changelog
JSON, use semver comparison instead of assuming the user is very old —
this avoids showing stale cards to users on newer patch releases.
* fix: guard WorktreeList getItemKey against stale virtualizer cache entries
When rows shrink (group collapse, worktree removal) while PR/issue data
arrives asynchronously, the virtualizer's elementsCache can hold stale
entries whose data-index exceeds the new rows length. measureElement
calls getItemKey for those stale indices, causing "Cannot read properties
of undefined (reading 'type')". Add a null guard matching the pattern
already used by FileExplorer and Search virtualizers.
* fix: avoid stale worktree card remeasurement
When rows shrink (group collapse, worktree removal) while PR/issue data
arrives asynchronously, the virtualizer's elementsCache can hold stale
entries whose data-index exceeds the new rows length. measureElement
calls getItemKey for those stale indices, causing "Cannot read properties
of undefined (reading 'type')". Add a null guard matching the pattern
already used by FileExplorer and Search virtualizers.
- Snap selection to first result when search query changes instead of
keeping a stale mid-list selection
- Add 150ms debounce on search to reduce result list reshuffling
- Scroll list to top on query change
- Remove green highlight on current worktree row (Current badge remains)
- Remove primary-branch promotion sort that caused jumpy reordering
* feat: scope terminal shell history per worktree
Each worktree gets its own HISTFILE so ArrowUp only surfaces commands
from the current worktree. Integrates with the new LocalPtyProvider
architecture: history env injection runs after buildSpawnEnv but before
spawnShellWithFallback, and onBeforeFallbackSpawn keeps HISTFILE in
sync when the shell falls back.
* fix: align preload type declaration with implementation
Add missing command field to PtyApi.spawn in index.d.ts to match
the runtime index.ts signature, fixing TS2769 overload conflict.
* chore: remove terminal-history-scope-design.md from tracked files
* fix: mock terminal-history in worktrees test
The deleteWorktreeHistoryDir import pulls in electron's app module.
Add a vi.mock so the test doesn't hit the real electron export.
Add support for dragging files from the OS into the file explorer sidebar.
Files are copied (not moved) into the target directory within the worktree.
- Preload detects native file drops via capture-phase listener and resolves
the drop target (editor, terminal, or file-explorer) from DOM attributes
- New IPC handler `fs:importExternalPaths` copies files/directories with
symlink pre-scanning, path-traversal protection, and dedup on conflict
- FileExplorer tracks native drag state separately from internal drag state
to show correct drop highlights without interfering with tree reordering
- FileExplorerRow expands directories on hover during native drags
- useFileExplorerImport hook subscribes to preload IPC events and drives
the import → refresh → reveal pipeline
Includes review fixes:
- Clear nativeDropTargetDir on row drag-leave to prevent stale highlights
- Clear native drag state on early return in useFileExplorerImport
- Extract row drag logic to useFileExplorerRowDrag hook
- Split import tests into dedicated filesystem-import.test.ts
- Use T[] syntax instead of Array<T> per lint rules
- Use ternary expressions for simple if/else per lint rules