Repository navigation
🗂️ feat: Choose Conversation Checkout Mode - #16679
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The UI can misrepresent an automatic checkout as explicit isolation, omits modes from multi-environment chips, and the new toggle lacks its required default.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds opt-in, per-conversation checkout selection across persistence, execution routing, and the composer UI.
Changes:
- Adds
sourceandisolatedcheckout modes to workspace decisions. - Validates capabilities and routes isolated sessions through conversation worktrees.
- Adds configuration, UI controls, documentation, and focused tests.
| File | Description |
|---|---|
packages/data-schemas/src/schema/defaults.ts |
Persists checkout mode. |
packages/data-schemas/src/schema/defaults.spec.ts |
Tests schema serialization. |
packages/data-schemas/src/methods/conversation.spec.ts |
Tests stale-save preservation. |
packages/data-provider/src/config.ts |
Adds the feature toggle. |
packages/data-provider/src/config.spec.ts |
Tests toggle validation. |
packages/data-provider/src/code/workspace.ts |
Defines checkout modes and validation. |
packages/data-provider/src/code/selection.spec.ts |
Tests selection identity. |
packages/api/src/code/capabilities.ts |
Resolves checkout routing. |
packages/api/src/code/capabilities.spec.ts |
Tests routing and failure behavior. |
packages/api/src/agents/execution.ts |
Preserves checkout selections. |
packages/api/src/agents/execution.spec.ts |
Tests capability stripping. |
docs/workspace-checkouts.md |
Documents setup and semantics. |
client/src/locales/en/translation.json |
Adds checkout labels. |
client/src/hooks/Agents/useCodeWorkspace.ts |
Validates checkout availability. |
client/src/hooks/Agents/__tests__/useCodeWorkspace.test.tsx |
Tests restored selections. |
client/src/components/Chat/Input/CodeWorkspaceMenu.tsx |
Adds checkout controls and chip labels. |
client/src/components/Chat/Input/__tests__/CodeWorkspaceMenu.spec.tsx |
Tests checkout interaction. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a2f253d75
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b2b378c42
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review Please review current PR head cc895af, confirming the exact reviewed commit. Source is now offered independently of isolation. Transition readiness shares the policy/capability validator and requires an explicit mode when predecessor decisions differ. Tests cover unsupported-isolation correction and ambiguous transitions. Please review this lifecycle as a whole. |
|
@codex review Please review final current PR head 1c195a4, confirming this exact reviewed commit. The source audit additionally preserves explicit mode when selecting another repository on the same machine; both modes have regression tests. Review mode continuity across initial selection, payload, persistence, move/recovery and execution, including capability loss and mixed predecessor modes. |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |


Summary
A coding chat currently inherits the worker's checkout policy: conversation-worktree workers always isolate, while other workers use their registered checkout. The owner cannot explicitly choose between shared files and a conversation-owned checkout.
Add a Checkout mode choice under the selected repository in the composer: Isolated worktree or Registered checkout. Save it in the existing conversation decision, preserve it on reload and stale ordinary saves, and show the recorded mode in the workspace chip. The choice is available before the decision is sealed; existing attach/detach transitions remain intact.
Mechanism
No new worker operation, creation-on-render, status poll, database query, or second binding is introduced. An explicit isolation choice fails closed if worker support disappears; it never becomes shared-root execution. Legacy field-less selections keep their current policy. The same canonical selection identity is used for sealing and replay.
Enablement and scope
Opt in with
configSchema.workspaces.allowCheckoutSelection: trueon the attached environment/control plane after all API replicas and clients are updated. Isolation requiresworkspaceInstances: [git_worktree]; a worker's existing conversation-worktree configuration supplies it. Linked-worktree lanes and conversation-worktree provisioning are different worker configurations, not interchangeable modes. See setup and rollout notes.An isolated checkout starts from the worker's admitted Git snapshot; uncommitted source files are not copied.
environment.refremains operator metadata, not a branch switch. Arbitrary base-ref selection and archive/restore are subsequent worker-protocol slices, not implemented here. No live workers were changed.Tests
tsc --noEmitpassed locally. Client, API and data-schemas local typechecks encountered stale compiled workspace dependency types in the reused installation; CI typechecks with rebuilt packages passed on the final head.tsdownbefore a browser audit. This reused installation also lacks@shadcn/lint; no broad dependency repair was performed. Test configuration maps this branch's data-provider source and uses reused external dependencies.Final head:
1c195a4d0a0a9a0ad423a5b6f271d3d2bde1668d. Exact-head review reported no major issues. CI typechecks, package builds, static checks and Lighthouse passed. Broader frontend/E2E checks are still running; no failures have been reported at handoff.