Repository navigation
[v0.10] Continue Watching: a server that answers second no longer hides its newest cards behind the deck - #1447
Merged
Merged
Conversation
…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]>
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.
Backport of #1405 to
release/v0.10:git cherry-pick -x 91d69752cc64.