Repository navigation
fix(backup): show restore change lists in the interface language - #4757
Conversation
|
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 1 minute. View limit details
|
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. |
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:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b5fdcc14d
ℹ️ 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".
The Restore page's change list under a differing home or library section,
or template collection, stayed in English in every language: the server
sent English words ("item limit", "3 collection items") and the web
printed them. The restore set now sends change codes (item_limit,
collection_items, ...), declared as enums on both changes arrays, with
missing_collection_items carrying the count. The web shows each code
from the translation catalog. Row messages keep their English wording.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
d20b316 to
89a993b
Compare
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:
|
Response enums are additive, so a code the bundle has no label for, or an older server's English word during a rolling upgrade, shows as sent instead of a blank bullet. 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:
|
Co-Authored-By: Claude Opus 5.5 <[email protected]>
#4757 approved its own restore change enums, which main now has, so against main those approvals match nothing and the contract check refuses them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ent (#4668) * feat(config): set backups, Discord, MDBList and more from the environment Thirteen more server settings can be set from environment variables, with the checks an admin save runs: the nightly backup schedule and contents (SILO_BACKUP_*), the Discord application (SILO_DISCORD_*), the MDBList key, the Meilisearch index, the web media origin, the prepared-download budget and realtime library monitoring. A deployment kept in version control no longer needs the admin UI for them. The web admin shows each of these fields read-only with the variable that sets it, as it does for the existing variables. The Discord card leaves keys the environment sets out of its saves and its clear action, which the server would refuse. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(backup): apply only SILO_BACKUP_ENABLED before migrations, in both entry points The backup before migrations laid every SILO_BACKUP_* value over the stored settings. A lower SILO_BACKUP_KEEP then rotated nightly copies away before the migrations had succeeded, under a value startup had not stored yet. Only SILO_BACKUP_ENABLED decides that backup now; retention waits for startup. A migration job (--migrate-only) read no environment settings, so on the deploy that first sets SILO_BACKUP_ENABLED=true over a stored false it migrated without a backup. It now reads them for this one value, and an invalid value elsewhere falls back to the stored settings with a warning instead of stopping the migration. Also drop a test that repeated the env table's invalid-value check. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(config): keep env-set Discord drafts and the index field out of saves - The Discord card left env-set keys out of its saves, but a client secret or bot token typed before the environment took that key over still went into the batch, and the server refused the whole save. Each draft now counts only while its key is editable. - The Search page's Meilisearch index stayed editable when the sensitive-status read failed, unlike the other three Meilisearch fields there. - A migration job read every environment setting for its one use, SILO_BACKUP_ENABLED, so an invalid unrelated variable dropped that value. It now reads that variable alone. - The before-upgrade backup's comment and doc now say it reads SILO_BACKUP_ENABLED. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(config): declare AI providers and recommendations in the deployment A deployment kept in Compose, Kubernetes or NixOS files could set recommendations only by scripting the admin API after first start: the AI provider registry is machine-managed and provider ids were random. The plugin provisioning document is now the deployment document, read from SILO_CONFIG or SILO_CONFIG_FILE (SILO_PLUGINS and SILO_PLUGINS_FILE still work). Its plugins section is optional, and a new ai_providers section declares providers keyed by the id they keep, with keys given as fromFile or fromEnv references. An API server stores them at start, in the same transaction as the environment's settings, so SILO_RECOMMENDATIONS_PROVIDER, SILO_RECOMMENDATIONS_MODEL and SILO_RECOMMENDATIONS_ENABLED can name one and the recommendation engine starts with them on that start. A declared provider replaces the stored one with its id; one no longer declared stays connected and becomes editable again; an empty section releases them all, and a document without the section leaves them alone. Admin updates and deletes of a declared provider are refused with managed_by_environment, and the API reports managed_by_env_var. Web admin shows declared providers and env-set recommendation fields read-only. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(web): keep provider select choices apart from declared provider ids The provider selects used "add" and "none" as their own choices. An admin-created provider's id is always <type>-<hex>, but a deployment document chooses its providers' ids, and both words match the id pattern. A provider declared as "none" or "add" would have read as no provider, or opened the add form. The choices now contain underscores, which no provider id can. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(config): keep a declared provider's type; show the stored one when locked - A declaration that kept a provider's id but changed its type replaced it in place, so the models bound to it (another type's) went to the new endpoint. The admin API already refuses a type change; a declaration now does too, asking for a new id. - A provider the deployment took over while an admin had edits open kept showing, and testing, those edits. A locked panel now shows and tests the stored provider. Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor(config): share the document's secret budget; drop dead guards - AI keys counted against a 1 MiB budget of their own instead of the document's one budget its comment described. They now share it, and a key comes straight from its captured reference, the only form the schema allows. - Drop guards nothing can reach: --migrate-only before the frontend document read, an env-set model commit from a disabled field, and a repeated suggestion check. - The Recommendations page shows the variable note only on the toggle, the one field there a variable sets. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(config): refuse empty capabilities and blank keys in declarations - `capabilities: []` passed the schema and a known type then silently took its own set; the schema now asks for at least one capability. - A key file or variable holding only whitespace became no key at all, which a provider with an optional key accepted without a word; it now stops startup. - Test that the admin API lists a declared provider with its variable and refuses to edit or remove it. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(web): keep env-taken drafts and a chatgpt id from steering AI settings - The text provider select used "chatgpt" for the ChatGPT plan, so a provider declared with that id read as the plan. The select's value is now "__chatgpt__"; the auth mode keeps "chatgpt". - A provider panel remounts when the deployment takes the provider over or releases it, so no draft or test result from before carries across; a locked panel shows the stored provider. - The Recommendations page ignores a provider or model draft for a key the environment took over, in what it shows and in Check Connection. - A name clash suggests taking the other provider over only when it has the declared type, and the type-change error asks for a new name as well as a new id, since the released provider keeps its name. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(config): check only bindings the deployment can break at startup A document that changes the AI provider registry, or a recommendations variable, made startup check every stored provider binding, so one a restore into another deployment left naming a removed provider stopped the server, which an admin can't fix while it's down. Startup now checks the bindings the environment sets and those naming a provider the document declares; declaring never removes a provider, so the rest are as valid as before. A text binding the ChatGPT plan leaves idle is no longer checked against its provider, as AIProviderUsers already treats it, and the auth mode joins the binding group. The Recommendations page also replaced a draft for a key only while the environment set it, so the draft came back, and could be saved on blur, once the variable was removed. A key the environment sets now takes the server's value over any draft. docs/admin-settings-api.md says how declared providers are released. Co-Authored-By: Claude Opus 5.5 <[email protected]> * chore(apiv2): drop the approvals #4757 left that this change doesn't use #4757 approved its own restore change enums, which main now has, so against main those approvals match nothing and the contract check refuses them. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Problem
Related issue: N/A
Validation tasks: none
Other clients: N/A (only the web admin has a restore screen; silo-apple, silo-android, and silo-roku have none)
On the Restore page, the "What changes:" list under a differing home or library section, or a template collection, stayed in English in every interface language. The heading was translated, but each entry ("item limit", "web only", "featured", "3 collection items", "sort order", "libraries", ...) came from the server as English display text, and
RestoreRows.tsxprinted it unchanged. This change makes the server send codes and the web show each one from the translation catalog.Approach
internal/backup(sectionChanges,customizeTemplate, the templatelibrariesentry) emits change codes such asitem_limit,web_only,title_translation,collection_replaced,sort_order,sync_schedule, andcollection_items, instead of English words. The section's missing-item count moves out of the string intoPreviewHomeSection.MissingCollectionItems, set only alongsidecollection_items./api/v2: bothchangesarrays (AdminBackupRestoreHomeSection,AdminBackupRestoreCollection) declare their codes as enums, and the home section gains optionalmissing_collection_items. This changes the values of an existing field before the 1.0 lock. Only the web restore flow reads them, and it ships in the same binary. Both operations that return a restore set (getAdminBackupRestoreSet,getAdminBackupUploadRestoreSet) are affected, andcontracts/api/v2/breaking-approvals.jsonapproves the enum additions on each.RestoreRows.tsxmaps each code to aweb.admin.backups.restore.rows.change.*key, with a plural for the collection item count. The map is typed over the generated enum, so a code without a label fails the typecheck, and a value the bundle doesn't know shows as sent. The keys came from feat(catalog): name what a restore changes in a section or template collection silo-translations#134, now in release2026.11.21-0719c45.docs/backups-api.mdanddocs/architecture/backups.mdlist the codes.Validation
3516fb41) and after (a4a43860): with the profile in German, the restore set API returned['item limit', 'web only']before and['item_limit', 'web_only']after. The page showed English entries under the German heading before, and "Maximale Anzahl an Elementen", "Nur Web", "Hervorgehoben", "Aktiviert", "Titel" after. English shows "Item limit", "Web only", and so on. The translation pin commit after that build changes only Arabic and Hebrew strings outside this page.TestManagedSectionPointedElsewhereIsRestoredDBnow also removes an item from a managed section's collection after the backup and checks the wire shape:changes: ["collection_items"]withmissing_collection_items: 1. It failed on the base, which sent["1 collection items"]and no count. The sandbox data has no section that manages a collection, so this test is the only check of that entry.internal/backupwith Postgres,internal/apiv2,internal/contractspec: pass. Web typecheck, eslint, prettier, and the full vitest suite: pass.make lint-changed,verify-apiv2-openapi,verify-apiv2-web-types,verify-apiv2-contract,verify-apiv2-fixtures,verify-route-inventory,verify-local-paths,verify-size-ratchet: pass. The fullmake test-gowas not run.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-4757/
Surface and build: web admin, Restore page, desktop, tablet, and phone widths; before main
3516fb41, aftera4a43860. The row subtitles differ between the two captures because of #4710 and #4715 on main, not this change.Risks
During a rolling upgrade, a bundle and API on different versions show the other side's raw values (
item_limit, or the old English words) instead of translated labels, never blanks. No migration, and nothing stored changes: row messages and restore reports keep their English wording.Checklist
Council review
Rounds: 2, last reviewed 53b502b
Visual review: 1 round, captures from a4a4386
Fixed: the translation pin's new warning-toggle messages need an
amountvalue; the rebase onto main brought #4737, which passes it (also raised by Codex). An unknown change code, or an older server's English word during a rolling upgrade, now shows as sent instead of a blank bullet, as the contract asks of response enums.Round 2 found nothing; Gemini's one nit, a doc comment naming the wrong struct, is fixed.
Answered: the English row message above the translated list stays, because restore reports keep only that message and show it after the restore; translating messages is #4669. The visual findings (row subtitles, phone captions, a long URL, the list heading's weight) concern parts of the row this change doesn't touch; the subtitle changes come from #4710 and #4715 on main.
AI Disclosure
🤖 Generated with Claude Code
Note
Show restore change lists in the interface language
planner.sectionChangesin selective_sections.go, and achangeWordsformatter in selective_plan.go keeps English output working server-side.CHANGE_LABELSmap andchangeLabelhelper in RestoreRows.tsx. Added restore-change message entries to all locale catalogs, with per-language plural forms for the collection-item count.missing_collection_itemsand enum constraints on theChangesfields in openapi.json; docs and breaking-approval records are updated.sync_schedule,collection_items) instead of space-separated English labels, plus a newmissing_collection_itemsresponse property. Unmapped codes are shown as-is in the UI.Macroscope summarized c6c74d1.