Repository navigation
fix(web): name the libraries in the rule sentence - #1940
Conversation
"Show [Movies] from [Movies, 4K Movies]" stuttered and hid that the picker
holds libraries. The shared rule sentence now reads "Show [movies] from the
[Movies, 4K Movies] libraries that match [all] of these:" ("library" for one,
"from [all libraries]" when none are picked), with lower-case kinds so they
read inside the sentence. Home rows rule rows get the same wording; saved
rule definitions are unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ries" capitalized The Smart mockup starts "that match [all] of these:" on its own line, and the lower-case "all libraries" that reads well inside the sentence also leaked into the picker's reset item next to capitalized library names. LibraryMultiSelect gains an optional allOptionLabel (defaulting to the empty summary, so other callers are unchanged) for the menu item. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f30cfcfec
ℹ️ 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".
| const namedLibraries = value.library_ids.filter((id) => | ||
| libraries.some((library) => library.id === id), | ||
| ).length; |
There was a problem hiding this comment.
Handle mixed known and unknown library IDs
When value.library_ids contains both a library present in libraries and an ID whose name is unavailable (for example, a deleted or not-yet-loaded library), this count is based only on the known IDs, so the sentence renders from the [Movies] library even though the query still contains multiple library IDs. The picker likewise hides the unknown ID once at least one name is available, making the new singular/plural suffix misleading; the summary and suffix should account for mixed selections rather than treating the known subset as the full selection.
Useful? React with 👍 / 👎.
|
The Suggested fix: Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
A selection mixing a named library with one whose name is unknown (deleted or not yet loaded) read "from the Movies library". The picker summary now counts unnamed IDs toward "+N more", and the sentence picks "library" or "libraries" from the whole selection. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Updated the Validation tasks line to "changes #1141 C1" per Macroscope. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 043db108c9
ℹ️ 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".
| </SelectContent> | ||
| </Select> | ||
| <span>from</span> | ||
| <span>{value.library_ids.length > 0 ? "from the" : "from"}</span> |
There was a problem hiding this comment.
Handle a single unresolved library ID
When library_ids contains exactly one deleted or not-yet-loaded ID, LibraryMultiSelect renders 1 libraries and summaryShowsAName suppresses the noun suffix, while this branch still changes the sentence to from the; the result is from the 1 libraries. Either render the singular summary as 1 library or avoid the definite-article wording when the sole library name is unavailable.
Useful? React with 👍 / 👎.
A rule row whose only library is deleted or not yet loaded read "from the 1 libraries". The picker summary now checks for a single selection before falling back to the "N libraries" count. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Problem
Related issue: #192
Validation tasks: changes #1141 C1 (Not run): rule rows in Admin > Home rows show the new wording and line break; what a row saves does not change.
The rule sentence in the Home row dialog reads "Show [Movies] from [Movies, TV] that match [all] of these:". The capitalized type and the bare list of library names read like form labels rather than a sentence. The collections redesign reuses this sentence on the Smart collection page and words it "Show [movies] from the [Movies, 4K Movies] libraries that match [all] of these:". This PR changes the shared
RuleBuilderto that wording, so Home rows rule rows and the coming Smart page read the same.Stacked on #1939 (
feat(collections): one collection editor page, starting with Manual).Approach
LibraryMultiSelectsummary now counts the unnamed one toward "+N more", so the sentence reads "from the [Movies +1 more] libraries" instead of "from the [Movies] library". A single unnamed library reads "1 library" rather than "1 libraries". The picker's other callers get the same summary in those cases.LibraryMultiSelectgets an optionalallOptionLabelfor the reset item in its menu, defaulting to the empty label. The rule sentence passes "All libraries", so the menu item stays capitalized while the button in the sentence reads "all libraries". Its other callers don't pass it and render as before. The personal Smart page will need "all my libraries" here; the PR that adds that page passes it intoRuleBuilder.Only labels change; the query a rule row saves is the same. No API change. jellycompat and the Apple and Android clients need no change. The user manual doesn't quote this sentence, so it needs no change.
Validation
tsc -bandmake test-web(808 files, 7,499 tests) pass.make verify-local-pathspasses. No Go, contract or migration files changed, so the Go and contract checks were not run.Risks
None identified. Admins see new wording in Home rows rule rows; saved rows are unchanged.
Checklist
AI Disclosure
RowFormis the only caller ofRuleBuilder, and put the oldRuleBuilderback in a scratch checkout, where 6 tests in the changed test files failed. It approved with one minor finding and two nits, all fixed. The sentence did not break before "that match" as the mockup does, and the picker's "All libraries" menu item had become lower-case along with the button; both fixes have tests. An Add row dialog assertion matched "movies" as a substring, so it would also pass on "movies and shows"; it now matches the whole label.🤖 Generated with Claude Code
Note
Fix rule-builder sentence to name selected libraries with lowercase wording
SCOPESare now lowercase (e.g. "movies and shows"), andLibraryMultiSelectgets separate empty-summary and capitalized reset-item labelsformatLibraryFilterSummarycounts all selected IDs (including unknown ones) in the "+N more" suffix, and shows a single unknown selection as "1 library"Macroscope summarized 9f592bd.