Repository navigation
Conversation
When settings changed under a page with unsaved edits (another admin or tab saved, or a restart wrote a changed SILO_* value), every Save was refused with 412 against the stale snapshot and only Discard got out. A refused save now keeps the drafts and shows a toast with Reload. Reload reads the current settings, keeps each edit whose setting still shows the value it showed when the edit began, undoes the rest (including edits to saved passwords and keys, which no snapshot shows), and guards the next save with the new snapshot. Toasts stay above a floating save bar, and toast action buttons get a focus ring, hover state and touch-size target. Translations: Silo-Server/silo-translations#120, release 2026.11.20-b4d4933. 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 6 minutes. 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:
|
…-conflict # Conflicts: # web/src/hooks/useSettingsForm.ts
Reload read the settings and the secret status at the same time, so a secret set between the two reads could look unset while the snapshot already carried it, and its edit would be kept. The status is now read after the settings. A refetch that another read cancels settles with the record it already had. Reload took that as a failure only when its version matched the refused one, which also failed a valid reload after the other change was undone. It now uses each result only when it was fetched during this reload. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Quick104
left a comment
There was a problem hiding this comment.
Adversarial review (gpt-6.2-sol, reviewed 761fc6d)
Reload can preserve a conflicting edit or leave a settings page with no way to retry in place. I verified the form behavior with the settings hook and checked the affected callers.
AI-assisted review by gpt-6.2-sol in the Codex harness through T3 Code.
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:
|
Quick104
left a comment
There was a problem hiding this comment.
Adversarial review (claude-opus-5-5, reviewed 761fc6d)
One nit. I found no correctness problem in the reload logic: the generation, mount, save-pending, baseline and refused-validator fences hold for Discard, profile switches, a save racing a reload, and a cancelled refetch. The Redis pair and secret rules match the description.
I checked the shared changes against every caller. All 19 SaveBar callers render at most one bar at a time; CollectionEditor's two bars are exclusive branches. Unmounting a bar clears --save-bar-clearance, so nothing leaks to other pages. The Toaster offsets keep sonner 2.0.7's 24px and 16px side defaults. The action-button restyle reaches the 11 other toasts with an action (Undo and similar). It is an improvement there, but this fix doesn't need it.
Not verified: I did not run the test suite or a browser here; the review is from reading the code.
Written by Claude Opus 5.5 (claude-opus-5-5) running in Claude Code.
- A save that finished after Discard set its snapshot as the next edit's baseline and re-created records for the discarded edits, so a later Reload could keep an edit over an unseen change or drop a valid one. The save's follow-up now applies only while its drafts still exist. - A Redis database-number edit is undone on Reload when a Redis URL is saved: the URL is a secret, so Reload can't tell whether the server the number belongs to changed. - The Use Redis switch follows the stored URL again once no Redis edit is staged, not only once the whole page is clean. - The conflict toast stays until the admin reloads, discards, or reverts every edit; it no longer covers the save bar, so it needn't time out. - Reload no longer checks timestamps: a refetch that another read cancels settles with that newer read, and a stale settings record would only make the next save refused again. 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:
|
Quick104
left a comment
There was a problem hiding this comment.
Adversarial review (gemini-4-neon, reviewed 761fc6d)
Four findings from checking the reload, ETag, TanStack Query refetch, and caller interactions against the server and web source:
- G1 (High) — Failed or partial conflict reloads flip TanStack Query's
isError, strandingStorageSettingsin a dead-end alert (with<SaveBar>unmounted and the conflict toast dismissed) and tearing downNotificationsAdminSettings,AdminBackups, and wizardFeaturesStepon a transient reload failure. - G2 (Medium) — Editing
redis.dbalone keeps the draft across Reload even whenredis.urlchanged to another Redis server with the same effective database number. - G3 (Medium) —
RedisGroup's "Use Redis" switch stays stuck OFF after Reload undoes a staged disable while keeping another dirty field on General Settings. - G4 (Low) —
freshTag === refusedWith.currentrejects a valid reload when another admin reverts a previously stored setting back to the same content-hash ETag.
Details and suggested repairs are on the relevant lines below.
AI-assisted review: gemini-4-neon via Antigravity in T3 Code.
A failed settings read during Reload turned the form's loadError on even though the snapshot was still loaded, and pages that show a load error replaced the form, drafts and all. loadError now means what it says: the snapshot never loaded, like the secret status since #4673. The Use Redis switch also follows the stored URL again when the page goes clean, not only when its Redis edits clear: switching Redis on with no URL saved stages nothing, so Discard has to reset it. 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:
|
When Reload undoes an edit to a saved password or key, it now also undoes the other edits in that setting's group (the keys sharing its prefix, such as a service's server address), so a service's settings are saved together with the credential they were entered with. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-conflict # Conflicts: # .silo-translations # web/src/locales/keys.ts
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:
|
A Reload checked only for a save still in flight. A save the admin started and the server refused while Reload was still reading slipped past, and Reload then undid the edit the admin made after pressing it. Compare the save counter instead, so any save started meanwhile retires the Reload; its refusal offers Reload again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The AI page cleared its test results on its own Discard and on edits, but a Reload after a refused save can undo a tile's edits without either, leaving a passing test next to the model it replaced. Keep each result with the values it tested and show it only while the tile still holds them. 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:
|
The server trims what it stores, so a password or key saved as spaces is cleared. The baseline a save leaves for the edits still staged counted it as set, and a later Reload then undid edits it could have kept. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Quick104
left a comment
There was a problem hiding this comment.
Adversarial review (gemini-4-neon, reviewed d0196d4)
Verified round-3 findings (ranked by impact):
- G9 (
FeaturesStepafter Reload undoes edits): Reload clears the prefilledmarkers.share_by_default = "true"draft whilesharePrefilled.currentstaystrue, leaving the toggle rendered as ON ("" !== "false") withdirtyCount === 0so Continue skips saving and leaves sharing off. - G10 (pages reading settings outside
keys):pageChangedchecks onlystableKeys, so changes to settings read or shown on a page outside the array passed touseSettingsForm(AdminBackups,SecurityAccessSettings,DownloadsSettings,NotificationsAdminSettings,AppearanceSettings) do not trigger an undo on Reload. - G11 (stale
stableKeysin toast closure):reloadAfterConflictcloses overstableKeysinstead of a ref, so onPlaybackSettingsa 412 toast raised beforeuseLibraryCapabilities()resolves misses trickplay keys when Reload runs later. - G12 (
dirtyRef.currentlags passiveuseEffect):dirtyRef.currentupdates only in a passiveuseEffect, whereaseditVersionsandeditedOverupdate synchronously, leaving a window where an edit orresetValuebefore passive effects flush causesreloadAfterConflictto drop only part of the drafts orsave()to treat a taken-back edit as still staged.
AI disclosure: reviewed with gemini-4-neon via Antigravity in T3 Code.
Reload checked only the keys a page passed to the form, as they were when the save was refused. Pages also show settings they read through the form without listing them, and some add keys once a capability loads. Record every key the page reads through the form along with its keys, and check them all. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The setup wizard's Features step staged sharing on once, while nothing was stored. A Reload that undid the step's edits left the switch showing on with nothing staged, so Continue saved nothing and sharing stayed off. Stage the default whenever nothing is stored and nothing is staged. 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:
|
The text tile shows the subtitle model while no text model is set, and a Reload can change that one. Include the shown model in what a text test result was run with. 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:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4186d3cb8a
ℹ️ 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".
| !dirtyRef.current.has(key) && | ||
| (valueIn(baseline, key) !== valueIn(fresh, key) || | ||
| secretsThen.includes(key) !== configured.includes(key)), |
There was a problem hiding this comment.
Treat unchanged secret-presence flags as unverifiable
If an admin stages an SMTP host change while another admin replaces the already-configured SMTP password, Reload retains the host draft: the password is absent from both snapshots and its configured flag remains true, so this comparison misses the change. Because unverifiable only checks dirty keys, the unedited password does not trigger reconciliation either. Reload then advances the save baseline, allowing the next Save to combine the staged host with a password it was not entered against, potentially breaking authentication or sending the replacement credential to the wrong server. Treat related configured secrets as unverifiable even when they were not edited locally, or use secret revision information to establish that they are unchanged.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
🤖 Claude Code (claude-opus-5-5)
Checked on 361d49b. The snapshot and the secret status can't show a saved secret replaced by another value, so Reload keeps a non-secret edit over it. That edit then saves exactly what the admin would have saved after opening the page fresh: the password still shows as set and the host is the one they typed. The save still sends only the edited keys and is guarded by the fresh ETag, so nothing the page shows is overwritten unseen. Catching a rotation would need a per-secret revision from the server, for example in sensitive-status. I've put that to the maintainers as a possible follow-up rather than blocking this PR on it.
Re-pins translations to 2026.11.22-114155f, which carries both main's keys and this branch's.
…ct toast strings Co-Authored-By: Claude Opus 5.5 <[email protected]>
This comment has been minimized.
This comment has been minimized.
Quick104
left a comment
There was a problem hiding this comment.
🤖 Claude Code (claude-opus-5-5)
Maintainer review of 3d9a3c6, which is the branch with main merged in. The pin now stays on main's translation release, which already has the four conflict strings, so this PR no longer changes any locale file. The fix holds up live. On a sandbox built from this head, a save refused after another admin changed the log level offered Reload, kept the Server name edit, and saved with the new validator (200). A refused save after a change to Login subtitle on the same page undid the edit. The new reload tests fail on main.
Six findings: five on their lines below, one here. I'm fixing all of them in commits on this branch, so there's no need to change anything yourself.
Minor: the Redis connection check result outlives a reload. RedisGroup holds its check result in plain state, so after a Reload undoes staged Redis edits, the green result for the replaced URL or number stays beside the restored values. This is the same thing this PR fixes on the AI page. Repair: use the existing useConnectionCheck helper, which shows a result only while the request it checked still matches.
The settings pill rises above a background watch or audiobook bar, but the clearance it published for toasts didn't, so a toast covered Discard and Save. Co-Authored-By: Claude Opus 5.5 <[email protected]>
An edit staged before the status arrived recorded it as unknown, so a later Reload after a refused save undid every edit even when only another page changed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…undone The form now counts saves, Discards, profile switches, and Reloads that undo the drafts, and the Use Redis switch follows the stored URL again only when that count changes. Before, typing the database number back to its saved value turned the switch off mid-edit. The Redis connection check uses the shared helper, so its result shows only beside the values it checked. A secret cleared and retyped during a save is no longer recorded as set, and an acknowledged save dismisses a conflict toast shown before it. 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:
|
…t was flipped back Turning Use Redis on and back off with no URL saved, or off and back on with one saved, left an override that hid a URL another admin saved or removed afterwards. Those flips now leave the switch following the stored URL. 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:
|
|
🤖 Claude Code (claude-opus-5-5) Maintainer review summaryReviewed head: Fit: 8/10 · Readiness: 8/10 · conditional (assuming CI is green) What I checked
Addressed in this reviewCommits
Left for the maintainers
Fit and readiness
Validation
Council
|
Problem
Related issue: N/A
Validation tasks: none
Other clients: N/A (no client-visible change outside the web app: the Apple, Android, and Roku apps don't edit server settings)
When server settings changed while an admin had unsaved edits on a web settings page, the page could no longer save. Every Save was refused with 412, the toast showed the server's English problem text, and the only way out was Discard, which threw away every edit. Settings change underneath a page when another admin or browser tab saves, or when the server restarts with a
SILO_*variable whose value differs from the stored one. This change keeps the server's refusal and gives the admin a way forward: a translated message with a Reload button that brings in the current settings, keeps the edits when it safely can, and lets the next Save through.The settings form guards each save with the ETag of the snapshot it read at the first edit. Only a successful save, Discard, a profile switch, or reverting every edit replaced that baseline, so after a refusal each later Save sent the same stale
If-Matchand was refused again.Approach
On a 412 from
PUT /api/v2/admin/settings,useSettingsFormkeeps every draft and shows a toast ("Settings changed elsewhere") with a Reload button; the toast stays until the admin reloads, discards, or reverts every edit. Reload reads the settings, then the secret status, and keeps the page's edits only if nothing on the page changed and it can vouch for every edit:When Reload keeps the edits, the form adopts the new snapshot as its save baseline; when it undoes them, the fields show the current settings again. A reload whose secret-status read fails keeps every edit and offers Reload again, since without the status an unset setting and a secret look alike. A reload that settles after Discard, a profile switch, or a save started meanwhile (even one already refused) changes nothing, and a save that settles after Discard no longer sets a baseline for edits that are gone. The setup wizard steps use the same form, so they get the same behavior; their own error toast now skips that 412 so it isn't shown twice. The five admin surfaces that call
useUpdateServerSettingsdirectly keep their current behavior (see Follow-ups).Two pages kept their own state next to the form's drafts and needed it to follow a Reload that undoes them: the AI page now shows a connection test result only while the tile holds the values it tested, and the setup wizard's Features step stages its marker-sharing default again.
Two shared web changes came out of the visual review, because the new toast's button has to stay usable next to the floating save bar. While a
SaveBarshows, it publishes the room it takes at the bottom of the screen and the toaster keeps every toast above it; before, any toast covered Discard and Save at tablet and phone widths. Toast action buttons now get the app's focus ring, a hover state, and a 44px height on touch screens.The strings are in Silo-Server/silo-translations#120, Silo-Server/silo-translations#126, Silo-Server/silo-translations#130 and Silo-Server/silo-translations#133 (the toast text followed the reload rule as review tightened it). Main's translation pin already includes all four, so this branch adds no locale changes.
Validation
main(66b836f8): with an unsaved edit on Settings → General, another admin's save made both following Saves answer 412 with the sameIf-Match.45dd421a(the head since then only changes the AI page's test results), Settings → General:en-XApseudo-locale (no untranslated text).useSettingsForm.reload.test.ts) run the real form against a fake settings server with ETags. They cover a reload that keeps every edit and what the next save writes; reloads that undo every edit (a saved password entered with a new server address, a change to a setting on the page, a change to a setting the page shows without managing it); a failed secret-status read that keeps the edits, then a retry that still finds the change the failed read brought in; and a save started while a reload is reading. All three tests fail onmain(the refused save offers no Reload), and each review fix's test failed on the commit before it.4186d3c.745c8f9, main merged in): on a sandbox build of361d49bb, a change on another page let Reload keep the edit and the next Save answer 200, and a change on the same page undid it. With a playback bar's clearance set, the toast sat above the settings save bar. The review's fixes addRedisGrouptests that fail without them. Review evidence: https://evidence.siloserver.org/r/silo-server/pr-4684-review/Evidence: https://evidence.siloserver.org/r/silo-server/settings-412-conflict/
Risks
Follow-ups
useUpdateServerSettings()directly (Recommendations, the backup S3 dialogs, Notifications, Providers, and the setup wizard's last step) still stay refused after a 412: [bug] Settings saved outside the settings form stay refused after a change elsewhere #4685, after this merges, since it changes the same hook.Checklist
Council review
Rounds: 3 (reviewed 761fc6d, 6d1af25, then d0196d4); round 3 fixes in bc0bc0c, 23e04b6, aba69c5 and 45dd421
Visual review: 2 rounds, on captures taken before the PR opened; the toast's text and the Reload outcome have changed since, and the captures linked above are from 45dd421.
Round 3 fixed: Reload compared the page with what it showed last, so a change that a background read or a failed reload had already shown didn't count (Codex and Kody found it too); a save started and refused while Reload was reading let that Reload undo the newer edit; Reload checked only the keys a page listed when the save was refused, not other settings it shows or keys it adds later; the wizard's Features step showed marker sharing on but saved nothing after Reload; the AI page kept a passing connection test beside a model Reload replaced. Kody also found a blank secret write counted as set (d939f69) and the AI text test missing the fallback model (4186d3c). Answered: an edit can land before the form's dirty set updates only when code outside an input event makes it at the moment a read settles; the toast's "saved password or key" also covers the Redis database number while a Redis URL is saved.
Round 2 fixed: grouping settings by key prefix undid too much or too little (replaced by all-or-none); a field undone by Reload could show an older value than the next save's baseline; a failed status read undid every edit; a save settling after its edit was taken back left a stale baseline; the Use Redis switch snapped off when turned back on; a password entered for a service was kept while another admin changed that service's server address on the same page (Reload now checks the whole page).
Round 1 fixed: a password or key edit undone without the related edits in its group; a failed reload read put loaded pages behind a load error; a save settling after Discard set a stale baseline; a Redis database edit could move to a changed server; the Use Redis switch could show the wrong state after Reload; a valid reload after the other change was undone was reported as failed; the toast timed out. Kody's race between the two reads is fixed by reading the status after the settings.
Visual fixed: the toast covering the save bar on tablets and phones, an invisible focus ring, no hover state and a 24px target on the toast's button, and an orphaned title word. Answered: the toast's shared styling (icon alignment, text colour, no close button), no per-field mark on replaced edits (the unsaved count drops and the field loses its edited dot), and a walkthrough frame caught mid-animation (measured: once settled the toast sits above the save bar).
Maintainer review: 3 rounds (reviewed 3d9a3c6, 361d49b, then 745c8f9); fixes in 2b01f58, 276173d, 361d49b and 745c8f9
Maintainer review fixed: toasts covering the settings save bar over a playback bar; the Use Redis switch turning itself off mid-edit, and later hiding a URL changed elsewhere after it was flipped back (the form now exposes
resetRevision); a stale Redis connection check result after Reload; wizard prefills staged before the secret status loaded, which made every later Reload undo all edits; a cleared secret recorded as set; a conflict toast left up after a successful save.AI Disclosure
make translate-pr(Claude Code)🤖 Generated with Claude Code
Note
Fix admin settings save conflicts so a settings page can save again after external changes
redis.urlstate after a taken-back edit, AI connection-test results show only for matching tile values, and setup-wizard prefills wait for sensitive-status loading.Macroscope summarized 745c8f9.