Skip to content

fix(web): scale browse and detail text with the browser text size - #1806

Merged
Quick104 merged 2 commits into
Silo-Server:mainfrom
Rhainland:fix/web-text-size-scaling
Oct 3, 2026
Merged

Quick104 merged 2 commits into
Silo-Server:mainfrom
Rhainland:fix/web-text-size-scaling

Conversation

@Rhainland

@Rhainland Rhainland commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Closes #1796
Related issue: #1252
Validation tasks: changes #1252 C7; changes #1256 C7

The web app ignored the browser's text-size setting. app.css pinned the root font size to 16px, which cancels the browser default font size, and core screens also used fixed pixel sizes (for example text-[15px] on the Resume button). The 1.0 criteria require core browse and detail screens to follow the system text size.

The root font size is now relative (100%, with the in-app Large and Extra large settings at 112.5% and 125%), and the fixed sizes on the core browse and detail screens are converted to the equivalent rem values. At a 16px browser default everything renders at the same size as before; a larger browser setting now enlarges these screens.

Approach

99 sizes in 35 files are converted to exact rem equivalents rather than Tailwind scale classes, because the scale classes also set line height and would change default rendering. Scope: item detail (movie, series, season, episode), season and episode lists, cast and crew, home and library cards, search and the catalog filter bar, watchlist and collection cards, poster badges and the sidebar. Admin pages, the player, settings, the setup wizard and the Books beta screens keep pixel sizes for now. A new test fails if the root size goes back to pixels or a converted file regains a pixel font size.

Validation

  • Tests for every touched component, src/pages/ItemDetail, Home, LibraryBrowse, the overlay presets and the root CSS pass.
  • Manual, web app against a Docker build of these fixes, series detail page: at 100% the measured sizes are unchanged (Resume 15px, genres 13px); at 150% every measured element scaled by exactly 1.5× (Resume 22.5px, genres 19.5px), and the action row wrapped without clipping.
  • The full gate from CONTRIBUTING.md ran on a branch combining all nine Series — Web #1252 fixes: every step passes except make test-go. Its failures also occur on unmodified main on this macOS host (hardware-acceleration probe tests whose fake ffmpeg is killed, and TestAdminResourceCapabilitiesAndScope); three jellycompat transcode-session tests that failed once under full-suite load pass in isolation on both. Linux CI is the authority for those.

Risks

Users whose browser default font size is not 16px will see these screens at their chosen size for the first time; that is the intent. About 646 pixel font sizes remain outside the scope above. With a larger browser font, Tailwind's lg: breakpoint (rem-based) and the fixed 1024px --app-sidebar-offset switch can disagree between those widths; that predates this change.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.

AI Disclosure

  • Harness: Claude Code (running in T3 Code)
  • Tool(s): Claude Code (Bash, Read, Edit, Write, sub-agents, browser automation through the T3 Code preview), GitHub CLI, Docker, FFmpeg
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: An independent Claude Code review agent (claude-opus-5-5) checked the diff against main: that every converted size equals its pixel value at a 16px root, and the interaction with the in-app text scale. No findings.

Note

Scale browse and detail text with browser text size via root rem typography

  • Makes the app root font size follow the browser's default text-size setting; the in-app Large and Extra Large modes apply percentage scaling on top of it in app.css
  • Defines --ui-root-text-ratio (root-rem-to-16px ratio via CSS trigonometry, with --ui-text-scale-factor fallback) so overlay badges can scale with the root text; BadgeStack badge font sizes and all OVERLAY_PRESETS badge classes now multiply by this ratio
  • Migrates arbitrary pixel text-size utilities to equivalent rem utilities across browse and detail components (cards, carousels, sidebars, popovers, action bar, watchlist, collections)
  • Adds test coverage: CardOverlays.test.tsx resolves badge sizes against the parsed root ratio, and textSizeScaling.test.ts fails if any scanned source file still uses pixel text utilities
  • Behavioral Change: all affected text now scales with the browser text-size setting (identical rendering at a 16px root); tests that asserted pixel-based classes in ActionBar.test.tsx were updated

Macroscope summarized cdb240d.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 43 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 9308699e-f477-4b91-9963-4226498fc353

📥 Commits

Reviewing files that changed from the base of the PR and between 271edd9 and cdb240d.

📒 Files selected for processing (40)
  • web/src/app.css
  • web/src/components/AppSidebar.tsx
  • web/src/components/CastCarousel.tsx
  • web/src/components/ContinueWatchingCard.tsx
  • web/src/components/CrewList.tsx
  • web/src/components/EpisodeRow.tsx
  • web/src/components/GlobalSearch.tsx
  • web/src/components/ItemCard.tsx
  • web/src/components/MediaCardArtwork.tsx
  • web/src/components/MediaCarousel.tsx
  • web/src/components/MediaLocations.tsx
  • web/src/components/RequestPosterCard.tsx
  • web/src/components/RequestToAddSection.tsx
  • web/src/components/SeasonAccordion.tsx
  • web/src/components/SectionItemCard.tsx
  • web/src/components/catalog/CatalogFilterBar.tsx
  • web/src/components/collections/CollectionPosterCard.tsx
  • web/src/components/overlays/CardOverlays.test.tsx
  • web/src/components/overlays/CardOverlays.tsx
  • web/src/components/ratings/RatingEntry.tsx
  • web/src/components/ui/kbd.tsx
  • web/src/components/watchlist/WatchlistTabs.tsx
  • web/src/components/watchlist/WatchlistTitleCard.tsx
  • web/src/lib/overlays/presets.ts
  • web/src/pages/ItemDetail/DetailHero.tsx
  • web/src/pages/ItemDetail/ExternalTitleContent.tsx
  • web/src/pages/ItemDetail/SeasonCarousel.tsx
  • web/src/pages/ItemDetail/components/ActionBar.test.tsx
  • web/src/pages/ItemDetail/components/ActionBar.tsx
  • web/src/pages/ItemDetail/components/AudioTracksPopover.tsx
  • web/src/pages/ItemDetail/components/DetailBreadcrumb.tsx
  • web/src/pages/ItemDetail/components/DetailOverview.tsx
  • web/src/pages/ItemDetail/components/EpisodeCarousel.tsx
  • web/src/pages/ItemDetail/components/ExtrasSection.tsx
  • web/src/pages/ItemDetail/components/HeroCrewLine.tsx
  • web/src/pages/ItemDetail/components/QualityBadges.tsx
  • web/src/pages/ItemDetail/components/SubtitlesPopover.tsx
  • web/src/pages/ItemDetail/components/TrailersSection.tsx
  • web/src/pages/ItemDetail/components/VersionDropdown.tsx
  • web/src/textSizeScaling.test.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@silo-kody

silo-kody Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

description: "Semi-transparent dark pill with a white border. The default.",
badgeClass:
"rounded-full border border-white/15 px-2 py-0.5 text-[10px] font-semibold tracking-wide uppercase leading-none",
"rounded-full border border-white/15 px-2 py-0.5 text-[0.625rem] font-semibold tracking-wide uppercase leading-none",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Bug medium

Text-size regression in web/src/lib/overlays/presets.ts occurs because the rem preset classes no longer match the existing Large/Extra large !important font-size overrides in app.css, while CardOverlays.tsx:197 still supplies an inline pixel/container-unit font size. Changing the in-app text size therefore no longer enlarges overlay badges, and the inline size leaves the new rem utility ineffective on rendered cards.

Prompt for LLM

File web/src/lib/overlays/presets.ts:

Line 39:

Text-size regression in web/src/lib/overlays/presets.ts occurs because the rem preset classes no longer match the existing Large/Extra large !important font-size overrides in app.css, while CardOverlays.tsx:197 still supplies an inline pixel/container-unit font size. Changing the in-app text size therefore no longer enlarges overlay badges, and the inline size leaves the new rem utility ineffective on rendered cards.

Talk to Kody by mentioning @kody

Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.

​

​

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirmed, and fixed in cdb240d. Before this PR, the !important html[data-text-scale] .text-[10px] rules beat the badge's inline font size, so Large and Extra large made badges bigger (a fixed 11.2px, losing card-width scaling). With rem preset classes those rules stopped matching and the inline size kept badges at their default size. The inline size is now multiplied by a new --ui-root-text-ratio (root font size over 16px, computed with CSS trigonometry, falling back to the in-app factor). Badges now grow with both the in-app setting and the browser text size and keep card-width scaling; default rendering is unchanged. A new test checks the badge size at default and at Large. No other converted file sets an inline font size.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for confirming. Based on your description, cdb240d99 addresses the reported regression: multiplying the inline badge size by --ui-root-text-ratio restores browser and in-app text scaling while preserving card-width scaling and unchanged default rendering.

The default/Large test covers the in-app regression. A larger-browser-default test would also be useful to protect the browser-scaling path, particularly the distinction between the computed ratio and its fallback.

I haven’t independently inspected the commit, but the approach you describe resolves the original concern.

@macroscopeapp

macroscopeapp Bot commented Oct 2, 2026

Copy link
Copy Markdown

#1796 documents an issue found during #1252 C7, but the task’s Results table still says Not run (not Failed or Blocked), so unblocks is not supported by the validation record. The shared app.css and DetailHero changes also reach Audiobooks Web #1256 C7, which is likewise Not run.

Suggested fix (PR description; no source diff): Validation tasks: changes #1252 C7; changes #1256 C7. Neither case has a recorded result yet.

Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed.

Posted via Macroscope — v1 validation impact

The root font size was pinned to 16px, so a larger browser default font
size never reached rem-based text, and labels on the core screens used
fixed pixel sizes (`text-[15px]` and similar) that ignored any root
change. On the series detail page the Resume and Mark Series Watched
buttons, genres and tagline stayed the same size while headings grew.

The root font size is now 100% (112.5% and 125% for the in-app Large and
Extra large text settings), so it follows the browser default. Fixed
pixel font sizes on the home, library browse, search/catalog and item
detail screens, their shared cards and badges, and the app sidebar are
converted to the equal rem value. At the default 16px root every size
renders as before; arbitrary rem values are used instead of Tailwind
scale classes because those also set a line height.

A source test keeps the converted files free of pixel font sizes and the
root font size relative.

Closes Silo-Server#1796
Card overlay badges set their font size inline (container units on
posters, pixels on wide cards). Before the rem conversion, the in-app
Large and Extra large settings still enlarged them because the
`html[data-text-scale] .text-[10px]` rules use `!important`, which beats
the inline style. The preset classes are rem now, so those rules no
longer match and the inline size kept badges at their default size.

The inline size is now multiplied by `--ui-root-text-ratio`, the root
font size over 16px. It follows both the browser default font size and
the in-app setting, and keeps the card-width scaling that the old
override discarded. Browsers without CSS trigonometry fall back to the
in-app scale factor. At the default text size the result is unchanged.
@Rhainland
Rhainland force-pushed the fix/web-text-size-scaling branch from 5a295e5 to cdb240d Compare October 2, 2026 20:36
@silo-kody

silo-kody Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

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.

[bug] Web detail page actions and metadata ignore the browser text size

2 participants