Repository navigation
HUD: BACK dismisses a Skip or Up Next offer and restores the discs - #1161
Conversation
GLinnik21
left a comment
There was a problem hiding this comment.
Requesting changes: the Skip pill shouldn't join the transport row.
This adds a sixth control to the row, and the result looks messy. There are too many buttons at once, and the row changes shape every time a segment starts. I'd rather keep the row as it is on main: Skip Intro, Skip Credits and Up Next take the place of the Subtitles/Audio/More discs, with nothing added beside them.
What I'd consider instead is letting BACK dismiss the offer. Pressing BACK over a Skip or Up Next button hides it and brings the Subtitles/Audio/More discs back. That fixes the "unreachable for 60–90 s" problem without adding any controls.
Back over the offered control row latches that marker segment and swaps the Skip pill / Up Next tile for the Subtitles, Audio and More discs, without hiding the transport or leaving playback. The latch is keyed on the segment, not the row, so dismissing Skip Intro does not suppress Up Next or Skip Credits later in the same episode; the row itself is exactly the one main draws, with no sixth control. The slot is recomputed from the playhead every frame, so the dismissal is resolved once per frame in app::run before focus follows the row and before the page is handed the slot. It also clears was_standin, because the swap is not a stand-in leaving under the ring. The player HUD state shape gains dismissed_offer, which bumps the screen shape pin and requires the replay anchors to be re-recorded.
80daed7 to
e3af3f0
Compare
|
Reworked along the review's lines; the earlier latch is gone.
Verification is in the body. |
GLinnik21
left a comment
There was a problem hiding this comment.
Nice, this is the row I meant. One design thing and one bug inline before it lands. Watch the frame order too: BACK arrives after playback_tick set fr.ctrl, so player.slot = fr.ctrl in run.rs puts the offer back for that frame. And the state graph in docs/hud-plugins.md needs the new BACK edge.
| /// independent decisions: dismissing Skip Intro must not silently hide Up Next at the end | ||
| /// of the same episode. The row falls back to the discs while the playhead is still inside | ||
| /// this segment, and a different segment offers normally. | ||
| pub dismissed_offer: Option<(plx_data::metadata::MarkerKind, i64)>, |
There was a problem hiding this comment.
We already have this. MetadataState::skipped is the same (MarkerKind, i64) key, active_marker reads it, the store clears it per item, and mark_skipped's doc names this very case. Can BACK ask a typed PlayerReq that runs MetadataCmd::MarkSkipped, so slot() answers the discs by itself? Then the latch, the state-shape bump and the three re-recorded fixtures all go away. synthesized_tail_marker doesn't check skipped yet, so it needs the same filter.
There was a problem hiding this comment.
Done. BACK now asks PlayerReq::DismissOffer(marker); app::playback::player_requests runs MetadataCmd::MarkSkipped, the latch/state-shape field is gone, the pin and anchors are back on main, and synthesized_tail_marker applies the same skipped filter.
| self.hud.dismissed_offer = Some(offer); | ||
| self.slot = self.hud.slot_after_dismissal(self.slot, ps); | ||
| if self.hud.nav.focus == GROUP_ROW { | ||
| self.hud.nav.btn = self.slot.primary_btn(); |
There was a problem hiding this comment.
This moves the ring but not the engine. After Watch Credits then BACK the ring sits on Next, the engine stays on Previous, and OK restarts the episode. Use self.row_primary() and re-seat with repair_focus. bound_press has no engine so the test can't see it, travel_rig::Rig can.
There was a problem hiding this comment.
Fixed. dismiss_offer now uses row_primary() and re-seats by element; content_requests does the same after the metadata command re-resolves fr.ctrl, so the ring, the engine and OK all name the drawn primary. back_over_an_offer_swaps_in_the_discs_on_the_same_frame covers the app path and the engine seat.
| /// row to the discs, and leave the cursor on the row at the new primary so the next press is | ||
| /// a disc rather than a trip back up from the scrubber. The app resolves the same latch in | ||
| /// `run::update` before its next `slot()`, so the swap survives the frame. | ||
| fn dismiss_offer(&mut self, ps: &plx_media::route::PlaybackSession, now: u32) { |
There was a problem hiding this comment.
nit: one eventlog::log line here, follow_control_row logs its edge so a device run can read it.
There was a problem hiding this comment.
Kept it: marker dismissed: <kind> at <n>s, beside follow_control_rows offer line.
|
Thanks! |
|
This merged with the latch implementation, so the review's rework is in #1187: |
BACK over a Skip Intro / Skip Credits pill or an Up Next tile still dismisses that segment's offer and puts the Subtitles/Audio/More discs back without hiding the transport. What changes is where the dismissal lives: the metadata store's `skipped` set is now the only dismissal state, and #1161's HUD-side latch (`HudState::dismissed_offer`), its state-shape bump and its re-recorded replay anchors are gone. - BACK asks a typed `PlayerReq::DismissOffer(marker)`. `app::playback::player_requests` runs `MetadataCmd::MarkSkipped` through the Bridge's `metadata_run`, the set a Skip press already writes and the store clears per item, so `slot()` answers with the discs by itself. - `MetadataView::active_marker` and `synthesized_tail_marker` share one `skipped` filter. The synthesized tail was the one offer path that ignored the set, so a dismissed silent credits tail would have come straight back. - Dismissal is per marker segment (the store keys on `(kind, start_ms)`): dismissing Skip Intro does not suppress Up Next / Skip Credits later in the episode, and it holds for the rest of that item's playback, so a scrub back into the segment is not re-offered. - After a dismissal `content_requests` re-resolves `fr.ctrl` and parks the FocusEngine on the row's primary by element, so the ring and OK land on the same disc after Watch Credits. `PlayerScreen::dismiss_offer` builds the returning discs from the frame's own `model.controls` snapshot (no process-global read inside the step) and seats the row once by its own `Seat::First` policy. - A second BACK is an ordinary transport hide; BACK from the scrubber is unchanged. No new control, no geometry change, no sixth focus stop. The player's logical state is back to its pre-#1161 shape: `SCREEN_SHAPES_PIN` and the three replay anchors are untouched. - Cleanup folded in on review: the two player re-seat helpers in `bridge.rs` share one delivery, the new tests share their marker fixtures and ask the production resolve, and the comments and `docs/parity-gaps.md` describe the skipped set's lifetime instead of the removed latch. Known follow-up, not part of this change: the app still computes the returning row and cursor a second time after the page's own step (`content_requests`, `Frame::ctrl` gets a second writer), and the dismissal rides `PlayerReq` on the `AppFx::Player` lane rather than `AppFx::Store`. The general fix is to re-resolve the slot once where it is handed to the page. Verification (host): `make test-crate` plx_data 1449, plx_screens 1863, plx_appkit 761 passed; `make test-hostsim` 1256 passed; `tests.test_replay_fixtures` 13 OK; `make check-nodef` clean. Not device-verified: the row is the same visual as before. No writes to a real Plex account; no TV commands were run. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Two textual conflicts, both resolved by keeping both sides: - ui/src/cards/mod.rs: the `card_row` re-export keeps this branch's `Rim` and main's `SortValue` and `SORT_VALUE_*` items. - screens/src/player/mod.rs: `row_primary` keeps main's `pub` and its doc (the FocusEngine's re-seat lands on it) with this branch's body, which reads the discs through `eff_slot` and the open sections. Main's BACK-dismisses-an-offer arm (#1161, #1187) sits below the section arm of the BACK ladder, so a BACK over an open section closes the section and never retires the offer under it; a test pins that for the modal and the inline policy. Dutch (#1160) is covered by the SHIPPED-driven tests and goldens. Co-Authored-By: Claude Opus 5.5 <[email protected]>
What
The control row stays exactly as it is on
main: a Skip Intro / Skip Credits pill or an Up Next tile still takes the place of the Subtitles/Audio/More discs, with nothing added beside it. What changes is BACK: pressed over the offered row, it dismisses that segment's offer and puts the discs back, without hiding the transport or leaving the film.PlayerReq::DismissOffer(marker).app::playback::player_requestsrunsMetadataCmd::MarkSkipped— the setMetadataState::skippedalready owns, that a Skip press writes, and that the store clears per item.slot()therefore answers with the discs by itself; there is no HUD-side latch and no second source of truth for a decision the store already makes.MetadataView::active_markerandsynthesized_tail_markernow share oneskippedfilter. The synthesized tail was the one offer path that did not consult the set, so dismissing a silent credits tail would otherwise have brought it straight back.app::content::content_requestsre-resolvesfr.ctrlafter a dismissal and parks the FocusEngine on the row's primary by element. A group-only re-seat restored the element the engine remembered from before the stand-in, leaving the ring and OK on different discs after Watch Credits.PlayerScreen::dismiss_offeruses the samerow_primary()locally, so a page-only test sees the same cursor.(kind, start_ms)and clears the set per item, so dismissing Skip Intro does not suppress Up Next / Skip Credits later in the episode.SCREEN_SHAPES_PINdoes not move and the three replay anchors are untouched.skip_pill.rsnow describes the BACK dismissal instead of the old "CC/Audio are unreachable" cost;docs/hud-plugins.mdrecords the new BACK edge.Verification
make test-crate C=plx_data— 1449 passed, 0 failedmake test-crate C=plx_screens— 1863 passed, 0 failedmake test-crate C=plx_appkit— 761 passed, 0 failedmake test-hostsim— 1252 passed; the only 3 failures are the existing permission/refusal session tests, which assert thatchmodstops a write and therefore cannot fail-close under uid 0. All 3 pass when the same binaries run as an ordinary user.python3 -m unittest tests.test_replay_fixtures— 13 tests OK; all three anchors still carrystate_fp 12149748892022442062andanchor: true.make lintclean;make check-nodefclean;ci/check-deps.shall gates green.On this host (uid 0) a full
make checkcannot be green: itsplx_plexpersistence suite asserts denied/unlinkable writes, and the four pre-existingplx_media::route::decision::prefs_*log tests fail outside it as well.plx_mediaandplx_plexare untouched by this diff; the suites above are the ones that exercise it.The tests added here:
back_over_a_skip_or_up_next_offer_restores_the_discs_without_hiding_the_transport(both offer kinds askDismissOffer(marker), the local row becomes the discs, ring on the row)dismissing_an_offer_re_seats_the_engine_on_the_returning_discs_primary(page + FocusEngine agree on the new primary)back_over_an_offer_swaps_in_the_discs_on_the_same_frame(app-side: the frame that took BACK draws the discs, the store holds the segment skipped, and the engine lands on the drawn primary before the next key)a_dismissed_synthesized_tail_is_not_offered_again(the tail path honoursskipped)dismissing_one_marker_leaves_a_later_segment_on_offer(per-segment, not per-episode)back_off_the_offer_row_still_hides_the_transport(BACK from the scrubber keeps its old meaning)Not device-verified: the row is deliberately the same visual as
main, so no new pixel layout needs a TV check; the BACK behaviour is covered by the host suite above. No writes to a real Plex account; no TV commands were run for this branch.