Repository navigation
ui: the tab row scrolls, so every library is reachable - #16
Merged
Merged
Conversation
The centred tab-pill row is our only way into a library, and it was capped at
Home plus four sections. The cap was applied honestly and consistently — the
draw truncated at `MAX_TABS - 1`, the hit rects were a fixed `[Rect; 5]`, and
both focus walks clamped to the same number, because the rule was that a pill
which cannot be drawn must never be focusable. Everything under it was already
fine: `browse::ensure_sections` discovers every movie/show section, `set_cur`
accepts any index, and `/tmp/plxnative-library=N` browses section 4 and beyond
correctly. So a user with Movies / TV / Kids Movies / Kids TV / 4K Movies had a
fifth library the app knew about, could load, and could not open.
Keep the rule, remove the cap, by making "can be drawn" true of every pill: the
strip now scrolls horizontally inside its track. That is the problem the detail
page's season tabs already solve for a many-season show, solved the same way —
`card_row::reveal` minimal scroll-into-view on a critically-damped spring at the
season row's own stiffness. The two rows are the same element by user directive,
and that now covers their motion as well as their geometry. The track stays
centred and caps at a width that clears the profile chip; past that the pills
slide inside it and are cut by the scissor at the pill area's edge, which is
also the affordance that says there is more over there. A row that fits is
untouched: no clip, no scroll, the same centred bar as before.
`MAX_TABS` is gone rather than raised — a bigger constant only moves the
unreachable library further out. `tab_count()` replaces it as the one source of
the focusable pill count.
Three things the row now has to get right, none of which the old fixed geometry
could get wrong:
- The recorded hit rect is the pill CLIPPED to the viewport, and the same
clipped width decides whether to draw at all. One rule, so the scissor and
the pointer cannot disagree about a sliver at the strip's edge — an
off-screen pill has zero width and is neither drawn nor clickable.
- Off the row the scroll tracks the SELECTED pill rather than holding, which
is where this departs from the season tabs. The way back into the band is
the chip and then the Home pill, its left end, so a strip parked far right
would be showing pills the next keypress cannot reach anyway, under a row
with no selected tab in view. Landing straight in a far section is handled
at entry instead, by a jump, so arriving costs no slide.
- Home draws the profile chip AFTER the track. The chip's focused capsule
unfurls the profile name to its right, and a wide enough strip now reaches
far enough left to meet it; under the track, that name was painted over.
`Rect::intersect` lands in the retui core, where the next clipped hit test can
find it.
Tests: +5 host (63)
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_018GuSHrq9oydnX7nhKE1Hvc
GLinnik21
added a commit
that referenced
this pull request
Aug 3, 2026
… machine
Replace the five entangled `let mut` route bools (playing/detail_open/menu_open/
info_open/chapters_open) with one exclusive state machine:
enum Overlay { None, Menu, Info, Chapters }
enum Route { Home, Detail, Player { overlay: Overlay } }
Overlays live inside Player (only meaningful during playback); Detail and Player
are mutually exclusive, so illegal combos are unrepresentable. All 89 sites
migrated (reads -> matches!, writes -> route assignments); deleting the bool decls
made the compiler enforce read coverage. The #16 background/foreground UAF path is
preserved: background sets Route::Home while the suspended session stays in
bg_was_playing/bg_was_paused/bg_pos, foreground does a single guarded re-Load.
Return-to-detail is preserved via a `played_from_detail` return-target (kept
outside Route, like bg_was_playing): Stop/BACK/EOS from a detail-launched play
returns to that detail page, home-launched returns home — byte-equivalent to the
old detail_open-under-playing mechanism, incl. the bg-resume window edge case.
Planned + adversarially verified by a map->design->verify workflow (13 agents, 0
refutations); the applied diff was re-reviewed (sound, no blockers, one minor
safe-direction race fixed). Verified on-device: Home->Detail->Player->Player{Menu}
route graph with live video + track-menu overlay, no crash. Completes the
View-tree migration (docs/ui-viewtree-plan.md stops after 7a).
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Kcauj6zm932EtcdTTtW998
GLinnik21
added a commit
that referenced
this pull request
Aug 15, 2026
…fix it
The reopen wedge has a mechanism now, from the device's own binary (md5-matched
against the copy in `sysroot/`), and it is NOT what the symptom suggests.
There is no latch in `WebOSShowScreenKeyboard`: the second call re-runs every
step of the first. The defect is one step earlier, in the `text_model.leave`
handler at 0x8043c —
80452: str r3, [r4, #16] ; vkb->text_model = NULL BEFORE the call
80458: b.w 0x7cc20 ; SDL_StopTextInput()
— which NULLs the model before calling stop, so `WebOSHideScreenKeyboard`'s
`cbz r0` early-returns and `text_model_deactivate` is never sent. The compositor
keeps the old model active and ignores every later `activate`. Exactly what
webosbrew's 265d00ea ("ensure osk is deactivated") fixes, and what LG's own
chromium client documents as the contract SDL omits: reset, deactivate, destroy,
NULL.
Two things that would have been reached for and are dead ends: `SDL_SetTextInputRect`
is a total no-op here (`Wayland_CreateDevice` never writes +0xd4/d8/dc — only the
four keyboard hooks exist), and `SDL_IsScreenKeyboardShown` IS stale after a
dismiss (+0x1c is never cleared) but gates nothing, so it is a reporting bug and
not the cause.
What this commit adds is EVIDENCE, not a fix, because the device runs so far
cannot tell the driver's wedge apart from one of our own making — and the two
have identical symptoms. `start()` is a no-op while `STARTED` is set, so a `stop`
that never runs also makes every later `start` silent and the panel simply never
returns. `stop` now logs its transition, so the pair answers which one you have:
`start` with no matching `stop` before it is ours; `start` logged with no panel
is the driver's.
`SDL_LogSetPriority(INPUT, DEBUG)` turns on the driver's own narration
(`[WebOSShowScreenKeyboard] called`, `[TextModelLeave] called`,
`[TextModelInputPanelState] called - state: %d`). NB it did NOT reach
`/tmp/plxnative-stderr.log` on this firmware — 0 bytes across a full session — so
where LG's SDL sends its log is itself unresolved, and the app's own two lines
are the reliable half today.
Also fixed while here: `enter()` cleared `EDITING` without calling `stop()`, the
one place in this screen where the flag and the panel could disagree.
`make check` 643 green, ARM cross-build links.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
GLinnik21
added a commit
that referenced
this pull request
Aug 26, 2026
… machine
Replace the five entangled `let mut` route bools (playing/detail_open/menu_open/
info_open/chapters_open) with one exclusive state machine:
enum Overlay { None, Menu, Info, Chapters }
enum Route { Home, Detail, Player { overlay: Overlay } }
Overlays live inside Player (only meaningful during playback); Detail and Player
are mutually exclusive, so illegal combos are unrepresentable. All 89 sites
migrated (reads -> matches!, writes -> route assignments); deleting the bool decls
made the compiler enforce read coverage. The #16 background/foreground UAF path is
preserved: background sets Route::Home while the suspended session stays in
bg_was_playing/bg_was_paused/bg_pos, foreground does a single guarded re-Load.
Return-to-detail is preserved via a `played_from_detail` return-target (kept
outside Route, like bg_was_playing): Stop/BACK/EOS from a detail-launched play
returns to that detail page, home-launched returns home — byte-equivalent to the
old detail_open-under-playing mechanism, incl. the bg-resume window edge case.
Planned + adversarially verified by a map->design->verify workflow (13 agents, 0
refutations); the applied diff was re-reviewed (sound, no blockers, one minor
safe-direction race fixed). Verified on-device: Home->Detail->Player->Player{Menu}
route graph with live video + track-menu overlay, no crash. Completes the
View-tree migration (docs/ui-viewtree-plan.md stops after 7a).
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Kcauj6zm932EtcdTTtW998
GLinnik21
added a commit
that referenced
this pull request
Aug 26, 2026
…fix it
The reopen wedge has a mechanism now, from the device's own binary (md5-matched
against the copy in `sysroot/`), and it is NOT what the symptom suggests.
There is no latch in `WebOSShowScreenKeyboard`: the second call re-runs every
step of the first. The defect is one step earlier, in the `text_model.leave`
handler at 0x8043c —
80452: str r3, [r4, #16] ; vkb->text_model = NULL BEFORE the call
80458: b.w 0x7cc20 ; SDL_StopTextInput()
— which NULLs the model before calling stop, so `WebOSHideScreenKeyboard`'s
`cbz r0` early-returns and `text_model_deactivate` is never sent. The compositor
keeps the old model active and ignores every later `activate`. Exactly what
webosbrew's 265d00ea ("ensure osk is deactivated") fixes, and what LG's own
chromium client documents as the contract SDL omits: reset, deactivate, destroy,
NULL.
Two things that would have been reached for and are dead ends: `SDL_SetTextInputRect`
is a total no-op here (`Wayland_CreateDevice` never writes +0xd4/d8/dc — only the
four keyboard hooks exist), and `SDL_IsScreenKeyboardShown` IS stale after a
dismiss (+0x1c is never cleared) but gates nothing, so it is a reporting bug and
not the cause.
What this commit adds is EVIDENCE, not a fix, because the device runs so far
cannot tell the driver's wedge apart from one of our own making — and the two
have identical symptoms. `start()` is a no-op while `STARTED` is set, so a `stop`
that never runs also makes every later `start` silent and the panel simply never
returns. `stop` now logs its transition, so the pair answers which one you have:
`start` with no matching `stop` before it is ours; `start` logged with no panel
is the driver's.
`SDL_LogSetPriority(INPUT, DEBUG)` turns on the driver's own narration
(`[WebOSShowScreenKeyboard] called`, `[TextModelLeave] called`,
`[TextModelInputPanelState] called - state: %d`). NB it did NOT reach
`/tmp/plxnative-stderr.log` on this firmware — 0 bytes across a full session — so
where LG's SDL sends its log is itself unresolved, and the app's own two lines
are the reliable half today.
Also fixed while here: `enter()` cleared `EDITING` without calling `stop()`, the
one place in this screen where the flag and the panel could disagree.
`make check` 643 green, ARM cross-build links.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
GLinnik21
added a commit
that referenced
this pull request
Aug 27, 2026
…fix it
The reopen wedge has a mechanism now, from the device's own binary (md5-matched
against the copy in `sysroot/`), and it is NOT what the symptom suggests.
There is no latch in `WebOSShowScreenKeyboard`: the second call re-runs every
step of the first. The defect is one step earlier, in the `text_model.leave`
handler at 0x8043c —
80452: str r3, [r4, #16] ; vkb->text_model = NULL BEFORE the call
80458: b.w 0x7cc20 ; SDL_StopTextInput()
— which NULLs the model before calling stop, so `WebOSHideScreenKeyboard`'s
`cbz r0` early-returns and `text_model_deactivate` is never sent. The compositor
keeps the old model active and ignores every later `activate`. Exactly what
webosbrew's 265d00ea ("ensure osk is deactivated") fixes, and what LG's own
chromium client documents as the contract SDL omits: reset, deactivate, destroy,
NULL.
Two things that would have been reached for and are dead ends: `SDL_SetTextInputRect`
is a total no-op here (`Wayland_CreateDevice` never writes +0xd4/d8/dc — only the
four keyboard hooks exist), and `SDL_IsScreenKeyboardShown` IS stale after a
dismiss (+0x1c is never cleared) but gates nothing, so it is a reporting bug and
not the cause.
What this commit adds is EVIDENCE, not a fix, because the device runs so far
cannot tell the driver's wedge apart from one of our own making — and the two
have identical symptoms. `start()` is a no-op while `STARTED` is set, so a `stop`
that never runs also makes every later `start` silent and the panel simply never
returns. `stop` now logs its transition, so the pair answers which one you have:
`start` with no matching `stop` before it is ours; `start` logged with no panel
is the driver's.
`SDL_LogSetPriority(INPUT, DEBUG)` turns on the driver's own narration
(`[WebOSShowScreenKeyboard] called`, `[TextModelLeave] called`,
`[TextModelInputPanelState] called - state: %d`). NB it did NOT reach
`/tmp/plxnative-stderr.log` on this firmware — 0 bytes across a full session — so
where LG's SDL sends its log is itself unresolved, and the app's own two lines
are the reliable half today.
Also fixed while here: `enter()` cleared `EDITING` without calling `stop()`, the
one place in this screen where the flag and the panel could disagree.
`make check` 643 green, ARM cross-build links.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
GLinnik21
added a commit
that referenced
this pull request
Aug 28, 2026
…fix it
The reopen wedge has a mechanism now, from the device's own binary (md5-matched
against the copy in `sysroot/`), and it is NOT what the symptom suggests.
There is no latch in `WebOSShowScreenKeyboard`: the second call re-runs every
step of the first. The defect is one step earlier, in the `text_model.leave`
handler at 0x8043c —
80452: str r3, [r4, #16] ; vkb->text_model = NULL BEFORE the call
80458: b.w 0x7cc20 ; SDL_StopTextInput()
— which NULLs the model before calling stop, so `WebOSHideScreenKeyboard`'s
`cbz r0` early-returns and `text_model_deactivate` is never sent. The compositor
keeps the old model active and ignores every later `activate`. Exactly what
webosbrew's 265d00ea ("ensure osk is deactivated") fixes, and what LG's own
chromium client documents as the contract SDL omits: reset, deactivate, destroy,
NULL.
Two things that would have been reached for and are dead ends: `SDL_SetTextInputRect`
is a total no-op here (`Wayland_CreateDevice` never writes +0xd4/d8/dc — only the
four keyboard hooks exist), and `SDL_IsScreenKeyboardShown` IS stale after a
dismiss (+0x1c is never cleared) but gates nothing, so it is a reporting bug and
not the cause.
What this commit adds is EVIDENCE, not a fix, because the device runs so far
cannot tell the driver's wedge apart from one of our own making — and the two
have identical symptoms. `start()` is a no-op while `STARTED` is set, so a `stop`
that never runs also makes every later `start` silent and the panel simply never
returns. `stop` now logs its transition, so the pair answers which one you have:
`start` with no matching `stop` before it is ours; `start` logged with no panel
is the driver's.
`SDL_LogSetPriority(INPUT, DEBUG)` turns on the driver's own narration
(`[WebOSShowScreenKeyboard] called`, `[TextModelLeave] called`,
`[TextModelInputPanelState] called - state: %d`). NB it did NOT reach
`/tmp/plxnative-stderr.log` on this firmware — 0 bytes across a full session — so
where LG's SDL sends its log is itself unresolved, and the app's own two lines
are the reliable half today.
Also fixed while here: `enter()` cleared `EDITING` without calling `stop()`, the
one place in this screen where the flag and the panel could disagree.
`make check` 643 green, ARM cross-build links.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01TxZ585ehWMnuScciTQ9WgV
GLinnik21
added a commit
that referenced
this pull request
Oct 8, 2026
…loor, no secret echo) (#557) CodeQL py/* alerts #4-8, #10, #11, #16-20. serve_fixtures resolves and checks containment before isfile; every dev SSLContext sets minimum_version TLS 1.2; gen-release-audit parses the DSN host instead of a substring test; the census arm regex no longer backtracks; plxnative-lab start stops echoing the session secret (pkg/lab.json, 0600, carries it); remote-dpad echoes only a password it generated. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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.
Unit 10 — libraries past the fourth are unreachable
docs/parity-gaps.md§2 theme C.MAX_TABS = 5("Home + up to 4 sections") hard-capped the onlynavigation we have into a library. Everything under it was already fine and provably so:
browse::ensure_sectionsdiscovers everymovie/showsection,browse::set_curaccepts anyindex below the count, and
/tmp/plxnative-library=Nbrowses section 4 and beyond correctly. Onlythe pill row could not address them — so a user with Movies / TV / Kids Movies / Kids TV / 4K Movies
had a fifth library the app knew about, could load, and could not open.
What changed
The cap is gone rather than raised — a bigger constant only moves the unreachable library further
out. The invariant in the old doc comment ("a pill that can't be drawn must never be focusable") is
kept, and now holds by construction instead: the pill strip scrolls horizontally, so every pill
can be brought into view, so every pill is focusable.
The treatment is ours, not the reference client's sidebar-with-an-overflow: the detail page's season
tabs already solve exactly this for a many-season show, and the tab pills are the same element by
explicit user directive. So the strip reuses that pattern —
card_row::revealminimalscroll-into-view on a critically-damped spring at the season row's own stiffness (240). The track
stays centred and caps at a width that clears the profile chip on both sides; past that the pills
slide inside it, scissor-clipped at the pill area's edge (the bounded-panel clip case from
ui/CLAUDE.md, which doubles as the "there is more over there" affordance). A row that fits isuntouched: no clip, no scroll, the same centred tvOS bar as before — so on a server with four or
fewer video libraries this change is invisible.
widgets.rs—MAX_TABS→tab_count()(the one source of the focusable pill count); puregeometry (
tab_content_w/tab_view_w/tab_pill_x/tab_scroll_target),tab_row_update(the per-frame spring step both screens call) and
tab_row_reveal(a jump, for screen entry).PILL_RECTSis aVecof the pills clipped to the viewport, and that same clipped widthdecides whether to draw — one rule, so the scissor and the pointer can't disagree about a sliver
at the strip's edge.
home.rs— the top-band clamp goes throughtab_count();home_updatesteps the strip; theprofile chip now draws after the track (its unfurled name capsule and a wide track can now
meet, and under the track the name was painted over).
library.rs— the Tabs-area walk goes throughtab_count();updatesteps the strip;enterreveals the entered section's own tab; the focused-pill expression is factored to one
tab_focus()so draw and scroll can't disagree.mod.rs—Rect::intersect, in the retui core where the next clipped hit test can find it.Design note: what the strip does when the row is NOT focused
It tracks the selected pill rather than holding (this is where it departs from the season tabs,
which hold). The way back into the top band is the profile chip and then the Home pill — the strip's
left end — so a strip parked far to the right would be showing pills the next keypress cannot reach
without scrolling back anyway, under a row with no selected tab visible. Reveal is minimal-scroll,
so this is a no-op whenever the selected pill is already on screen, which is the whole of the
Library screen's life after
enterplaced it.Known limitation, worth a follow-up if pointer parity matters: from Home's grid view, pointer
hover on the pills is deliberately disabled (it used to park focus on a tab so the next ENTER opened
a library), so a pointer-only user can click only the pills currently on screen. Every pill is
reachable by D-pad, and by pointer from the hero view where hover moves focus and the strip reveals.
Verification (host tier)
make check→ 63 pass (+5).make(ARM cross-build) → clean, no new warnings.every_pill_scrolls_fully_into_the_strips_viewport— for 1..=16 pills and from anystarting scroll (0, mid, negative, far past the end), the target for pill i puts that whole
pill inside the viewport and never over-scrolls. This is the "no focusable index lacks a drawn
rect" proof.
the_strip_scrolls_only_once_it_outgrows_the_row_and_only_as_far_as_it_must— a 4-pill rowprovably still fits and has no scroll range; a 12-pill row provably overflows, scrolls to its
last pill, and holds for a pill already in view (at the start and mid-strip).
a_stale_pill_index_clamps_instead_of_panicking— graded on an overflowing row so the clamphas a real range: in-range scroll kept, over-scroll pulled to the end, negative pulled to 0.
top_band_focus_walks_to_the_last_section_whatever_the_count— for N = 1..8, RIGHT fromthe Home pill reaches the last pill and never lands on a non-pill; LEFT walks back through
Home to the profile chip.
set_hero_focus_clamps_onto_the_last_drawable_pill— drives the real setter (the line the capused to live on), not just the pure helper.
test, the
&'staticborrow out of the label cache (now a scoped closure), the off-focus scrollrule, the chip/track collision and two vacuous assertions are all folded in above.
Device verification: deferred to coordinator
Not run — the TV queue was centralised mid-task. Nothing here has been on the device.
How many video sections the test server has: TWO.
192.168.0.3:32400returns three sections —1 movie "Movies",2 show "TV Shows",3 artist "Music"— andensure_sectionsskipsmusic/photo. So the row is 3 pills, which fits un-scrolled: the device cannot prove the >4
case at all, and a device pass can only show non-regression of the shared row. Boot logs the
count itself as
pms: nmovies=<n> nsections=2.What to run, in one boot:
./tests/run.py --fps— coverslibrary-scrollandlibrary-switch, which drive the Libraryscreen and
switch_section, i.e. the shared row on both screens. No playback case is affected.One FIFO drive to walk the whole band. Boot with a picker-suppressing trigger
(
printf 0 > /tmp/plxnative-heroidx) plus the injected token, then write to/tmp/plxnative-remote, one token per line, ~1s apart:Expected in
/tmp/plxnative-events.log:pms: ... nsections=2at boot, then the once/secheartbeat flipping from
FPS=<n> route=hometoFPS=<n> route=libraryafterok. There is nolog line naming the section, so confirm which library opened from a capture:
tools/capture-screen.sh /tmp/unit-10.png DISPLAY— the TV Shows pill should carry the selectedtreatment and the grid should be TV Shows.
Worth an eyeball in that capture: the tab row is centred and un-clipped (3 pills), and the
profile chip sits cleanly beside it — the two z-order and geometry changes are the only things
that can look different on a server this size.
Teardown:
tests/run.pycleans up after itself; the by-hand boot needs the app closed and every/tmp/plxnative-*trigger (including the injected token) cleared, sparing the three*.logfiles.🤖 Generated with Claude Code
https://claude.ai/code/session_018GuSHrq9oydnX7nhKE1Hvc