Skip to content

feat(web): filter the Add row collection pickers by library - #4471

Merged
Quick104 merged 3 commits into
mainfrom
feat/collections-row-library-filter
Nov 18, 2026
Merged

Quick104 merged 3 commits into
mainfrom
feat/collections-row-library-filter

Conversation

@Quick104

@Quick104 Quick104 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none passed are affected; this reaches #1141 C1 (building home rows in web admin), which has not been run yet
Other clients: Apple N/A (no home row editor); Android N/A (no home row editor); Roku N/A (no home row editor)

Servers often have a collection with the same name in several libraries, for example "Trending Movies This Week" in each movie library. In the Add row collection pickers on the web (A collection and A row of collections, in both web admin Home Sections and Settings > Home Screen), those showed up as identical rows with only the type and title count to tell them apart, and there was no way to narrow the list to one library.

This adds a library dropdown next to the type filter and puts each collection's library at the start of its meta line ("Movies - Anime · Synced list · 4 titles").

Approach

  • useCollectionSearch gains a library filter alongside the search text and type filter. The dropdown lists "All libraries" and then every library that has a collection, sorted by name. It only appears when the collections span more than one library. If the picked library has no collections left after a refetch, the filter goes back to All libraries.
  • CollectionOption now carries a libraries list. The admin picker fills it from every entry in a collection's library_ids. The profile picker already merged a collection shared by several libraries into one option, and now records their ids too, so filtering works for either library.
  • Personal collections have no library. They show when All libraries is picked and are hidden when a library is picked.
  • Two new web strings, web.home.addRow.collection.library (the dropdown's accessible name) and web.home.addRow.collection.noneInLibrary (no collection of the picked type in the picked library), came in through feat(catalog): add the library filter to the Add row collection pickers silo-translations#83. Translations are pinned to release 2026.11.18-8f70d38. "All libraries" reuses web.home.addRow.params.allLibraries.

Validation

  • Web gate: pnpm run lint (0 errors), format:check, build, budget:check, and make test-web (286 files, 2865 tests) pass. No Go files changed.
  • Checked in Chromium against a dev server with 390 collections across 7 libraries, 90 of them sharing a name with a collection in another library. Covered: the admin and profile pickers, adding a filtered collection, the empty state, a 390 px wide viewport, and the en-XA pseudo-locale.

Evidence

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

Surface and build: web admin Home Sections > Add row and Settings > Home Screen > Add row, desktop and phone width. Before is 34931a5cc6; after is this branch.

Risks

None identified. The change is limited to the web pickers' client-side filtering and meta line. Saved row configuration and API calls are unchanged.

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, Playwright, GitHub CLI
  • Model(s): claude-opus-5-5
  • Involvement: Fully AI-generated, directed by the maintainer; not yet human-reviewed
  • Adversarial review: an independent Claude Code reviewer agent (claude-opus-5-5) read the changed files and every caller of the changed helpers. It checked filtering with collections in several libraries, filter state across refetches, the Radix Select value handling, accessibility, and translation keys, and found no defects.

🤖 Generated with Claude Code

Note

Add library filter to Add-row collection pickers

  • Adds a library selector to the shared collection search bar, shown only when more than one library is available, and wires it into both the single-collection picker and the multi-collection chooser.
  • The useCollectionSearch hook tracks the selected library, filters results by library, and reverts to "all libraries" when the selection becomes invalid.
  • Collection options now carry all libraries a collection appears in (via a new CollectionLibrary type), and metadata strings include the library name.
  • Adds a dedicated empty-state message for no results in the selected library, plus translations across all locale catalogs.
  • Risk: CollectionOption shape change in useAllUserCollections.ts and useRowCollectionOptions.ts — admin options now build library metadata from a collection's library id list with fallback to the primary library id.

Macroscope summarized f43e2a1.

Servers often have a collection of the same name in several libraries,
and the Add row pickers listed them as identical rows. Each collection
now names its library first in its meta line, and a library dropdown
beside the type filter narrows the list to one library. The dropdown
shows when the collections span more than one library. Admin options
take every library in a collection's library_ids.

Translations pinned to silo-translations 2026.11.18-8f70d38.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/XL 500–999 added + deleted lines (all files); change volume, not priority. label Nov 18, 2026
@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T03:34:27.682115Z f43e2a1 New commits
🔒 Security Review ✅ Completed 2026-11-18T03:36:11.726831Z f43e2a1 New commits
ℹ️ About Codex in GitHub

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

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

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

@silo-kody

silo-kody Bot commented Nov 18, 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 ❌

@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 labels Nov 18, 2026
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The add-row collection picker now supports filtering collections by library. Collection options include associated libraries. The interface displays library-specific empty-state text, with selector and empty-state labels added across the listed locales.

Changes: Collection library filtering

Layer / File(s) Summary
Collection library option data
web/src/hooks/queries/useAllUserCollections.ts, web/src/hooks/queries/homeRows/useRowCollectionOptions.ts
Collection options include library IDs and names. Repeated collections accumulate distinct library entries and use the combined names for group and library_name.
Library filtering and search UI
web/src/components/homeRows/addRow/collectionSearch.ts, web/src/components/homeRows/addRow/collectionChooser.tsx, web/src/components/homeRows/addRow/CollectionPicker.tsx, web/src/components/homeRows/addRow/CollectionsRowEditor.tsx
The search state provides available libraries and filters results by the selected library. The picker shows a library selector when multiple libraries are available and displays empty-state text based on the selected library and query.
Library filter translations
web/src/locales/*.json, web/src/locales/keys.ts, .silo-translations
Locale files add the library selector and library-specific empty-state messages. The generated message keys and translation version metadata are updated.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant CollectionPicker
  participant useCollectionSearch
  participant CollectionSearchBar
  CollectionPicker->>useCollectionSearch: Read available libraries and selected filter
  CollectionPicker->>CollectionSearchBar: Pass library options and selected filter
  CollectionSearchBar->>CollectionPicker: Call library-change handler
  CollectionPicker->>useCollectionSearch: Set selected library
Loading

Suggested reviewers: rhainland, blurbery

Merge Risk: Minimal · up to f43e2

The library filter on the add-row collection pickers behaves consistently. A filter that no longer applies resets to "All libraries", and the selector stays available whenever a filter is active. No remaining merge-blocking issues were found.

Security architecture risk: Minimal · up to f43e2

The change filters collections already available to the picker. The inspected changes do not expand access, alter saved collection identities, or introduce a security-relevant state transition.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a library filter for the Add row collection pickers on the web. The changeset adds a library dropdown to the shared collection search bar, wires it into both pickers, …
Description check Passed The description explains the problem (same-named collections across libraries look identical), the approach (library dropdown, library list on CollectionOption, personal collections handling, new tran…
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.
Full details: Title check

Explanation

The title names the main change: a library filter for the Add row collection pickers on the web. The changeset adds a library dropdown to the shared collection search bar, wires it into both pickers, and updates the hook and locale strings to match. The title is specific and concise.

Full details: Description check

Explanation

The description explains the problem (same-named collections across libraries look identical), the approach (library dropdown, library list on CollectionOption, personal collections handling, new translation keys), validation steps, and risks. These match the changeset, which covers the collection search, pickers, option types, and locale files.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent 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: 88fbe0f0-12ee-4c68-81f4-cb5e0c699650
Commits

Reviewing files that changed from the base of the PR and between 503c07a and f43e2a1.

Files selected for processing: 1

  • web/src/components/homeRows/addRow/collectionSearch.ts

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

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 503c07a787

ℹ️ About Codex in GitHub

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

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

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

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

@silo-kody

silo-kody Bot commented Nov 18, 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 ❌

⚠️ Note: some checks couldn't be completed in this run, so auto-approval (when enabled) was skipped. Check the details at https://kodus.siloserver.org/pull-requests and then comment @kody review on this PR to retry once the issue is resolved.

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

Actionable comments posted: 2

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: 6ec15d86-720c-45df-a665-e3822a4bb2ac
Commits

Reviewing files that changed from the base of the PR and between 34931a5 and 503c07a.

Files selected for processing: 49

  • .silo-translations
  • web/src/components/homeRows/addRow/CollectionPicker.tsx
  • web/src/components/homeRows/addRow/CollectionsRowEditor.tsx
  • web/src/components/homeRows/addRow/collectionChooser.tsx
  • web/src/components/homeRows/addRow/collectionSearch.ts
  • web/src/hooks/queries/homeRows/useRowCollectionOptions.ts
  • web/src/hooks/queries/useAllUserCollections.ts
  • web/src/locales/ar-XB.json
  • web/src/locales/ar.json
  • web/src/locales/bg.json
  • web/src/locales/ca.json
  • web/src/locales/cs.json
  • web/src/locales/da.json
  • web/src/locales/de.json
  • web/src/locales/el.json
  • web/src/locales/en-XA.json
  • web/src/locales/en.json
  • web/src/locales/es.json
  • web/src/locales/et.json
  • web/src/locales/fi.json
  • web/src/locales/fr.json
  • web/src/locales/he.json
  • web/src/locales/hi.json
  • web/src/locales/hr.json
  • web/src/locales/hu.json
  • web/src/locales/id.json
  • web/src/locales/it.json
  • web/src/locales/ja.json
  • web/src/locales/keys.ts
  • web/src/locales/ko.json
  • web/src/locales/lt.json
  • web/src/locales/lv.json
  • web/src/locales/ms.json
  • web/src/locales/nb.json
  • web/src/locales/nl.json
  • web/src/locales/pl.json
  • web/src/locales/pt-BR.json
  • web/src/locales/pt-PT.json
  • web/src/locales/ro.json
  • web/src/locales/ru.json
  • web/src/locales/sk.json
  • web/src/locales/sl.json
  • web/src/locales/sv.json
  • web/src/locales/th.json
  • web/src/locales/tr.json
  • web/src/locales/uk.json
  • web/src/locales/vi.json
  • web/src/locales/zh-Hans.json
  • web/src/locales/zh-Hant.json

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

@Quick104
Quick104 merged commit 4d3bca6 into main Nov 18, 2026
26 checks passed
@Quick104
Quick104 deleted the feat/collections-row-library-filter branch November 18, 2026 03:42
Quick104 added a commit that referenced this pull request Nov 19, 2026
Main pruned the test files this branch extended (#4465) and moved the
Home row pickers' meta line into collectionOptionMeta (#4410, #4471).
The pickers now show "Count unavailable" through that helper. Two test
helpers the pruning removed are restored next to their remaining
callers, and the translations sync from the catalog branch for
Silo-Server/silo-translations#95.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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/XL 500–999 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant