Skip to content

1.0.49

Choose a tag to compare

@morapelker morapelker released this 02 Mar 16:10
· 2859 commits to main since this release

What's Changed

feat: per-provider default model storage (#88)

Adds per-provider (per-SDK) default model storage so each AI agent SDK (OpenCode, Claude Code, Codex, etc.) remembers its own default model independently.

Problem: Previously, model selection was stored as a single global default. When switching between different agent SDKs (e.g., OpenCode → Claude Code → Codex), the last-used model would leak across SDKs. For example, selecting a Codex model in one session would cause that model to appear as the default for Claude Code sessions in the same worktree.

Solution: Introduce a selectedModelByProvider map in the settings store, keyed by SDK name, so each provider retains its own default model.

Background follow-up dispatch and session init abort guards (#87)

  • Background follow-up dispatching in global listener: When a background (non-active) session goes idle and has queued follow-up messages, the global listener now automatically dispatches the next follow-up prompt. This ensures follow-up chains survive tab switches and continue executing without requiring the session tab to be active. Includes deduplication guards (backgroundFollowUpDispatchingRef / deferredIdleWhileDispatchingRef) to prevent double-dispatch from rapid idle events.

  • Session init abort guards in SessionView: Added a shouldAbortInit() check throughout the entire async initialization chain in SessionView. Every await point now verifies the effect is still active and the stream generation hasn't changed, preventing stale async operations from clobbering state when users rapidly switch sessions/tabs during initialization.

  • Pending message requeue on failure: When auto-sending a pending message (e.g., code review prompt) fails, the message is now requeued via requeuePendingMessage() instead of being silently dropped. Similarly, follow-up messages that fail to send are requeued at the front of the queue via requeueFollowUpMessageFront() so they can be retried.

  • Extracted helper functions in global listener: Refactored the idle-handler in useOpenCodeGlobalListener by extracting resolvePromptDispatchContext() (resolves worktree path + OpenCode session ID from stores and DB, preferring materialized DB session IDs over pending:: prefixed ones), resolvePromptDispatchContextFromStores(), and markBackgroundSessionCompleted() into standalone functions for clarity and testability.

  • Session store API additions: Added dequeuePendingMessage(), requeuePendingMessage(), dequeueFollowUpMessage(), and requeueFollowUpMessageFront() to the session store. The existing consumePendingMessage() and consumeFollowUpMessage() methods are preserved as aliases for backward compatibility.

  • Comprehensive test coverage: Added new test file global-listener-follow-up-dispatch.test.ts covering background follow-up dispatch scenarios (success, failure with requeue, duplicate idle dedup, connection session paths, DB-preferred session ID resolution). Updated existing tests (global-listener-busy.test.ts, code-review.test.ts) with new store mocks and tests for the new dequeue/requeue methods.

Multiline custom answer input in QuestionPrompt (#86)

  • Converted the custom answer input from a single-line <input> to a multiline <textarea> in QuestionPrompt.tsx, allowing users to enter multi-line responses when providing custom answers to AI questions
  • Added auto-resize behavior using useLayoutEffect that dynamically adjusts the textarea height based on content, capped at 200px max height
  • Added Shift+Enter support for inserting newlines, while plain Enter still submits the answer
  • Updated the custom answer display to use whitespace-pre-wrap and line-clamp-3 so multiline answers render properly (with truncation after 3 lines) when shown as a selected option

Fix auto-focus on rename input fields across all item components (#85)

  • Fixed rename input focus reliability across all item components (ConnectionItem, PinnedList, ProjectItem, WorktreeItem)
  • The rename/edit input fields were not consistently receiving focus when triggered from context menus, because the focus call would fire while the menu was still closing
  • Applied a two-pronged fix in all 5 rename input locations:
    1. Deferred focus via requestAnimationFrame — the useEffect that fires on rename state change now wraps focus() + select() in requestAnimationFrame(), ensuring the call runs after the context menu has fully closed and the input is mounted in the DOM
    2. Added autoFocus prop — as a belt-and-suspenders measure, the input elements now also carry autoFocus so the browser natively attempts focus on mount

Add SDK rate_limit_event logging (#84)

  • Adds explicit logging for rate_limit_event messages received from the Claude Agent SDK in the ClaudeCodeImplementer prompt message stream
  • When a rate_limit_event SDK message is received, it is now logged at info level with the full message payload before the general SDK message logging
  • This provides better observability into rate limiting behavior during AI coding sessions

Fix PlanReadyImplementFab button background for local theme (#83)

  • Fixed transparent background on the "Supercharge Locally" button in the PlanReadyImplementFab component
  • Changed bg-transparent → bg-background so the button picks up the current theme's background color instead of being fully transparent, ensuring proper visual contrast and consistency across all themes

Add branch diff viewer for comparing worktree against any branch (#82)

  • New "Diffs" tab in FileSidebar — adds a BranchDiffView component that lets users select any local or remote branch and see a list of all files that differ between the current worktree and that branch. Includes a searchable branch dropdown (local/remote grouped), file list with git status indicators, auto-refresh on git status changes, and click-to-open Monaco diff view.

  • Branch diff backend (IPC + GitService) — two new IPC channels (git:branchDiffFiles, git:branchFileDiff) backed by GitService.getBranchDiffFiles() and GitService.getBranchFileDiff() methods. Uses git diff --name-status --no-renames <branch> and git diff <branch> -- <file> with branch name validation to prevent command injection.

  • Monaco diff viewer branch comparison mode — extends MonacoDiffView, MonacoDiffToolbar, and MainPane to accept an optional compareBranch prop. When set, the diff viewer fetches the branch ref as the original and the working tree as the modified content. The toolbar shows "vs <branch>" instead of Staged/Unstaged. Hunk action gutters are hidden in branch comparison mode since they don't apply.

  • Store changes — useFileViewerStore gains compareBranch on DiffTab and ActiveDiff types with branch-aware tab keys (diff:<path>:branch:<name>). useGitStore gains selectedDiffBranch (a Map<worktreePath, branchName>) to persist the selected comparison branch per worktree.

  • Ghostty overlay suppression refactor — replaces the boolean ghosttyOverlaySuppressed flag with a stack-based push/pop system (pushGhosttySuppression / popGhosttySuppression) in useLayoutStore. Adds a reusable useGhosttySuppression(key, active) hook used by CommandPalette, FileSearchDialog, SettingsModal, and SessionTabs context menu to correctly suppress/restore the Ghostty terminal overlay when multiple overlapping UI layers are open.

  • Terminal z-index layering fix — TerminalView now reads ghosttyOverlaySuppressed from useLayoutStore and computes effectiveVisible = isVisible && !ghosttyOverlaySuppressed, ensuring the Ghostty surface is hidden when any modal/dialog is open above it.

Fix input field height on worktree navigation (#81)

  • Fixes textarea input height not adjusting correctly when navigating between worktrees with pre-populated drafts in SessionView
  • Replaces useEffect + requestAnimationFrame with useLayoutEffect for the textarea auto-resize logic, ensuring the height is measured and set synchronously before the browser paints
  • Removes the unnecessary requestAnimationFrame wrapper since useLayoutEffect already runs synchronously after DOM mutations