Skip to content

fix(web): pick a backup warning toggle's singular for exactly one item - #4737

Merged
Quick104 merged 4 commits into
mainfrom
fix/backup-warnings-toggle-singular
Nov 21, 2026
Merged

Quick104 merged 4 commits into
mainfrom
fix/backup-warnings-toggle-singular

Conversation

@Quick104

@Quick104 Quick104 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Related issue: N/A
Validation tasks: none

Other clients: N/A (the Backups and Restore admin pages exist only in the web app; the six keys are web-only)

In the web admin's backup warning details (the Backups page and the Restore page's Users section), the toggle under each warning shows "Show the account" or "Show the accounts", "Show the file" or "Show the files", or "Show file" or "Show files" for one group of files. The label prints no number. Main picks the wording with a CLDR plural on the count, but in Russian, Ukrainian, Croatian, Lithuanian, Latvian and Slovenian the plural one category also covers 21, 31, 101 and so on. A backup that left out 21 accounts shows "Показать аккаунт" (Show the account) in Russian, and 21 missing files show "Показать файл".

Approach

The six keys now select on an {amount} the web code sets (Silo-Server/silo-translations#132 and Silo-Server/silo-translations#136): exactlyOne for one item, exactlyTwo for two, otherwise other. Only exactly one item gets the singular. exactlyTwo keeps the dual Arabic and Slovenian use for two ("عرض الحسابين"), which the plural forms on main already give. In English, exactlyTwo reads the same as other, so the English labels don't change.

The three call sites in BackupWarningDetails.tsx pass the number of items each toggle reveals: the left-out accounts, the listed missing files, or the files in one group. The missing-files toggle uses the listed count rather than the headline total. The server only truncates that list past 10,000 entries, so a count of one or two is always the real count.

The translation pin moves to 2026.11.21-d2ccdf3. Apart from these six keys, it changes the English of web.admin.settings.hooks.settings.conflict.description, which nothing on main renders, and adds web.admin.tasks.detail.sampleSeriesEpisode.

A sibling change will move the other count-free backup and restore labels (restore.choose.showThem / hideThem and the omission reasons) to the same selector and may share the amount() helper.

Validation

  • Live, Russian, on a Silo dev deployment with backups that left out 1, 2, 14 and 21 accounts and missed 1, 3 and 21 files. The web app ran from each commit against the same backend. Main showed the singular toggle for 21 accounts and 21 files, closed and open. This branch shows the plural for both, and the singular only for one account or one file. Restore page: the same for the 21-account and 1-account backups.
  • Live, Arabic: the 2-account backup keeps its dual label on both commits. English: every label is unchanged.
  • New test: under Russian plural rules, the accounts, files, and file-group toggles for 21 and 101 items match those for 5, and the ones for 1 differ, each label checked closed and open. It uses the pseudo-English catalog, the only non-English one CI's web tests check out. It fails on main, where 21 accounts get the singular label. A second case uses a small test catalog to check that every call site passes the exactly-two branch for two.
  • Web typecheck, lint, Prettier, and the backups and i18n tests pass. make lint-changed: no changed Go packages.
  • Browser console: only the event WebSocket's 403 from the local dev proxy, on both commits.

Evidence

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

Surface and build: web admin Backups page and Restore page (Users section), Russian, Arabic and English, desktop, tablet and phone widths; main 5be6082 against this branch.

Risks

None identified. A caller that still passed { count } to these keys would throw in development and log a format error in production. The six call sites in this file are the only callers, and the test renders all of them.

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.

Council review

Rounds: 1, last reviewed 920a018

Member Round 1
Sol (gpt-6.2-sol, xhigh) 9/10
Opus (claude-opus-5-5, high) 8/10
Gemini (gemini-4-neon, xhigh) unavailable (quota limit on both tries)

Fixed: S1 (low), the test read three of the six labels and passed when any one differed; since 2251134 it checks all six, closed and open, one at a time. Answered: O1 (nit), the private amount() duplicates exactAmount() from #4741; whichever PR merges second keeps one copy. Commits after 920a018 change only the test.

Visual review: 2 rounds, captures from 920a018

Member Round 1 Round 2
Sol better, 9/10 better, 8/10
Opus better, 7/10 better, 8/10
Gemini better, 7/10 better, 8/10

Fixed: the iPad Restore captures now show the opened toggle clear of the fixed header. Answered: the fixed header over full-page captures, the tablet action alignment, the phone date wrap, the toggle's contrast and indent, the truncated reason line on phones, and the English file-group names in other languages all look the same on main and are outside this change. The Russian headline's pronoun after 21 is a separate key, left for a follow-up. The file-group toggle at 21 files is covered by the test rather than a capture.

AI Disclosure

  • Harness: T3 Code with Claude Code
  • Tool(s): Claude Code; Codex and Antigravity for the review panel; silo-translations make translate-pr for the catalog translations
  • Model(s): claude-opus-5-5 (implementation, captures, code review, translation pass); gpt-6.2-sol, claude-opus-5-5, gemini-4-neon (plan round, visual review, and background review)
  • Involvement: Fully AI-generated. The agent verified it live on a dev deployment; a person has not verified it yet.
  • Adversarial review: the plan round (Sol, Opus, Gemini) replaced an earlier CLDR-plural version of this fix with the code-set select and dropped a docs rule from this change; a high-effort code review found no defects and asked for test coverage of the file toggles, which was added; a sibling run raised the Arabic and Slovenian dual, which exactlyTwo now covers. See Council review.

🤖 Generated with Claude Code

Quick104 and others added 2 commits November 20, 2026 20:18
The backup warning toggles chose "Show the account" or "Show the
accounts" with a plural on the count. The label prints no number, and in
Russian, Ukrainian, Croatian, Lithuanian, Latvian and Slovenian CLDR's
"one" form also covers 21, 31 or 101, so a backup that left out 21
accounts showed the singular label. The toggles now pass "exactlyOne",
"exactlyTwo" or "other" to the catalog's select, which keeps the dual
Arabic and Slovenian use for exactly two.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Brings in the backup warning toggle keys that select on {amount}
(Silo-Server/silo-translations#132 and #136) and the other catalog
changes released since the last pin.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@silo-triage silo-triage Bot added the size/XXXL 3000+ added + deleted lines (all files); change volume, not priority. label Nov 21, 2026
@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The backup warning component now selects labels using exact amounts, and the locale catalogs define matching text. The catalogs also revise settings-conflict messages and add a task-detail sample series episode message across supported locales.

Changes: Backup warning labels

Layer / File(s) Summary
Amount-based warning labels and validation
web/src/pages/admin-backups/BackupWarningDetails.tsx, web/src/pages/admin-backups/BackupWarningDetails.test.tsx, web/src/locales/*
Warning labels now use exactlyOne, exactlyTwo, or other categories instead of raw counts with cardinal plural rules. The locale messages were updated to match. Tests cover Russian plural behavior and custom amount-selector branches.
Settings-conflict messages
web/src/locales/*
The revised messages state that all edits are discarded if page content changed or a saved password or key was edited; otherwise, edits are retained.
Sample episode message and generated key
.silo-translations, web/src/locales/keys.ts, web/src/locales/*
Locale catalogs add the task-detail sample episode message using series, code, and title placeholders. The generated MessageKey union and translation version metadata are updated.

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

Change: Bug fix

Merge Risk: Minimal · up to 22511

Backup warning toggle labels now use plural wording for counts such as 21 in languages where the one-category rules would have produced singular text. No concrete defects were found, and the change is low risk to merge.

Architecture risk: Low · up to 22511

The change affects 1 system.

Changed systems: web

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — web (service) was modified; 44 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in web/src/locales/ar-XB.json: The hideAccounts, hideFiles, and hideGroupFiles entries replace count cardinal plural forms (one/other) with amount selectors (exactlyOne/exactlyTwo/other), retaining the corresponding singular and plural text.
  • observed — Modified behavior in web/src/locales/ar-XB.json: showAccounts replaces its count cardinal plural form with an amount selector containing exactlyOne, exactlyTwo, and other options.
  • observed — Modified behavior in web/src/locales/ar-XB.json: showFiles and showGroupFiles replace count cardinal plural forms with amount selectors containing exactlyOne, exactlyTwo, and other options.
  • observed — Modified behavior in web/src/locales/ar-XB.json: The settings conflict text now says all edits are undone if something on the page changed or a saved password or key was edited; otherwise, edits are kept. This replaces the previous statement that only edits to changed settings and saved credentials with related settings are undone.
Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the backup warning toggle now uses the singular wording only for exactly one item. The raw summary and objectives both describe this selector change in BackupWarningDe…
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.
Description check Passed The description is specific and related to the changeset. It explains that the six backup-warning toggle keys in the web admin now select on an {amount} value (exactlyOne, exactlyTwo, other) so Russia…
Full details: Title check

Explanation

The title names the main change: the backup warning toggle now uses the singular wording only for exactly one item. The raw summary and objectives both describe this selector change in BackupWarningDetails.tsx and the locale catalogs. The title is specific and accurate, though it does not mention the locale updates or the test additions, which is expected.

Full details: Description check

Explanation

The description is specific and related to the changeset. It explains that the six backup-warning toggle keys in the web admin now select on an {amount} value (exactlyOne, exactlyTwo, other) so Russian, Ukrainian, Croatian, Lithuanian, Latvian, and Slovenian plural forms no longer show singular wording for counts such as 21. It names the three call sites in BackupWarningDetails.tsx, the translation pin bump to 2026.11.21-d2ccdf3, the new sampleSeriesEpisode key, the new test, and the validation performed.

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

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)

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: 077052b0-10d2-473c-8c79-9cb62e48d087
Commits

Reviewing files that changed from the base of the PR and between e8988d6 and 2251134.

Files selected for processing: 45

  • .silo-translations
  • 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
  • web/src/pages/admin-backups/BackupWarningDetails.test.tsx
  • web/src/pages/admin-backups/BackupWarningDetails.tsx

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 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-21T01:37:48.568116Z 2251134 New commits
🔒 Security Review ✅ Completed 2026-11-21T01:40:13.849517Z 2251134 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 21, 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 bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish labels Nov 21, 2026

@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 (Opus 5.5, reviewed 920a018)

One finding, a boundary nit. The rest held up. No caller of the six keys still passes count. All 43 locale files compile the three branches for each key, and none still uses count. The re-pin's only other change is the new web.admin.tasks.detail.sampleSeriesEpisode key. prepareValues skips selector arguments, so the string amount gets no isolates in ar or ar-XB.

* also covers 21, 31, and 101 in Russian or Latvian, and `exactlyTwo` keeps
* the dual that Arabic and Slovenian use for two.
*/
function amount(count: number): "exactlyOne" | "exactlyTwo" | "other" {

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.

O1 (nit, boundary): #4741 adds exactAmount() to web/src/i18n/format.ts and exports it from @/i18n. It has the same signature and body as this amount(), and the i18n docs rule in #4741 points callers to it. #4741 doesn't touch this file, so once both merge the web app has two copies of the same exact-count rule, one private to this component.

Suggested repair: keep one copy. If #4741 lands first, rebase and call exactAmount from @/i18n here. If this lands first, move the helper to @/i18n under that name so #4741 reuses it.

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.

Agreed, there should be one copy. Whichever PR merges second removes the duplicate: if #4741 merges first, this PR imports exactAmount from @/i18n and drops amount(); if this one merges first, #4741 replaces amount() here with exactAmount when it rebases. Its author has agreed to that.

CI's web tests check out only the English and pseudo-English catalogs,
so the test can't import the Russian or Arabic ones. It now formats the
pseudo-English catalog under Russian plural rules, and checks the
exactly-two branch with a small catalog of its own.

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

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

The test read three of the six labels and passed when any one of them
differed. It now reads the accounts, files, and file-group toggles both
closed and open, and checks each label on its own.

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

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

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 priority: P2 Limited scope, workaround exists, or polish size/XXXL 3000+ added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant