Skip to content

1.0.22

Choose a tag to compare

@morapelker morapelker released this 18 Feb 10:11
· 3184 commits to main since this release

What's Changed

feat: add Pull Requests tab to branch picker dialog (#34)

  • New git:listPRs IPC handler — Uses gh pr list CLI to fetch open pull requests for a project, with structured error handling for missing CLI, non-GitHub repos, and auth issues. Includes git fetch origin to ensure PR branches are available locally for worktree creation.
  • Preload bridge & types — Exposes window.gitOps.listPRs() with full TypeScript declarations in index.d.ts for the PR data shape (number, title, author, headRefName).
  • Tabbed BranchPickerDialog — Refactors the dialog from a single branch list into a two-tab layout (Branches / PRs) with a custom tab bar using Tailwind styles. PRs are lazy-loaded only when the tab is activated.
  • PR filtering & selection — Filter pull requests by title, branch name, or #number. Selecting a PR passes its headRefName to the existing onSelect callback, creating a workspace from the PR branch.
  • UI polish — Updated dialog title/description, tab-aware search placeholder, and per-tab footer counts with filter context.

Add tool call debug inspector and fix context window calculation (#32)

  • Tool Call Debug Inspector: Added a right-click context menu on all tool cards that opens a modal for inspecting raw tool call data (input JSON, output text, status, duration). Includes tabbed input/output view with copy-to-clipboard support. New components: ToolCallDebugModal and ToolCallContextMenu.
  • Context Window Calculation Fix: Corrected the context usage calculation to only count prompt tokens (input + cacheRead + cacheWrite). Output and reasoning tokens are generated tokens and do not occupy the context window — they were previously incorrectly included in the total, inflating the reported usage percentage.
  • ContextIndicator UI Improvements: Updated tooltip to separate "generated" tokens (output, reasoning) into a distinct section labeled "Generated (not in context)", renamed heading from "Context Usage" to "Context Window", and widened tooltip.
  • Test Updates: Updated all context calculation tests across phase-6/session-3 and phase-12/session-1 to reflect the corrected formula, adjusted test input values for threshold tests, and added a new dedicated test for verifying output/reasoning exclusion.

Extract autoRenameWorktreeBranch helper and rename connected worktree branches (#31)

  • Extracted shared autoRenameWorktreeBranch() helper into git-service.ts — consolidates the duplicated auto-rename logic that previously lived inline in both opencode-service.ts and claude-code-implementer.ts into a single, well-typed function with clear AutoRenameParams / AutoRenameResult interfaces
  • Extracted isAutoNamedBranch() utility into git-service.ts — replaces three identical inline checks (in worktree-handlers.ts, opencode-service.ts, and claude-code-implementer.ts) that matched breed/city names with a single reusable function
  • Added connection-member branch renaming — when a session title is generated, all worktrees belonging to the same connection (not just the session's direct worktree) now get their auto-named branches renamed to match the session title, with collision suffixing (-2, -3, …) handled automatically

Files changed

File Change
src/main/services/git-service.ts Added isAutoNamedBranch(), AutoRenameParams, AutoRenameResult, and autoRenameWorktreeBranch()
src/main/services/opencode-service.ts Replaced ~80 lines of inline rename logic with calls to the shared helper; added connection-member rename loop
src/main/services/claude-code-implementer.ts Same refactor — replaced inline logic with shared helper; added connection-member rename loop
src/main/ipc/worktree-handlers.ts Replaced inline auto-name check with isAutoNamedBranch() import
test/claude-code-title-integration.test.ts Updated mocks to use autoRenameWorktreeBranch instead of individual branchExists/renameBranch
test/phase-11/session-12/integration-verification.test.ts Updated assertions to reflect shared helper usage
test/phase-11/session-4/auto-rename-branch.test.ts Updated assertions to point at git-service.ts where collision/failure logic now lives

Replace connect dialog with inline sidebar connection mode (#30)

  • Replaces the modal ConnectDialog with an inline "connection mode" directly in the left sidebar, allowing users to select worktrees via checkboxes without leaving the project tree
  • Adds connection mode state to useConnectionStore (connectionModeActive, connectionModeSourceWorktreeId, connectionModeSelectedIds, connectionModeSubmitting) with actions to enter, exit, toggle, and finalize connections
  • Updates LeftSidebar with a connection mode header bar showing a selection count, Cancel/Connect buttons, Escape key listener, and auto-expansion of all projects on mode entry
  • Simplifies WorktreeItem by removing the ConnectDialog import and rendering a checkbox-based selection UI when connection mode is active, with the source worktree pre-selected and locked
  • Updates ProjectItem to disable drag-and-drop, hide the "Create Worktree" button, and suppress the context menu during connection mode
  • Hides ConnectionList when connection mode is active to reduce visual clutter
  • Adds expandAllProjects action to useProjectStore so all project trees are visible for selection