Skip to content

fix(web): hide collection actions on seasons and episodes - #1755

Merged
Quick104 merged 23 commits into
Silo-Server:mainfrom
RXWatcher:feat/collection-season-members
Oct 8, 2026
Merged

Quick104 merged 23 commits into
Silo-Server:mainfrom
RXWatcher:feat/collection-season-members

Conversation

@RXWatcher

@RXWatcher RXWatcher commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: #1754
Validation tasks: changes #195 W2; changes #1252 C8

Season and episode detail pages offer Add to Collection even though collections accept movies and series. Clicking it leads to a failing action. Hide that option on these two pages, as requested in the maintainer review.

Approach

Season and episode pages disable the ActionBar collection action. The menu item and dialog stay hidden; an otherwise-empty overflow menu is also omitted. Other actions keep their content IDs. Movies and series retain Add to Collection.

The final diff changes only the web controls and their regression tests. Collection storage, API contracts and supported member types remain unchanged.

Validation

  • Focused action-menu and detail-page tests: 38 passed, including movie/series eligibility, season/episode exclusion, dialog gating and empty-menu behavior.
  • Full web suite: 5,820 tests passed across 742 files with make test-web WEBTEST_ARGS='--maxWorkers=4 --vmMemoryLimit=512MB'. Earlier default runs hit two timing-sensitive failures; their files passed separately. A two-worker run ended with a worker exit; recycling workers completed the full suite.
  • Web lint: passed with 190 existing warnings and no errors. Format, production build and bundle-budget checks: passed.
  • Generated settings, playback fixtures, route inventory, migration/scenario ledgers, offline routes, OpenAPI, contract fixtures, local-path and case-collision checks: passed. The API contract comparison against main is identical.
  • git diff --check: passed. The branch incorporates main and has no unresolved conflicts.
  • Browser walkthrough: verified the season and episode menus and retained movie/series collection actions using synthetic API data.
  • Backend tests were not rerun for this web-only change.

Evidence

Before: 7d4b8318e16826928605c921df1a0ccf2136af64 (main without this fix). After: b298f58cdb471e8f3c1e8e0f5600fbc682304416. Captured from real web builds in the same browser with identical synthetic items and the Reviewer profile. This verifies presentation; it does not exercise a production collection write.

Surface Before After
Season overflow menu server1755-before-season server1755-after-season
Episode overflow menu server1755-before-episode server1755-after-episode

Movie and series menus still offer Add to Collection:

server1755-after-movie

server1755-after-series

Risks

This removes an unsupported action rather than adding season or episode membership. Issue #1754 remains related because its request to collect individual seasons is broader than this fix. No database migration or backend behavior change.

Checklist

  • I read and can explain the final diff.
  • This pull request addresses one concern.
  • The Evidence section shows the visible changes.

AI Disclosure

  • Harness: Codex harness in T3 Code (current revision); Claude Code (earlier branch).
  • Tool(s): Codex, GitHub CLI, T3 collaborative browser; Claude Code for the earlier implementation.
  • Model(s): gpt-6.1-sol (current revision); claude-opus-5-5[1m] (earlier branch, as previously disclosed).
  • Involvement: AI-assisted; human review pending.
  • Adversarial review: The coding agent checked disabled-action behavior, dialog mounting, empty overflow menus and preservation of supported actions against tests and browser observations. No independent agent reviewed this narrowed revision. The earlier independent review concerned the withdrawn season-membership implementation.

RXWatcher and others added 20 commits October 1, 2026 12:55
Add to Collection on a season page sent the season's ID, and on an episode
page the episode's ID. Collections hold catalog items, and the server
checks the item against media_items before adding it. Seasons and episodes
are not media_items rows, so every such add failed with "Item not found".

The action bar now takes the collection target separately from the page's
content ID. Movie and series pages add themselves, and a season page adds
its parent series and names it in the picker. Episode pages no longer offer
the action, because there is nothing they could add.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@kody-ai

kody-ai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the `@kody start-review` command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Providing Context (Files & MCPs)

Add these hints in your PR description (or a comment) to unlock deeper checks:

  • Ticket / Acceptance Criteria: `Refs: ABC-123` (Linear/Jira/Asana/ClickUp/Trello) or a direct ticket link.
  • Bugfix Validation: a Sentry/Datadog/Bugsnag event link (or paste the stack trace/error message).
  • Endpoint Risk: mention the route (e.g., `POST /api/payments`) or controller/action name.
  • Attach a repo file as context: use an explicit marker like `@file:docs/guide.mdx#L10-L50` (replace with your real path).
  • API Contract Docs: include `@file:openapi.yaml` or `@file:swagger.json` when changing routes/schemas.
  • Definition of Done / Standards: include `@file:DOD.md` or `@file:CONTRIBUTING.md` if your repo has them.
  • Design System Source of Truth: include `@file:ui/index.ts` (replace with your DS entrypoint path).
  • Feature Flags: include the flag key/name and `@file:flags.ts` / `@file:config.json` (and optionally the PostHog flag name).
  • Edge/CDN Rules: link the Cloudflare rule/zone or describe the intended redirect/header behavior.
  • Attach an MCP tool output: use `@mcp<provider|tool>` (replace with an installed MCP provider + tool, e.g., `@mcp<sentry|events.search>`).
Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Access your configuration settings here.

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: 05afb528-6aad-44a3-b7b6-becc47ae4eb3
📥 Commits

Reviewing files that changed from the base of the PR and between b298f58 and 398416e.

📒 Files selected for processing (3)
  • web/src/pages/ItemDetail/SeasonContent.test.tsx
  • web/src/pages/ItemDetail/components/ActionBar.menu.test.tsx
  • web/src/pages/ItemDetail/components/ActionBar.tsx

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


📝 Walkthrough

Walkthrough

The action bar now uses canAddToCollection to control collection actions. Season and episode detail views disable collection actions while retaining their content IDs.

Changes

Item action collection eligibility

Layer / File(s) Summary
Gate collection actions in the action bar
web/src/pages/ItemDetail/components/ActionBar.tsx, web/src/pages/ItemDetail/components/ActionBar.menu.test.tsx
ActionBar adds canAddToCollection, defaulting to true. The flag controls the overflow menu, collection menu item, and dialog. Tests cover eligible and ineligible content.
Disable collection actions for seasons and episodes
web/src/pages/ItemDetail/SeasonContent.tsx, web/src/pages/ItemDetail/SeasonContent.test.tsx, web/src/pages/ItemDetail/EpisodeContent.tsx, web/src/pages/ItemDetail/EpisodeContent.test.tsx
Season and episode detail views pass canAddToCollection={false}. Tests verify that the action bar receives the content ID and disabled flag.

Priority: ➖ Normal

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

Change: Bug fix

Suggested reviewers: quick104, rhainland

Merge Risk: ⚪ Minimal · up to 39841

The collection-action controls appear ready to merge after normal checks; no actionable merge-blocking risk remains in the supplied evidence.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 64d57

The inspected season paths preserve collection ownership and parent-series visibility checks, and unsupported storage rejects season additions before writing. No introduced authorization bypass was established, but concurrency, rollback, and deployment behavior were not fully validated.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The inspected mutation's independently attackable scope is the authenticated account's personal collection, with edits limited to its creator profile. The new identifier class reaches collection membership and catalog metadata; it does not itself grant parent-series visibility.

Security Findings and Attack Paths

  • observed — The guessed-season-ID path encounters collection authorization, a stored-season lookup with bound identifiers, parent-series visibility checks, and a storage capability check before insertion. The inspected implementation rejects unresolved IDs without reaching the membership write.

Trust Boundaries and Controls

  • observed — Viewer restrictions come from the request context rather than the submitted collection item. Membership SQL binds account and collection identity separately from parent-series library authorization, and membership paging revalidates returned item visibility.

Resilience and Maintainability Implications

  • inferred — A concurrent visibility revocation can occur between validation and insertion because they are separate operations. That separation predates the season fallback in the inspected earlier revision. Season membership alone is not an enduring authorization grant: subsequent inspected reads reapply visibility checks. Atomic revocation semantics remain unproven.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.80% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 51 functions across 36 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: hiding collection actions on season and episode detail pages.
Description check ✅ Passed The description directly explains the problem, implementation, validation, scope, and retained movie and series behavior.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

❤️ Share

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

Resolution, HDR, audio, subtitle and bitrate filters join media_files on
the row's content ID. Episode files carry the series ID, so season members
never matched. Season rows now join through their series key, limited to
their own episodes; file sorts use the series' aggregate.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@kody-ai

kody-ai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Code Review Completed! 🔥

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the `@kody start-review` command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Providing Context (Files & MCPs)

Add these hints in your PR description (or a comment) to unlock deeper checks:

  • Ticket / Acceptance Criteria: `Refs: ABC-123` (Linear/Jira/Asana/ClickUp/Trello) or a direct ticket link.
  • Bugfix Validation: a Sentry/Datadog/Bugsnag event link (or paste the stack trace/error message).
  • Endpoint Risk: mention the route (e.g., `POST /api/payments`) or controller/action name.
  • Attach a repo file as context: use an explicit marker like `@file:docs/guide.mdx#L10-L50` (replace with your real path).
  • API Contract Docs: include `@file:openapi.yaml` or `@file:swagger.json` when changing routes/schemas.
  • Definition of Done / Standards: include `@file:DOD.md` or `@file:CONTRIBUTING.md` if your repo has them.
  • Design System Source of Truth: include `@file:ui/index.ts` (replace with your DS entrypoint path).
  • Feature Flags: include the flag key/name and `@file:flags.ts` / `@file:config.json` (and optionally the PostHog flag name).
  • Edge/CDN Rules: link the Cloudflare rule/zone or describe the intended redirect/header behavior.
  • Attach an MCP tool output: use `@mcp<provider|tool>` (replace with an installed MCP provider + tool, e.g., `@mcp<sentry|events.search>`).
Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Access your configuration settings here.

@macroscopeapp

macroscopeapp Bot commented Oct 1, 2026

Copy link
Copy Markdown

The Collections acceptance parent #192 currently limits v1 scope to Movies and Series and requires a new criteria revision if that scope changes. This PR adds seasons and materially changes recorded Server/API cases #193 S1, S2, S3, and S6: member reads/counts, accepted add IDs, series-inherited access, and the manual item-order editor. The PR must explain why validated behavior changes and record the scope revision; these cases need re-validation after merge. The #193 S2 evidence on build 1012 also covers the repaired item_count path (#1552), which this PR rewrites with a season branch.

The existing #193 S6 blocker #1616 concerns cross-profile ordering of the collection list; this PR changes member ordering only and does not unblock it. Web #195 and native collection tasks silo-apple #20/#21 and silo-android #5/#6 are Not run, but their member grids use source=user_collection and can now receive season rows. This PR also does not address the manual-collection creation path reported in #990, so do not treat W2 as unblocked.

Suggested fix — No diff: record a new Collections acceptance revision in #192 and update the PR line to:

Validation tasks: changes #193 S1, S2, S3, S6; changes #195 W1, W2, W3, W5, W7; changes Silo-Server/silo-apple#20 C1, C3, C5, C7; changes Silo-Server/silo-apple#21 C1, C3, C5, C7; changes Silo-Server/silo-android#5 C1, C3, C5, C7; changes Silo-Server/silo-android#6 C1, C3, C5, C7

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

Posted via Macroscope — v1 validation impact

@RXWatcher

Copy link
Copy Markdown
Contributor Author

Updated the description per the Macroscope check: the validation line now lists the affected cases, and the Problem section notes that adding seasons widens Collections acceptance v1 (#192: movies and series). Recording a new criteria revision there is a maintainer decision, so I haven't touched #192.

The failing ci / Go test job is TestFailedBackendIsReplaced in internal/librarymonitor, which this PR doesn't touch. It's the known timeout in #1736 (fix in #1737). I can't rerun the job from a fork; could someone rerun it? All other checks pass, including Go DB pins.

@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.

Reviewed commit 64d57e817cc680061032f2b3c69c252682e9f5d4.

AI disclosure: gpt-6.1-sol in T3 Code using the Codex provider.

@Quick104

Quick104 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for the thorough work here. The tests, the query-plan check and the write-up of the known gaps are all good. I don't think we should take this direction for 1.0, though.

Seasons as collection members cost a lot for a small use case:

  • The personal-collection grid moves to a media_items + seasons UNION, with season-specific paths for access, sorting, type filters and the watched rollup. That's a lot of permanent complexity in a hot query, and it hasn't been checked against a large catalog.
  • Seasons would still be missing from Home and section rails, offset paging and facets. A season would show up in some places and not others until a follow-up lands.
  • It widens the Collections criteria in [v1] Collections #192, reopens validation cases in all three repos, and needs new season card labels on Apple and Android. Right now we're focused on QA and polish, not new member types.
  • The SQLite 501 means the same action behaves differently depending on the storage backend.

The "To Watch" case is already covered by the watchlist at series level, with Continue Watching tracking progress.

The simplest fix for the "Item not found" bug is to remove Add to Collection from season and episode pages. Collections hold movies and series, so the button belongs on those pages. Could you rescope this PR to just that? Then #1754 can either close or be retitled to the season-page bug.

If people later ask for season- or episode-level collections, we can revisit with a concrete use case.

Quick104 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Silo's pull request guidance changed today (#2016). A PR that changes what a user sees now needs before-and-after evidence in its Evidence section, and a PR with no visible change says Evidence: none, no user-visible change. This PR was opened before the rule existed, so it hasn't had a chance to meet it yet.

Missing here: Before-and-after screenshots of the season page's Add to Collection dialog and a personal collection grid holding a season, and a recording of the add flow.

The rules are in Show visible changes, and the PR template shows the Evidence section layout. I've converted this PR to draft for now. Mark it ready for review once the Evidence section is filled in.


Generated by Claude Code

@silo-kody

silo-kody Bot commented Oct 6, 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 ❌

@RXWatcher RXWatcher changed the title feat(collections): let personal collections hold TV seasons fix(web): hide collection actions on seasons and episodes Oct 6, 2026
@RXWatcher
RXWatcher marked this pull request as ready for review October 6, 2026 20:11
@macroscopeapp

macroscopeapp Bot commented Oct 6, 2026

Copy link
Copy Markdown

The current head no longer changes the server collection query or API. Two Web validation paths are touched: #195 W2 is relevant to the item-detail Add to Collection entry point (movie/series actions and the collection editor remain unchanged), and #1252 C8 navigates the season/episode hierarchy, whose detail pages now omit that action. Both cases are currently Not run, so no recorded result is invalidated; validate these UI paths on the merged build. The current validation line omits #1252 C8.

Suggested fix — No diff: update the PR body to:
Validation tasks: changes #195 W2; changes #1252 C8

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

Posted via Macroscope — v1 validation impact

@RXWatcher

Copy link
Copy Markdown
Contributor Author

@Quick104 ready for another look. The three remaining threads came from the withdrawn season-membership revision and are resolved with notes; the current diff is web-only. Evidence is in the description and CI is green.

…n-members

# Conflicts:
#	web/src/pages/ItemDetail/components/ActionBar.tsx
@macroscopeapp

macroscopeapp Bot commented Oct 8, 2026

Copy link
Copy Markdown

The season and episode overflow-menu changes have before-and-after captures, but the Evidence section does not identify a mobile-width capture. Because these web controls are also visible at phone width, add before-and-after mobile web captures for each menu using the same item data and name the surface and commits.

Suggested fix — No diff: add the two mobile before-and-after pairs to the Evidence section.

Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness.

Posted via Macroscope — Visible change evidence

@Quick104
Quick104 merged commit fe5ec69 into Silo-Server:main Oct 8, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants