Skip to content

Player sub-menus 2/5: keyed track-menu forms, Style page with Size/Position/Color pickers - #342

Closed
GLinnik21 wants to merge 4 commits into
mainfrom
feat/player-submenus-2-pages
Closed

GLinnik21 wants to merge 4 commits into
mainfrom
feat/player-submenus-2-pages

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

What changed

PR 2 of the player sub-menus (docs/player-submenus.md):

  • Keyed track-menu forms (2a): the Audio and Subtitles tabs are declarative FormTable forms with semantic row ids and stable RowKeys.
  • Style page stack (2b): Subtitles -> Style -> Size / Position / Color pickers, LEFT/RIGHT/BACK/title-band navigation, per-renderer locks (image / native ASS keep their own size and position; Color stays live), replay canon for the page path.
  • Fixes in this pass
    • Settings Size/Position retry: after a failed write the live atomic is already on the new rung, so OK on the checked row used to pop without writing and the next boot reverted. For those two fields the picker now also compares against the STORED value, so OK retries.
    • A rebuild-signature change on a sub-page refreshes the page in place (focus kept by id); it pops to the root only when the page's availability no longer holds (renderer kind, or Style's own-burn / server-burn gate).
    • Player popovers (Tracks, More) get a minimum width, theme::layout::PLAYER_MENU_MIN_W = 440 px, via TableView::min_panel_w; a floor only, wider content still grows to MENU_MAX_W. At 440 the locked-renderer note takes two lines in English and Belarusian, three in Spanish (two needs about 520).
    • Stale docs corrected (overlay.rs key / edge_key, track_menu.rs module head, TrackMenuPart, TrackOk::Inert).

Replay anchors

The overlay's canonical state shape changed on purpose in 2b (tab, page path with return ids, selected key), so the replay anchors were re-recorded for it. The minimum width needed no further re-record (make check replay/focus gates pass).

Optimistic Settings save path

route::select_subtitle_size/position publishes the live atomic on the main thread, invalidates, and submits a persist-only write to the storage worker (FIFO, last submitted wins); the Settings pickers use the same call and pop on the durable receipt. A failed write keeps the page with "Please try again", and OK on the checked row now retries it.

Tests

New, each observed failing before its fix: ok_on_the_checked_size_after_a_failed_write_retries_the_write, a_signature_change_that_keeps_the_pages_availability_refreshes_in_place, the_style_note_fits_two_lines_at_the_player_menu_floor. The existing renderer-change test still pops, and the Style-page fit tests grade at the floor. Captures were taken in the simulator against the mock server only; frame rate and text rasterization still need the television.

Gates (committed tree, clean before and after):

  • cargo +nightly test --lib: test result: ok. 5319 passed; 0 failed; 7 ignored; 0 measured; 0 filtered out
  • cargo +nightly check --lib --no-default-features: Finished, no errors
  • make check: exit 0 (test result: ok. 5393 passed; 0 failed; 7 ignored and ok. 102 passed; 0 failed)
  • make (ARM): exit 0

🤖 Generated with Claude Code

GLinnik21 and others added 4 commits October 1, 2026 04:25
… no visible change)

Audio and Subtitles are now ui::form Forms held in one FormTable, replacing TrackMenuState's hand
built Vec<Section> and the parallel RowTarget / AudioRowTarget position maps. Each row is declared
once with a TrackRowId (Off, SubTrack(i), Timing, Color, AudioTrack(i), Boost, Loudness), its RowKey,
kind and Row; RowTarget and SubRow::target are folded into the id (the pure grouping model
sub_layout::sub_sections is unchanged).

RowKey = tab base (0x100 audio, 0x200 subtitles) + a stable ordinal: a track's index in the playing
item's list, constants for the fixed rows, never the list position. Every index-based focus path
moved to keys in this change: TrackMenuPart's groups/group_of/neighbour/place/reconcile/seat and the
pointer stops, the overlay's FocusMoved write-back and Activate (which now seats the panel on the row
the event names before spending it), and row lookups by id. Opening or switching tab uses
FormTable::open with the active track as the initial id; live polls use the new
FormTable::refresh_with (prefer / fallback ids), which carries the Audio tab's banked Boost/Loudness
focus across a rows vanish/return by id. Locked Timing/Color and the dim enhancement pair are
declared disabled, so OK on them is inert at the form layer.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…sub-menus PR 2b)

The Subtitles tab is a page stack: root -> Style (Size / Position / Color, each
showing its value) -> picker pages with the current value checked. Color moves
from a cycling row to a picker. OK/RIGHT on a Nav row pushes; LEFT/BACK or a click
on the title band pops, restoring the opener by id and the scroll; BACK at the
root dismisses and LEFT at the root is still the tab switch. Timing's chevron is
gone (it is a hand-off, not a page).

Persistence: route::select_subtitle_size/position publish the live atomic first and
submit a persist-only write (optional reply) that never republishes; Settings'
Size/Position use the same path and refresh their cached rows and open picker.

Locks: Style follows Timing's availability and is dimmed with the locked note only
for the app's own burn; image and ASS/SSA subtitles dim Size and Position with
separate notes; Color stays live. A rebuild signature (subs, active index,
renderer kind, transcoding, own-burn/enhancement route) pops a sub-page to the root
on mismatch. The replay canon carries the page path, return ids and selected key,
so the overlay SHAPE changed and the three replay anchors were re-recorded on
purpose (observed refused, re-recorded, replayed SAME in both modes).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…e, in-place page rebuild, player menu minimum width

A failed Size/Position write left the live value (and the checkmark) on the new rung while the
disk kept the old one, so OK on the checked row popped without writing and the next boot reverted.
The picker now also compares against the stored value for those two fields, so OK retries.

On a Style sub-page a rebuild-signature change no longer pops to the root unconditionally: the
page is refreshed in place (focus kept by id) and pops only when its availability no longer holds
(renderer kind, or Style's own-burn / server-burn gate).

The in-player popovers (Tracks, More) get a minimum width, theme::layout::PLAYER_MENU_MIN_W
(440 px), carried by TableView::min_panel_w, so small pages stop shrinking to their labels; it is a
floor only. Stale docs on key/edge_key/TrackOk::Inert/TrackMenuPart and the module heads updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@GLinnik21

Copy link
Copy Markdown
Collaborator Author

Superseded by #345 (same feature ported onto #339's track-menu form).

@GLinnik21 GLinnik21 closed this Oct 1, 2026
@GLinnik21
GLinnik21 deleted the feat/player-submenus-2-pages branch October 10, 2026 00:13
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