Repository navigation
fix: inject the margin's commit into reply continuity - #4483
Merged
Merged
Conversation
#3864 made reply continuity wait for the margin's own DOM commit (`regionCommitted("annotations")`) and said that a widget holding its commit, as through a drag, no longer kept a displaced reply editor waiting. That holds only when the margin owes no repaint. A region's own commit (`presenter.committed` in `framework/presentation.js`) resolves in its paint, and `collect` runs the paint only after the DOM its `after` names, which for the margin is obligations, thread, projection and the widgets. When an editor is displaced the margin usually repaints, so a held widget still delays continuity. A scratch runtime test confirmed it: a margin claimed while a widget holds its commit doesn't commit until the widget does. ## What changed - `applicationPresenter` returns `committed`, its region's own DOM commit, and its header says when that settles: at once when the region owes no paint, otherwise after everything upstream. - `application.js` passes the margin presenter's `committed` into `createThreadPresentation` as `marginCommitted`, which continuity awaits. This replaces the string-keyed `regionCommitted` and its `ownCommits` map, which had this one caller. - `PRESENTATION_DOM.annotations`, added by #3864, is deleted: nothing in production read it, only the test. - The comment in `thread/presentation.js` now says a repainting margin still waits for its upstream, so a held widget delays continuity then. - The runtime test is renamed to the case it covers, a region owing no paint, and reads the region's `committed` and the margin's `after` chain directly. Whether continuity should skip held widgets when the margin repaints is left open; this change only makes the code and its comments agree. #3864's `tick()` helper and its eslint rule stay.
leaf-agent
approved these changes
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.
#3864 made reply continuity wait for the margin's own DOM commit
(
regionCommitted("annotations")) and said that a widget holding itscommit, as through a drag, no longer kept a displaced reply editor
waiting. That holds only when the margin owes no repaint. A region's own
commit (
presenter.committedinframework/presentation.js) resolves inits paint, and
collectruns the paint only after the DOM itsafternames, which for the margin is obligations, thread, projection and the
widgets. When an editor is displaced the margin usually repaints, so a
held widget still delays continuity. A scratch runtime test confirmed it:
a margin claimed while a widget holds its commit doesn't commit until the
widget does.
What changed
applicationPresenterreturnscommitted, its region's own DOMcommit, and its header says when that settles: at once when the region
owes no paint, otherwise after everything upstream.
application.jspasses the margin presenter'scommittedintocreateThreadPresentationasmarginCommitted, which continuityawaits. This replaces the string-keyed
regionCommittedand itsownCommitsmap, which had this one caller.PRESENTATION_DOM.annotations, added by Draw the margin once per thread pass #3864, is deleted: nothing inproduction read it, only the test.
thread/presentation.jsnow says a repainting marginstill waits for its upstream, so a held widget delays continuity then.
paint, and reads the region's
committedand the margin'safterchain directly.
Whether continuity should skip held widgets when the margin repaints is
left open; this change only makes the code and its comments agree.
#3864's
tick()helper and its eslint rule stay.