Repository navigation
feat(app): add a Full session row to the /fork picker - #67731
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Looks good. I ran it in Desktop with the simulated model. On the base, /fork lists only prompts, and Enter forks before the newest one, which drops its reply and puts the prompt back in the composer. With this PR, Full session is the first row and is highlighted. A bare Enter opens a fork that includes the latest assistant reply, and the composer is empty. fork-machine.test.ts passes and tsc -b in packages/app is clean.
Public API: unchanged. The change only touches packages/app internals and calls the existing session.fork without before.
No blocking concerns. The bare Enter in the picker now forks the full session instead of the newest prompt. That matches the TUI and #67147.
3 of 6 tasks
1 task
This was referenced Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Issue for this PR
Closes #67147
Type of change
What does this PR do?
Adds a Full session row at the top of the desktop/web
/forkpicker, in the same place the TUI has it. Choosing it callssession.forkwithoutbefore, so the fork copies the whole history, including the latest assistant reply, and opens with an empty composer. Forking before a prompt works as it did before.fork-machine.ts: a fork now carries aSessionForkBoundary, either{ type: "full" }or{ type: "before", messageID, draft }.fork.startsendsbeforeonly for a prompt fork,fork.openrestores a draft only when there is one, and the view reports which target ispending.fork.ts:fork({ sessionID, target })builds the draft only for abeforetarget.useSessionFork(the timeline's "Fork from here") still forks before its message.fork-dialog.tsx: "Full session" goes above the prompts (newest first) when the session has any. A bare Enter now forks the full session, the same as in the TUI. The row can be found by search, and it shows a spinner while its fork runs.en.ts: addsdialog.fork.full.How did you verify your code works?
bun test src/session/fork-machine.test.ts: added a full-session case that checksbefore: undefined, the pending view and thatfork.openhas no draft.composer.spec.ts: the existing/forktest now checks that "Full session" is the first row and moves to the newest prompt with ArrowDown before Enter. A new test checks that a bare Enter forks with nobefore, opens the fork and leaves its composer empty. Both tests pass locally on Chromium.bun run typecheckinpackages/apppasses.typecheck:e2eshows only errors that are already ondev, none of them in the lines this PR touches.lint:changedpasses in CI. oxlint crashes in the sandbox this was written in, so it couldn't run locally.Screenshots / recordings
Screenshots are in the Slack thread this PR came from.
Checklist
Requested by: Brendan via Slack