Skip to content

feat(desktop): add Codex thread migration foundation#622

Merged
huntharo merged 21 commits into
mainfrom
feat/thread-profile-migration
Jun 4, 2026
Merged

feat(desktop): add Codex thread migration foundation#622
huntharo merged 21 commits into
mainfrom
feat/thread-profile-migration

Conversation

@huntharo
Copy link
Copy Markdown
Contributor

@huntharo huntharo commented Jun 1, 2026

Summary

  • add shared contracts, IPC/preload/renderer API plumbing for cross-profile Codex thread migration
  • extend the Codex App Server client and backend registry so destination CAS can fork from a source CAS-provided rollout path without PwrAgent reading Codex thread storage
  • add a main-process ThreadMigrationService with captive source CAS clients, grouped source thread listing, fork/validate/archive-last run execution, and a guard that blocks Move before archive when profile-owned worktrees are detected
  • add Settings -> Thread Management for source profile/thread selection and Move/Copy starts

Safety notes

  • Source rollout paths stay main-process-only; the migration picker receives bounded profile/project/thread summaries.
  • Move archives the source only after destination fork and replay validation.
  • Profile-owned worktree Move is currently blocked before fork/archive until the relocation strategy lands.

Validation

  • pnpm --filter @pwragent/shared typecheck && pnpm --filter @pwragent/desktop typecheck
  • pnpm exec vitest run --config vitest.workspace.ts apps/desktop/src/main/tests/thread-migration-service.test.ts apps/desktop/src/main/tests/codex-client.test.ts apps/desktop/src/main/tests/backend-registry.test.ts -t "ThreadMigrationService|forks a Codex thread from a CAS-provided rollout path|passes a CAS-provided source rollout path when forking for migration"
  • pnpm exec vitest run --config vitest.workspace.ts apps/desktop/src/renderer/src/features/settings/tests/settings-screen.test.tsx
  • pnpm lint:codex-storage
  • pnpm lint:colors
  • pnpm lint:boundaries
  • git diff --check

@huntharo huntharo marked this pull request as ready for review June 1, 2026 18:48
@huntharo huntharo force-pushed the feat/thread-profile-migration branch from e82ca48 to 520b12b Compare June 3, 2026 17:13
@huntharo huntharo merged commit 591b13b into main Jun 4, 2026
7 checks passed
@huntharo huntharo deleted the feat/thread-profile-migration branch June 4, 2026 00:03
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.

1 participant