Skip to content

feat(tv): type and spacing tokens and one focus language - #2237

Merged
4gray merged 3 commits into
masterfrom
claude/project-thread-ar5gmt
Nov 14, 2026
Merged

4gray merged 3 commits into
masterfrom
claude/project-thread-ar5gmt

Conversation

@4gray

@4gray 4gray commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Requested by Sergey · project thread

What changed

This is the foundation from section 03 of the TV webOS design review, plus top-10 items #1 (type scale) and #2 (focus). Layouts and flows stay the same.

  • apps/tv/src/tokens.css holds the 1920×1080 type scale as tokens: display 88 serif 600, title 56, heading 32 sans 500, body 28, meta 24, and eyebrow 22 with +14% tracking. No text is smaller than 22px, and the serif face is used only for content and channel titles. The file also defines an 8px spacing base, a 64×48 safe area that every page and the players share, 72px buttons with a 14px radius, and 96px list rows. All TV stylesheets now use these tokens instead of literal sizes. Windows narrower than 1400px redefine the tokens to the earlier, denser scale.
  • apps/tv/src/focus.css loads last and owns the three state signals:
    • Focus is the only use of the mint ring (5px outline, 5px offset). Buttons also get a mint fill. Cards get the ring plus scale(1.06), animated with transform only. List rows and guide cells show an inset ring on their own fill.
    • Selected (current nav item, settings category, tab, live category, day, programme) is a mint bar, never a ring.
    • On (Saved, favourite: the new .tv-toggle) is shown by the filled ♥ glyph with no border. This removes the double ring on the movie player (screen 32).
    • Primary buttons are light at rest, so a mint button never looks like a second focus.
  • Empty Favorites tabs (for example "Series 0") are disabled. They are dimmed to 40% and spatial navigation skips them. The active tab stays enabled.
  • Chromium 68 constraints: the remaining flex gap declarations are replaced with margins. There is no backdrop-filter. Only transform is animated. Selection bars are small inset shadows with no blur.
  • Fixes the scale needed:
    • VirtualCollection now measures an item that does not have focus, so a scaled card cannot distort the row step. The default channel step is now 105, matching the 96px row plus 9px spacing.
    • HorizontalRail no longer counts the trailing focus padding as content when it decides that the end of a rail is reached.
    • Focused episode cards scale from their top edge so the scroll anchor stays put.
  • Screenshots: the new opt-in design-review.e2e.ts captures the 24 review screens with the fictional catalog. It runs only with TV_DESIGN_REVIEW=1. The command is in docs/development/tv-development.md.

Before / after

The same 24 screens, captured by the same scenario before and after this change, are on a private comparison page (ask for access if you can't open it): https://claude.ai/artifact/QL7RKNB3wq38QXfkYxt1GN

Why

From about 3 m away the old text (15–21px) could not be read. Mint also meant focus, Saved and the active item at the same time, so the movie player showed two rings at once.

Release note

  • Added a note under .changes/ (tv-readable-type-and-focus.md)
  • Not needed

Checks

  • Tests added or updated for the changed behavior
  • pnpm nx run-many -t test lint typecheck -p tv tv-feature tv-ui tv-e2e passes (lint reports only warnings that already existed), and tv:verify-build passes
  • Full tv-e2e in Playwright Chromium: 229 of 232 passed. The other three:
    • global-home "cross-source playback retry restores the complete Home origin" fails on the restored scroll offset. The sibling test with the same assertion (global-home.e2e.ts:136) also fails on master in this environment, so this check is already fragile, but the taller layout makes it fail more often. It needs a follow-up.
    • review-recovery "abandoning grid … cancels a pending channel resolution" failed 3 times in 44 runs under load and 0 times in 12 runs alone. On master it passed 8 times out of 8. It is timing-sensitive and worth watching.
    • home-cancellation failed once in the full run and passed on rerun.
  • Test changes with reasons:
    • visual-refinement allows a poster top below 300px at 1920 because the controls are now 72px.
    • episode-layout scrolls the chosen episode into the upper part of the screen before stills load. Otherwise the taller still card has to scroll into view, and that rule, not the anchor, sets the offset.
  • Not done: the Codex and Greptile local review gate (those CLIs are not available in this environment) and a check on a real LG device. Chromium 68 draws outlines as rectangles around rounded controls.

Generated by Claude Code

Introduce tokens.css with the 1920x1080 type scale (88/56/32/28/24/22,
nothing under 22px, serif only for content and channel titles), an 8px
spacing scale, the 64x48 safe area, 72px controls and 96px list rows.

focus.css owns the state signals: the mint ring marks focus only (fill on
buttons, scale 1.06 on cards, inset on rows), selection is a mint bar,
Saved and favourite toggles show a filled glyph instead of a border, and
empty Favorites tabs are disabled. This removes the double ring on the
movie player. Primary buttons are light at rest so mint never suggests a
second focus.

Virtual lists measure an unfocused item so card scaling cannot skew their
step, and rails ignore their trailing focus padding when deciding the end.
An opt-in E2E scenario captures the 24 design-review screens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S4BLms6Gy8rWZKSVoR4A9w
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T15:32:43.940084Z 97dffbe Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@4gray 4gray self-assigned this Nov 14, 2026
@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 865b23bac6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/tv/src/focus.css Resolved
@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The latest changes appear safe to merge, with no new blocking issues found.

Summary

The PR adds shared TV type, spacing, and focus styles. The latest changes:

  • TV screens use a shared type scale and larger spacing.
  • TV controls use different cues for focus, selection, and saved state.
  • TV lists keep their scrolling aligned with larger focused cards.
  • A TV design-review run captures 24 screens with fictional catalog content.

No new actionable issues were found in the changes since the previous review.

Reviews (2) · Last reviewed commit: "fix(tv): give episode cards and rail foc..." · Reviewed by Greptile

Comment thread apps/tv/src/focus.css Resolved
Comment thread apps/tv/src/theme.css Resolved
Comment thread apps/tv/src/theme.css Resolved
A selected nav item, tab, day or Saved toggle that also has focus now
takes the same mint fill and dark text as any focused button, instead of
light text on mint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S4BLms6Gy8rWZKSVoR4A9w
Episode cards grow so their labels are not cut off at the new type
scale, and home rails get room for the scaled card's focus ring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S4BLms6Gy8rWZKSVoR4A9w
@codecov

codecov Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.88%. Comparing base (7c28cf0) to head (97dffbe).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #2237    +/-   ##
========================================
  Coverage   81.87%   81.88%            
========================================
  Files        1904     1904            
  Lines      101605   101617    +12     
  Branches    24847    24089   -758     
========================================
+ Hits        83191    83204    +13     
+ Misses      11129    11128     -1     
  Partials     7285     7285            
Flag Coverage Δ
unit 81.88% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

4gray commented Nov 14, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@greptileai review

Please re-review the latest head (97dffbe), which addresses the earlier findings on focus contrast, episode card heights and rail focus rings.


Generated by Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 97dffbe2b5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@4gray
4gray merged commit ba38f21 into master Nov 14, 2026
36 checks passed
@4gray
4gray deleted the claude/project-thread-ar5gmt branch November 14, 2026 16:05
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.

2 participants