Let a render arriving mid-fold inherit the hold the fold is already keeping - #162
Merged
Conversation
…eeping The comment panel's scroll hold pins one card so the list can change around it. Every render takes a fresh hold, and a hold reads the pointer to find the reader's place. While a fold plays, that reading is wrong: the room closes under the cards below the folding card and the hold gives scroll back, so the cards above come down into it and one of them ends up under a pointer that never moved. A render landing inside a fold therefore pinned a card above the motion and let the successor the reader was aiming at keep rising, by whatever was left of the fold. Nothing has to arrive for that to happen: the two-second heartbeat repaints the work lines under the same hold. That is what made test_a_folding_reference_hands_its_hold_to_the_next_card red on CI at d98ed92 and green on a workstation — the wall-clock gap the test leaves between the resolve landing and the fold finishing is milliseconds here and long enough to catch a tick there. A hold taken while a fold is running now inherits the standing hold's own reference, which has already handed off past the card that is leaving, instead of re-deriving a place from a list that is mid-move. The four checks that say whether a card can still hold the place are stated once, in heldBox, so taking a hold and correcting one cannot disagree about it.
This was referenced Aug 31, 2026
# Conflicts: # docs/example-previews.json
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.
Problem
A thread-panel render arriving while a resolution fold was still moving retook the list's scroll hold from whichever card had slid under the stationary pointer. It could pin a card above the fold and let the intended successor keep rising. The two-second heartbeat could trigger that render, which made the failure depend on runner load.
Solution
While a fold is active, a new hold now inherits the first live reference from the preceding hold.
heldBoxgives hold creation and correction one definition of a card that can still preserve the reader's place. The regression pauses the fold, lands an unrelated reply mid-motion, and verifies the target card stays fixed both then and after the fold finishes.Refresh and testing
The branch is refreshed through
mainat77a8681. Runningscripts/example-previews.pyreproduced all nine preview images byte-for-byte and updated the manifest's runtime-input digest toff92edc6….uv run pytest tests/test_render_conversations.py tests/test_render_aim.py tests/test_render_reactions.py tests/test_site.py --run-nightly -n 4 --dist loadgroup -q— 128 passed on the final treepre-commit run --all-files— passednode --check skills/leaf/assets/runtime/conversation/thread-list.js— passedThe complete 1,576-test nightly suite passed on the immediately preceding merged tree; after #163 entered
main, the four browser owners affected by the combined changes were rerun above.Automated fix for failed run 33347154927.