Repository navigation
fix: read reply availability only for a current panel thread - #4438
Merged
Merged
Conversation
A refused optimistic comment removes its thread before the panel route is reconciled. Composition callbacks can read the field in that interval; a route key alone does not establish a current thread. Check the thread in both field selection and the retained panel template, keeping the existing editor and refusal recovery. The 24 focused refusal and application-boundary cases pass, including all seven reported cases; the detached refusal reproduced the null dereference before the fix. Runtime: 682 passed. Browser build passes. Closes #4422
This was referenced Oct 27, 2026
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 optimistic comment removes its thread before the floating panel reconciles its route. The retained composer introduced in #4393 can read that stale route during its own update and pass a null thread to
replyAvailable, interrupting refusal recovery. The field reader and panel template now require a current thread before reading reply availability. This preserves the retained renderer and native editor ownership intended by #4393.The visible behavior remains the existing refusal recovery: the rejected thread closes, the user's words return to their editor, and focus follows the existing intent rules. No layout, styling, or timing changes are introduced.
Validation: the detached-comment test reproduces the reported exception before this fix. The same focused selection passes afterward: 24 browser cases, including all seven cases in the report and adjacent refusal/application-boundary transitions. The browser build and all 682 runtime tests pass. Existing regression tests provide coverage without adding another copy.
A served command-hub startup comparison against the base keeps 45 code requests through widget upgrade and first server-state presentation, with 115 additional code bytes; both arms report no console errors or layout shifts. The document/code combined increase is 206 bytes. Timing was diagnostic only.
Closes #4422 — automated triage