fix(control,desktop): keep steer messages out of the turn count#3936
Merged
Conversation
Rewind and fork map a clicked bubble to a backend turn by counting user items in the transcript. A mid-turn steer added a user bubble live and replayed its persisted wrapper message as one more, so every steer shifted all later rewind/fork targets by one - the "rewound several turns at once" class of report (#3660). Steers now surface only through the Steer event notice, live and on replay.
fcae139 to
7696613
Compare
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.
Follow-up hardening for the turn-mapping invariant behind #3660.
rewind/forkresolve a clicked message to a backend turn by counting user bubbles in the transcript, so any user-role item that is not a real backend turn shifts every later target. #3932 removed the compaction-fold phantoms; this closes the remaining (freshly introduced) source: mid-turn steers from #3360 added a user bubble live and replayed their persisted[Mid-turn steer queued by the user.…]wrapper as another one.syntheticPrefixesgains the steer wrapper, so history replay (desktop, serve, resume) no longer renders it as a user bubble.steer()path drops its optimistic user-bubble dispatch — theSteerevent's↪notice (which feat(desktop): mid-turn steer injection #3360 added precisely as the delivery confirmation) is the visible trace, live and after reload, keeping both representations consistent.Table test covers the wrapper prefix.