Skip to content

fix(worktree): unify session workspace lifecycle#489

Merged
Harry19081 merged 4 commits into
developfrom
junyu/audit-worktree-data-flow
Jul 22, 2026
Merged

fix(worktree): unify session workspace lifecycle#489
Harry19081 merged 4 commits into
developfrom
junyu/audit-worktree-data-flow

Conversation

@beruro

@beruro beruro commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • model session workspace launch as three explicit modes: local, create isolated worktree from an optional base ref, or reuse a registered linked worktree
  • keep the TypeScript/Zod/Rust/CLI contract in parity and return authoritative worktree path, checkout branch, and base ref
  • scope UI selection by repository, reject stale async results, and preserve existing-worktree paths from the picker through launch
  • validate reused worktrees before persistence and distinguish borrowed checkouts from session-owned worktrees during merge, discard, rollback, and deletion
  • bound setup commands and diff/source caches; isolate GitHub source data by endpoint, connection, credential source, username, and repository
  • include architecture and frontend UI audit reports; no new visual styling or layout was introduced

Verification

  • cargo check -p org2
  • cargo test -p git worktree --lib — 34 passed
  • cargo test -p agent_core workspace_launch --lib — 4 passed
  • targeted Vitest suite — 4 files, 65 tests passed
  • ESLint on all changed TypeScript/TSX files
  • git diff --check

Known verification limits

  • full TypeScript typecheck still reports the pre-existing ContextInfoButton.tsx:468 string | undefined error; that file is unchanged from develop
  • the new git_api cache-cap unit test is present, but the crate's macOS lib-test target is blocked by an existing unconditional import of a Windows-only helper; production cargo check passes
  • no rendered Tauri E2E was run

UI audit

  • 2 pre-existing fix candidates, deferred to a dedicated UI cleanup
  • 19 keep-with-reason findings
  • 3 systematic abstraction candidates

@Harry19081
Harry19081 merged commit 24e6325 into develop Jul 22, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants