Skip to content

Let a render arriving mid-fold inherit the hold the fold is already keeping - #162

Merged
max-sixty merged 5 commits into
mainfrom
fix/ci-33347154927
Aug 31, 2026
Merged

Let a render arriving mid-fold inherit the hold the fold is already keeping#162
max-sixty merged 5 commits into
mainfrom
fix/ci-33347154927

Conversation

@leaf-agent

@leaf-agent leaf-agent commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

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. heldBox gives 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 main at 77a8681. Running scripts/example-previews.py reproduced all nine preview images byte-for-byte and updated the manifest's runtime-input digest to ff92edc6….

  • 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 tree
  • pre-commit run --all-files — passed
  • node --check skills/leaf/assets/runtime/conversation/thread-list.js — passed

The 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.

This was written by Codex on behalf of max-sixty

…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.
@max-sixty
max-sixty merged commit 25e8a27 into main Aug 31, 2026
3 checks passed
@max-sixty
max-sixty deleted the fix/ci-33347154927 branch August 31, 2026 06:04
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