- Remove branch badge and terminal toggle from ChatView header
- Keep GitActionsControl in the header action area
- Adjust GitActionsControl button styles to emphasize completed action state
Co-authored-by: codex <[email protected]>
- Add `gpt-5.3-codex-spark` with medium reasoning effort to commit/PR generation calls
- Inject process runner into `CodexTextGenerator` and add tests for model selection and failure passthrough
- Update PR modal to use status/result PR URLs and keep a single Open PR action path
- Add an `Open PR` button in the result footer and handle link-open errors
- Populate the commit message field with the generated subject when available
- Refine disabled/selected action option styling while git actions are running
- add desktop IPC handler to validate and open http(s) URLs via Electron shell
- expose `shell.openExternal` in shared NativeApi contracts and web bridge
- route Git PR opening and native API reads through the new `useNativeApi` hook
Co-authored-by: codex <[email protected]>
- Split Git actions into context-aware Commit, Push, and PR menu items
- Add modal action selection with clearer availability and disabled-state guidance
- Migrate git status and immediate actions to React Query and add a custom GitHub icon
Co-authored-by: codex <[email protected]>
- Add a Git action confirmation modal with live commit/push/PR progress states
- Accept optional `commitMessage` input and skip AI message generation when provided
- Expand server and contracts tests for custom commit message handling
Co-authored-by: codex <[email protected]>
- include open PR metadata in git status with graceful `gh` failure handling
- centralize git command execution in `GitCoreService` via `runProcess` with truncation support
- add PTY spawn-helper permission fixes, shell fallback retries, and tests for new behavior
Worktrees in /tmp or other ephemeral locations get cleaned by the OS
but remain in git's worktree list as "prunable". These stale entries
caused branches to show a worktree label pointing at a non-existent
directory, leading to broken state when selected.
Now validates each worktree path with existsSync before including it
in the branch→worktreePath map.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
branchesQuery.data is undefined while loading, so isRepo defaulted to
false — briefly showing the init button even for worktrees. Now defaults
to true while loading (only shows init when the query actually returns
isRepo: false).
Co-Authored-By: Claude Opus 4.6 <[email protected]>
When in a secondary worktree and selecting a branch checked out in the
main worktree (e.g. main), the code skipped the worktree redirect
(because worktreePath === project.cwd) and tried git checkout, which
git rejected.
Now any branch with a worktreePath is handled as a redirect — main
worktree redirects to local (worktreePath=null), secondary worktrees
redirect to their path.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
When selecting a branch that lives in a different worktree, the store
updated the thread's worktreePath but the running session kept its
original cwd. The agent continued operating in the old directory.
- SET_THREAD_BRANCH now clears the session when worktreePath changes
- BranchToolbar stops the server-side session before dispatching the
branch change, so the next message creates a fresh session with the
correct cwd
Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Add worktreePath to gitBranchSchema and populate from `git worktree list --porcelain`
- Redirect to existing worktree when selecting a branch that's already checked out
(instead of failing with "already used by worktree")
- Distinguish main worktree (project cwd) from secondary worktrees in selection logic
- Fix toolbar to show three states: Local, Worktree (existing), New worktree (pending)
- Add explicit protocol/host to Vite HMR config for reliable Electron WebSocket
- Auto-open DevTools in dev mode for HMR debugging
Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Add @tanstack/react-query and wire up QueryClientProvider in App.tsx
- Refactor BranchToolbar to use useQuery for branch listing and
useMutation for checkout, create branch, and git init, replacing
manual useState/useCallback/useEffect async patterns
- Fix branch sync effect and ChatView envMode effect to use stable
primitive deps instead of full object references, preventing
unnecessary re-runs on unrelated store dispatches
Co-Authored-By: Claude Opus 4.6 <[email protected]>
- ChatView: change useEffect dependency from [activeThread] (new object
ref every dispatch) to [activeThread?.id, activeThread?.worktreePath]
so envMode is no longer silently reset to "local" on unrelated store
dispatches, making the worktree code path reachable.
- git.ts: replace shell command strings (runTerminalCommand + single-quote
escaping) with a runGit helper that spawns git directly via argv array.
Eliminates Windows quoting issues and the command injection surface.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Adds right-click → Delete on sidebar thread items using Electron's
native Menu.popup() when running in desktop, with an imperative DOM
fallback for browser environments. The contextMenu.show() API is
generic so the returned item id is type-safe based on the items passed.
Co-Authored-By: Claude Haiku 4.5 <[email protected]>
- Switch from turbo watch to turbo run --parallel for dev scripts
- Simplify contracts exports to use ./src/index.ts for types directly
- Add --watch --clean to contracts dev script
- Root dev task depends on contracts#build, is persistent
- Revert typecheck to depend on ^typecheck (contracts types from source)
- Remove redundant server dev task override
- Desktop dev depends only on t3#build (contracts implied)
- Uncomment server dist wait in dev-electron.mjs
Co-Authored-By: Claude Opus 4.6 <[email protected]>
tsdown escalates warnings to errors when CI=true. Adding
inlineOnly: false suppresses the bundled-dependency warning
since we intentionally inline contracts and zod.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
tsdown v0.20.3 errors when it detects undeclared dependencies in the
bundle. Since @t3tools/contracts (already in noExternal) transitively
pulls in zod, explicitly declare it to avoid the build failure.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Remove --filter=t3 from dev:desktop since electron spawns its own
server from dist/index.mjs (running server via turbo would conflict)
- Add t3#build and contracts#build as dependencies of desktop dev task
so the server is built before electron starts
Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Point @t3tools/contracts type exports to ./src/index.ts instead of
generated .d.cts/.d.mts files that only exist after build
- Remove unused useGitState.ts that imported missing @tanstack/react-query
Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Move BranchToolbar below the chat input box to match Codex app layout
- Change worktree path to ~/.t3code/worktrees/{repo}/{branch}
- Split desktop tsdown config into separate main/preload builds to prevent
code-splitting from leaking node:os into the sandboxed preload script
- Migrate turbo scripts to turbo watch, add desktop start/smoke-test tasks
- Update server output to .mjs, add CJS format, remove tsx dependency
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Verifies that querying branches from a worktree directory correctly
reports the worktree's branch as current, while the main repo still
shows its own branch — the assumption the BranchToolbar fix relies on.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Use worktree path instead of project cwd for git branch queries so
worktree threads correctly report their branch as current. Also update
error banner to use semantic color tokens for light mode support.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Both openInEditor and the Cmd+O shortcut now use the thread's
worktreePath when available instead of always using activeProject.cwd.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Move git operations (listGitBranches, checkoutGitBranch, createGitWorktree,
etc.) from main.ts into git.ts for testability. Add 20 integration tests
that run real git commands against temporary repos covering checkout,
branch creation, worktrees, conflicts, and thread-switching flows.
Also fix: branch checkout now runs regardless of envMode, worktree
creation passes cwd to ensureSession to avoid stale closure bug, and
current branch auto-fills on new threads.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Replace hardcoded dark-mode colors with theme-aware semantic classes
(bg-popover, text-foreground, bg-accent, etc.) so the branch picker
works in both light and dark mode. Detect the real default branch via
git symbolic-ref and show a "default" label (with "current" taking
precedence when both apply).
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add non-null assertion for activeProject in worktree creation path
(guarded by earlier check) and add missing branch/worktreePath to
test fixture.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Allows users to right-click "+ New thread" to create threads from specific git branches, with optional worktree creation for isolated work. Includes branch sorting (current/default first), graceful handling of non-git repos, and ability to initialize git repos.
- New git IPC contract (listBranches, createWorktree, removeWorktree, init)
- Branch context menu with worktree sub-option in Sidebar
- Thread model extended with branch/worktreePath fields
- Session cwd uses worktree path when available
- Branch sorting: current > main/master > alphabetical
Co-Authored-By: Claude Haiku 4.5 <[email protected]>