Skip to content

feat(web): show the series title for episodes in Playback History - #2430

Merged
Quick104 merged 2 commits into
Silo-Server:mainfrom
blurbery:feat/playback-history-series-title
Oct 21, 2026
Merged

Quick104 merged 2 commits into
Silo-Server:mainfrom
blurbery:feat/playback-history-series-title

Conversation

@blurbery

@blurbery blurbery commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Closes #2152
Related issue: N/A
Validation tasks: none. No validation case covers the admin Playback History page. #1251 C3 (not run yet) may read it, and would now see episodes listed under their series.

Playback History lists an episode by its own title only. An admin reading the history sees "The Tide Turns" with no hint of which show it belongs to, and has to open the entry to find out. The v2 playback history API already returns series_title, season_number and episode_number for episodes, but the web client dropped them. With this change an episode reads as its series title with S02E04 · The Tide Turns under it.

Approach

  • adminPlaybackHistoryItemFromV2 keeps the three fields, and AdminPlaybackHistoryItem gains them.
  • In the Media column an episode leads with its series title, followed by a muted line with the episode code and title. The code comes from episodeCode, the helper the admin user pages already use for rows from this endpoint. An untitled episode shows the code alone (it used to show its raw item id), and a pilot titled the same as its show doesn't repeat the name. Movies, and any row without a series title, look the same as before.
  • Both lines sit inside the existing item link, so it still opens the episode, and its accessible name covers both.
  • The item filter label, shown when the page is opened from an item with media_item_id, uses the same text, for example Harbour Lights · S02E04 · The Tide Turns.
  • The Media column now wraps at 12rem to 18rem instead of growing to fit the longest title. On a phone the table still scrolls sideways inside its card, as it did before, because the other columns don't wrap.

Web only: no API, schema, jellycompat or client app change. The branch is rebased onto main, after #2398 and #2817.

Validation

  • Vitest, src/pages/AdminPlaybackHistory.test.tsx (new): 3 tests, which fail on main and pass on this branch. A field-mapping test was dropped in review: CONTRIBUTING.md asks not to test field copies, and test: remove low-value and never-run tests #2817 removed the test it extended.
  • The tests cover an episode with series title, code and title; the code-only, title-only and pilot cases; a row without a series title; a movie; and the item filter label. Real-browser layout is covered by the manual run below, not by tests.
  • ESLint and Prettier on the changed files, and tsc -p tsconfig.app.json --noEmit: clean.
  • Manual: ran the branch in Chrome against a local Silo server built from main with synthetic history (two movies and four episodes, including very long titles) at 1440px and 390px wide. The page doesn't scroll sideways at either width.
  • Full gate: CI on this PR.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/pr-2430/

Surface and build: web admin Playback History (/admin/history), unfiltered and filtered to one episode, at 1440px and 390px wide in the dark theme. Before: main at 6144c45. After: this branch at 9578d3a. Both against the same local server and synthetic data.

Risks

None identified. It changes how one admin page displays rows, and the API already sends these fields.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Claude Code (Claude desktop app)
  • Tool(s): Claude Code with subagents, GitHub CLI
  • Model(s): claude-opus-5-5
  • Involvement: AI-assisted with Claude Opus. I directed the task and designed the work.
  • Adversarial review: a separate Claude Opus subagent reviewed the diff, checked the column layout on a Chrome test page, and test-merged the branch with feat(web): reorganize admin and user settings around the sidebar #2398. It found no blocking bugs. I fixed its three low findings: a pilot titled the same as its show repeated the name, two comments described a case the schema can't produce, and the episode line was hard to tell apart from the series title.

Note

Show series title and episode details for episodes in admin Playback History

  • Episode rows now use the series title as the main linked text, with an optional detail line for episode code and episode title.
  • Added historyRowTitle and historyRowLabel formatters in AdminPlaybackHistory.tsx. They suppress duplicate titles when the media title equals the series title and fall back to media title, item ID, or file ID.
  • Extended AdminPlaybackHistoryItem with series title and nullable season/episode fields, and mapped them in adminPlaybackHistory.ts.
  • The active media-item filter label uses the same composite label as the row.

Macroscope summarized 306c860.

@silo-kody

silo-kody Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

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

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

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

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

Next included review available in 10 minutes.

Check out review usage here.

View limit details

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

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0072d601-1434-49bd-9da7-67776a71d8ad
📥 Commits

Reviewing files that changed from the base of the PR and between 9578d3a and 306c860.

📒 Files selected for processing: 4
  • web/src/api/types.ts
  • web/src/api/v2/adminPlaybackHistory.ts
  • web/src/pages/AdminPlaybackHistory.test.tsx
  • web/src/pages/AdminPlaybackHistory.tsx

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bdb847cc-09f3-4967-8fe6-02d2df24bf54
📥 Commits

Reviewing files that changed from the base of the PR and between 6144c45 and 9578d3a.

📒 Files selected for processing: 5
  • web/src/api/types.ts
  • web/src/api/v2/adminPlaybackHistory.ts
  • web/src/hooks/queries/admin/history.test.tsx
  • web/src/pages/AdminPlaybackHistory.test.tsx
  • web/src/pages/AdminPlaybackHistory.tsx

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Walkthrough

The admin playback history API mapping now provides series and episode metadata. The page displays episode rows using the series title, episode code, and episode title, and uses the same formatting in the active item-filter label.

Changes: Admin playback history

Layer / File(s) Summary
Episode metadata contract
web/src/api/types.ts, web/src/api/v2/adminPlaybackHistory.ts, web/src/hooks/queries/admin/history.test.tsx
The item type adds series and episode metadata. The v2 mapper defaults missing series titles to an empty string and missing season and episode numbers to null. Query tests cover movie defaults and episode metadata.
Episode title display
web/src/pages/AdminPlaybackHistory.tsx, web/src/pages/AdminPlaybackHistory.test.tsx
Episode rows and the active item-filter label use the series title, episode code, and episode title when available. Tests cover movie and episode links, missing episode metadata, and filter labels.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: quick104

Merge Risk: ⚪ Minimal · up to 9578d

This change shows the series title for episodes in the admin Playback History page, and movies keep their prior display. No actionable merge-blocking risk was identified in the supplied changes.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Issue [#2152] requires the Playback History list to identify an episode by its series title and handle long titles. AdminPlaybackHistory.tsx renders an episode series title with an episode code and …
Out of Scope Changes check Passed The changes stay within issue [#2152]. The type and API mapping changes provide the existing v2 metadata to the web display. The page tests and mapping tests verify the requested behavior. The table-w…
Description check Passed The description clearly explains the Playback History changes, affected episode and movie behavior, layout updates, tests, and validation.
Title check Passed The title concisely and accurately states the main change: displaying series titles for episodes in web Playback History.
Full details: Linked Issues check

Explanation

Issue [#2152] requires the Playback History list to identify an episode by its series title and handle long titles. AdminPlaybackHistory.tsx renders an episode series title with an episode code and title inside the existing item link. It keeps movie and no-series rows unchanged. The Media cell caps width at 18rem, keeps a 12rem minimum, and wraps text. adminPlaybackHistoryItemFromV2 maps the required metadata, and tests cover mapped metadata, episode display cases, movies, missing series data, pilots, and the item filter label.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue [#2152]. The type and API mapping changes provide the existing v2 metadata to the web display. The page tests and mapping tests verify the requested behavior. The table-width change supports the issue's long-title layout requirement. No unrelated API, schema, client-app, or server changes are present in the reviewed change summary.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

❤️ Share

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

@silo-triage silo-triage Bot added enhancement New feature or request 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 Oct 14, 2026

@Quick104 Quick104 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review of 9578d3a. The display change works as described: I found no defect in how rows, the item filter label, or the fallbacks render. Two findings are inline, and I'm fixing both in a commit on this branch, so there's no need to change anything yourself. A summary comment follows.

Comment thread web/src/api/v2/adminPlaybackHistory.ts Resolved
blurbery and others added 2 commits October 21, 2026 11:07
The admin Playback History page listed an episode by its own title only,
so an admin had to open the entry to see which show it came from. The v2
playback history API already returns series_title, season_number and
episode_number. The web client now keeps them, and the Media column shows
the series title with "S02E04 · Episode title" beneath it, the same code
format the admin user pages use. The item filter label uses the same text.

Long titles wrap inside a capped width instead of widening the table.
The v2 schema marks series_title, season_number and episode_number as
required, and the server always sends them, so the fallbacks never
applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Quick104
Quick104 force-pushed the feat/playback-history-series-title branch from 9578d3a to 306c860 Compare October 21, 2026 15:07
@Quick104

Copy link
Copy Markdown
Contributor

Review summary

Reviewed head: 306c860 (the review started on 9578d3a).

The change does what the description says. Episodes in Playback History now lead with their series title, with S02E04 · Episode title under it. Movies and rows without a series title render as before. The item filter label uses the same text. The backend filter on media_item_id matches exactly, so the first row always describes the filtered item. Untitled episodes, missing numbers, specials (season 0), and a pilot titled after its show all render sensibly.

Addressed findings

  • The branch conflicted with main. test: remove low-value and never-run tests #2817 removed the projection test in history.test.tsx that this branch extended. I rebased onto main and kept main's version of that file, which also drops the new field-copy test. CONTRIBUTING.md asks not to test field copies, and the type checker already catches a missing field. The branch was rewritten with --force-with-lease. The feature commit is now 7715541.
  • The ?? fallbacks in adminPlaybackHistoryItemFromV2 never fired. The v2 schema marks the three fields required, and the server always sends them. 306c860 assigns them directly.

Remaining for maintainers

  • No blockers.
  • Design note, not blocking: the admin user detail cards (Watch History, Recently Watched, Watching Now) label an episode as series title plus S02E04 and leave out the episode title. This page adds the episode title and hides a pilot title that repeats the show name. Nothing renders wrong, but a shared label helper next to episodeCode would keep the four surfaces consistent if they're meant to match. That can be a follow-up.

Verification

  • The 5 page tests in AdminPlaybackHistory.test.tsx fail on main and pass on this branch. Before the rebase, the 2 mapping tests also failed on the base. Those were removed as described above.
  • On 306c860, vitest for the page and src/hooks/queries/admin/ passed: 66 files, 336 tests. tsc -p tsconfig.app.json, ESLint and Prettier are clean on the changed files.
  • My commits change no rendered output, so the published evidence for 9578d3a still matches what this head shows. I did not run the page in a browser myself.
  • Cross-provider review (GPT-6.1-Sol, one round, on 9578d3a): it found no functional defect and flagged the same field-copy test, which is now removed.

Validated features

No passed case on the v1.0 board reaches this page. #1251 C3 (Series, web admin) hasn't been run yet. If its validator reads Playback History, they'll see episodes listed under their series, which is the intended change.

Validation tasks: none

Other checks

  • User manual: unaffected. The manual doesn't describe the admin Playback History page.
  • Apple and Android: no follow-up. This is web-only, with no API change, and jellycompat is unaffected.

Fit: 9/10 · Readiness: 9/10 — ready (assuming CI is green)

@silo-triage silo-triage Bot added the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Oct 21, 2026
@silo-kody

silo-kody Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

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

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

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@macroscopeapp

macroscopeapp Bot commented Oct 21, 2026

Copy link
Copy Markdown

Minor change — silo-server#1251 C3 (Web admin). The Oct. 4 rehearsal note records checking preserved playback history through the Playback History page on main (1555e5214); this PR changes an episode row from the episode title alone to the series title plus episode details. The underlying history and resume data are unchanged, but the display observed by the validator differs. The task’s formal Results table remains Not run, and the rehearsal note says C3 still needs an RC run.

Suggested fix: replace Validation tasks: none with Validation tasks: changes #1251 C3. The planned RC run should record the updated display; no validation was performed here.

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

Posted via Macroscope — v1 validation impact

@Quick104
Quick104 merged commit 22693c2 into Silo-Server:main Oct 21, 2026
24 checks passed
@blurbery
blurbery deleted the feat/playback-history-series-title branch November 6, 2026 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request impact: polish Annoyance, cosmetic, or nice-to-have javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish size/M 50–199 added + deleted lines (all files); change volume, not priority. triaged High-confidence review completed; does not mean fixed, validated, or accepted for release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Show the series title next to episode titles in Playback History

2 participants