Repository navigation
Player sub-menus 4/5: animated panel resize and page slide (Tracks, More) - #347
Merged
Merged
Conversation
…ore) ui::panel_motion::PanelMotion, owned by the Tracks and More popovers: the natural layout is cached against TableView::layout_rev; springs move the panel's top and left edges (bottom/right anchored); a push or pop slides the outgoing and incoming table layers horizontally with alpha under one animated clip, one panel background, no backdrop capture. An opposite-direction interrupt mirrors progress and velocity, so push -> pop reverses smoothly. Audio <-> Subtitles resizes the card; More resizes when its row set changes. Only the live page registers focus stops, at the animated position; a settled panel asks for no frames. Screen::pointer_held lets a surface hold the pointer: the dispatcher records but never resolves it while a page slides, so it is neither a hit nor a miss (OnMiss::Dismiss never fires). Device scene: plxnative-submenuosc=<period_ms> loops real keys through Style, the Size picker, Other languages and the Audio tab; manifest scene track-menu-submenu-osc (worst_ceiling_ms 25, not yet measured on the TV); tv-session.sh up --arm NAME[=VAL] arms a scene's extra boot triggers; docs/player-submenus.md gains the account-free device frame-time sequence. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The feed-ahead throttle measured against SHARED.pres_fed, which moves in ~200 ms steps. The lane stayed shut for eleven frames and then opened by 200 ms of media at once, so every 12th frame fed ~5 video and ~7 audio AUs through a blocking Feed(): 4-15 ms of `results=` on the player route (FRAMEDROP spans `feed:14.4`). FeedPace runs the reference on at 1x from the last report, capped at 250 ms, so the same AUs land one or two per frame (~0.4 ms) and the buffer depth bound is unchanged. The results phase now carries scen/pump/land spans, the player clear a `clear` span, and each Feed() call sfv/sfa spans, so a slow frame names which of them held it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
On the player route the draw's first framebuffer command waits ~15 ms for a free back buffer, and a freshly pushed sub-page met its strings cold in the draw after that wait: `clear:12.8 ... textx8:7.4`, a 26.7 ms frame on the TV on the first visit to each page. PanelMotion::prewarm_text walks the live table through the recorder (the same speculative, clear-free walk ui::dispatch uses) once per table layout and rasterises up to eight of its strings in update. The budget is counted, not timed: the UI reads no wall clock. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ce and doc fixes The prewarm's budgeted drain uploaded GL textures from `update`, on frames that may not present or that run while the window is backgrounded, against spec §10. `update` now only records (clearing the queue first, so a held modal's strings cannot eat the budget) and `prepare_window` drains it inside its `fr.present` block, before the draw's glClear. Spans recorded on a frame that does not present are now discarded instead of printing on the next presented frame's FRAMEDROP line. FeedPace: a clock behind the report stamp is no run-on (saturating_sub), feed_stream reads the clock fresh per AU instead of once before a loop of blocking Feed() calls, and a seek resets the pace. Doc corrections for the cap, 1x, the results-phase steps, the span scope and the text queue's drain location. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The drain moved to the presenting side of the present decision, so the bridge test drivers (which stand in for a presented frame) now drain after each frame; without it a held surface waited forever on the queue the Tracks menu's update left. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Feed() blocks the frame thread, 0.3-0.7 ms per AU on the TV. The throttle is off while priming and a post-prime lane is a full lead behind, so the first frames of every playback (and every seek's re-prime) fed the whole demuxed backlog at once: FRAMEDROP total=89.1 with sfvx62:19.4 and sfax120:50.8, then sfax53:38.3 the frame after, with the HUD and the track menu on screen. The greedy video lane also fed 2.5 s before audio got a turn, so the prime fell through to the video-only escape (primed: v=2541ms a=0ms). Each lane now stops once it has spent FEED_LANE_SLICE_US in a tick, after feeding at least one AU; the AU stays pending exactly as on a throttle stop. Steady-state feeding (one or two AUs a frame) never reaches it. A host test with a 1 ms-per-read feed clock pins the per-lane bound and that the prime still completes on both lanes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The first switch from Subtitles to Audio drew the Audio root's strings cold on the TV: textx8:9.5 inside a 24.8-29.0 ms frame. The live page's prewarm cannot cover a tab switch, because the key rebuilds the table after that frame's update. Once per menu, on a frame with no page slide, no resize and an empty prewarm queue, update now builds the other tab's root form into a scratch table and records its strings (PanelMotion::prewarm_more_text, which extends the queue rather than replacing it). The presenting side's drain uploads them as it does the live page's. The Subtitles root's pure build (sub_root_form), the Audio root against an explicit enhancement answer (audio_form_for) and the panel's natural rect (table_natural) are split out so the scratch build shares them with the live one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… dim The track menu's open frame is 27-28 ms on the TV (navcommit 6-7 ms, scrims 5-7 ms, text 3 ms) and the existing spans cannot say which part of navcommit or scrims it is. tmnew covers TrackMenuState::new, ulatch the underlay field's sync and udim each dim's paint. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The other-tab warm from 83e4a16 was drained like a live page, eight strings a frame, and on the TV that put the whole Audio root into the frame after the menu opened: warmdrain:11.4 in a 21.3 ms frame (textx8:9.4 in a 22.1 ms one in the osc leg). Nothing waits on those strings, so a queue filled by PanelMotion::prewarm_background_text now drains at BACKGROUND_STRINGS (one, ~1 ms on the TV) per presented frame; a live walk or an empty queue restores the eight-string budget. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The track menu warms its inactive tab one string a frame through the text
prewarm queue, but that queue belongs to the live page: `ui::dispatch` empties
it every frame with no page warm, and a live walk replaces it. On the TV the
warm was therefore one string deep, and the first switch to Audio still
rasterised `textx9:8.0` / `textx7:6.6` cold (23-25 ms frames).
Background strings now park in their own queue in `text`. It is invisible to
`prewarm_pending` (no held surface waits on it), untouched by live walks and by
the draw's clear, and drained one string a frame only when nothing live is
queued. Closing the menu drops it.
The host tests now model the draw's per-frame clear; the idle-warm test fails
without this change ("met these Subtitles labels cold: [Other languages]").
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ed slice low-water exemption, drain occupancy bound, measured-build wording The other tab's warm now records inside rec::speculative (spec 5). The background prewarm queue has an owner token so a closing menu's drop cannot clear a newer menu's queue, and its drain honours TCACHE - PREWARM_HEADROOM. A feed lane below low-water (priming, or under 250 ms of lead) is exempt from the per-tick slice, so a slow Feed() neither stretches time-to-first-frame nor drains the lead. The doc and manifest say which commits the 2026-10-01 grades were taken on. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 1, 2026
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.
Part 4 of 5 of the player drill-in sub-menus (follows #345 and #346; design in
docs/player-submenus.md).What changed
ui/panel_motion.rs(new): one spring drives the popover card's rect; the top and left edges move and the bottom-right corner stays anchored. Page content slides with a staggered fade. The leaving page fades out over 0.14 s while moving 22% of the card width toward the exit side. The arriving page starts only after every leaving layer is at or below alpha 0.1, then fades in over 0.22 s from the entry side. So two pages are never legible at once, only the arriving page draws a focus pill, and layers below 1% alpha are not drawn (less overdraw on Mali).layout_rev, with a globally uniquenext_rev(). Content is clipped through the nestedClipScope, inset 10 px while moving. There is no backdrop capture.track-menu-submenu-osc: theplxnative-submenuosc=<ms>trigger walks Style → Size → back → Other languages → back → Audio tab → back through the real key handlers.worst_ceiling_ms25 is a budget, not a measured baseline.tools/tv-session.sh up --arm NAME[=VAL]arms boot triggers. The account-free recipe (mock PMS plus--guest --mock) is in the doc.Tests
New motion tests:
a_push_is_animating_then_asks_for_no_more_frames_at_restan_interrupted_push_then_pop_reverses_and_settles_at_the_root_rectrapid_pushes_and_pops_leave_one_slide_and_land_on_the_logical_pagea_push_during_a_push_steps_no_layerthe_two_pages_are_never_both_above_the_gate_and_only_one_draws_a_pilla_tab_switch_animates_the_heightthe_layout_is_cached_until_the_table_changesGates on the committed tree:
cargo test --libat5a5cc98f0:test result: ok. 5379 passed; 0 failed; 7 ignored--no-default-featurescheck: cleanmake check: rc 0 (5379/5456/102passed, 0 failed)make: rc 0A simulator run of the oscillator with no captures (about 60 s, 80 steps) had no hangs. The worst frame was steady at the simulator's vsync, with one GL-swap outlier.
Frame stalls on the TV (added after the first device run)
FeedPace). Each lane gets at most a 3 msFeed()slice per tick. A lane below its prime depth or a 250 ms low-water lead is exempt, so start-up and seek are not stretched.prepare_window.scen/pump/land,feed,sfv/sfa,ulatch/udim/tmnew). Spans from frames that are not presented are discarded.TV, 60 Hz panel, guest + mock, screen on, muted, ~90 s legs:
5a5cc98f0: worst frame median 18.5 ms; 31 frames ≥20 ms.glClear. The no-menu control has them at the same rate. The menu-open frame (~27–34 ms) is left for a follow-up.🤖 Generated with Claude Code