Repository navigation
fix(desktop): branch long sessions without loading the transcript in the renderer - #121239
Merged
Merged
Conversation
Rebased onto main, where params are validated against tui_gateway/contracts and unknown keys are rejected: the copy_parent_history / omit_messages flags on session.create and session.branch now answered 4000. Keep both methods' wire shape unchanged and give the two new methods their own contracts (session.branch_stored, session.branch_whole) with messages_omitted results; the handlers take the behaviour as keyword arguments, not wire flags.
5 of 6 tasks
૮ >ﻌ< ა ci reviewran on 1e40a85 — fix(desktop): declare the branch methods in the typed gatewa debug infoCI timingsCI timings · View report · View jobWall time 5m48s vs 6m8s (-5.4%). 3 job(s) slower, 12 faster,
|
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.
Summary
Branching a long Desktop session loaded the whole parent transcript into the renderer twice, once to read it and once from the echoed branch response. That froze or crashed the window (#103139). With this change the backend that owns the parent copies the history, and the transcript never crosses the wire.
This carries forward @benjaminbrumbaugh's #103154, rebased onto
mainwith the original commits and authorship kept. The contributor branch couldn't be updated because the fork's workflow files differ frommain.What changed
session.branch_stored(new): a whole-session branch of a stored parent. The gateway reads the parent from its own profile store, seeds the child and returnsmessages_omitted: true.session.branch_whole(new): a whole-historysession.branchof a live session that doesn't echo the transcript back.count) still usesession.branchand get the full response.mainnow validates params againsttui_gateway/contractsand rejects unknown keys. The PR'scopy_parent_history/omit_messageswire flags would therefore have failed with 4000.session.createandsession.branchkeep their wire shape. The two new methods have their own contracts (regenerated TS + OpenRPC), and the handlers take the behaviour as keyword arguments.Tests
scripts/run_tests.sh tests/tui_gateway/: 2042 passed.vitest use-session-actions.test.tsx: 110 passed.tsc -p apps/desktop: clean.Fixes #103139
Supersedes #103154