Repository navigation
Add per-checkpoint Fork and any-two checkpoint compare to the Git tab - #1626
Conversation
Solenta-Message-Id: 71aa67e9-228f-428e-9ee1-d21391230aad
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7855840b49
ℹ️ 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".
| const forkFromCheckpoint = useCallback( | ||
| (threadId: string, sha: string) => | ||
| forkThread(threadId, { checkpointSha: sha }), |
There was a problem hiding this comment.
Honor checkpoint forks in the browser-dev adapter
When the app runs via npm run dev in a browser, resolveCoderApi selects devCoder, but src/dev/threads.ts's fork implementation ignores checkpointSha and only copies history for messageId. Clicking this new Fork button therefore creates an ordinary empty thread with no checkpoint-derived worktree instead of the files and conversation advertised by the UI. Handle checkpointSha in the dev adapter or suppress this control there.
Useful? React with 👍 / 👎.
A late git write into repo/.git made the diff-scopes afterEach rmSync fail with ENOTEMPTY on ubuntu CI (#1626). Same retry the other store and workflow tests already use. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A late git write into repo/.git made the diff-scopes afterEach rmSync fail with ENOTEMPTY on ubuntu CI (#1626). Same retry the other store and workflow tests already use. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes the remaining parts of #252. In the Git tab, the checkpoints list can now start a new thread from any checkpoint and compare any two checkpoints.
What changed
Fork from a checkpoint
forkFromCheckpointservice.threads:forksends requests to it when the input includescheckpointSha.checkpointForkPoint(inworktrees-checkpoints.js) checks that the sha is one of the source thread's checkpoints and throwsUnknown checkpointif it isn't. It then works out where to cut the transcript, using the same lookup as restore: the message-id trailer in the commit body, or else the last message created by the commit's timestamp (+999ms).leadSnapshotSha, so the worktree starts at that commit and never falls back to main.forkThread, a Claude fork that gets its own worktree no longer--resumes the source session. Claude stores sessions per cwd, so a new worktree replays the context instead.Compare any two checkpoints
git:turnDiff/turnDifftake an optionalfrom. It is held to the same rule assha: it must be one of the thread's checkpoints, or the result is an empty diff.TurnDiffPaneltakes an optionallabelto replace its header (e.g.Turn 1 → 3).UI (
AgentsPanel→CheckpointsCard)TurnDiffPanelwith the range between them, using the saved split/unified preference. Ticking only one shows a hint to pick another.CheckpointsCardis keyed by thread id, so checkbox picks reset when you switch threads.Tests
electron/test/turn-diff.test.js:fromrange matchesgit diff c1 c3, and afromthat isn't a checkpoint returns an empty diff.test/checkpoints.test.tsx: renderer coverage for the new checkpoint controls.🤖 Generated with Claude Code