Repository navigation
fix: stop reading a reply turn after its thread disappears - #4525
Merged
Merged
Conversation
A retained composition field may repaint after refusal removes the optimistic thread and before the panel retires its route. fieldReading fell through to Reply for that missing key, so the turn lead introduced by #4510 dereferenced a nonexistent thread. Classify the missing subject in the shared field reader so both its hint and lead stop describing a reply. Native row ownership and refusal recovery remain intact. Existing refused-comment regressions fail before and pass after this change, preserving returned words, placement and focus. Twelve refusal cases and four adjacent panel cases pass, as do the browser build and 684 runtime tests. Closes #4522
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.
A refused comment removes its temporary thread before the retained reply field finishes repainting. The shared
fieldReadingstill classified that missing subject as “Reply”, allowing the turn lead added in #4510 to callthreadAttentionwithout a thread. The field reader now returns an empty reading while its subject is absent, so both the hint and its lead stop describing a reply until the panel retires the route.This preserves the retained composition renderer and native editor ownership from #4393. The rejected thread still disappears and the user's words, placement and focus return through the existing refusal recovery. No layout or styling changes are introduced.
Both reported browser regressions reproduce the null dereference on the base and pass with the fix. Validation also passes 10 adjacent refusal cases, four panel cases covering status, reply/walk labels and sending, the browser build, and all 684 runtime tests. Existing tests cover the transition without another reproduction test.
A served command-hub startup comparison against the base keeps 45 code requests through widget upgrade and first server-state presentation, adding 158 code bytes. Both arms show no console errors or layout shifts. The added branch belongs in the shared field reading rather than a second null guard in the attention reader; it states whether the retained field still has a subject.
Closes #4522 — automated triage