Repository navigation
ui: the overscan frame becomes a bound, and six screens were outside it - #61
Merged
Merged
Conversation
The margin token said 90 and `docs/lg-self-checklist.md` marked LG checklist item #2 a pass on the words "MARGIN_X 90 (4.7%), inside the 5% overscan frame". That reads as clearance and is the opposite: a smaller margin puts content NEARER the edge, so every screen in the app sat six pixels inside the exclusion zone. Nobody had ever measured one. The vertical half was worse, because it did not exist. There was no MARGIN_Y anywhere in the tree, so nothing bounded the top or bottom of anything, and four places were further out than the horizontal margin ever was: - the shared top tab bar + profile chip, 18px (the "main page" the item names) - the detail page's pinned compact title, 14px — and 32 for a square clearLogo, which spills upward as paint rather than as layout - the Library's A-Z rail, 32px, the worst in the app - the Home / Library / Person scroll reveals, which settled a focused card's caption 24 / 16 / 40px off the bottom edge Both margins are tokens now (96 / 54), and the requirement is a host test rather than a literal. `no_required_content_enters_the_safe_area_exclusion_zone` grades the COMPOSED rect of every screen and panel against `consts::SAFE`, so a later audit can move a token — or give one screen a correction of its own — without the test being rewritten to permit it. Deliberately no `assert_eq!(MARGIN_X, 96.0)`: that passes today and forbids the fix. "Required" is load-bearing. A full-bleed backdrop, a page ground, a scrim, a focus glow and a shelf peeking off the bottom edge are all supposed to reach the panel edge. Tiles are entered at REST for the same reason — the 1.09 focus pop magnifies ink already inside the frame and its caption does not scale — while the compact logo IS graded at its spill, because there the spill is the logo. The A-Z rail could not be fixed by moving the rail: with the grid filling `SCR_W - 2*MARGIN_X` exactly there was no room inside the frame for a 44px control to its right, so the grid now reserves the band unconditionally (a reflow between two sections of one library is worse than a slightly narrower grid that never moves). One design cost, because it is a trade rather than a fix: dropping the top bar 18px grows the tab band's blur region by 18 rows of a ~1470px grab, which puts `GLASS_TRACK_MAX` outside `gfx::GLASS_REGION_BUDGET`. It is the `min` of its two constraints now instead of the "must not touch" rule alone, so the glass comes off a strip wider than ~672px rather than ~848. The product's strip is 572, so today's bar is unaffected and one more library still keeps it. If that is too tight the lever is the measured budget, not the frame. Checklist item #7 (idle / focused / selected distinguishable) was audited screen by screen at the same time and needed no change; the doc row says what was looked at instead of what was believed. Verified: `make check` 980 green, and the simulator at a real 1920x1080 — Library's ink went x 77..1877 / y 36..1060 to x 83..1823 / y 54..1078 (the 83 is the focused card's own drop shadow, the 1078 the scrolling shelf's peek). No television: this lane is host-only. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G
GLinnik21
added a commit
that referenced
this pull request
Aug 26, 2026
…it (#61) The margin token said 90 and `docs/lg-self-checklist.md` marked LG checklist item #2 a pass on the words "MARGIN_X 90 (4.7%), inside the 5% overscan frame". That reads as clearance and is the opposite: a smaller margin puts content NEARER the edge, so every screen in the app sat six pixels inside the exclusion zone. Nobody had ever measured one. The vertical half was worse, because it did not exist. There was no MARGIN_Y anywhere in the tree, so nothing bounded the top or bottom of anything, and four places were further out than the horizontal margin ever was: - the shared top tab bar + profile chip, 18px (the "main page" the item names) - the detail page's pinned compact title, 14px — and 32 for a square clearLogo, which spills upward as paint rather than as layout - the Library's A-Z rail, 32px, the worst in the app - the Home / Library / Person scroll reveals, which settled a focused card's caption 24 / 16 / 40px off the bottom edge Both margins are tokens now (96 / 54), and the requirement is a host test rather than a literal. `no_required_content_enters_the_safe_area_exclusion_zone` grades the COMPOSED rect of every screen and panel against `consts::SAFE`, so a later audit can move a token — or give one screen a correction of its own — without the test being rewritten to permit it. Deliberately no `assert_eq!(MARGIN_X, 96.0)`: that passes today and forbids the fix. "Required" is load-bearing. A full-bleed backdrop, a page ground, a scrim, a focus glow and a shelf peeking off the bottom edge are all supposed to reach the panel edge. Tiles are entered at REST for the same reason — the 1.09 focus pop magnifies ink already inside the frame and its caption does not scale — while the compact logo IS graded at its spill, because there the spill is the logo. The A-Z rail could not be fixed by moving the rail: with the grid filling `SCR_W - 2*MARGIN_X` exactly there was no room inside the frame for a 44px control to its right, so the grid now reserves the band unconditionally (a reflow between two sections of one library is worse than a slightly narrower grid that never moves). One design cost, because it is a trade rather than a fix: dropping the top bar 18px grows the tab band's blur region by 18 rows of a ~1470px grab, which puts `GLASS_TRACK_MAX` outside `gfx::GLASS_REGION_BUDGET`. It is the `min` of its two constraints now instead of the "must not touch" rule alone, so the glass comes off a strip wider than ~672px rather than ~848. The product's strip is 572, so today's bar is unaffected and one more library still keeps it. If that is too tight the lever is the measured budget, not the frame. Checklist item #7 (idle / focused / selected distinguishable) was audited screen by screen at the same time and needed no change; the doc row says what was looked at instead of what was believed. Verified: `make check` 980 green, and the simulator at a real 1920x1080 — Library's ink went x 77..1877 / y 36..1060 to x 83..1823 / y 54..1078 (the 83 is the focused card's own drop shadow, the 1078 the scrolling shelf's peek). No television: this lane is host-only. Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Aug 27, 2026
…it (#61) The margin token said 90 and `docs/lg-self-checklist.md` marked LG checklist item #2 a pass on the words "MARGIN_X 90 (4.7%), inside the 5% overscan frame". That reads as clearance and is the opposite: a smaller margin puts content NEARER the edge, so every screen in the app sat six pixels inside the exclusion zone. Nobody had ever measured one. The vertical half was worse, because it did not exist. There was no MARGIN_Y anywhere in the tree, so nothing bounded the top or bottom of anything, and four places were further out than the horizontal margin ever was: - the shared top tab bar + profile chip, 18px (the "main page" the item names) - the detail page's pinned compact title, 14px — and 32 for a square clearLogo, which spills upward as paint rather than as layout - the Library's A-Z rail, 32px, the worst in the app - the Home / Library / Person scroll reveals, which settled a focused card's caption 24 / 16 / 40px off the bottom edge Both margins are tokens now (96 / 54), and the requirement is a host test rather than a literal. `no_required_content_enters_the_safe_area_exclusion_zone` grades the COMPOSED rect of every screen and panel against `consts::SAFE`, so a later audit can move a token — or give one screen a correction of its own — without the test being rewritten to permit it. Deliberately no `assert_eq!(MARGIN_X, 96.0)`: that passes today and forbids the fix. "Required" is load-bearing. A full-bleed backdrop, a page ground, a scrim, a focus glow and a shelf peeking off the bottom edge are all supposed to reach the panel edge. Tiles are entered at REST for the same reason — the 1.09 focus pop magnifies ink already inside the frame and its caption does not scale — while the compact logo IS graded at its spill, because there the spill is the logo. The A-Z rail could not be fixed by moving the rail: with the grid filling `SCR_W - 2*MARGIN_X` exactly there was no room inside the frame for a 44px control to its right, so the grid now reserves the band unconditionally (a reflow between two sections of one library is worse than a slightly narrower grid that never moves). One design cost, because it is a trade rather than a fix: dropping the top bar 18px grows the tab band's blur region by 18 rows of a ~1470px grab, which puts `GLASS_TRACK_MAX` outside `gfx::GLASS_REGION_BUDGET`. It is the `min` of its two constraints now instead of the "must not touch" rule alone, so the glass comes off a strip wider than ~672px rather than ~848. The product's strip is 572, so today's bar is unaffected and one more library still keeps it. If that is too tight the lever is the measured budget, not the frame. Checklist item #7 (idle / focused / selected distinguishable) was audited screen by screen at the same time and needed no change; the doc row says what was looked at instead of what was believed. Verified: `make check` 980 green, and the simulator at a real 1920x1080 — Library's ink went x 77..1877 / y 36..1060 to x 83..1823 / y 54..1078 (the 83 is the focused card's own drop shadow, the 1078 the scrolling shelf's peek). No television: this lane is host-only. Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Aug 28, 2026
…it (#61) The margin token said 90 and `docs/lg-self-checklist.md` marked LG checklist item #2 a pass on the words "MARGIN_X 90 (4.7%), inside the 5% overscan frame". That reads as clearance and is the opposite: a smaller margin puts content NEARER the edge, so every screen in the app sat six pixels inside the exclusion zone. Nobody had ever measured one. The vertical half was worse, because it did not exist. There was no MARGIN_Y anywhere in the tree, so nothing bounded the top or bottom of anything, and four places were further out than the horizontal margin ever was: - the shared top tab bar + profile chip, 18px (the "main page" the item names) - the detail page's pinned compact title, 14px — and 32 for a square clearLogo, which spills upward as paint rather than as layout - the Library's A-Z rail, 32px, the worst in the app - the Home / Library / Person scroll reveals, which settled a focused card's caption 24 / 16 / 40px off the bottom edge Both margins are tokens now (96 / 54), and the requirement is a host test rather than a literal. `no_required_content_enters_the_safe_area_exclusion_zone` grades the COMPOSED rect of every screen and panel against `consts::SAFE`, so a later audit can move a token — or give one screen a correction of its own — without the test being rewritten to permit it. Deliberately no `assert_eq!(MARGIN_X, 96.0)`: that passes today and forbids the fix. "Required" is load-bearing. A full-bleed backdrop, a page ground, a scrim, a focus glow and a shelf peeking off the bottom edge are all supposed to reach the panel edge. Tiles are entered at REST for the same reason — the 1.09 focus pop magnifies ink already inside the frame and its caption does not scale — while the compact logo IS graded at its spill, because there the spill is the logo. The A-Z rail could not be fixed by moving the rail: with the grid filling `SCR_W - 2*MARGIN_X` exactly there was no room inside the frame for a 44px control to its right, so the grid now reserves the band unconditionally (a reflow between two sections of one library is worse than a slightly narrower grid that never moves). One design cost, because it is a trade rather than a fix: dropping the top bar 18px grows the tab band's blur region by 18 rows of a ~1470px grab, which puts `GLASS_TRACK_MAX` outside `gfx::GLASS_REGION_BUDGET`. It is the `min` of its two constraints now instead of the "must not touch" rule alone, so the glass comes off a strip wider than ~672px rather than ~848. The product's strip is 572, so today's bar is unaffected and one more library still keeps it. If that is too tight the lever is the measured budget, not the frame. Checklist item #7 (idle / focused / selected distinguishable) was audited screen by screen at the same time and needed no change; the doc row says what was looked at instead of what was believed. Verified: `make check` 980 green, and the simulator at a real 1920x1080 — Library's ink went x 77..1877 / y 36..1060 to x 83..1823 / y 54..1078 (the 83 is the focused card's own drop shadow, the 1078 the scrolling shelf's peek). No television: this lane is host-only. Claude-Session: https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G Co-authored-by: Claude Opus 5 (1M context) <[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 B9 — LG App Self Checklist #2 (overscan frame), #5 (display/resolution), #7 (focus states).
What was wrong
docs/lg-self-checklist.mdmarked #2 a pass on this sentence:That reads as clearance and is the opposite. A 4.7% margin puts content nearer the edge than a 5% one, so every screen in the app began six pixels inside the exclusion zone. Nobody had ever measured a screen — the number stood in for the measurement, exactly as the splash's "63% black" did until somebody looked at the panel.
The vertical half was worse, because it did not exist. There was no
MARGIN_Yanywhere in the tree, so nothing bounded the top or bottom of anything.The audit — measured, at a real 1920×1080
Every screen was booted in the simulator at
SIM_W=1920 SIM_H=1080and overlaid with the 5% frame (x 96…1823, y 54…1025).SIM_W/SIM_Hare not optional here: left empty the window fits the display, which on a 1× screen is half the authored canvas and makes every margin measurement wrong.card_rowshelfright: 80)…overflow panels (right: 80)Clean on both axes already, and unchanged: Login (QR + code, centred), the profiles picker, the exit alert, About / Track-information / Person-bio alerts (
EDGE_CLEAR68, centred), the failure read-out (centred).Measured confirmation (ink extremes against the page ground, dev FPS counter masked — it is
devtools, compiled out ofRELEASE):The residual
83/95on the left is the focused card's own drop shadow and the field capsule's antialiased edge — the drawn rects are at exactly 96. The residual bottom is the scrolling shelf's peek, which is by design.What changed
Tokens (
ui/consts.rs):MARGIN_X90 → 96, newMARGIN_Y54, plusSAFE: Rectandinside_safe(r)so nothing re-derives the frame and gets a sign wrong.Derived instead of respelled — the shape that let 90 survive was the margin being spelled twice:
player_hud::SB_X,search::FIELD.x,CTRL_RIGHT, both player panels'right: 80,account_menu'spx,stats' panel x andCHIP_FRAMEnow all read the token.Moved:
widgets::TOP_BAR_Y44 →MARGIN_Y + TAB_TRACK_PAD(62), measured from the band's outermost ink so the whole control clears the frame, not just the part you press.consts::GRID_TOP_Y,library::TOOL_Y/GRID_TOPandsearch::FIELD.y/CONTENT_TOPfollow it by 18px, keeping their stated clearances.CHIP_FRAME.x→MARGIN_X + TAB_TRACK_PAD: it is the capsule that lands on the margin, as the tab track's does.detail::COMPACT_TITLE_BOTis solved from the frame (MARGIN_Y + COMPACT_H_MAX), andTOP_MARGINfollows it — the tallest logo, not the reserved band, is what has to clear the top.MARGIN_Y. Library's scroll ceiling moved with its reveal bound — they are a pair, and moving only one left the last row 34px short.space::XL64 already clearedMARGIN_Yand missedMARGIN_Xby 32.The A–Z rail could not be fixed by moving the rail. With the grid filling
SCR_W − 2·MARGIN_Xexactly there is no room inside the frame for a 44px control to its right, so the grid now reservesRAIL_BANDunconditionally (LGAP48 → 35.2). Unconditional because widening the grid when the rail is absent moves every column between two sections of one library, and a grid that reflows as you change tab is worse than one that is slightly narrower and never moves — the same argumentdraw_railalready makes for top-anchoring rather than centring.The test — the invariant, not the literal
no_required_content_enters_the_safe_area_exclusion_zone(inui/consts.rs) grades the composed rect of every screen and panel — 30 rows, contributed by eight#[cfg(test)] overscan_rectsprobes plus the geometry already public there — againstconsts::SAFE. There is deliberately noassert_eq!(MARGIN_X, 96.0): that passes today and forbids the very fix an audit needs. Each probe is asserted to contribute individually, because a table-wide row floor cannot see one of eight going silent."Required" is doing real work. A full-bleed backdrop, page ground, scrim, focus glow and a shelf peeking off the bottom edge are all supposed to reach the panel edge. Tiles are entered at REST for the same reason: the 1.09 focus pop magnifies ink already inside the frame, strictly contains its resting rect, and does not scale the caption. The compact logo is graded at its spill — there the spill is the logo.
Two more tests pin what the table cannot: the Library's last-row reveal (pure arithmetic over the
lo/max_ypair) and the two anchored popovers at their clamp extremes.One design cost, stated as a trade
Dropping the top bar 18px grows the tab band's backdrop-blur region by 18 rows of a ~1470px-wide grab, which puts
widgets::GLASS_TRACK_MAXoutsidegfx::GLASS_REGION_BUDGET. It is now theminof its two constraints rather than the "must not touch" rule alone, so the glass material comes off a strip wider than ~672px instead of ~848. The product's own strip is 572px, so today's bar is unaffected and one more library still keeps it; two more drop to the flat capsule, which is a designed, shipped alternative rather than a break. If that is judged too tight the lever is the measured budget (docs/glass-hardware-budget.md§11 already records the region term as ~4× conservative on the direct source path), not the frame.While re-deriving it,
GLASS_TRACK_BUDGET_MAX's closed form was found to assume a union left edge of 0 — true when the capsule started at x=82, false now that it starts at 96. Fixed, and the test now re-derives both bounds throughgfx::blur_region_unionrather than comparing the constant against the two constants it is theminof (which only NaN could fail).#7 — focus / selected states
Audited screen by screen; nothing needed changing, and the checklist row now says what was looked at rather than what was believed. All three states are distinguishable, and on two surfaces they are visible simultaneously:
TableViewrows (Sort menu): idle = plain label; selected = ✓ in the leading column; focused = white pill spanning the row. Captured with focus two rows below the checked one.Two published LG numbers, and which one this is graded against
LG's developer overscan guide states a 20px margin; the checklist item says "overscan frame", which by broadcast convention is 5%. This is graded against 5%, because a layout that satisfies 5% satisfies 20px and not the other way round. Both are recorded in
MARGIN_X's doc and in the checklist note.#5 — display / resolution
No change needed and none made. The UI stays authored at logical 1920×1080; the drawable is read back by
surface.rs(1920×1080 on every device so far,scale()= 1.0); the panel's 3840×2160 remains a diagnostic and is not a layout input anywhere in this diff.Files
ui/consts.rs(tokens +SAFE/inside_safe+ the audit test) ·ui/theme.rs(logo::COMPACT_H_MAXdoc) ·ui/widgets.rs(top bar, chip frame, glass cap) ·ui/library.rs·ui/detail.rs·ui/home.rs·ui/person.rs·ui/search/mod.rs·ui/search/results.rs·ui/player_hud.rs·ui/account_menu.rs·ui/track_menu.rs·ui/more_menu.rs·ui/item_menu.rs·ui/alt_sources.rs·ui/stats.rs·ui/onboard.rs·docs/lg-self-checklist.md.ui/widgets.rsis a shared component file rather than a screen: the edits there areTOP_BAR_Y,CHIP_FRAME,TAB_SIDE_CLEAR, the glass cap and one test probe. Naming it explicitly because other lanes are in UI files.Verification
make check— 980 passed, lint clean, both feature configurations type-check (theRELEASE=1hook ran on every.rsedit)./code-review highrun and its findings applied — including two real bugs it caught that the audit table could not: the Library scroll ceiling andsearch::results::BOTTOM_PAD.Not verified on a television. This lane had no device access, so nothing here is a claim about frame rate or text rasterization. The one thing that wants a device pass is the tab bar's glass at the new region size.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GovTtrsD9P7Ld7DnLCMK2G