Repository navigation
fix(web): show restore section types in the interface language - #4710
Conversation
The restore page's home and library section rows named each section's
type by tidying its raw id ("custom_filter" became "Custom filter"), so the
type stayed in English whatever the interface language. Use rowKindLabel,
the translated name the home rows editor already shows. In English the
restore page now uses the editor's names too ("Smart row", "Surprise me").
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 4 minutes. View limit details
|
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. |
Problem
Related issue: N/A
Validation tasks: none
Other clients: N/A (web admin only; the Apple, Android, and Roku apps have no restore screens)
On a backup's Restore page, each row under Home and library sections has a short detail line: the section's type, then what the restore does to it. The type was built from the raw
section_typeid ("custom_filter" became "Custom filter"), so it stayed in English in every interface language. In Arabic each line read "Recently added · ‹Arabic›". Because the line is right-to-left, a narrow row showed only the end of the English word ("…ntly added") and none of the Arabic.This change names the type with the translated row names the home rows editor already uses, so the whole line follows the interface language.
Approach
rowSecondaryinweb/src/pages/admin-backups/restoreGroups.tsnow callsrowKindLabelfromweb/src/lib/homeRows/catalog.tsand the localsectionTypeNamehelper is gone. No catalog keys are added: every section type the server defines already has aweb.home.rows.kinds.*entry.In English the restore page now uses the editor's names, so two labels change: "Custom filter" reads "Smart row" and "Random" reads "Surprise me". The others read the same.
Validation
main(1169342): with the admin profile in Arabic, a backup taken before deleting a library listed eight sections, and every detail line started with the English type. After rebuilding from this branch (43a2df7) on the same data, every line is Arabic. English shows the editor's names. Checked at 1024 px and 360 px, with no browser console errors. In German the longer names truncate inside the detail line with an ellipsis and the row keeps its shape.Evidence: https://evidence.siloserver.org/r/silo-server/restore-section-type-names/
Risks
A backup from a newer Silo with a section type this build's catalog doesn't know shows the generic "Row" instead of a name derived from the id. That is how
rowKindLabeltreats unknown types everywhere else. Every type the server defines today has a name.The expanded row's list of changes (for example "item limit" or "web only") is still English text from the server. That is a separate fix.
Checklist
Council review
Rounds: 1, last reviewed 43a2df7
Visual review: 1 round, captures from 43a2df7
Answered: at 360 px "Surprise me" now truncates to "Surprise …", where "Random" fitted. The detail line was already cutting 5 of 8 type names at that width, and 3 rows read better after this change, so the label stays the editor's. The cramped one-line row layout and the narrow desktop column predate this change. Titles clipping without an ellipsis is a separate fix already in progress.
AI Disclosure
🤖 Generated with Claude Code
Note
Fix restore section types to show labels in the interface language
Restore rows for home sections now get their section-type label from
rowKindLabelin the home-row catalog, so labels follow the user's interface language. Removes the localsectionTypeNamehelper, which replaced underscores with spaces and capitalized the first character without translation.Macroscope summarized 43a2df7.