T1a: Preserve keyed timeline segments during reconciliation - #40
Merged
Merged
Conversation
Replace prefix-only segment compatibility with an exhaustive keyed diff so unchanged presentation keys retain their QWidget identity across insertion and reorder. Remove only absent segments and keep viewport anchors attached to surviving widgets. Call-site audit: the single segment reconciliation site changes; turn-level compatibility, render call structure, and the exact-content fast path are deliberately unchanged. Deletion census: 86 lines removed under src/. The removed block was the prefix-alignment and whole-turn teardown algorithm (longer than five lines), replaced by keyed removal and indexed survivor reuse; the remaining removed layout calls are superseded by indexed insertion. Runtime proof covers live activity growth, middle insertion, exhaustive reorder identity, selective lookup removal plus deferred destruction, and viewport-anchor lifetime. No golden hash or protocol fingerprint changed.
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.
Reproduction gate
The test was written and run before the fix against merged master
3679e38.Change
Replace the prefix-alignment/whole-turn teardown with an exhaustive keyed reconciliation over the desired segment order:
Turn-level compatibility,
render()call structure, and the exact-content fast path are unchanged.Runtime proof
CodexUIConversationLayoutTestnow covers:QWidget*;QWidget*;QPointerafter deferred deletion;Validation
/home/voc/projects/drafts/.codex-builds/codexui-final-verify-20260822CodexUIConversationLayoutTest: passed