Repository navigation
Continue Watching: a server that answers second no longer hides its newest cards behind the deck - #1405
Merged
Conversation
…ewest cards behind the deck A deck nobody has moved is at its head, yet a lane that joined it (a second server's first answer, or any server's refresh) was seated by the rule for a deck the reader has paged along: its cards newer than the window's first card were held BEHIND the window. On a household whose own server answers after a shared one, the five newest episodes were behind a window that began at the shared server's first card: the row's offset was 5, its first card the shared server's, and the newest cards were reached only by five LEFTs and a backward page. `deck::place` now judges "at head" on the lanes that already hold the deck, with the test `fit` already uses (every lane starts at the head of its listing), and a joiner at the head leads the window with its newer cards, the overflow let go from the oldest end. A deck the reader moved keeps the old rule. The shelf and the focus engine were not at fault: focus is on the hero when the cards land, and a focused card is already carried with its element when cards land in front of it. Adds a `land_deck_lane_for_test` hook that lands one server's deck through the production path, and tests at the deck and at Home for both arrival orders, a re-answer, a single server and the reader-moved case. Closes #1395 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… moved past A server whose Continue Watching is empty keeps the default lane, and `deck::place` seated such a joiner at its tail, lo = hi = 1. From then on the deck read as moved: friend, then an empty server, then the household's own newer cards put the own server's cards behind the window (offset 1 + 5) and the two-server case "friend, then an empty one" published an offset of 1, a placeholder before the first card. A joiner with no rows now sits at its head. `place`'s doc says what the head rule does to a full window (it lets go of its oldest shown cards, which stay ahead as lookahead), and a deck test pins it. The comments that said a refresh joins the deck now say what is true: a placed lane's refresh goes through `deck::reload` and re-joins through `place` only when the reload fails. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This was referenced Nov 15, 2026
Closed
Contributor
|
Backport to |
GLinnik21
added a commit
that referenced
this pull request
Nov 17, 2026
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
pushed a commit
that referenced
this pull request
Nov 17, 2026
…es its newest cards behind the deck (#1405) (#1447) 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 (cherry picked from commit 91d6975) Backport note: the hook land_deck_lane_for_test calls facts_key() as v0.10.0 defines it; the per-scope facts_key(&scope) came with #1358, which is not on this line.
GLinnik21
added a commit
that referenced
this pull request
Nov 18, 2026
The release note and the authored half of the audit for v0.10.1, a patch released from release/v0.10: v0.10.0 plus the backports of #1438 (Realtek webOS 5 access() interposer), #1437 (seek snap-back on sets with no displayed-frame counter), #1405 (Continue Watching start position), #1439 (Play during a held prime) and #1370 (crash records filed under the uploading release). Compatibility is unchanged from 0.10.0. The audit records the device evidence each fix rests on and leaves the generated block for the release run.
GLinnik21
pushed a commit
that referenced
this pull request
Nov 18, 2026
The release note and the authored half of the audit for v0.10.1, a patch released from release/v0.10: v0.10.0 plus the backports of #1438 (Realtek webOS 5 access() interposer), #1437 (seek snap-back on sets with no displayed-frame counter), #1405 (Continue Watching start position), #1439 (Play during a held prime) and #1370 (crash records filed under the uploading release). Compatibility is unchanged from 0.10.0. The audit records the device evidence each fix rests on and leaves the generated block for the release run. (cherry picked from commit e2f8760)
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.
Closes #1395
What
A cold Home whose servers answer one after the other opens its Continue Watching row on the newest card again. When the household's own server answers after a server shared with it, its newer cards now lead the deck instead of waiting behind it.
Why
The cause is not the row's focus or scroll. It is
deck::place(rust-modules/data/src/stores/deck.rs, the joiner loop ofplace, on origin/maindeck.rs:273,let before = lane.rows.iter().filter(|row| order(row, &first.0) == Ordering::Less).count();, anddeck.rs:279,drop_excess(lanes, true); the settle ispms.rs:3848,settle_deck(&mut srcs, refreshed)).step_landings,rust-modules/data/src/pms.rs), and a whole-source answer (a first one, or a refresh whose reload failed:landed_ok) carries an unplaced preview lane, whichsettle_deckseats withdeck::placeagainst the lanes already holding the deck. A placed lane's refresh that reloads cleanly goes throughdeck::reloadand does not join throughplace.placetreated every joiner as joining a deck the reader had paged along: the joiner's cards newer than the window's first card were held BEHIND the window (lo/hiof the own lane were(5, 5)in the probe). Nobody had moved this deck.offset = sum(lane.lo) = 5, so Home'smore_beforewas true (a skeleton before the first card) and the first card on screen was the shared server's ("card 6" of the merged order). Five LEFTs and a backward page brought the newest cards in.placetakes the whole window from the head, and DOWN lands on card 1. That is the reporter's isolation.The first hypothesis (an anchor following its item while own items merge in front) is refuted for this path: focus is on the hero when the cards land, so
Shelfhas no anchor to follow (Shelf::tickreads focus only for a card of its own row), andHome::seatpicks the column nearest the hero by the row's scroll, which is 0. A focused card IS already carried with its element when cards land in front (existingShelf::landed/pool::slid), so no shared focus or scroll code changed.The fix gives
placethe testfitalready uses for "a deck at its head": every lane that held the deck before the joiners starts at the head of its listing (lo == 0 && !has_before()). A joiner at the head leads the window with its newer cards and any overflow is let go from the oldest end (drop_excess(.., false), asfitdoes). A deck the reader moved keeps the old rule, so a joiner still waits behind a window the reader paged along.The arrival order is inferred, not observed. Fetches start in parallel (fan-out
WIDTH4,stores/fanout.rs), so which server answers first follows the network. The bug appears whenever the server holding the newest cards answers after another (a first answer, or a refresh whose reload failed and so re-joins). It does not depend on the order in any other way.A server with nothing to continue keeps the default lane, and
placeused to seat such a joiner at its tail (lo = hi = 1), so the deck read as moved from then on: the friend's server, then an empty one, then the own server's five newer cards put them behind the window (offset 1 + 5), and "friend, then an empty one" alone published an offset of 1, a placeholder before the first card. A joiner with no rows now sits at its head (lo = hi = head.position); a non-empty joiner whose rows all fall before the window keeps the end of its listing, as before.One behaviour to know about: a full window at its head lets go of its oldest shown cards when a joiner brings newer ones, and those cards stay ahead as lookahead. It needs the reader to have asked forward (the window grown to its bound with
lostill 0) before a server's first answer lands.fitalready did this for a refresh at the head; the same rule now holds for a join.place's doc comment says it and a deck test pins it.Tests
Red on unchanged logic, then green:
rust-modules/data/src/stores/deck.rs):a_lane_that_joins_a_deck_at_its_head_shows_its_newer_cards_in_frontanda_joining_lane_at_the_head_keeps_the_newest_cards_when_the_window_overflowsFAILED (left: ["s2-0", "s2-1", "s2-2"],right: ["s1-0", ..., "s2-2"]);test result: FAILED. 15 passed; 2 failed. Green:test result: ok. 64 passed; 0 failed(make test-crate C=plx_data T=deck).rust-modules/screens/src/home/tests.rs), the reporter's case through the real store and the engine's DOWN:a_cold_deck_opens_on_its_newest_card_when_the_shared_server_answers_firstand..._when_a_refresh_re_joins_after_a_failed_reloadFAILED (left: ["s1", "s2", "s3"],right: ["o1", ..., "s3"]);..._when_the_own_server_answers_firstanda_single_server_deck_opens_on_its_first_cardalready passed. Green:test result: ok. 30 passed; 0 failed(make test-crate C=plx_screens T=deck).a_server_with_nothing_to_continue_does_not_hide_the_newest_cards_of_the_one_after_it(friend, empty, own: the merged order, nothing before,sum(lo) == 0) anda_server_with_nothing_to_continue_leaves_nothing_before_the_deck(friend, then empty: nothing before) FAILED on 9be185b (left/rightdiffer at the merged order;an empty lane is no card the window has moved past), green with the fix. Homea_cold_deck_opens_on_its_newest_card_when_a_server_with_nothing_answers_in_between(friend, empty, own, DOWN from the hero) FAILED on 9be185b (left: ["s1", "s2", "s3"],right: ["o1", ..., "s3"]), green with the fix.a_full_window_at_its_head_lets_go_of_its_oldest_cards_to_the_joiners_newer_onespins the overflow sentence (it passes on both).a_server_that_joins_in_front_keeps_the_reader_on_the_same_card_when_nothing_overflows(Home, 3 + 5 cards, so no overflow; a reader on a card, the other server's newer cards land in front, the pop follows the card). It could not be set up before the fix (the cards were held behind), so it fails there on its setup line and passes now. The shelf-level behaviour it relies on is pinned by the existingshelf_landing_carries_the_pop_and_the_scrollandshelf_landing_mid_row_keeps_the_tile_exactly(rust-modules/ui/src/cards/tests.rs) and Home'sa_landing_the_row_cannot_honour_clamps_the_scroll_and_the_pop_follows.a_single_server_deck_opens_on_its_first_card; the reader-moved deck keeps its old rule:a_lane_that_joins_a_deck_the_reader_moved_keeps_its_newer_cards_behind(deck).Gates on the committed tree (
git status --shortempty before and after):make test-crate C=plx_data:test result: ok. 1633 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 14.20smake test-crate C=plx_screens:test result: ok. 2157 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 21.68smake check-nodef:Finished dev profile [unoptimized + debuginfo] target(s) in 15.28s, exit 0bash ci/check-deps.sh:check-deps: all gates greenpython3 ci/check-module-layers.py:check-module-layers: greenSCREEN_SHAPES) changed.Not verified
No simulator or TV run. The shipping
makeARM build,make checkas a whole,plx_ui(untouched) andmake test-hostsimwere not run. The cold-launch arrival order on the reporter's household is inferred from the code, not observed.🤖 Generated with Claude Code