Add option to fork from current state (include last model response) - #440
Add option to fork from current state (include last model response)#440Hrovatin wants to merge 4 commits into
Conversation
Implementation PlanProblemThe ApproachAdd a dedicated "fork from current state" path that branches from the current leaf ( Deliverables1. Core —
2. RPC layer
3. Interactive UI —
4. Dashboard
Testing (mandatory)
Files touched (summary)
Risks / open questions
Plan created by mach6 |
Progress UpdateImplemented "fork from current state (including the last model response)" end-to-end across all four layers, plus a test-infra fix. ArchitectureThe feature adds a second fork entry point that branches from the current session leaf (so the last assistant response is retained), complementing the existing "fork at a user message" flow which rewinds to before a selected user message.
New files
Modified files
Commit: Verification
Migration notesNo schema/config changes. The Progress tracked by mach6 |
Code ReviewFive review agents evaluated the change against issue #439's acceptance criteria. Completeness is fully met — all 6 ACs map to real, working code, and the CriticalNone. ImportantA. B. C. Cross-session tree parenting ( SuggestionsD. Dashboard "fork from current state" ignores the E. TUI action-row selection path has zero test coverage (test-reviewer, conf 90, medium) F. G. Duplicated fork-completion logic in the TUI selector callback (simplifier, conf 88, low) H. Near-identical dashboard fork handlers could share a completion helper (simplifier, conf 85, low) Strengths
Agents run: code-reviewer, error-auditor, test-reviewer, completeness-checker, simplifier Reviewed by mach6 |
Review AssessmentAssessed against the review comment: #440 (comment) Each finding was verified by reading the actual code and run through two gates — factual (is it a real problem in current code?) and scope (must it be fixed to deliver issue #439 safely?). A finding is genuine only if both pass. Classifications
Action Plan
Deferred (optional follow-up, not blocking merge): A (speculative throw-safety, pre-existing), C (persisted Assessment by mach6 |
Progress UpdateAddressed the three genuine review findings (D, E, B) and the two nitpicks (G, H) attributable to this PR. Deferred findings A/C/F were left untouched as out-of-scope (pre-existing / unchanged shared code). ArchitectureThe change hardens and dedupes the two fork surfaces so a fork that produces no branch is now always surfaced to the user instead of appearing to succeed.
New files
Modified files
Verification
Known limitationsDeferred findings remain open as optional follow-up, intentionally out of scope for this PR: A (speculative Commit: Progress tracked by mach6 |
|
@/tmp/gh-comment.XXXXXX.md |
Review AssessmentAssessed against the review comment: #440 (comment) Each finding was verified by reading the actual code (and, where relevant, running the repo's real type checker) and run through two gates — factual (is it a real problem in current code?) and scope (must it be fixed to deliver issue #439 safely?). A finding is genuine only if both pass. Regressions/safety failures introduced by the PR stay eligible; pre-existing or merely-relocated shared-code concerns are deferred. Classifications
Counts
Action Plan
Deferred (optional follow-up — no new tracking issue needed)Findings 1 and 2 are factually valid but pre-existing/relocated shared-code concerns, already carried by prior deferred findings A and F. No additional tracking issue is warranted beyond what the prior review noted. Findings 4 and 5 require no action. Assessment by mach6 |
Progress UpdateAddressed the sole genuine finding from the latest review assessment (finding 3). The other findings were correctly left unactioned per the assessment: findings 1 and 2 are deferred (pre-existing / merely-relocated shared code), finding 4 is a false positive (its ArchitectureTest-only change in the dashboard client test suite. Modified files
Verification
Known limitationsDeferred findings remain optional follow-up, out of scope for issue #439: finding 1 (TUI fork-callback throw-safety — a pre-existing gap identical on the existing Commit: Progress tracked by mach6 |
|
@aebrer Can you have a look? |
|
This is a good idea, but I do think the other approach we discussed in the issue is a better short and long term solution. Probably I'll try for that. |
Closes #439
Adds a "fork from current state" option that branches from the current leaf — including the last model response — as a complement to the existing rewind-to-user-message fork.
Implementation plan posted as a comment below.