Skip to content

fix(web): group thousands in collection title counts - #4138

Merged
Quick104 merged 2 commits into
mainfrom
fix/web-collection-count-grouping
Nov 14, 2026
Merged

Quick104 merged 2 commits into
mainfrom
fix/web-collection-count-grouping

Conversation

@Quick104

@Quick104 Quick104 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Closes #4137
Related issue: N/A
Validation tasks: none

Other clients: Apple Silo-Server/silo-apple#1161 (shipped); Android Silo-Server/silo-android#915; Roku Silo-Server/silo-roku#69

Web printed collection title counts without a thousands separator: "1284 titles" under a collection card and "23456" on a poster badge. Apple groups these counts by locale since Silo-Server/silo-apple#1161. This change does the same on web, so English shows "1,284 titles" and German shows "1.284 Titel".

Approach

Every place that prints a collection's title count now passes it through toLocaleString(formatLocale()). MDBListBrowser.tsx already formats the same message this way. That covers the poster badge, the collection meta line, the admin collection list, the editor's sync line, template gallery cards, the count in a collection page's filter bar, the Add to collection picker, and a profile's Allowed Titles list. The plural still selects on the number, so no catalog or translation change is needed. Years and other identifiers are untouched.

Other collection-related counts keep their current format because they use different messages: synced-list skipped and kept counts, and the home-row picker's count, which shares a helper with home-row limits.

Validation

  • Reproduced on a dev deployment built from main, then checked again after rebuilding from this branch. No collection there has more than 999 titles, so the capture script rewrote item_count in API responses. Before: "1284 titles", "23456", and "Manual·Movies·1284 titles" on the Collections page, a library's Collections tab, and Admin → Collections. After: "1,284 titles", "23,456", and "Manual·Movies·1,284 titles". The same three surfaces show the same result at phone width, where the admin row already truncated on main. The browser console logged no errors.
  • I didn't check five call sites live: the sync line, template cards, the collection page count, Add to collection, and Allowed Titles. They use the same one-line change.
  • Web gate passed: lint, format check, build, bundle budget, and make test-web (7,374 tests). No test was added, because this is a display-formatting change.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/issue-4137/

Risks

None identified. In Arabic the count now prints as a grouped string in the format locale's digits, which is how the other preformatted counts in the app already behave.

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 subagents (code-review finders and validation check)
  • Model(s): claude-opus-5-5 (implementation, review finders A and B); claude-sonnet-5-5 (review finder C, validation check)
  • Involvement: Fully AI-generated. The agent verified it on a dev deployment, and no person has reviewed it yet.
  • Adversarial review: a high multi-agent code review found two more call sites of the same count, the template gallery card and the collection page count, and both are now included. It found no defects. The plan round was skipped because the fix is mechanical. A background adversarial review (gpt-6.1-sol, reviewed 0846be5) found one P3 issue: Add to collection and Allowed Titles still printed the count ungrouped. Both are fixed in a111c12.

🤖 Generated with Claude Code

Note

Group thousands in collection title counts across web UI

Applies the app locale number formatter to item and title counts shown on collection cards, poster cards, list rows, editor metadata, sync status, allowed-titles entries, and catalog results. The raw count stays available so translation plural selection still works. Affected files include CollectionTemplateCard.tsx, CollectionListItem.tsx, copy.ts, and Catalog.tsx. Behavioral Change: counts now render with locale grouping (e.g. "1,234") wherever these components display them.

Macroscope summarized a111c12.

Collection cards, the admin collection list, the editor's sync line, template
cards and a collection's page printed counts as raw numbers ("1284 titles").
Pass the count through the format locale so it prints "1,284 titles", or
"1.284 Titel" in German, matching Apple since Silo-Server/silo-apple#1161.
The plural still selects on the number.

Closes #4137

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Nov 14, 2026
@silo-kody

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 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-14T05:07:12.584221Z a111c12 New commits
🔒 Security Review ✅ Completed 2026-11-14T05:08:46.535405Z a111c12 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-triage silo-triage Bot added bug Something isn't working evidence-required Needs before-and-after evidence before the Evidence check passes 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 14, 2026
@silo-triage

silo-triage Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Resolved: Phone-width before-and-after captures now cover the collection meta line, library collection badge, and admin collection row requested below.

Original request

The desktop before-and-after evidence shows the count-formatting change, but mobile web is also affected and has no before-and-after captures. Please add matching phone-width captures for the collection count displays, or explain why those displays are unaffected on mobile, as CONTRIBUTING’s “Show visible changes” section requires.

@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Collection count displays now use the application locale to format numbers. Numeric count values remain unchanged where they are passed separately from the displayed value.

Changes: Collection count formatting

Layer / File(s) Summary
Format collection count displays
web/src/components/CollectionTemplateGallery/CollectionTemplateCard.tsx, web/src/components/collections/CollectionPosterCard.tsx, web/src/components/collections/admin/CollectionListItem.tsx, web/src/components/collections/editor/CollectionMetaLine.tsx, web/src/components/collections/editor/SyncStatusBlock.tsx, web/src/pages/Catalog.tsx, web/src/components/profiles/AllowedTitlesSection.tsx, web/src/lib/collections/copy.ts
These collection cards, lists, editor metadata, catalog results, profile messages, and collection copy now format displayed counts using formatLocale(). Components that pass a separate numeric count retain that value.

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

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: blurbery

Merge Risk: Minimal · up to a111c

This change shows collection counts with locale-appropriate thousands separators, such as 1,284 in English and 1.284 in German. No actionable merge-blocking risk is identified, and the change is easy to revert.

Security architecture risk: Minimal · up to a111c

Collection counts now use locale-aware formatting. Numeric values and permission-changing actions remain unchanged; the inspected changes introduce no material security or architecture risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: collection title counts now get locale-based thousands grouping on web. It matches the diff, which applies formatLocale-based toLocaleString formatting to title counts…
Linked Issues check Passed Issue #4137 asks for locale-grouped thousands in web collection card counts. The named display points are the poster badge and the meta line. At the reviewed head, web/src/components/collections/Colle…
Out of Scope Changes check Passed All changed call sites format the same collection title count with toLocaleString(formatLocale()) and keep the numeric count for plural selection. The incremental change adds two call sites: Allow…
Description check Passed The description is specific and on-topic. It names the problem (collection title counts printed without a thousands separator), links issue #4137, and lists the call sites changed: poster badge, meta …
Full details: Title check

Explanation

The title names the main change: collection title counts now get locale-based thousands grouping on web. It matches the diff, which applies formatLocale-based toLocaleString formatting to title counts across collection components. The conventional-commit prefix is fine and the title is specific.

Full details: Linked Issues check

Explanation

Issue #4137 asks for locale-grouped thousands in web collection card counts. The named display points are the poster badge and the meta line. At the reviewed head, web/src/components/collections/CollectionPosterCard.tsx formats the count with toLocaleString(formatLocale()). web/src/components/collections/editor/CollectionMetaLine.tsx passes shown as a formatted string and keeps count numeric, so plural selection is unchanged. The issue path web/src/components/CollectionPosterCard.tsx:91 no longer exists; the file now lives under components/collections/. The issue states that web has no library-header or person-page title count, so none is required. Apple's LocaleFormat.groupedCount is background only. The incremental change since the previous review adds formatting to AllowedTitlesSection.tsx and to manualTitleCount in lib/collections/copy.ts. These changes do not alter the two required surfaces. No automated test is requested by the issue. Repository inspection confirms the source change but not rendered output in a browser.

Full details: Out of Scope Changes check

Explanation

All changed call sites format the same collection title count with toLocaleString(formatLocale()) and keep the numeric count for plural selection. The incremental change adds two call sites: AllowedTitlesSection.tsx (count_text for live and paused collections) and manualTitleCount in lib/collections/copy.ts (count_text). These are the same kind of count as the issue's poster badge and meta line, so they connect to the objective. The PR description does not name them, and the PR objectives and commit message do; this is a documentation gap, not an unrelated change. The earlier call sites (poster badge, meta line, admin rows, sync status, template cards, Catalog filter-bar count) also remain on the same objective. The PR leaves years, identifiers, synced-list skipped and kept counts, and the home-row picker count unchanged. No unrelated change was found in the inspected diff. Browser rendering of the new call sites was not checked.

Full details: Description check

Explanation

The description is specific and on-topic. It names the problem (collection title counts printed without a thousands separator), links issue #4137, and lists the call sites changed: poster badge, meta line, admin list, editor sync line, template cards, collection page filter bar, Add to collection picker, and Allowed Titles. It also states the validation performed and the surfaces left unchanged. This matches the changeset in web/src/components/collections, web/src/lib/collections/copy.ts, and web/src/pages/Catalog.tsx.

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: 9e6f94fe-c1c7-4b62-be34-bcf3e70884b1
Commits

Reviewing files that changed from the base of the PR and between 0846be5 and a111c12.

Files selected for processing: 2

  • web/src/components/profiles/AllowedTitlesSection.tsx
  • web/src/lib/collections/copy.ts

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 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Adversarial review (gpt-6.1-sol, reviewed 0846be5)

One low-severity finding: two other displays of a collection's title count still omit grouping.

AI disclosure: Reviewed by Codex, model gpt-6.1-sol.

@Quick104

Copy link
Copy Markdown
Contributor Author

I added phone-width before-and-after captures to the evidence page for all three surfaces: the Collections page meta line, the poster badge on a library's Collections tab, and the Admin → Collections row. The phone results match desktop: "1284 titles" becomes "1,284 titles" and "23456" becomes "23,456". The admin row's meta line already truncates at phone width on main ("1284 ti…"), and the separator doesn't change that.

🤖 Claude Code (claude-opus-5-5)

@silo-triage silo-triage Bot removed the evidence-required Needs before-and-after evidence before the Evidence check passes label Nov 14, 2026
…d titles

Both print a collection's current title total, so they now use the format
locale's separator like the cards and meta lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-kody

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

@Quick104
Quick104 merged commit 1a99f7b into main Nov 14, 2026
20 checks passed
@Quick104
Quick104 deleted the fix/web-collection-count-grouping branch November 14, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have javascript Pull requests that update javascript code priority: P2 Limited scope, workaround exists, or polish size/S 0–49 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parity: group thousands in web collection card counts (from Silo-Server/silo-apple#1161)

1 participant