Repository navigation
fix(web): group thousands in collection title counts - #4138
Conversation
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 Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Codex Review Summary: ✅ CompletedThis 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. |
|
Resolved: Phone-width before-and-after captures now cover the collection meta line, library collection badge, and admin collection row requested below. Original requestThe 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. |
|
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 🤖 Claude Code (claude-opus-5-5) |
…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 — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
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.tsxalready 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
main, then checked again after rebuilding from this branch. No collection there has more than 999 titles, so the capture script rewroteitem_countin 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 onmain. The browser console logged no errors.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
AI Disclosure
highmulti-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.