Skip to content

fix: restore contribution focus without publishing twice - #5102

Merged
max-sixty merged 1 commit into
mainfrom
fix/issue-5085
Nov 2, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/issue-5085

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

Queued contribution focus started a second explicit arrival after its update had already rendered. During suggestion decision and undo, that extra publication could leave margin layout measuring the old parent-passage Undo row between presentations, then restoring the same style attribute. Focus restoration now finishes the existing update and uses its retained control, keeping the request available until the renderer has materialized its surface.

This preserves the surface materialization introduced in #1652 and batching of updates within one script. Explicit navigation still requests a fresh arrival. The change adds no scheduling mode or geometry exception; the shared contribution owner removes the duplicate publication for every caller.

The reported browser journey fails the unchanged-style watch on the starting main commit and passes with this repair, including at 6× CPU throttling. The runtime regression also fails before the fix with two publications instead of one, then passes while checking that the last batched focus request reaches its control.

Validation
  • Four focused margin cases pass: suggestion decision/undo across rail and pin widths, the suggestion lifecycle including refusal, secondary action settlement, and secondary controls’ disabled/focus behavior.
  • The page-owned annotation obligation/action/Undo case passes.
  • All 746 runtime tests pass. Browser build, reproducible bundle check, and changed-file pre-commit checks pass.
  • Served startup comparison on the existing margin-actions fixture: both arms deliver the document, upgrade and present the first server state without reported layout shifts. Upgrade and presentation each retain 37 requests, including 31 JavaScript requests. JavaScript grows from 2,209,316 to 2,209,539 bytes (+223); no additional request or preparation is introduced. Elapsed times are diagnostic only.
  • The source review covered correctness, removed behavior, callers, lifecycle cleanup, layering, and cost. Focus-request cleanup preserves a newer request created during rendering.

Closes #5085 — automated triage

Queued focus already belongs to the contribution update that requested its surface. Settle that update and focus its retained control rather than starting another explicit arrival. This keeps updates in one script batched and prevents margin layout from seating the stale parent-passage Undo row between two presentations.

The runtime regression fails on the old code with two publications instead of one. The suggestion decision/undo journey also fails its unchanged-style watch before the repair and passes after it.

Closes #5085
@max-sixty
max-sixty merged commit 7075a02 into main Nov 2, 2026
5 checks passed
@max-sixty
max-sixty deleted the fix/issue-5085 branch November 2, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggestion decision and undo repeats the margin cluster style

2 participants