Skip to content

Play Version and Also available act on a pick again: a closing surface no longer blocks its page's command - #1433

Merged
GLinnik21 merged 1 commit into
mainfrom
fix/play-version-command
Nov 17, 2026
Merged

GLinnik21 merged 1 commit into
mainfrom
fix/play-version-command

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

Closes #1424

What

Picking a row in Play Version (or Also available) on a Detail page closes the panel again and then
plays (or opens) what was picked. Since #1392 it closed the panel and did nothing.

A page's app commands are gated on "the sender holds input". The five page-command gates (content, Home,
Search, Watchlist, Library) now ask one read-only dispatcher question, input_owner_after_dismissals: who holds
input once the Dismiss ops already parked this drain commit. The question only reads: no dispatcher field,
FIFO order or hash input is added. What changes is the gates' outcome, so a recording that contains a pick
from a closing surface admits the command and its state_hash moves from there on.

Why

The refusal rule (rust-modules/src/app/content.rs:593 on 3878e4f55, and its four siblings at 745, 817,
867 and 990): a page's command is refused unless nav.input_owner() == Entry(sender's entry), where
input_owner() is the topmost Opening|Open modal surface, else the top page. A covered page must not
navigate for itself.

Why this command fell foul of it:

  1. The Play Version surface closes on a pick and reports the row to the page that opened it:
    Fx::Nav(Dismiss) then a delivery of AppMsg::PlayVersion (screens/src/versions_panel.rs:99,113).
    The page answers with ContentReq::Play (screens/src/detail/mod.rs, the AppMsg::PlayVersion arm near
    line 2391 into play_hero, line 4628). Also available is the same shape (alt_sources.rs,
    AppMsg::AltSourceOpen into ContentReq::Present).
  2. A Dismiss is only PARKED in the drain (ui/src/dispatch.rs:2531) and commits at NAV COMMIT, step 7 of
    the frame.
  3. Before refactor(ui): complete owned presentation and replay inputs #1392 the page's commands ran after the frame (take_content_reqs after bridge::frame), when the
    panel was already gone. refactor(ui): complete owned presentation and replay inputs #1392 moved execution to the yielded FIFO head, in the pre-commit drain. There the
    panel is still Open, still the input owner, so the live Detail page got Refused: the panel closed, nothing
    played.

It is Refused, not RetiredSender: the sender is the live Detail page, so this is not a dead-sender case.
The refusals #1392 added for covered pages and dead senders stay.

Tests

Red first, on 3878e4f55 (origin/main) plus the tests only:

assertion `left == right` failed: the page asked to play the SECOND version, once, and the runner executed it: [(Other("content:PreviewStart"), Instance(InstanceId(2)), Refused), (Play(Some(MediaId(3086))), Instance(InstanceId(2)), Refused)]
  left: [Refused]
 right: [Completed]
assertion `left == right` failed: the page asked to present the other copy, once, and the runner executed it: [(Present(ServerId(1), "copy"), Instance(InstanceId(1)), Refused)]
  left: [Refused]
 right: [Completed]
test result: FAILED. 3 passed; 2 failed; 0 ignored; 0 measured; 1436 filtered out; finished in 0.04s

Green with the fix (make test-crate C=app T=detail_panel_tests):

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 1436 filtered out; finished in 0.04s
  • a_picked_version_plays_that_version_though_its_panel_is_still_closing (the reporter's case): a title with
    two versions, Play Version open, Down, OK through the product frame and the real runner. The page's play
    command carries the SECOND version's id and ends Completed, the panel is gone and the Player is on top.
  • a_picked_alternative_source_opens_that_copy_though_its_picker_is_still_closing: the same for Also
    available
    , ContentReq::Present of the other copy's page.
  • a_page_under_a_picker_that_stays_open_is_still_refused: the covered-page refusal still holds; only a
    surface whose own Dismiss is parked counts as closed.
  • containers::tests::the_owner_after_dismissals_is_the_page_once_the_surfaces_dismiss_is_parked (ui): the
    container-level query.
  • refactor(ui): complete owned presentation and replay inputs #1392's own tests, which still pass: product_runner_refuses_covered_search_and_retires_an_unmounted_sender
    (a covered page is refused; an unmounted sender is RetiredSender) and
    a_covered_live_sender_is_not_retired_and_lifecycle_after_take_is_revalidated, both in
    app/dispatch_return_tests.rs.

The PreviewStart the Detail page asks while the panel covers it is refused before and after the fix, which is
right: a covered page starts nothing.

Other callers checked

Read, not all tested:

  • Same shape and fixed: Play Version and Also available, the two surfaces that Dismiss and then report to a
    page, which then asks the app for a command. Both tested above.
  • Same gate, no parked-dismiss shape today: the Home, Search, Watchlist and Library page commands share the
    helper (holds_input), so they cannot disagree with the content one. Library's menu reports its pick as a
    page-internal request (LibraryEdit) and a LibraryMenuSelect on the surface's unmount, neither of which
    reaches the library gate while the dismissal is parked. The Watchlist menu's one command (SetOptions)
    comes from the surface and is exempt from that gate.
  • The item menu is itself the sender and has its own gate with a closing_menu clause, unchanged. Its
    player-return tests (hostsim) pass.
  • Among the surfaces I read that dismiss (tracks, about, person bio, account menu, library menu, watchlist
    menu, item menu, versions, alt sources), none but those two pushes a Content/Home/Library/Search/Watchlist
    command from itself. That list is not complete: settings, consent, the player overlay and the dispatcher's
    own edge and click-outside Dismisses (dispatch.rs:1351, :3049) are not in it.
  • The other direction: a content page presented as a surface (the copy Also available opens,
    content.rs:614-617, and Filmography, person.rs:882) dismisses itself through ContentReq::Back →
    content_back (content.rs:1126). A further gated command it sends in the same drain is now refused,
    where main admitted it. Before refactor(ui): complete owned presentation and replay inputs #1392 it was refused after the commit, and Back already stops the
    preview, so this restores the older outcome.
  • The stacked case is real in the product: the copy Also available opens is an opaque surface, and its own
    Play Version panel opens over it (bridge.rs:4423). A pick there is admitted because the search skips only
    surfaces whose Dismiss is parked and falls through to the copy. That was checked by reading; no test
    stacks two real surfaces or covers a surface still Opening.

Gates (on the committed tree, git status --short empty before and after)

make test-crate C=ui
test result: ok. 1664 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.79s

make test-hostsim T=item_menu_player_return
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 1658 filtered out; finished in 0.13s

make check-nodef
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 32.76s

bash ci/check-deps.sh
check-deps: all gates green

python3 ci/check-module-layers.py
check-module-layers: green

python3 ci/check-app-command-routing.py
(no output, exit 0)

make test-crate C=app aborts with SIGSEGV (exit -11) in
app::bridge::product_extension_tests::an_unregistered_product_screen_uses_generic_navigation_and_actual_store_effects
on this Mac. The same test dies the same way on the unmodified 3878e4f55 (run alone: running 1 test, then
exit -11; a 64 MiB RUST_MIN_STACK does not change it), so it is not this change. The committed tree's
test binary with that one test skipped:

test result: ok. 1440 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out; finished in 24.63s

The first full run also failed
adapters::huds::tests::missing_faces_are_tried_again_after_a_store_event_and_the_package_then_compiles and
bootstrap::tests::flow12_default_producer_long_recording_passes_current_preflight once; neither recurred in
the three runs after.

Not verified

  • Not run on the TV (no device in this task). The tests run the product frame and the real runner on the host;
    playback itself is not exercised past the Player being pushed.
  • No replay fixture was re-recorded, because none has a surface reaching a page-command gate: every page
    command in them goes from one page to another, and none presents a surface. That was checked by reading the
    recorded payloads, not by replaying them; CI's replay gate is the proof.
  • One pr-reviewer pass ran on this commit. It found no blocker or major issue, and two minor ones: the wording
    this text now corrects, and the missing two-surface test above.
  • The make check aggregate was not run; the gates above are the brief's list.

🤖 Generated with Claude Code

…e no longer blocks its page's command

Since #1392 a page's app command runs at the head of the dispatcher FIFO, in the drain ahead of
the frame's NAV COMMIT. Play Version and Also available are surfaces that close on a pick and
report the row to their Detail page (`Fx::Nav(Dismiss)`, then a delivery to the page), and the
page answers with `ContentReq::Play` / `ContentReq::Present`. That dismissal is only PARKED until
the commit, so `content_command`'s gate, `input_owner() == Entry(sender)`, still saw the closing
surface holding input and answered `Refused`: the panel closed and nothing played or opened.
Before #1392 the commands ran after the frame's commit and never met the closing surface.

The five page-command gates (content, Home, Search, Watchlist, Library) now ask one read-only
question of the dispatcher, `input_owner_after_dismissals`: who holds input once the Dismiss ops
already parked commit. A surface that stays open still covers its page, so the covered-page
refusal and RetiredSender for a dead sender are unchanged, and nothing about the FIFO, its order
or its hashed state moves.

Tests: the reporter's Play Version case and the Also available picker through the real
dispatcher and runner (both Refused before, Completed after), a page under a picker that stays
open still refused, and the container query itself.

Closes #1424

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@GLinnik21 GLinnik21 added bug Something isn't working playback Playback, the player and its controls labels Nov 17, 2026
@GLinnik21
GLinnik21 merged commit 5e8a9d8 into main Nov 17, 2026
24 of 27 checks passed
@GLinnik21
GLinnik21 deleted the fix/play-version-command branch November 17, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working playback Playback, the player and its controls

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Play Version does nothing since #1392: the picked version's command is refused

1 participant