Skip to content

Let the playurl dev trigger start playback from the sign-in and picker pages - #1234

Merged
GLinnik21 merged 2 commits into
mainfrom
fix/playurl-from-signin
Nov 4, 2026
Merged

GLinnik21 merged 2 commits into
mainfrom
fix/playurl-from-signin

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

What was observed

docs/agent-reference.md and tests/README.md say the /tmp/plxnative-playurl dev trigger enters the player on its own from a boot with no session, and the pipeline test tier (tests/run.py run_pipeline_case) relies on that: it injects no token. On the TV it did not. The event log read boot: no session — starting QR sign-in, coldopen screen=login, then only loop=60 route=login for 120 s. The triggers were consumed and the fixture server saw no request.

Cause

Two separate things, the second visible only once the first is fixed.

  1. autoplay_arm (rust-modules/src/dev/scenarios.rs) only ran when the route was not Player, Login or Profiles, since 235e519. A boot with no stored session parks on the QR sign-in, so the arm never ran.
  2. Letting the arm run is not enough: a player pushed over the sign-in page never mounted. Until the page dip-out commits, top_arg() still names Login, so the per-frame follow_auth_landing kept running. In its Phase::Waiting arm nav_root_if_unsettled(Login) reads a pending push as "Login is not settled" (NavStack::root_settled is false while anything is pending) and parks a Root(Login). NavStack::is_inert only dedups the same op kind, so that Root replaced the pending Push(Player). The Profiles arm has the same shape.

Fix

  • autoplay_arm_due(route, auto_tried, elapsed_ms, playurl) is the arm's condition, extracted. playurl chooses no item and needs no session, so it may also fire from Login and Profiles. autoplay/playidx pick a catalog item and keep the old guard. The 2000 ms delay is unchanged. auto_tried is spent only when the arm fires, so autoplay after a real sign-in still fires on Home. playurl is asked last, only on those two pages, and latched in Scenarios::playurl_armed, so a sign-in page left open does not stat a file every frame.
  • bridge::player_arriving answers "is the player the page the stack is about to land on". follow_auth_landing returns early while it is true, before it takes the session handoff, so nothing is lost: the handoff stays in the bridge until the follower runs again. enter_player's already_up uses the same helper instead of its own copy of the check.
  • tests/player_shots.sh had a comment saying a sessionless boot never reaches the player. It is now false, so it is reworded (comment only).

Tests

Each failed against the old code before the fix and passes after (make test-crate C=app: 1183 passed, 3 failed before; 1186 passed after).

  • dev::scenarios::autoplay_arm_due_tests::playurl_fires_from_the_sign_in_and_picker_routes failed: a boot with no session parks on the sign-in page, which has no home grid for playurl to need.
  • dev::scenarios::autoplay_arm_due_tests::playurl_is_asked_last_and_only_when_it_decides failed on its last assertion (Login is not due with the old rule).
  • app::bridge::session_picker_regression_tests::a_player_pushed_over_the_qr_screen_is_not_re_rooted_by_the_follower failed: the follower withdrew the player push. It runs the production follow_auth_landing over the real Dispatcher with the production PageDip, as the neighbouring login-phase test does.

The other tests in autoplay_arm_due_tests pin the boot delay, the one-shot, Home needing no playurl answer, and the player never being due.

make test-hostsim: test result: ok. 1329 passed; 0 failed.

Gates

make check on the first commit was killed by the tool's two-hour limit while the machine was swapping; it never reached a verdict, so this PR's CI is the gate. Draft until CI is green.

Not verified here: playback from Login on the television. The host tests prove the navigation lands on the player; the return to the sign-in page after the stream ends and the real pipeline case need the set.

🤖 Generated with Claude Code

GLinnik21 and others added 2 commits November 4, 2026 19:52
…r pages

docs/agent-reference.md and tests/README.md say /tmp/plxnative-playurl enters the player on
its own from a boot with no session, and the pipeline test tier relies on that. The code did
not: autoplay_arm excluded Login and Profiles, so a boot with no stored session parked on the QR
sign-in and the trigger was never acted on (a TV run saw 120 s of loop=60 route=login and no
request reach the fixture server).

Two things stood in the way, and both are fixed.

- The arm's condition is now autoplay_arm_due: playurl, which chooses no item and needs no
  session, may fire from Login and Profiles; autoplay/playidx, which pick a catalog item, keep
  the old guard. The 2000 ms delay is unchanged, auto_tried is spent only when the arm fires
  (so autoplay after a real sign-in still fires on Home), and playurl is asked last, once
  (latched), so a sign-in page left open does not stat a file every frame.
- A player pushed over the sign-in page never mounted: until the dip-out commits, top_arg() still
  names Login, so the per-frame follow_auth_landing called the page "not settled" and parked a
  Root(Login) over the pending push. It now stands aside while the player is arriving. The
  pending-Player check is one helper, bridge::player_arriving, which enter_player's already_up
  uses too.

Tests: autoplay_arm_due_tests (three of them failed against the old rule) and
a_player_pushed_over_the_qr_screen_is_not_re_rooted_by_the_follower (failed against the old
follower).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…r reaches the player

The playurl arm now fires from the sign-in page too, so the comment claiming it is skipped on
Route::Login is false. Comment only; the script is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@GLinnik21
GLinnik21 marked this pull request as ready for review November 4, 2026 19:13
@GLinnik21
GLinnik21 merged commit 9357da7 into main Nov 4, 2026
20 checks passed
@GLinnik21
GLinnik21 deleted the fix/playurl-from-signin branch November 4, 2026 19:23
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