Skip to content

[v0.10] Continue Watching: a server that answers second no longer hides its newest cards behind the deck - #1447

Merged
GLinnik21 merged 2 commits into
release/v0.10from
backport/1405-to-v0.10
Nov 17, 2026
Merged

GLinnik21 merged 2 commits into
release/v0.10from
backport/1405-to-v0.10

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Backport of #1405 to release/v0.10: git cherry-pick -x 91d69752cc64.

GLinnik21 and others added 2 commits November 17, 2026 22:39
…ewest cards behind the deck (#1405)

With several servers, Home's Continue Watching opened scrolled to the first card of the server that answered first. The newer cards of a server answering after it were held behind the window, offset by their count, so DOWN from the hero landed on the wrong card.

The cause was deck::place, not the row's focus or scroll. Every server's answer lands on its own. A whole-source answer (a first answer, or a refresh whose reload failed) joins the deck through settle_deck, and place seated every joiner by the rule for a deck the reader had paged along: its cards newer than the window's first card went behind the window, and the overflow was dropped from the head.

place now judges whether the deck is at its head, with fit's own test on the lanes that held it before this call. At the head, a joiner's newer cards lead the window, and the overflow goes from the oldest end. A full window lets go of its oldest shown cards, which stay ahead as lookahead. A deck the reader moved keeps the old rule. A joiner with no rows (a server whose Continue Watching is empty) is seated at its head rather than past its tail, so it no longer reads as a lane the deck moved past and hides the next joiner's cards.

Deck tests (red first) cover: a joiner at the head leads with its newer cards; the arrival order makes no difference; the newest cards fill a full window; a reader-moved deck keeps its window; an empty server between two others; an empty server alone. Home tests drive the real store (a new test hook, land_deck_lane_for_test) and the engine's DOWN from the hero. They cover a cold deck in either arrival order, with an empty server in between, and after a failed reload. They also check a single-server deck, and a reader who stays on the same card when cards land in front of it.

Closes #1395

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 91d6975)
The cherry-pick of 91d6975 brought a test hook, land_deck_lane_for_test,
whose last lines read `state.seen_facts = facts_key(&scope);`. On main,
6f2c15a (#1358, sans-io machine boundaries) gave facts_key a BrowseScope
parameter (`scope.clients.facts_gen()`); at v0.10.0 it takes none and reads the
process-global plex::server_facts_gen(), so the call did not compile (E0061).

#1405's fix is deck::place; the hook only records the facts epoch the same way
its sibling hooks on this line do (`state.seen_facts = facts_key();`), so the
backport calls facts_key() as the line defines it and imports nothing from
#1358.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit f93e034 into release/v0.10 Nov 17, 2026
13 checks passed
@GLinnik21
GLinnik21 deleted the backport/1405-to-v0.10 branch November 17, 2026 23:40
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.

1 participant