Skip to content

Paint the draft's mark from the ranges placement keeps of it - #6322

Merged
max-sixty merged 1 commit into
mainfrom
route-fixes-on-main
Nov 17, 2026
Merged

max-sixty merged 1 commit into
mainfrom
route-fixes-on-main

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

Placement already kept live ranges for each thread's passage, reused across readings that move nothing, but the draft's anchor came back without them. So paintPending built its own Range for each segment of the draft's passage on every paint. Now placement resolves the draft the same way it resolves a thread (placePending, over liveRanges), and the anchor paint reads those ranges. Building a passage's ranges now has one home instead of two, and the page looks the same. Code is net +3 lines; a runtime test (+45) holds that placement keeps the draft's ranges, and it fails with them dropped.

This comes from #6161, which max-sixty is leaving unmerged because it adds code. He asked to land the parts that make main simpler and better. The other standalone part of #6161, a fix for a contributed control redrawn disabled, isn't here: main has no surface that releases a control and takes it back up, and no reproduction found one.

Tests: pnpm run check (1011 runtime tests), and the 19 browser test functions that read the draft's mark plus two on anchors and contributed controls (29 cases).

This was written by Claude Code on behalf of max-sixty

Placement kept live ranges for a thread's passage, reused across readings
that move nothing, but the draft's anchor came back without them, so
`paintPending` built a `Range` for each segment of the draft's passage on
every paint. Placement now resolves the draft as it does a thread
(`placePending`, over `liveRanges`), and the anchor paint reads those
ranges, so a thread's mark and the draft's come from one record. What the
page shows doesn't change.

A runtime test holds that placement gives a thread's passage and the
draft's a range over their words and keeps the same ranges across a
reading that moves nothing; with the draft's ranges dropped it fails.
@max-sixty
max-sixty merged commit 5f6fba0 into main Nov 17, 2026
5 checks passed
@max-sixty
max-sixty deleted the route-fixes-on-main branch November 17, 2026 22:17
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.

2 participants