You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(catalog): label sports episodes by air date - #5129
Sportarr numbers each league's events as a TV season, so an NBA game is "S2026E296". The numbers sort the games correctly but tell a viewer nothing. With this change a metadata provider can mark a series as labeled by air date, and the web app shows the game's date (for example "Nov 20, 2026") wherever it showed the season and episode code.
Approach
A plugin's series metadata can set episode_labels: "air_date" (the only value). The server stores it on the series (media_items.episode_labels, new migration). Identify, Reset to Provider and a Complete Refresh take it from the new answer, so re-matching a league to a numbered show brings the numbers back. Other refreshes, "Replace all metadata" included, keep it when the providers send none.
/api/v2 returns the series' episode_labels on catalog cards (home and library sections, Watch Tonight and recommendation rows, browse, search, collections, favorites, watchlist, history, Watch Together pickers), on item detail of the series, its seasons and its episodes, on watch detail of an episode, and on the shuffle next card. Episode cards and watch detail also carry air_date. A missing value means "show numbers", so older clients and servers need no capability check. /api/v1 and the Jellyfin-compatible API are unchanged.
Web: one helper picks the date or the code. It drives Continue Watching, the season episode grid and carousel (the matchup leads and the date stays on the metadata line), the episode page breadcrumb, and the player title. Sorting, next up and playback still use the numbers. An undated episode keeps its numbers.
Go tests for the touched packages (handlers, apiv2, catalog, metadata, models, sections): pass.
make lint-changed, make lint-router-recovery: 0 issues.
API contract, generated web types, fixtures, migrations, route inventory and local-path checks: pass.
Web unit tests for the changed modules (53) and the TypeScript build: pass.
End to end against a server with a Sportarr library (NBA, NHL, MLB, NFL, Formula 1, UFC) and the plugin change: web, Apple and Android clients show dates.
Surface and build: web, before c0fad70 (main), after this branch.
Risks
New column media_items.episode_labels (TEXT NOT NULL DEFAULT '', migration); existing rows read '' and behave as before.
Older clients ignore the new fields and keep showing numbers.
Checklist
I read and can explain the complete diff.
This pull request addresses one concern.
Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
The Evidence section shows every change a user can see, or how I checked a change nobody sees.
AI Disclosure
Harness: Claude Code (in T3 Code)
Tool(s): Claude Code; Codex CLI for the second reviewer
Model(s): claude-opus-5-5; gpt-6.2-sol (review)
Involvement: Fully AI-generated, human verified
Adversarial review: dual code review (claude-opus-5-5 and gpt-6.2-sol, independent, then reconciled) of the server, web, Apple and Android diffs. Findings fixed here: labels missing on row-backed listing cards and smart collections, labels kept after Identify, and labels missing on shuffle and picker cards.
Note
Add air-date episode labeling for series (episode_labels: air_date)
Metadata pipelines read the setting from plugin providers, merge it by mode, and clear it on identify/rematch so a new match can supply its own value; item, browse, detail, watch, section, and favorites queries all select and propagate it.
The v2 API and web frontend expose episode_labels and air_date on catalog items, item details, watch details, and browse responses (v1 JSON shapes are unchanged; the new fields are internal there). Episode cards, hero metadata, player HUD, continue-watching, and watch-together pickers show the air date instead of the season/episode code when a series uses air-date labels, falling back to the numbered form when no air date exists.
Risk: metadataResultToItem in service.go normalizes and overwrites the stored value for series on every persist; unrecognized label values silently become empty strings via NormalizeEpisodeLabels.
Sportarr numbers a league's events S<year>E<n> so they sort as a TV season;
the numbers mean nothing to a viewer. A metadata provider can now mark a
series episode_labels=air_date. The server stores it on the series
(media_items.episode_labels) and v2 returns it on cards and item detail,
with air_date on episode cards. The web app shows the episode's air date
where it showed S2026E296.
Review follow-ups: Identify clears a stale episode_labels; listing cards
(browse, search, collections, favorites, watchlist, history), watch detail,
the player HUD, Playing Next and Watch Together pickers label date-labeled
episodes by air date; the contract is documented in docs/catalog-api.md.
… pickers
Round-2 review follow-ups: Identify drops a stored episode_labels even when no
trusted ID differs (a Sportarr league has none); the shuffle post-roll, the
On Deck line and the Watch Together pick use the air date; a watch-detail
contract test; shared airDateWithTitle helper.
The episode catalog source builds media_items-shaped rows for episode browse,
search and custom sections; it lacked the new column, so those queries failed
with 'column mi.episode_labels does not exist'.
…cond query
Listing cards take episode_labels and the episode air date from the rows
they already load (item list shell, favorites/watchlist/history builder,
collections, and the episode catalog source's series join), so the
per-listing label lookup and its apiv2 plumbing go. Also: one shared
section ID collector, a single date/title separator on web, a plain
labelsEpisodesByAirDate(labels) signature, and the Identify comment moved
off the correction block.
…llections
Explore All pages of home rows and episode-scoped smart collections lost
the episode's air date (and the rows their label) once listing cards stopped
using a separate lookup. Episode card contexts now carry the series' label
and the air date, which covers every catalog listing; collections take the
air date from the episode row. Also moves the label helpers out of
media.go (size ratchet) and uses the item type constants.
silo-triageBot
added
enhancement
New feature or request
go
Pull requests that update go code
impact: polish
Annoyance, cosmetic, or nice-to-have
javascript
Pull requests that update javascript code
priority: P2
Limited scope, workaround exists, or polish
triaged
High-confidence review completed; does not mean fixed, validated, or accepted for release.
labels
Nov 22, 2026
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
The change adds series-level episode_labels metadata with an air_date option. Catalog and watch APIs provide the label setting and applicable episode dates. Web catalog, watch-together, and playback views use dates for episode labels when available and retain numbered fallbacks.
Changes: Episode air-date labels
Layer / File(s)
Summary
Store and resolve episode-label metadata internal/models/*, migrations/sql/*episode_labels.sql, internal/metadata/*, internal/catalog/*, internal/sections/fetcher.go
The model and migration add the series label setting. Metadata providers normalize and merge it, and Identify clears it before resolving a new match. Repository queries, scans, and detail construction carry episode labels and air dates.
Expose episode labels and air dates internal/api/handlers/*, internal/apiv2/*, contracts/api/v2/openapi.json, web/src/api/v2/schema.ts, docs/catalog-api.md
Catalog, section, and watch responses populate episode labels and applicable air dates. The v2 schemas and API documentation describe the fields and numbered-label fallbacks. Serialization tests cover labeled and numbered episodes.
Render labels in catalog and episode views web/src/api/types.ts, web/src/api/v2/*, web/src/lib/episodeCardLabels*, web/src/components/ContinueWatchingCard.tsx, web/src/components/heroMetadata.ts, web/src/pages/ItemDetail/*
Web types and adapters carry the new fields. Shared formatters and catalog views display air dates where available; episode cards and subtitles retain numbered labels when needed.
Use episode labels in watch flows web/src/pages/watchRouteHelpers.ts, web/src/pages/watchtogether/*, web/src/playback/*, web/src/player/*
Watch-together selection, confirmation, playback subtitles, and next-episode displays use air-date labels when available and preserve numbered-label fallbacks.
Silo-Server/silo-server#5263: The shared card builders now provide episode labels and applicable air dates, affecting how these cards can display dated episodes. The missing series title and episode-number fields described in the issue remain a separate gap.
Suggested reviewers:quick104, darthshadow
Merge Risk: Low · previous review ca797
Date-labeled sports episodes work in most views. Some edge cases, such as undated episodes in personal lists, picker accessibility, and a few preview or refresh paths, still show numbers or stale labels. These are minor and can be fixed before or shortly after merge.
Security architecture risk: Minimal · up to ca797
The change adds an optional display preference without changing which episodes viewers can access or how episodes are identified. Numbered labels remain the fallback.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
observed — The inspected section changes disclose a series label preference and an applicable episode date on existing cards. The fetcher diff adds selected columns and scan destinations without changing joins or filters, and the card helpers do not fetch additional items.
Trust Boundaries and Controls
observed — The provider controls a presentation preference, not an access decision. The server normalizes the preference to the supported air_date value or empty, and the inspected web formatter turns the date into display text.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "feat(catalog): label sports episodes by air date" matches the main change. The PR adds an episode_labels series mode (air_date) that lets the web app and API show an episode's air date inst…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description explains the change clearly. It covers the problem (sports episode codes such as S2026E296 tell viewers nothing), the approach (a provider sets episode_labels to air_date, the server s…
Full details: Title check
Explanation
The title "feat(catalog): label sports episodes by air date" matches the main change. The PR adds an episode_labels series mode (air_date) that lets the web app and API show an episode's air date instead of its synthetic season/episode code. The title names the scope and the core behavior. It does not name the web-only display or the new migration, which is acceptable because it need not cover every detail.
Full details: Description check
Explanation
The description explains the change clearly. It covers the problem (sports episode codes such as S2026E296 tell viewers nothing), the approach (a provider sets episode_labels to air_date, the server stores it in media_items.episode_labels, and the web app shows the air date in place of the season and episode code), validation, risks, and linked plugin and client work. It relates directly to the changeset, so the check passes.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Fix failing CI checks
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Minor · Episode cards from personal lists never include season or episode numbers. · favorites.go:865-871
internal/api/handlers/favorites.go:865-871 Minor · Functional Correctness · Quick win
Episode cards from personal lists never include season or episode numbers.
The episode branch of resolveItemsByIDs builds its response without SeasonNumber or EpisodeNumber, and no later code in the function sets them. The v2 card conversion copies these fields unchanged, so they stay empty. An undated episode in an air_date series therefore has no air-date label and no numbers to fall back to.
Set the season and episode numbers from the episode record in this branch, alongside the parent fields, so that undated episodes keep their numbered labels.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 6a3b0c80-f0a5-4aeb-9705-89b13be4aa9c
Commits
Reviewing files that changed from the base of the PR and between f26cb9f and bbf58bf.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
…glish
- Episode label lookups dedupe content IDs and query them in batches of
500, so a large section page no longer sends one unbounded ID list.
- The Watch Together episode picker passes the fetched series' episode
labels into the staged pick when the card it opened from has none, so
the suggestion names a date-labeled game by its date.
- The subtitle sent to a Watch Together party writes the air date in
English, since it is data other viewers read.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Minor · Show air dates in the episode selection list. · SeriesDrilldown.tsx:422-424
web/src/pages/watchtogether/room/picker/SeriesDrilldown.tsx:422-424 Minor · Functional Correctness · Quick win
Show air dates in the episode selection list.
For an air_date series, each row still shows the synthetic episode number and title. If titles repeat, users cannot identify a game by date before selecting it. The new confirmation footer shows the date only after selection.
Use episodeAirDateLabel in each row. Retain the numbered label when no usable date exists.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: ae459447-9052-4623-b9fe-f4899487d2e0
Commits
Reviewing files that changed from the base of the PR and between bbf58bf and dc25e93.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.
For a date-labeled series the episode picker rows showed the synthetic
episode number ("296."). They now show the game's air date, and undated
rows keep the number. The rows, the staged pick and the confirmation
footer read the series' labels from one place: the card, else the
fetched series detail.
The reason will be displayed to describe this comment to others. Learn more.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Major · Include the date and title in the row’s accessible name. · SeriesDrilldown.tsx:397
web/src/pages/watchtogether/room/picker/SeriesDrilldown.tsx:397 Major · Functional Correctness · Quick win
Include the date and title in the row’s accessible name.
For a date-labeled episode, the visible row shows the date and title, but aria-label replaces them with pickLabel, which only receives the synthetic season and episode numbers. Screen reader users cannot identify the game by its date or title. Include the date label and title in the accessible name, and keep the numbered fallback for undated episodes.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: f0a42f27-f2db-41ae-ae28-d688c4e88741
Commits
Reviewing files that changed from the base of the PR and between dc25e93 and 0a4607d.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.
…ason cards
Series cards from catalog browse and search, Watch Together picker cards,
Watch Tonight and recommendation cards, and synthetic season detail dropped
the series' episode_labels, so clients showed S2026E296 there. The Start
Party episode chooser now names a date-labeled game by its date. The API
docs tell clients to treat an unknown episode_labels value as numbers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🤖 Claude Code (claude-opus-5-5)
Review of 0a4607d. The date labels work on the surfaces that read the series row or the card context, but four card paths outside the diff still drop episode_labels, so clients show S2026E296 there. I'm fixing all of these in a commit on this branch, so there's no need to change them yourself.
Medium: series cards in catalog browse and search carry no episode_labels.browseItemColumns and browseGroupByColumns in internal/catalog/browse.go keep their own column list and scanBrowseItems its own scan, and none of them gained the column. Only the episode cards get the label, from ListCardContexts. docs/catalog-api.md says browse and search cards carry it, and SeriesDrilldown reads series.episode_labels from the card first. Repair: select episode_labels in both lists and scan it.
Medium: Watch Together picker and member cards drop episode_labels.GetItemCardsByIDs in internal/catalog/item_cards.go builds each ItemDetail field by field and leaves the label out, so catalogItemCardOf never sends it on picker entries (watch_together_picker.go) or member state. The drilldown then shows numbers until the series detail loads, and a pick made before that stages NBA · S2026 E296 for the party. This is the window discussed in the SeriesDrilldown thread. With the card carrying the label, it closes. Repair: copy EpisodeLabels there.
Low: a synthetic season's detail omits episode_labels.syntheticSeasonDetail in internal/api/handlers/catalog_resources.go copies the series ID and title but not the label, so a season page reached through a synthetic season ID shows numbers. Repair: copy seriesDetail.EpisodeLabels.
Low: Watch Tonight and recommendation cards drop the series label.sectionItemFromMediaItem in internal/api/handlers/sections.go copies ShowStatus but not EpisodeLabels. Home sections fill it from the new lookup afterwards; watch_tonight.go and recommendations.go build cards through the same function and never do. Repair: copy item.EpisodeLabels.
Fit: 8/10 · Readiness: 8/10 — conditional (assuming CI is green)
Fit: the metadata plugin says how its series' episodes are labeled, and core shows that with no new setting, which follows the plugin boundary in AGENTS.md. It adds public /api/v2 surface (episode_labels, air_date) for a long-tail library type, which holds it below 9.
Readiness: the approach is sound, and the gap this round found is fixed and proven by a check that fails on the old head. It stays below 9 because the maintainer questions below are open (two of them describe behavior that differs from the docs) and the Apple PR still has to land with it.
The web build failed on 61b9c94 (ci / Web, tsrs -b): the Continue Watching date line from ca797eb builds a date-and-title array, and Children.map inferred its child type from the resulting union and rejected the translated line. 60c5a8f types episodeMeta as ReactNode, which restores the inference main had. It changes no runtime behavior. pnpm exec tsrs -b fails on 61b9c94 with that one error and passes on 60c5a8f, and vite build, Prettier and ESLint pass on the file.
Watch Tonight, recommendation rows, Explore All of fetcher-backed rows, and the admin section preview now carry episode_labels, and their episode cards carry air_date. The section fetcher's own column list and its episode query never selected the column. Home rows hid this behind a separate per-request lookup, so the earlier fix to sectionItemFromMediaItem copied an empty value on these routes. Both loaders now select it. The separate lookup (catalog.EpisodeLabelReader) is removed, so a home load runs one query fewer. Every source of section rows now reads the label from the query it already runs.
Web: the Continue Watching and On Deck date lines keep the date in its own non-shrinking box (they were fragments, which Children.map doesn't look inside). An untitled dated episode in the season grid and carousel uses its date, not "Episode 296", for its image alt and menu title.
Admin section preview episode cards send their air_date along with the label (6681413).
Docs and contract: the CatalogItem.episode_labels doc no longer says season cards carry it, and docs/catalog-api.md lists Watch Tonight and recommendation rows. The docs and the PR body also said "Replace all metadata" takes the label from the new answer. It doesn't: like every other value, a manual replace refresh keeps the label when the providers send none. Identify, Reset to Provider and a Complete Refresh are the actions that clear it, and the docs now name them (61b9c94, raised by CodeRabbit).
Verification: a temporary database check, not committed, seeds a date-labeled series and one game. On 57e61c2 it fails: section-loaded series and episode rows scan an empty label, and their cards have no air_date. On the fix it passes, and a numbered episode's card still has no air_date. The existing database-backed section, handler and apiv2 tests pass against a freshly migrated database. So do the Go tests for the touched packages, make lint-changed, the contract, migration and local-path checks, and the affected web tests. The web typecheck run for ca797eb didn't catch the Children.map error; CI's tsrs -b did, and 60c5a8f fixes it. Nothing was checked live on a sandbox this round. Steps and results: Evidence: https://evidence.siloserver.org/r/silo-server/pr-5129-review/
Left for the maintainers
An undated, titled episode in the season grid and carousel shows its title without a number. The docs say "an undated episode keeps its numbers". The author says the title-only line matches Apple and Android. Either the web follows the docs, or the docs say a titled episode leads with its title.
Identify can keep the date label when a library has both Sportarr and a numbered provider. Identify re-sends every stored provider ID, the old Sportarr ID included (prepareProcessRequest), so Sportarr can answer again and fill the cleared label back in. Other Sportarr fields stick the same way today. This is traced in source, not reproduced.
CatalogItem.air_date repeats release_date on episode cards. Dropping it before the /api/v2 lock would remove a field, but the Apple and Android changes read air_date.
Still showing numbers: the Watch Together picker's next-up caption, the drilldown row's screen-reader label (pickLabel, which needs a new catalog key), the home Upcoming row's subtitle (formatUpcomingSubtitle ignores the card's label, though the event has its date), and calendar events (they carry no label, so this one needs a new calendar field). Whether to cover these here or in a follow-up is open.
Answered without a change
The episode sweep's read-then-upsert can overwrite a newer label. It overwrites every column that way on main, so it predates this PR.
air_date::text under a non-ISO DateStyle: the catalog reads release_date::text the same way throughout.
The Watch Together subtitle's date stays English on purpose, because it is sent to the party as data (CodeRabbit raised it too).
The catalog seed export and import don't carry episode_labels. They leave out show_status the same way, and a refresh fills both.
The " • " between date and title is punctuation, used on the same lines where the numbered path uses its translated pattern. It needs no catalog key.
Pre-existing, filed separately
Episode cards in favorites, the watchlist, watch history, and collection pages carry no series title or season and episode numbers, so the web shows the bare episode title there, and a sports game's date can't show either. This predates the PR. The fix edits the same card blocks this PR changes, so it is filed to follow this PR: #5263.
Checks
Validated features: no passed case on the v1.0 board changes. Every surface falls back to the numbered code when episode_labels is absent, which covers every existing library. Validation tasks: none stands.
All three found the Watch Tonight and section-loader gap in round 1, and round 2 confirmed it fixed. In round 2, Sol found that the admin preview sent the label without the date; 6681413 fixes that. Sol's undated-title note and Gemini's note on the Watch Together next-up caption are already in the maintainer list above. Two more are declined. Sol's "Recently Added loses its air date when episode enrichment fails" is a degraded path where the card loses its season and episode numbers too, and that predates this PR. Opus's one helper for the air-date rule would miss Watch Tonight, which builds its cards without toSectionItemResponse. The three commits after round 2 (6681413, a one-line fix for that round's low finding; 61b9c94, docs only; and 60c5a8f, a type annotation) got no third round.
…ds from the section loaders
The section fetcher's own column list and its episode-target query never
selected episode_labels, so Watch Tonight, recommendation rows, Explore All
of fetcher-backed rows and the admin section preview sent cards without it.
Home sections hid the gap with a separate per-request lookup.
Select the column in both loaders, derive an episode card's air_date in the
shared card builders (sectionItemFromMediaItem, applyEpisodeCardMeta), and
drop the separate EpisodeLabelReader lookup, which every home load paid for.
Web: the Continue Watching and On Deck date lines pass their parts as an
array: Children.map does not look inside a fragment, so the date lost its
non-shrinking box; an untitled dated episode's image alt and menu title use
its date instead of "Episode 296".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
🤖 Claude Code (claude-opus-5-5)
Review of 57e61c2 (0d1c6d7 with current main merged in). Watch Tonight, recommendation rows, Explore All of fetcher-backed rows, and the admin section preview still send cards without episode_labels, so native clients show S2026E296 there. Two web date lines also lose their layout. I'm fixing all of these in a commit on this branch, so there's no need to change them yourself.
One more, outside the diff: in the season grid and episode carousel, an untitled episode of a date-labeled series uses "Episode 296" as its image alt and its menu title, while its caption and screen-reader title show the date (SeasonEpisodeGrid.tsx and EpisodeCarousel.tsx, the episodeTitle fallback). Low. I'm fixing it in the same commit by falling back to episodeAirDateLabel(...) before the numbered text.
…label
The admin section preview copied episode_labels onto episode cards but not
their air_date, so a client got the display mode without the date. Send the
episode row's release date (its air date) as air_date, only for a
date-labeled series, as section cards do.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.
…abels
Identify, Reset to Provider and a Complete Refresh clear the stored label
before merging; a manual "Replace all metadata" refresh keeps it when the
providers send none, like any other value they leave out.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 settingsReview Options
The following review options are enabled or disabled:
Options
Enabled
Bug
✅
Performance
✅
Security
✅
Business Logic
❌
⚠️ 4 Kody Rule(s) were not evaluated
These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:
Preserve optional store capabilities through production wrappers
Detach mandatory cleanup from request cancellation and bound its lifetime
Preserve durable media identity and share identity-evidence precedence
Bound decoder throughput trades and share direct-play eligibility
…le array typechecks
Children.map inferred its child type from the union that the air-date
array introduced and rejected the t() result. Typing episodeMeta as
ReactNode restores the inference it had before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(admin): add Insights dashboard widgets, breakdowns and a Library tab (#5279)
* feat(insights): add breakdowns and a Library read to the Insights API
Activity buckets now count active accounts and profiles, and Activity
counts sessions by end reason. Titles lists the least-finished movies and
series, People ranks profiles across accounts, and Devices adds client
versions, a Silo vs Jellyfin-client split per bucket, and the subtitles
and audio sessions with route facts used.
GET /api/v2/admin/insights/library reads the catalog against the
window's plays: per-library coverage, titles never started, plays by
genre, decade and content rating, and how soon new titles get a first
play. Monitoring keys may read it like the other Insights reads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(web): put Insights charts on the dashboard
The dashboard gains Playback over time, Viewing hours, Plays by day of
week and Plays by hour of day widgets, read from Insights with windows
from 7 days to all time. Top titles and Most active profiles now count
plays the way the Titles and People tabs do, so the dashboard and
Insights agree; their shortest window is 7 days.
Insights widgets pace themselves (5 minutes for short windows, 15 for
long ones) instead of following the dashboard's 60-second loop, and the
Refresh button marks them stale. Insights cards that have a dashboard
widget get an Add to dashboard button.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(web): show the new playback, title and device breakdowns in Insights
The Playback tab adds plays by day of week and hour of day, active
people per period, and how sessions end. Titles adds the least-finished
movies and shows. Devices & Quality adds Silo apps vs Jellyfin apps over
time, the app versions in use, and the subtitles and audio sessions
played. Active people is also a dashboard widget.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* feat(web): add a Library tab to Insights
The tab shows how much of each movie and TV library was played, titles
nobody ever started, plays by genre, release decade and content rating,
how long new titles waited for a first play, and the newest titles still
waiting. Library coverage is also a dashboard widget.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(insights): tighten the new breakdowns after a visual check
Least finished leaves out titles nobody left unfinished. The Viewing
hours widget uses shorter cells so its legend fits three rows, the
Subtitles and Audio cards take the full width so their labels don't
truncate, and App versions shows the last-seen date without the time.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(apiv2): keep the Insights Library and usage types in their own files
admin_insights.go had grown past the size ratchet's 1,000-line limit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(insights): run the breakdowns and Library DB test in CI
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(api): list the Insights Library read in the media route manifest
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(insights): keep Library breakdowns to movies and series
Genres, decades and content ratings counted plays of any item type that
history holds, so they did not reconcile with the movie and series
coverage beside them. The never_started description now says it counts
sessions up to the window's end, which is what the query reads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): keep an Insights add when the dashboard opens right after it
Add to dashboard saves as the Insights page unmounts. A dashboard opened
from the On dashboard link mounted on the cached layout from before that
save, adopted it, dropped the new widget and then saved against a
version the server no longer held. The dashboard now waits for a layout
write still running, and for its refetch, before it settles.
Also: Insights widgets keep their last data through a failed poll, the
coverage bars draw the played share against 100%, and Add to dashboard
shows only once the layout can be saved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): scroll the Insights tabs sideways on a phone
Six tabs are wider than a phone screen: Devices & Quality was cut off and
Bandwidth could not be reached. The tab row now scrolls sideways below the
lg breakpoint with no scrollbar, fades the edge that has more tabs past it,
and keeps the active tab in view, like the user detail page's tabs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(insights): report never started and first plays as of now
For a window that ended in the past, the Library read called a title
never started or not played yet when its first session or play came after
the window, though the labels read as today's state. Never started now
looks at every session up to now, and the first play is looked up from the
window's start to now; played in the window still counts only the
window's plays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(apiv2): use a made-up title in the Insights least-finished fixture
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(insights): keep Library window counts to the window
Looking up first plays to now had widened the whole Library play pass to
now. Sessions after a past window then joined viewings that began in it,
so a false start resumed later counted as a play in the window, and a
narrow window long ago regrouped all the history since. The pass is
bounded to the window again; a separate lookup finds, from the window's
end to now, the first play of only the added titles that had none in it.
The docs also say how a library's added count differs from the summary's.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(insights): count a viewing resumed after a past window as a first play
The later first-play lookup grouped sessions from the window's end, so a
false start inside the window resumed just after it lost its opening
sitting and never counted, leaving the title not played yet. The lookup
now groups the waiting titles' sessions from the window's start; window
counts still come from the bounded pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(web): pin translations 2026.11.25-dbc5ec8 for the corrected embedded-subtitle label
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(directconn): run the direct connection engine on one API replica at a time (#5273)
* build(directconn): take shunpike and its forks from the darthShadow paths
The module requires github.com/darthShadow/shunpike v0.1.1 again, and the
quic-go and Tailscale replace lines point at github.com/darthShadow/quic-go
and github.com/darthShadow/tailscale, both still tagged -shunpike.2. The
directconn imports, the shunpike path constant in scripts/ci/forkpins and
its test fixtures, and the shunpike entry in THIRD_PARTY_NOTICES.md use
the same paths. go.sum is regenerated for them.
Signed-off-by: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com>
* feat(directconn): run the direct engine on a single leased API replica
When direct_connections.enabled is true, the API and integrated modes
now start the shunpike N4 engine and serve HTTP/3 on its UDP socket.
Only one API replica may run it, so two replicas can no longer present
the same direct identity. Production code still registers no peers, so
no client can connect yet. Enrollment, registration, and direct
playback are not part of this change.
Replica gate. The engine shares the API replica presence marker that
network access providers already use. A census counts live markers
every 30 seconds. A Redis lease (silo:direct:engine-lease, SET NX PX
90000, renewed every 30 seconds) lets one holder run the engine, and
the holder stops it once its last successful renewal is older than 60
seconds. The census and the lease call each have their own 2-second
bound, so a slow census cannot expire the renewal. The presence and
the lease use a Redis client that honors context deadlines, so a Redis
that stops answering cannot stall startup or shutdown. Without Redis
there is no census or lease and the engine may run. When Redis is
configured but its client fails to build, or the presence has no
identity, the gate stays closed with replica_census_unavailable. With
more than one replica, or a failed census, a valid holder keeps its
established sessions but new direct connections are unavailable. The
gate table is in docs/architecture/direct-connections.md.
cache.APIReplicaPresence gains ID and Refresh, bounds each marker write
to 2 seconds, and Register now starts renewal even when its first
write fails, so the marker appears once Redis recovers. When the
Register context ends, the marker is deleted and neither renewal nor a
late Refresh writes it again, so a stopped replica does not reappear in
the census. A presence registers once per process.
warnOnMultipleAPIReplicas reads the marker that main registers instead
of registering its own.
Engine lifecycle. The node key comes from HKDF-SHA256 over SECRET_KEY
with the label silo/direct-node/v1|api. The UDP port defaults to 8094.
An invalid port leaves the engine off, and a bind failure is reported.
No engine starts before main builds the HTTP handler it serves; until
then settings reads only record their values, so the lease deadline
stays in force during a slow startup. Each start replays the stored
peer set and builds a fresh HTTP/3 server. Each stop drains that server
before Engine.Close. If a rebind moves the local port, Silo restarts
once on the configured port. The service also rereads settings once a
minute, because Redis drops a settings-change event published while a
subscriber reconnects. A failed start waits for a settings or gate
change. The first successful settings read, changed values, a
SettingsChanged event, or a changed replica gate retries it; the minute
recheck, the follow-up read the service schedules itself, and status
rereads of unchanged values do not. If HTTP/3 Serve returns while its
engine is current, nobody asked it to stop, so Silo detaches the engine
and turns its row off with engine_start_failed before it publishes the
change, then drains and closes the engine. It restarts once after a
settings read and, with Redis, a successful lease renewal or
acquisition, both completed after the exit, if settings still enable it
and the gate permits it. A failed read or renewal keeps the restart
pending. A second unexpected exit leaves it off until settings or the
gate change. On process stop the direct service shuts down beside the
API server's drain: it drains HTTP/3, closes the engine, then ends any
census or renewal in flight and releases the lease, so no successor
holds the lease while this engine is open. The server policy is
n4.DefaultServerPolicy with the configured BBR loss setting.
Request path. The HTTP/3 server reuses the LAN TLS certificate and SPKI
pin with ALPN h3. Before the router runs, the wrapper strips Forwarded,
X-Forwarded-*, X-Real-IP, and both network access ingress headers, sets
RemoteAddr from the engine's observed endpoint for the admitted peer,
and answers 421 when either is missing. It then records
netaccess.Path.Direct on the request context. That identity carries no
user, device, or policy, and grants no application authority.
streamlocation classifies a direct path as remote even from a private
address.
Status and tuning. The status API adds an engine feature and the reasons
multiple_api_replicas, replica_census_unavailable,
replica_lease_pending, replica_lease_held, udp_port_invalid,
udp_port_bind_failed, and engine_start_failed. The direct row turns off
while the gate refuses new connections. Numeric knobs report min and
max bounds, and the tuning package adds SILO_NET_DIRECT_UDP_PORT,
SILO_NET_DIRECT_RECEIVE_WINDOW, SILO_NET_DIRECT_GSO,
SILO_NET_DIRECT_ACK_DECIMATION, and SILO_NET_DIRECT_BBR_LOSS. Bad
values fall back to a default or clamp, never stop startup. The
OpenAPI contract, generated web schema, and Direct Connections admin
section carry the new feature and reason labels, and the admin section
labels the clamped tuning reason.
Docs: docs/architecture/direct-connections.md and network-access.md,
and docs/direct-connections-api.md.
Signed-off-by: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com>
* fix(directconn): drop the engine's packets once its lease is lost
An API replica that loses the direct engine lease, or lets its last
renewal go stale, no longer sends or accepts direct traffic while the
next holder starts. Two replicas can no longer serve the same direct
identity at once, including across a lease takeover.
Lease fence. The packet connection handed to HTTP/3 drops every packet
in both directions, including segmented writes, as soon as the grant
that started the engine ends or its local deadline (last renewal plus
60 seconds) passes. The drop happens before teardown, and the
transport sees ordinary loss, not an error that would end its server.
A stop the lease forces closes HTTP/3 connections at once, with no
grace period. The fence covers the HTTP/3 path Silo owns; shunpike's
own discovery and transport paths are outside it, and a process paused
between a check and a send is bounded only by the TTL margin.
Grants and hold. A grant is one stretch of ownership of the lease key.
Only Redis's confirmation of an acquisition opens one, and a renewal
answered 0, a release, or a renewal that finishes after the grant's
own 60-second deadline ends it. The acquisition script also accepts a
key that already holds this process's value, so a retry after a lost
reply succeeds. A fresh grant keeps the engine off (reason
replica_lease_pending) until 90 seconds, the lease TTL, have passed
since the send time of the call that opened it, so the previous holder
has stopped before this one serves. A failed lease call is retried
after 5 seconds, and the release runs under its own 2-second bound even
when the shutdown context has ended.
Census. The replica census now reads one Redis sorted set,
silo:api-replicas, scored with each member's expiry in Redis time. One
script call prunes expired members, adds this process if it is missing,
and counts, so a lone marker of another process is never taken for this
one and the cost no longer grows with the keyspace. A process from the
previous release writes no member and is not counted. The census and
lease run only while direct connections are enabled, and are released
when it is turned off, after the engine closes. Every API host registers
the presence, so the multiple-replica warning also works in integrated
mode.
Redis requirement. In server.mode api the engine stays off with
replica_census_unavailable when Redis is not configured, because
separate API processes can share the lease only through Redis. A single
integrated process without Redis still runs it. Two integrated
processes without Redis can overlap during a rolling restart; that case
is documented and left open.
Engine start. A failed start reports udp_port_bind_failed when the
engine could not bind the requested UDP port and engine_start_failed for
any other cause. An engine built while the lease or settings changed
under it is closed unpublished and is not a failure. A peer list the
running engine rejects is not stored, so a restart never replays it. The
direct row turns off with the engine's own reason when the engine is
stopped for a port or start failure, not only for the replica gate. A
settings reread claims a worker slot before shutdown cancels the
service, so Shutdown waits for it.
Tuning and admin. An unrecognized SILO_NET_DIRECT_GSO,
SILO_NET_DIRECT_ACK_DECIMATION, or SILO_NET_DIRECT_BBR_LOSS value now
turns that knob off with reason invalid, as the TCP knobs do. A
malformed SILO_NET_DIRECT_RECEIVE_WINDOW keeps its default with the new
reason invalid_default. The Direct Connections admin section names the
five direct knobs, shows on/off and sizes as people read them, shows a
knob's allowed range, and labels invalid_default. Its new text comes
from the translation catalog; the synced locale files and
.silo-translations are generated.
Signed-off-by: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com>
* test(directconn): make the shutdown test fail if no census stalls
The lease monitor starts only after a settings read, and New reads
none. TestShutdownInterruptsInFlightReplicaUpdate therefore shut down
before any census ran, and it passed even with the stall path broken.
The test now reads settings once to start the monitor, and fails if no
census reached the stalled Redis call before Shutdown. A broken
interrupt path now fails it.
Also correct the comment in replicaMonitor.update. It said packet
checks read the clock under the lease lock. The fence reads the clock
after that lock, so a renewal that commits on or just before the old
deadline can still leave the fence latched while the grant stays held.
This changes a test and a comment only; no behavior changes.
Signed-off-by: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com>
---------
Signed-off-by: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com>
Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* feat(web): move live Activity into Insights and add a card layout (#5301)
* feat(web): move live Activity into Insights and add a card layout
Live streams become the first tab of Insights, which now opens on it. The
Activity sidebar entry goes away, its live-session badge moves to Insights,
and /admin/activity redirects to the new tab. The tab keeps its search,
filters, IP lookup, and realtime status in the bar where other tabs hold
their date range, and the page's Refresh re-reads sessions on this tab.
The tab adds a Cards layout beside the table. Each card shows the poster,
who is watching, how the server delivers the stream, and progress; its
details open in a side panel with the same facts, ffmpeg console, and
actions as an expanded table row. The choice is remembered per browser.
Until an admin picks one, a visit with up to eight streams opens as cards
and a busier one opens as the table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(web): sync translations 2026.11.25-456e313
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): return focus to a card's opener when its details panel closes
The card's details panel opens from no Radix trigger, so closing it left
focus nowhere. It now returns to the button that opened it, or to the
card's Details button after a click on the card itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* perf(insights): filter unrelated bus events from cache invalidation (#5306)
* perf(insights): filter unrelated bus events from cache invalidation
AdminInsightsProvider previously invalidated all 6 cached Insights tabs and bumped its fill generation on every message published to ChannelPlayback and ChannelAdmin. High-frequency realtime coordination traffic (Watch Together room state and suggestions, subtitle ready/timing/sync, marker updates/thumbnails) and unrelated admin chatter (node reachability/drain, settings, policies, plugins, auth/marker config, login session revocations) repeatedly evicted cached tabs and caused in-flight fills to discard their results.
Filter subscriptions per channel so invalidation only runs for events that can change Insights data:
- ChannelPlayback: playback_sessions_changed
- ChannelAdmin: admin_stats_invalidated, user_disabled, user_deleted, node_pool_changed, item:updated
Add unit tests covering relevant and ignored events on both channels, including in-flight fill preservation and stale-fill rejection.
* fix(insights): invalidate on sign-in revocation and name the item event
A sign-in provider's role change, and an admin edit that changes the
username together with the password, reach the Insights provider only as
user_sessions_revoked. Ignoring that event left the People tab showing the
old role or username until the cache expired. Revocations are rare, so
treat them as relevant again.
Add cache.EventItemUpdated so the metadata publisher, the Insights filter,
and its test share one name instead of a bare "item:updated" string.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(freebsd): emit direct-play ETag and map NFO EMLINK (#5308)
Add a FreeBSD directPlayFilesystemRevision implementation using
syscall.Stat_t (Dev, Ino, Ctimespec, modtime, size), exclude FreeBSD
from the empty fallback, and enable validator assertions for FreeBSD in
directplay_test.go.
Treat syscall.EMLINK alongside syscall.ELOOP from O_NOFOLLOW in
readNFOFile so symlink swaps on FreeBSD return errNFOReplaced.
Closes #5267
* fix(web): handle live Activity load failures and stale details panels (#5303)
* fix(web): handle live Activity load failures and stale details panels
Follow-up to #5301.
- A failed sessions load shows the Insights error panel with Retry
instead of "No active streams".
- The automatic cards-or-table choice waits for a loaded list, so a
failed or unstarted first load no longer fixes the tab on cards.
- A stream that leaves the list clears the open details panel, so the
same session listed again doesn't reopen it. The panel keeps its last
content while it slides closed instead of sliding out empty.
- The bug report template points to Admin > Insights > Activity.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): keep the ffmpeg console open while the details panel slides closed
The console reset ran when the panel's session went away, which is the
same render that starts the close animation, so an open console collapsed
mid-slide. Reset it once the panel has finished closing instead, and read
its logs for the session the panel is still showing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(web): cover the live Activity layout lock, Retry, and a failed refresh
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(workmetrics): report due-only queued age for image cache jobs (#5305)
* fix(workmetrics): report due-only queued age for image cache jobs
Future-deferred retries in metadata_image_cache_jobs stay in status='queued'
with next_attempt_at days in the future (for example, 7-day backoff on 403/404
or missing local artwork). Sampling min(created_at) for queued rows caused
SiloQueueAgeHigh to alert whenever any deferred retry existed.
Report min(next_attempt_at) FILTER (WHERE next_attempt_at <= NOW()) for queued
image cache jobs while keeping count(*) across all queued rows and min(created_at)
for running rows. When all queued image jobs are future-deferred, the oldest
queued timestamp metric is omitted so SiloQueueAgeHigh does not false-fire, while
due queued jobs that sit unworked still alert accurately.
* docs(workmetrics): explain what the images due-only age leaves out
The images queue now reports queued age from due rows only, so a job that
keeps getting deferred (a full artwork store or a missing local mount) no
longer shows as old queued work. Say so in the SiloQueueAgeHigh description
and the workload metrics doc: that case shows as queued depth that keeps
growing, and the images queued age is omitted while every queued job waits
for a later retry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(catalog): cap effective_io_concurrency during audiobook_group_stats refresh (#5304)
* fix(catalog): cap effective_io_concurrency during audiobook_group_stats refresh
Wrap REFRESH MATERIALIZED VIEW CONCURRENTLY audiobook_group_stats and the audiobook_group_stats_refresh upsert in a transaction on the advisory-lock connection with SET LOCAL effective_io_concurrency = 16.
In PostgreSQL 18, ReadStream prefetching on temporary tables created by concurrent materialized view refreshes can pin all local buffers (temp_buffers) and fail with SQLSTATE 53000 (no empty local buffer available) when the server runs with high effective_io_concurrency. Using SET LOCAL keeps the override scoped to the refresh transaction without leaking to pgxpool while keeping the session-level advisory lock held across the transaction.
* fix(catalog): only lower effective_io_concurrency for the refresh
Raising a lower setting to 16 undid an operator's tuning, such as the
value Silo's own tuning picks for spinning disks, and PostgreSQL 17 and
older reject any nonzero value on platforms without posix_fadvise.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(collections): ignore a query or fragment on an MDBList list link (#5314)
* fix(collections): ignore a query or fragment on an MDBList list link
NormalizeMDBListURL appended /json to the whole string, so a link with a
query or fragment became ".../list?sort=rank/json". The path never ended in
/json, mdblist.com answered with the HTML list page, and the sync failed with
"invalid character '<'". Drop the query and fragment first, and match a
trailing /json in any case. A collection that already stored such a URL
recovers on its next sync, which normalizes the stored URL again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(collections): keep an MDBList link's query for the feed
The first version dropped the whole query, so a feed link such as
".../json?sort=imdbpopular&sortorder=asc", which synced in that order
before, lost its sort. Put /json at the end of the path and keep the
query; drop only the fragment, and the "/json" earlier builds appended to
the end of the query.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(collections): make MDBList link normalization stable on a second pass
Trim every trailing /json from the query, not just one, so normalizing a
stored URL again leaves it unchanged. A Discover row now removes /json
from the path of the feed URL rather than from its end, so a row with a
query stores the list page link.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(collections): trim space a removed MDBList fragment or /json leaves
Trimming before cutting the fragment left the space in "…?sort=rank #top"
for the next pass to remove, so normalizing the stored URL again changed
it. Trim after each cut.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* perf(insights): optimize cold SQL queries across Insights tabs (#5307)
* perf(insights): optimize cold SQL queries across insights tabs
- Add media_item_libraries(first_seen_at, content_id) index and pre-filter
added title candidates before aggregating MIN(first_seen_at), querying
added titles once per Library read and reusing them across later first
plays, in-memory first-play wait bucketing/median, and unplayed lookup.
- Deduplicate admin_playback_history.media_item_id before joining episodes
in Library coverage and replace 4x COUNT(DISTINCT) GROUPING SETS sorts
with hash-aggregated per-library and distinct-title summary queries.
- Omit the media_files join from viewingRowsSQL when libraryID == 0 and
the caller does not project file library attribution.
- Consolidate Devices summary + breakdowns (4 queries -> 1) and subtitle
usage (3 queries -> 1), and pre-group sessions by media file before
probing media_files and JSONB track fields in resolutions, audio usage,
and client-codec matrix.
* fix(insights): keep the unplayed list's tie order and the median's rounding
The recently added, not played list sorted titles added at the same moment
by the database's default collation, because its ids came from unnest. On a
database whose default is not C, tied titles came out in a different order
than the catalog's COLLATE "C" gave before, and a tie at the 20-row cut could
change which title made the list. Go sorts strings byte by byte, as "C"
does, so cut the list there and order by content_id COLLATE "C".
The median of an even number of waits used (lo+hi)/2, which can differ in
the last bit from percentile_cont's lo + (hi-lo)*0.5 and tip the shown value
across 0.1 day. Use PostgreSQL's formula.
Also fold the duplicated title-plays statement into one template and drop a
test that only checked SQL text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(insights): read the Devices tab in three statements instead of eight
Each Devices section scanned the window's sessions on its own, and the
matrix, resolution and audio sections each looked up every played file
again. Read them in three statements:
- one scan feeds the summary and breakdowns, adaptation reasons, protocol
buckets and subtitle usage through grouping sets, and runs the Jellyfin
client check once per bucket and client name instead of once per session;
- one join of the sessions to their files feeds the codec matrix,
resolutions and audio usage through grouping sets, with no CTE under it so
the scan and join can run in parallel, and the matrix ranking stays in SQL;
- client versions stays on its own, since its order and limit rely on the
database's collation, and checks the client tokens after grouping.
The Go post-processing is unchanged, moved into small tallies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* perf(insights): hash Activity's distinct counts and probe one library's titles
Activity's summary and buckets counted distinct accounts and profiles with
COUNT(DISTINCT), which sorted every session in the window. Count them from a
pre-grouped set of who played in each bucket so every aggregate hashes.
Library coverage collected every title any session ever started, across the
whole history, to count titles never started. With a library filter and no
account or profile filter, probe the history's item index per title of that
library instead; the whole catalog and one account's sessions keep the
collected set, which is faster for them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(insights): match main on fractional-second waits and every catalog
- Compute a title's wait for its first play from the whole microsecond
difference in one division, the float PostgreSQL's EXTRACT(EPOCH ...)
gave. Adding seconds and fractions as two floats could tip the shown
median by 0.1 day for titles added on a fractional second.
- Map sessions to titles in the per-library "never started" probe exactly
as the collected set does: an episode's sessions start its parent
whatever the parent's type, and empty item ids start nothing.
- Read a Devices session's audio track in the projection, after the window
and library filters, so the default-track cast never runs on a file the
filters drop.
- Key protocol buckets by their start rather than their date label.
- Cover the unplayed list's 20-title cut in its tie-order test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(insights): keep the Devices reads within the linter's function length
Move the two Devices statements into SQL templates with small builders, the
session statement's row handling into a tally like the other three, and the
file statement's row kinds into constants the SQL and the Go switch share.
The SQL and its results are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* perf(insights): serve cached tabs while they refresh in the background (#5321)
* perf(insights): serve cached tabs while they refresh in the background
On a server with steady playback, every playback session change cleared
every cached Insights tab, so nearly every tab load ran its full read, which
takes seconds on a large library.
A playback event now only marks the cache stale. A read serves a stale entry
up to 30 minutes old at once and starts one background refresh of its key, at
most every max(15s, 4x the read's cost). A sweep keeps keys read in the last
30 minutes warm, refreshing stale ones every max(2m, 10x cost), and drops
keys nobody read. Background refreshes run one at a time, so they hold at
most one read-gate slot.
Admin events (account, item and node changes) still drop every entry, and a
read that started before one publishes nothing, so an admin's change shows
on the next read. The Refresh button's refresh=true read waits for fresh data
for its own tab and marks the others stale.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(insights): bound the cache's background reads and keep Refresh fresh
- A background refresh no longer brings back a key the sweep evicted, or
an admin change dropped, while it waited or ran.
- A refresh that fails is retried no sooner than one that succeeds would
be, and a slow failure counts toward the key's cost, so a read that keeps
timing out can't hold a read slot back to back.
- The sweep keeps a key warm for five minutes after its last read instead
of thirty, so background reads stop soon after the Insights page is
closed. A key is still served for thirty minutes.
- Invalidate, which admin events and the Refresh button call, drops every
entry again, as before this branch; only playback events mark entries
stale. Switching tabs after Refresh no longer shows pre-refresh numbers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(insights): cap the cached Insights reads at 128 per server
Entries now live up to 30 minutes instead of a minute, and their keys
multiply across ranges, timezones, filters and parameters that an
admin:monitor API key can ask for at will. Cap the cache at 128 entries and
let a new key evict the entry read longest ago, which also bounds how many
keys the sweep can keep refreshing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(insights): keep the cache's background reads to what still needs one
- A refresh that queued for the single slot rechecks, once it gets it,
that its entry is still the key's (not dropped, evicted or replaced),
still stale, and, for the sweep, still in its warm window. Its retry
spacing counts from when it reads, and a failure is charged only to the
entry it read for.
- The sweep refreshes only keys an event changed; one that is merely
older than a minute refreshes when someone reads it, so an idle server
reads nothing in the background.
- Misses share one read across playback events, which only mark entries
stale; only Invalidate starts a new one.
- Invalidate cancels a background refresh it would discard, freeing its
read slot.
- The dashboard's Refresh button now asks for fresh Insights too, as the
Insights page's does, instead of getting the cached copy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(insights): rewrap the cache provider's doc comment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(insights): keep Refresh to its own read and serve no copy over 10 minutes
- A refresh=true read no longer drops the whole cache. It marks every
entry stale and waits for fresh data for its own key, so a Refresh on
the dashboard or one Insights tab no longer costs every other tab its
cached read, and a burst of refresh reads no longer discards each
other's fills. Admin events still drop every entry.
- Serve a cached copy at once only while it is under ten minutes old, and
drop keys nobody read for ten minutes. A tab someone is browsing stays
warm; one opened after a longer break, a slow dashboard poll or an API
client waits for fresh data, as before this branch, so changes no event
announces (a library scan, the window moving) show up.
- Cap the background refreshes waiting for the single slot at eight; a
waiting one keeps its entry alive even after eviction.
- Only the dashboard's Refresh button asks for fresh Insights; returning
to the page catches up from the cache.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(scanner): read the hearing-impaired subtitle flag from the stream disposition (#5290)
FFprobe reports a subtitle track's hearing-impaired flag under disposition,
but the scanner looked for it in the stream tags and the decoded disposition
had no field for it, so every embedded track was stored as not
hearing-impaired.
Closes #5222
* fix(web): clear the subtitle upload selection when a file is rejected (#5291)
* fix(web): clear the subtitle upload selection when a file is rejected
Choosing an unsupported file in Add Subtitles showed the error but kept
the earlier file selected, so Upload sent a file other than the one the
error named. The rejection now clears the selection and the detected
language note, and ignores the earlier file's pending detection.
* fix(web): reset the detected language and file input on rejection
A rejected file now also puts back the default language when the earlier
file's language was detected rather than chosen, and clears the file
input so picking the earlier file again still registers.
* fix(web): keep only a user-picked language when a file is rejected
The detector reports a fallback language as manual, so the rejection now
keys the language reset on whether the user picked the language rather
than on the detection source.
* fix(web): reset only a detected language when a file is rejected
The detector reports a fallback as manual, and that fallback is often the
language the user picked. Keying the reset on languageOverride discarded
that choice, so the rejection resets the language only when detection
found it.
* test(web): cover a detection result that arrives after a rejected file
The rejection branch drops any language detection still running for the
earlier file. Add a test where that detection settles after the rejection
and check the language, the detected note, the error, and the Upload button
stay as the rejection left them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(playback): put the fonts an ASS script names first in its font bundle (#5293)
* fix(playback): put the fonts an ASS script names first in its font bundle
A subtitle font bundle holds at most 32 fonts and 32 MiB. Releases that
attach more fonts, often in alphabetical order, lost the ones the script
uses because the bundle kept the first attachments in container order.
When the attachments do not all fit, the bundle now reads the font
families the selected track names (style Fontname values from the track
header in the source's index, and \fn overrides once the subtitle cache
holds the extracted track) and the names inside each attached font, and
takes the matching attachments first. The log line now counts every font
left out.
* fix(playback): bound the font names read from an attachment
A crafted font collection could give each of its directories its own
header over one shared name table full of repeated names, so choosing a
bundle's fonts could decode the table hundreds of times, well past the
extraction deadline. Font names are now read within one budget per
attachment: each distinct name table is read once, every record examined
counts toward 8192 records, a name stored in more than 256 bytes is
skipped, and at most 512 distinct names are kept.
* fix(playback): bound script font names and keep the bundle when names are slow
A script that names a new font in every event made reading its families
quadratic, and each attachment's names were compared against every family:
20,000 distinct \fn names took seconds of CPU and 100,000 took about 24 s,
none of it stopped by the request's deadline. The families are now kept in
a set, at most 256 of them, and matched by lookup.
Reading every attachment's names shared the bundle's 30 s deadline, so on
storage too slow for it the request failed where the base served the fonts
that fit in container order. The name read now gets half of what is left of
the deadline and falls back to container order when it runs out.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): keep Insights tabs on screen while a sort, search, or filter loads (#5328)
* fix(web): keep Insights tabs on screen while a sort, search, or filter loads
Changing a sort, search, range, or library filter on an Insights tab
dropped the tab's data and showed skeletons until the new read returned.
The tabs now keep the previous result as placeholder data, dim it after
150 ms, and lift the dim when the new result lands. The People search
shows a spinner meanwhile. Links in a dimmed region are disabled, since
they would combine the new filters with the old result's window.
Placeholder data never carries across a change of signed-in profile or
server, and the person and title detail sheets do not opt in, so they
never show another person's or title's numbers. The Titles tab formats
its rows by the sort the data was ranked by, not the toggle's new value.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): keep refreshing Insights content opaque and block Enter on its links
Reviewers found two problems with the dimmed placeholder. At 50% opacity,
secondary text fell to about 2.7:1 on the default panel, below 4.5:1, and
no fixed opacity is safe under high-contrast mode or custom branding.
pointer-events also left the stale links reachable with Enter.
The region now stays opaque and shows a sweep along its top edge, which
fades in after 150 ms and holds still under reduced motion. A capture-phase
click guard stops links in the region, which covers Enter as well; buttons
stay live. The People tab uses one region for its KPIs and table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): drop a reset device override from the cached settings list (#5296)
* fix(web): drop a reset device override from the cached settings list
Reset override in the Admin > Devices subtitle appearance editor only
invalidated the user's cached settings list. Until the refetch answered,
a reopened editor still found the deleted row, showed its values, offered
Reset override again, and the next change saved those values back.
Both device override resets now remove the deleted rows from the cached
list before they settle, then refetch. Reset all overrides also removes
the rows it deleted before a later key failed.
Closes #5250
* fix(web): drop each reset-all row as its delete lands
A save made while the rest of a reset-all runs is no longer dropped with
the reset rows, and a key reset before a later failure still leaves the
cache. Covers the partial-failure case.
* fix(web): drop the mirrored intro skip row with its reset pair
The server clears playback.intro_skip_mode and playback.auto_skip_intro
together when either is deleted, but the cached settings list lost only
the key that was reset. Until the refetch answered, Admin > Devices still
counted the companion as an override and offered to reset it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): keep Find markers on playback in view with on-demand online markers (#5299)
* fix(web): keep Find markers on playback in view with on-demand online markers
Choosing "Fetch when needed" under "Online preferred + server detection"
hid the Find markers on playback row and staged markers.lazy_playback=true,
which turns on local detection at playback. On-demand lookups run at
playback either way, so storage no longer stages lazy playback and the row
shows whenever local detection is on or online markers are stored.
Closes #5251
* fix(web): describe a kept lazy playback row for online-only markers
Under online-only markers the row kept for an unsaved edit fell through to
the local detection description.
* fix(jellycompat): return episodes from favorites and Ids lookups across mixed types (#5297)
* fix(jellycompat): return episodes from favorites and Ids lookups across mixed types
A Jellyfin /Items request for favorites with IncludeItemTypes naming
Episode beside other types went to the media_items favorites browse, and
an Ids lookup with such a type filter (or Episode alone) skipped the
episode browse. media_items holds no episodes, so the favorite or named
episodes were missing from Items and TotalRecordCount.
Favorites now take the mixed browse, and the episode browse accepts the
Ids list, which BrowseEpisodes applies as a content ID allowlist.
Closes #4546
* fix(jellycompat): keep a series or season ParentId on episode Ids lookups
An Ids lookup with IncludeItemTypes=Episode and a series or season
ParentId now reaches the episode browse, which listed the named
episodes of every series. It now keeps only that parent's episodes.
* fix(jellycompat): keep Ids out of /Shows episodes and collection lookups
The episode Ids allowlist was set in the filters /Shows/{id}/Episodes
shares, so an Ids parameter there narrowed the series, which Jellyfin
ignores. Set it only in the /Items episode browse.
An Ids lookup under a collection ParentId reaches the episode browse
before the collection handler, and that browse can't match a
collection's members, so it returned named episodes outside the
collection. List no episodes there instead.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(jellycompat): say a collection ParentId drops only the named episodes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Quick104 <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): stop the Add widget sheet from scrolling the dashboard behind it (#5344)
The Add widget sheet is non-modal so the grid stays a drop target, which
also means nothing locks page scroll. Wheel input over the sheet header,
over a list too short to scroll, or at either end of the list scrolled the
dashboard. A non-passive wheel listener on the sheet now cancels wheel
input the widget list can't take; the list still scrolls natively while it
has room, and Ctrl+wheel zoom is left alone.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(playback): show a confirmed pause in the admin session views at once (#5298)
A pause or resume a native player confirms over its control socket now moves the session's lifecycle row before the sync that cues admin monitors, and announces session.paused or session.resumed. The admin session list and Live activity show the confirmed state at once instead of after the next progress report. The web session cache applies those events by lifecycle number and keeps them over an in-flight list read.
Closes #5224
Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(admin): translate the source of a catalog import from an export job (#5206)
* fix(admin): translate the source of a catalog import from an export job
The server stored an import's source only as the English text
"Export job <id>", so the web showed it untranslated. Imports queued from
an export job now also record the export job ID, GET /api/v2/admin/jobs
returns it as source_export_job_id, and the web formats the label with a
catalog key. source_label is unchanged for older clients.
* chore(i18n): pin translations to release 2026.11.24-dfd3991
Re-pin the web catalog from the unreleased silo-translations#162 commit
to the published release that contains it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): let a task's run history scroll sideways on phones (#5122)
* fix(web): let a task's run history scroll sideways on phones
The run history table sat in a panel that clipped it, so on a phone the
Error column was out of reach and its text was cut to one line with the
full message only in a tooltip. The table now uses the shared scrolling
table container, like the due samples table on the same page, and the
Error cell wraps at every width.
Closes #4690
* fix(web): wrap long tokens in the task history Error cell
A path or identifier with no break opportunity ran past the cell and gave
the table a sideways scrollbar, at desktop widths too. The 12rem minimum
also applied to empty cells, so a history with no errors scrolled
sideways on a phone onto an empty column. Wrap anywhere, and keep the
minimum width for cells that show error text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Quick104 <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(settings): read the profile subtitle appearance in the effective route (#5292)
* fix(settings): read the profile's subtitle appearance in the effective route
GET /api/v2/settings/subtitle-appearance/effective resolved the legacy
subtitle_appearance rows, so a profile that saved its appearance through
playback.subtitle_appearance (what the web, Apple and Android clients write)
got empty global_value and effective_value. Read the canonical rows instead:
the profile_device override for the declared device over the profile-scope
value, the contract's resolution order.
The legacy two-level resolver had no other caller and is removed.
Closes #5223
* fix(settings): refuse subtitle overrides the canonical schema cannot hold
The companion PUT /api/v2/settings/device/subtitle-appearance accepted any
JSON and, when the value failed subtitle-appearance.json, stored it only in
the legacy row. Now that the effective route reads the canonical rows, such a
write answered 200 while the response kept the previous override. Refuse it
with 422 at body.value, as PUT /settings/values does.
The effective route also reports the device name and platform the override
was saved with again, so a GET that declares only the device id keeps them.
* docs(settings): drop retired v1 routes from device-override comments
* docs(settings): say jsonb reorders keys in the compact-JSON helper's comment
compactSettingJSON strips the spaces Postgres jsonb adds, but jsonb also
reorders object keys while SQLite keeps them as sent, so the two backends
do not always return the same string for one document.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Quick104 <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(intromarkers): store a credits tail with no video frame as sparse (#5294)
* fix(intromarkers): settle a credits tail without keyframes as sparse
A tail pass that ran cleanly but decoded no keyframe was stored as a
retryable failure ("credits tail pass parsed no keyframes"), so files
whose video ends before the tail window, or whose window holds no IDR
frame, were decoded again on every backoff and never settled.
Treat that run like any other tail with too few keyframes: store it as
unusable with detail sparse, for episodes and movies alike, so it is not
decoded again until the file changes.
Closes #5260
* fix(intromarkers): store a tail as sparse only when ffmpeg counted no frame
A tail pass without parsed keyframe statistics is now stored as sparse
only when ffmpeg's own progress count says the window gave no video
frame. When ffmpeg counted frames the log parsers did not read, or
reported no count (an older remote node), the pass still fails and is
retried, so a log format change cannot settle every tail as sparse.
mediasample.Result gains VideoFrames, ffmpeg's frame count for a Stats
output, read from its last progress line.
* fix(intromarkers): keep the fingerprint when only the tail is unread
A tail pass whose keyframes ffmpeg counted but the log parsers did not
read fails the tail alone again, so the credits fingerprint from the same
run is still stored. The progress count also reads a line that starts with
the color reset ffmpeg writes when it colors its log, and the committed
worker schema gains Result.video_frames.
* test(mediasample): pin the progress frame count parser
* docs(intromarkers): say where a missing frame count comes from
Tail passes always run on the server's own ffmpeg, so a missing
VideoFrames count means ffmpeg printed no progress line, not that an
older remote node answered. Also give the real-ffmpeg tail test the
comment CONTRIBUTING asks of a test that takes over a second.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): name each Edit Metadata lock toggle after its field (#5295)
* fix(web): name each Edit Metadata lock toggle after its field
Every padlock button in Edit Metadata had the same accessible name, its tooltip, so a screen reader could not tell which field a button locks or whether it was locked. Each toggle is now named "Lock <field label>" and reports its state with aria-pressed. The tooltip stays.
The new web.item.editMetadata.lockField string comes from a local silo-translations build until its catalog change has a release.
Closes #5163
* chore(i18n): sync the lock toggle name in every language
Re-sync the web locales from Silo-Server/silo-translations#175 after its
translation pass, so every shipped language carries
web.item.editMetadata.lockField. The pin is still a local build; it moves
to the published release once that pull request merges.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(i18n): pin translations release 2026.11.25-e50eaa0
Silo-Server/silo-translations#175 merged and published 2026.11.25-e50eaa0.
Re-sync from that release in place of the local build; the locale files
are unchanged, so only the pin and the generated header move.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): keep profile and library names in their own order in right-to-left languages (#5231)
The profile editor's avatar preview and the restricted-library list rendered
user-entered names in the page's direction, so in Arabic a name like
"56 Days, Season 1 (Extended Edition)" moved its leading digits away from the
start. Give both names dir="auto", and the library name align-with-page so its
wrapped lines stay on the page's start side.
Closes #5055
* fix(web): draw readable badge text when the fill is see-through (#5226)
* fix(web): draw readable badge text when the fill is see-through
Vibrant badges without an accent kept their black text when Look -> Fill
was None, so 4K, HDR and audio labels were drawn black on the artwork.
Presets that draw a fill now get white text on any see-through fill, and a
see-through fill adds Minimal's text shadow when the preset has none.
Closes #4922
* fix(web): keep the see-through text shadow off when shadows are off
Look -> Shadow -> No shadow now also leaves out the text shadow a
see-through fill adds, and the style tests keep one case per branch.
* fix(web): keep the see-through text shadow off Plate's source chips
A see-through fill gives Plate badges a text shadow, and the source chip
inherited it onto its own solid colour. The chip now draws no text shadow.
The applyOverlayStyle comment now names the presets that get white text
(those that fill with the accent), and the card overlay architecture doc
records the see-through text colour and shadow rules for the other clients.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): keep Signed-in sessions buttons inside the card at large text sizes (#5227)
* fix(web): wrap session row buttons inside the card at large text sizes
On a narrow screen with a large font, the sign-out and Details buttons on a
Signed-in sessions row ran past the card's edge and the sign-out label was
cut off. Let the actions group wrap and let the sign-out label wrap within
the card's width.
Closes #4975
* fix(web): let the session row Details label wrap too
A long Details label (Czech "Podrobnosti") at a 200% font still ran past
the card on a 300px screen. Give both row buttons the same wrapping classes.
* fix(web): wrap long matcher queue paths instead of widening the desktop table (#5228)
* fix(web): wrap long matcher queue paths instead of widening the desktop table
The expanded library row in the desktop matcher queue kept the table's
whitespace-nowrap, so a long path grew the cell and the table scrolled
sideways with the filename off-screen. The cell now wraps and the path
uses CardPath on both layouts, as the expanded skipped-root row does.
* fix(web): keep matcher queue badges on a wrapped path's first line
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Quick <31828688+Quick104@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(web): keep week strip weekday labels inside their buttons on phones (#5230)
Below the md breakpoint, locales whose short weekday names run past four
characters (pt-PT, sw, lv, pl, ar, da) show narrow names in the Calendar
week strip, so labels no longer overlap their neighbours. Each button's
accessible name keeps the short name.
Closes #4886
* fix(web): let Bolder text weight reach prefixed weight classes (#5232)
* fix(web): let Bolder text weight reach prefixed weight classes
Under Bolder, app.css raised the bare font-normal, font-medium,
font-semibold and font-bold classes with !important rules. Tailwind gives
a prefixed class such as focus:font-medium its own selector, so the skip
links and file-input buttons stayed at their Default weight.
Redefine Tailwind's --font-weight-* theme variables under Bolder instead.
Every weight utility reads them, whatever its prefix, and the
!important rules go away.
* fix(web): keep card overlay badges following Bolder text weight
Badges set their weight inline, which the removed !important class rules
used to override under Bolder. Without them the badges stayed at their
Default weight. Resolve a badge's weight through the theme's weight
variables so Bolder moves it up a step like the weight classes.
* fix(web): keep the time range together in dashboard chart titles (#5233)
* fix(web): keep the time range together in dashboard chart titles
A narrow dashboard card wrapped "Playback activity · last 24 h" inside the
range ("· last" / "24 h"). rangeTitle now joins the translated range with
no-break spaces, so the title can only wrap between the widget's name and
its range, in every language.
Closes #4882
* fix(web): let the API clients header wrap like the other dashboard widgets
The API clients card kept its own header that never wraps, so a longer
range title such as Czech "· posledních 30 d" pushed the range picker past
the card edge at 1024px. It now uses WidgetHeader. rangeTitle splits on the
nearest spaces instead of a regex lookbehind, which older Safari lacks.
* test(web): carry the Arabic and Japanese range titles inline
CI's web test job checks out only the English locale catalogs, so the
range title test could not import ar.json and ja.json.
* feat(catalog): label sports episodes by air date (#5129)
* feat(catalog): label sports episodes by air date
Sportarr numbers a league's events S<year>E<n> so they sort as a TV season;
the numbers mean nothing to a viewer. A metadata provider can now mark a
series episode_labels=air_date. The server stores it on the series
(media_items.episode_labels) and v2 returns it on cards and item detail,
with air_date on episode cards. The web app shows the episode's air date
where it showed S2026E296.
* feat(catalog): carry air-date episode labels to listings and the player
Review follow-ups: Identify clears a stale episode_labels; listing cards
(browse, search, collections, favorites, watchlist, history), watch detail,
the player HUD, Playing Next and Watch Together pickers label date-labeled
episodes by air date; the contract is documented in docs/catalog-api.md.
* fix(catalog): clear air-date labels on Identify and label shuffle and pickers
Round-2 review follow-ups: Identify drops a stored episode_labels even when no
trusted ID differs (a Sportarr league has none); the shuffle post-roll, the
On Deck line and the Watch Together pick use the air date; a watch-detail
contract test; shared airDateWithTitle helper.
* fix(catalog): project episode_labels in the episode catalog source
The episode catalog source builds media_items-shaped rows for episode browse,
search and custom sections; it lacked the new column, so those queries failed
with 'column mi.episode_labels does not exist'.
* refactor(catalog): carry episode labels on listing cards without a second query
Listing cards take episode_labels and the episode air date from the rows
they already load (item list shell, favorites/watchlist/history builder,
collections, and the episode catalog source's series join), so the
per-listing label lookup and its apiv2 plumbing go. Also: one shared
section ID collector, a single date/title separator on web, a plain
labelsEpisodesByAirDate(labels) signature, and the Identify comment moved
off the correction block.
* fix(catalog): label episode cards in row-backed listings and smart collections
Explore All pages of home rows and episode-scoped smart collections lost
the episode's air date (and the rows their label) once listing cards stopped
using a separate lookup. Episode card contexts now carry the series' label
and the air date, which covers every catalog listing; collections take the
air date from the episode row. Also moves the label helpers out of
media.go (size ratchet) and uses the item type constants.
* test(catalog): pin episode labels on listing episode cards
* fix(catalog): bound episode label lookups and keep party subtitles English
- Episode label lookups dedupe content IDs and query them in batches of
500, so a large section page no longer sends one unbounded ID list.
- The Watch Together episode picker passes the fetched series' episode
labels into the staged pick when the card it opened from has none, so
the suggestion names a date-labeled game by its date.
- The subtitle sent to a Watch Together party writes the air date in
English, since it is data other viewers read.
* style(web): format episodeSubtitle
* fix(web): show the game's date in the Watch Together episode list
For a date-labeled series the episode picker rows showed the synthetic
episode number ("296."). They now show the game's air date, and undated
rows keep the number. The rows, the staged pick and the confirmation
footer read the series' labels from one place: the card, else the
fetched series detail.
* fix(catalog): carry episode labels on browse, picker and synthetic season cards
Series cards from catalog browse and search, Watch Together picker cards,
Watch Tonight and recommendation cards, and synthetic season detail dropped
the series' episode_labels, so clients showed S2026E296 there. The Start
Party episode chooser now names a date-labeled game by its date. The API
docs tell clients to treat an unknown episode_labels value as numbers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(catalog): label Watch Tonight, recommendation and Explore All cards from the section loaders
The section fetcher's own column list and its episode-target query never
selected episode_labels, so Watch Tonight, recommendation rows, Explore All
of fetcher-backed rows and the admin section preview sent cards without it.
Home sections hid the gap with a separate per-request lookup.
Select the column in both loaders, derive an episode card's air_date in the
shared card builders (sectionItemFromMediaItem, applyEpisodeCardMeta), and
drop the separate EpisodeLabelReader lookup, which every home load paid for.
Web: the Continue Watching and On Deck date lines pass their parts as an
array: Children.map does not look inside a fragment, so the date lost its
non-shrinking box; an untitled dated episode's image alt and menu title use
its date instead of "Episode 296".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(catalog): send an admin preview episode card's air date with its label
The admin section preview copied episode_labels onto ep…
Thanks @Rhainland for picking up #5046 and building this and @Quick104 for the swift review and merge. So much nicer to navigate now!
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
enhancementNew feature or requestgoPull requests that update go codeimpact: polishAnnoyance, cosmetic, or nice-to-havejavascriptPull requests that update javascript codepriority: P2Limited scope, workaround exists, or polishsize/XXL1000–2999 added + deleted lines (all files); change volume, not priority.triagedHigh-confidence review completed; does not mean fixed, validated, or accepted for release.
3 participants
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.
Problem
Related issue: #5046
Validation tasks: none
Other clients: Apple Silo-Server/silo-apple#1252; Android Silo-Server/silo-android#1035; Roku Silo-Server/silo-roku#105
Sportarr numbers each league's events as a TV season, so an NBA game is "S2026E296". The numbers sort the games correctly but tell a viewer nothing. With this change a metadata provider can mark a series as labeled by air date, and the web app shows the game's date (for example "Nov 20, 2026") wherever it showed the season and episode code.
Approach
episode_labels: "air_date"(the only value). The server stores it on the series (media_items.episode_labels, new migration). Identify, Reset to Provider and a Complete Refresh take it from the new answer, so re-matching a league to a numbered show brings the numbers back. Other refreshes, "Replace all metadata" included, keep it when the providers send none./api/v2returns the series'episode_labelson catalog cards (home and library sections, Watch Tonight and recommendation rows, browse, search, collections, favorites, watchlist, history, Watch Together pickers), on item detail of the series, its seasons and its episodes, on watch detail of an episode, and on the shufflenextcard. Episode cards and watch detail also carryair_date. A missing value means "show numbers", so older clients and servers need no capability check./api/v1and the Jellyfin-compatible API are unchanged.Validation
make lint-changed,make lint-router-recovery: 0 issues.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-5129/
Surface and build: web, before c0fad70 (main), after this branch.
Risks
media_items.episode_labels(TEXT NOT NULL DEFAULT '', migration); existing rows read''and behave as before.Checklist
AI Disclosure
Note
Add air-date episode labeling for series (
episode_labels: air_date)episode_labelscolumn tomedia_items(non-null text, empty-string default) via 20261122142104_media_items_episode_labels.sql, withNormalizeEpisodeLabelsin episode_labels.go recognizing only theair_datemode.episode_labelsandair_dateon catalog items, item details, watch details, and browse responses (v1 JSON shapes are unchanged; the new fields are internal there). Episode cards, hero metadata, player HUD, continue-watching, and watch-together pickers show the air date instead of the season/episode code when a series uses air-date labels, falling back to the numbered form when no air date exists.metadataResultToItemin service.go normalizes and overwrites the stored value for series on every persist; unrecognized label values silently become empty strings viaNormalizeEpisodeLabels.Macroscope summarized 60c5a8f.