You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(web): stop emptied settings fields from staging values they don't show - #4816
Closes#4698
Related issue: N/A
Validation tasks: changes #1228 C1
Other clients: N/A (web admin pages and the web setup wizard only)
Some settings fields stage a value they don't show. On an admin settings page, erasing what you typed into a setting that has nothing saved (a token secret, the CDN address, a bucket region) leaves "1 unsaved change" for an empty field. On Admin › Server › Storage the row then stays on screen as "Will be cleared on save", even with no secret saved. Number fields with a default, such as Link lifetime, show the default once emptied while Save sends the empty value, and the server rejects the whole save. In the setup wizard's Storage step, typing over a saved storage secret and erasing it stages a clear that Continue saves, deleting the secret. Hide also folds a storage backend's edited fields out of view while Continue still saves them.
With this change, a field shows what Save will send, and erasing an edit goes back to what is saved.
Approach
Unsaved settings. The settings form treats a setting its snapshot leaves out as saved empty, so erasing what was typed into it leaves nothing staged. The exception is a secret the server reports as set: the snapshot leaves those out too, and an empty value there is a clear to save. Until the secret status loads, the form keeps the old behavior.
Secret fields.SecretField goes back to the saved state whenever it is emptied, not only when a secret is saved. The wizard's four storage secrets (access key, secret key, token secret, Redis URL) now use SecretField, the control the admin pages already use, with no clear action. A saved secret there shows the mask and "Type to replace the saved value; leave blank to keep it.", as on the admin pages.
Wizard backends. A storage backend holding an unsaved edit stays open: its title carries the unsaved-change dot, "Unsaved changes in this group" shows under its status, and its Hide button is disabled until the edit is undone.
Settings rows. A row's description now wraps with text-wrap: pretty, so the secret hint no longer leaves one word on its last line, and the unsaved-change dot stays beside the first line of a label that wraps.
Default fallbacks. Text and number fields on Storage, Search, Library metadata, Playback, Notifications and AI Services no longer show a default when emptied. The server's settings snapshot already carries every default, so the fallback only ever showed when the field was empty. AI Services now checks each tuning value the save sends, so an emptied tuning field stops at its existing "invalid" message.
Use Redis switch. The switch's own on/off choice now resets on Save and Discard. It used to reset whenever the General page ran out of unsaved changes, and erasing an edit can now do that while the admin is still typing.
SettingField's password type had no callers left and is removed.
This touches the same lines of useSettingsForm.setValue as #4684; whichever merges second needs a small rebase.
Validation
Reproduced on a Silo dev deployment built from main (262ac3d), then checked on a deployment of this branch at bd585ba cloned from the same data. The later commits (AI Services' failed-load message, and a merge of main) don't reach any of these screens:
Admin › Server › Storage, no token secret saved: Cloudflare signed token, type into Token Secret, erase it, back to Signed links. Before: "1 unsaved change" and an empty "Will be cleared on save" row. After: nothing staged, row hidden.
The same steps with Address clients download from give the same results.
Link lifetime emptied: before, the field showed 10800 and Save failed with s3.public_token_ttl must be an integer between 1 and 2147483647. After, it shows empty and Save fails with the same error.
Setup wizard Storage step with a token secret saved: type over it, erase it, back to Signed links, Continue. Before: the stored secret was emptied (stored length 0, no longer reported as set). After: still set.
Setup wizard: edit Region in a backend. Before: Hide folded the edit away. After: Hide is disabled and the backend shows "Unsaved changes in this group" until Region is set back.
AI Services with the settings failed to load: Save reaches "Reload settings before saving." again, for an edited and for an emptied tuning field (component checks of that path, not committed, fail on 30fba6d and bd585ba and pass on af62e14); with the settings loaded, an emptied field still stops at its own message.
Maintainer review fixes (a8a2e0b, 112ac0e): a RedisGroup test of turning Use Redis on and back off with no URL saved, then a URL saved elsewhere, fails on 6af11af and passes on a8a2e0b. The Email and Search secret fields held still during a save are checked by reading the code; there is no page test for either. Lint, the type check, and the admin settings, settings component and setup wizard suites (245 tests) pass. Neither fix reaches a screen in the evidence.
Tests: eight new or updated web tests cover the form rule, SecretField, the Storage page, the Use Redis switch and the wizard step. All eight fail on main and pass here. A ninth covers the save baseline after an edit undone in place; it fails on 89793ad and passes on e384b0a.
Web lint, format check, build and bundle budget pass, as do make lint-changed and make verify-local-paths. No Go or API changes. In the full web suite (make test-web), 29 tests in four files fail on this machine and fail the same way on main: auth, request-deadline and player tests whose test environment has no localStorage. One collections test hit its 5-second timeout during the full run and passes on its own.
The form rule applies to every settings page: an edit erased back to empty on a setting with nothing saved no longer counts as a change. A saved secret's staged clear still counts. While the secret status is unavailable, a setting the snapshot leaves out keeps the old behavior.
web.admin.settings.fields.passwordConfigured and passwordNotConfigured lose their last web caller with SettingField's password type; removing them is a catalog change in silo-translations.
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.
Fixed after round 1: AI Services checks only the tuning values a save sends, so a failed settings load reports "Reload settings before saving." again (Sol, 89793ad); the save baseline is released when an edit is undone in place, which a Default accent click could otherwise pin until a later save hit a 412 (Gemini, e384b0a); Discard on General resets the Use Redis switch only once the settings have loaded (Gemini, e384b0a). Fixed after round 2: with the settings failed to load, a tuning field typed into and erased no longer hides the reload message (Sol, af62e14). Answered: erasing a wizard credential while Continue's save is in flight (Kody) is the wizard's existing editable-during-save window, fixed in #4870; a Redis database number left staged after a refresh (Sol) is the same on main and filed as #4834.
Plan round before implementing (Sol gpt-6.2-sol xhigh 6/10, Opus claude-opus-5-5 high 7/10, Gemini gemini-4-neon xhigh 6.5/10). Gemini found that a setting with nothing saved and no default stayed changed after it was typed into and erased, which moved the main fix into the settings form. Sol found that erasing a typed Redis URL would close the Use Redis switch, and Sol and Gemini both found the same default-fallback pattern on Notifications and AI Services, which is now included. Answered: Opus proposed leaving the wizard's Hide behavior out; the issue asks for it.
Visual review: round 1 on captures from an earlier build of this branch, round 2 on the final captures.
Member
Round 1
Round 2
Sol
better, 8/10
better, 8/10
Opus
better, 7/10
better, 8/10
Gemini
better, 7/10
better, 8/10
Fixed after visual round 1: the secret hint no longer leaves its last word on a line of its own, and a wizard backend holding an edit keeps Hide in place (disabled) with the unsaved-change dot on its header instead of dropping the button. Answered: the hint's length on tablet comes from the admin pages' shared copy; the wizard deliberately offers no "Clear saved value"; the raw setting name in the Link lifetime error, the input border contrast, and the other layout notes are the same on main. Round 2 confirmed both fixes and found that the disabled Hide doesn't say why it's disabled; the backend now shows "Unsaved changes in this group" under its status while it holds an edit (bd585ba). Answered: a typed replacement and the saved-value mask look alike, as they do on the admin pages, and the unsaved-change dot shifts a title the way it does on every settings row.
Code review (multi-agent, xhigh) found that erasing any edit on the General page with nothing saved could switch Use Redis off while the admin was still typing, and a few cleanups. All are fixed.
Maintainer review (reviewed 6af11af): a council round of Sol (gpt-6.2-sol, xhigh) 7/10, Opus (claude-opus-5-5, high) 8.5/10 and Gemini (gemini-4-neon, xhigh) 8/10, and a multi-agent code review at high. Fixed: turning Use Redis off with no URL saved no longer leaves the switch stuck off when a URL is saved elsewhere later (Sol, a8a2e0b); the Email and Search secret fields hold still while a save is in flight, so emptying one then no longer drops a draft the save still stores (Gemini, 112ac0e). Answered: a whitespace-only Redis URL staging a clear and a stale switch after a failed credential refresh are the same on main; the Features step hiding edits is #4697, and a Notifications channel card folding over an edit is the same on main.
AI Disclosure
Harness: Claude Code in T3 Code
Tool(s): Claude Code (implementation, live checks, code review subagents); T3 Code delegated reviews through Codex CLI and Antigravity
Adversarial review: a three-model plan round, a multi-agent code review at xhigh, a visual review round, and a simplify pass ran before opening; a second visual round and a background adversarial review ran after opening. See Council review.
Fix settings form staging empty secret and unset fields as changes
SecretField now calls onKeep whenever its input is emptied, instead of only when a saved secret is configured. This means erasing a typed value reverts it rather than staging an empty string.
useSettingsForm.setValue in useSettingsForm.ts compares drafts against a saved value inferred from both the settings snapshot and configured-secret status. An empty value for a key that is not configured clears its dirty state instead of being staged.
Removes UI fallback values from numeric settings inputs across admin pages (AI, notifications, search, storage, trickplay) so empty form values display as empty and are not validated or saved by accident. Numeric validation in AISettings.tsx now runs only on dirty fields.
RedisGroup in RedisGroup.tsx keeps its fields visible while any Redis key is dirty and clears its local switch override via a new save/discard counter from GeneralSettings, rather than on dirty-count changes.
In the setup wizard storage step, secret fields use SecretField instead of password-style SettingField, and a backend with an edited field stays expanded with its hide toggle disabled.
Behavioral Change: SettingField in SettingField.tsx no longer accepts the password type or the sensitiveConfigured prop; secret fields must use SecretField. LEGACY_AI_KEYS no longer includes subtitle_ai.max_concurrent_jobs.
… show
Erasing an edit now goes back to what is saved. The settings form treats a
setting its snapshot leaves out as saved empty, unless it is a secret the
server reports as set, where an empty value stays a staged clear. SecretField
returns to the saved state whenever it is emptied. The setup wizard's storage
secrets use SecretField, so erasing a replacement typed over a saved secret no
longer clears it, and a storage backend holding an edit stays open and marked
changed.
Text and number fields no longer show a default once emptied; the settings
snapshot already carries every default. The Use Redis switch resets on Save
and Discard instead of whenever the page runs out of unsaved changes.
Closes#4698
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).
The changes update settings draft handling for empty values, secret inputs, Redis save and discard state, and setup-wizard backend visibility. They also remove display fallbacks from settings fields and validate only modified AI tuning fields before saving.
Changes: Settings Editing
Layer / File(s)
Summary
Form and secret staging web/src/components/settings/SecretField.tsx, web/src/components/settings/SecretField.test.tsx, web/src/hooks/useSettingsForm.ts, web/src/hooks/useSettingsForm.test.ts
Empty secret inputs use the keep/reset path. The form compares edits with saved values when keys are omitted from settings snapshots and sensitive status confirms they are not configured. Tests cover clearing initially absent values and using the latest settings snapshot as the save baseline.
Redis save and discard state web/src/pages/admin-settings/GeneralSettings.tsx, web/src/pages/admin-settings/RedisGroup.tsx, web/src/pages/admin-settings/RedisGroup.test.tsx
GeneralSettings counts completed saves and eligible discards and passes the count to RedisGroup. RedisGroup resets its enabled override when that count changes. Tests cover clearing Redis edits without leaving staged changes.
StorageStep uses SecretField for storage secrets and marks edited backends as visible, dirty, and not hideable. Storage fields no longer display token parameter or lifetime fallbacks. Tests cover secret reset and backend visibility.
AI tuning validation and values web/src/pages/admin-settings/AISettings.tsx
AI tuning saves validate only dirty fields against field-specific bounds. The page removes legacy value resolution and display fallbacks.
These settings fields use form values directly instead of display fallbacks. SettingField adjusts label and description layout and removes password-field handling. A StorageSettings test covers clearing a token secret before switching authorization modes.
Silo-Server/silo-server#4696: Both PRs change secret staging and storage link-mode behavior in shared web components.
Silo-Server/silo-server#682: Both PRs change configured-secret draft and reset behavior in storage settings.
Suggested reviewers:blurbery, rhainland
Merge Risk: Low · previous review 6af11
After turning Redis off on the General settings page and then switching profiles, the Redis switch may still show off even though the new profile has a saved Redis connection. This is a narrow display inconsistency and is low risk to merge.
Security architecture risk: Minimal · up to 6af11
The changes make erased credential edits return to the saved state and keep pending storage edits visible. The inspected changes do not introduce a material security, configuration-ownership, or rollback risk; existing server validation and save-conflict checks remain in place.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
inferred — The inspected mutation scope is installation-wide configuration, including Redis connection credentials, S3 credentials and AI tuning. Its sensitivity comes from existing administrative settings authority, not a newly introduced tenant or service boundary. The write operation is declared acting-admin, demo-restricted and guarded.
Trust Boundaries and Controls
observed — Browser-entered settings remain subject to server normalization and guarded writes. The client captures the initiating profile and validator, disables automatic mutation retries, and rejects an asynchronous result after its profile authority becomes inactive. Unknown configured-secret status does not cause the new saved-value rule to assume an omitted secret is empty.
Resilience and Maintainability Implications
observed — The successful-save path awaits settings and sensitive-status invalidations before releasing savePending. Submitted edit versions determine which drafts are settled, preserving newer edits, and acknowledged secret drafts are erased from component state. Failed writes bypass this successful-save cleanup.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(web): stop emptied settings fields from staging values they don't show" matches the main change: the settings form and secret fields no longer stage invisible values when emptied. The c…
Linked Issues check
[#4698] Directly linked issue. Its coding requirements are three. (1) Emptying an edit must return to the saved state. useSettingsForm.setValue now uses a savedValue helper, so an omitted key with…
Out of Scope Changes check
Changes outside the literal issue text relate to the same defect class or are needed by it. The Use Redis switch reset (RedisGroup, GeneralSettings) changes because the new form rule can reset edi…
Description check
The description states the problem (settings fields stage values they don't show, default fallbacks showing while the server receives empty values, wizard storage secrets and Hide behavior), the appro…
Full details: Title check
Explanation
The title "fix(web): stop emptied settings fields from staging values they don't show" matches the main change: the settings form and secret fields no longer stage invisible values when emptied. The changeset covers the settings form, SecretField, setup wizard storage step, and related admin pages, all of which this title describes.
Full details: Linked Issues check
Explanation
[#4698] Directly linked issue. Its coding requirements are three. (1) Emptying an edit must return to the saved state. useSettingsForm.setValue now uses a savedValue helper, so an omitted key with no configured secret reverts to clean. SecretField.handleChange calls keepSaved() on any emptying. (2) Displayed values must match what Save sends. The fallbacks verify, 10800, and the Notifications, Search, Library metadata, Playback, and AI defaults are removed from the affected fields. The server snapshot already carries those defaults. (3) Hiding a wizard storage backend must not hide edits that Continue saves. StorageStep passes an edited flag to Backend. Edited backends stay open, show "Unsaved changes in this group", and disable Hide. The wizard's four storage secrets now use SecretField. Automated tests cover the form rule, SecretField, the Storage page, and the wizard step. The issue scope is the web UI only, and the PR changes only web files. No unmet coding requirement is found from the PR summary and the stated code changes. Source was not re-read for this assessment, so the conclusion relies on the summary and PR evidence.
Full details: Out of Scope Changes check
Explanation
Changes outside the literal issue text relate to the same defect class or are needed by it. The Use Redis switch reset (RedisGroup, GeneralSettings) changes because the new form rule can reset edits during typing. The AI Services validation change follows from removing the tuning-field defaults; it checks only values the save sends. Removing the numberValue and similar fallbacks on Notifications, Search, Library metadata, Playback, and Trickplay matches the issue's display-matches-save requirement. The SettingFieldpassword type removal removes a caller-less path. The row layout change (text-wrap: pretty, dirty dot beside the label) supports the unsaved-change indicator. No change was found that is unrelated to the issue. The changes are web-only and make no Go or API changes.
Full details: Description check
Explanation
The description states the problem (settings fields stage values they don't show, default fallbacks showing while the server receives empty values, wizard storage secrets and Hide behavior), the approach (settings form snapshot handling, SecretField reset, wizard backend edited state, default fallback removal, Use Redis switch reset), validation, and risks. It is directly related to the changeset, so it passes the lenient check.
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
With the settings snapshot missing, AI Services validated every tuning
field's empty value and stopped at "Max concurrent jobs must be a positive
whole number" instead of the form's "Reload settings before saving." An
untouched field holds what the server has and isn't sent, so only a field
the save sends is checked now.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Two verified findings from checking useSettingsForm, SecretField, SettingFieldRow, RedisGroup, StorageStep, and the backend effective-settings snapshot:
Medium (web/src/hooks/useSettingsForm.ts:130): setValue captures editBaseline.current before checking reverted. With omitted keys now reverting on "" (including Appearance's Default accent button and AI Services' None text provider), a no-op setValue on a clean form pins editBaseline.current to the old snapshot while dirtyCount stays 0, causing 412 Precondition Failed on a later save after any settings refresh (such as uploading or removing a branding asset on the same Appearance page).
Low (web/src/pages/admin-settings/GeneralSettings.tsx:95): handleDiscard increments savesAndDiscards even when !form.loaded causes form.discard() to return early without clearing dirty, flipping Use Redis back on while redis.url = "" stays staged.
Everything else checked out against the source: every key whose || "<default>" display fallback was removed is populated by adminSettingDefaults and EffectiveAdminSettings (including ai.max_concurrent_jobs legacy fallback), SecretField's onKeep routing works across all callers, and SettingFieldRow's text-sm overrides Label's leading-none via tailwind-merge so the h-5 dirty-dot container matches one label line.
AI disclosure: Reviewed with gemini-4-neon (Gemini 4 Neon) in T3 Code via the Antigravity harness.
An emptied setting with nothing saved now leaves nothing staged, so a click
like Appearance's Default accent set the save baseline without changing the
unsaved count, and the baseline was only released when that count changed.
After another write moved the settings on, the next save was guarded against
the old snapshot and refused with a 412. The baseline is now released
whenever the staged set ends up empty.
General's Discard also counted as a discard for the Use Redis switch when the
settings hadn't loaded and nothing was cleared; it now counts only once they
have.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A wizard storage backend holding an edit keeps Hide disabled until the edit
is undone, but only the dot on its title hinted at why. It now also shows
"Unsaved changes in this group" under its status.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…checking fields
With the settings snapshot missing, a tuning field typed into and erased
stayed staged as empty, and Save stopped at "Jobs running at once must be a
positive whole number" instead of "Reload settings before saving." Save now
hands a missing snapshot straight to the form's save, which reports it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Review of 6af11af. Two low-severity findings, both from the cross-provider round and both checked against the code. I'm fixing each in a commit on this branch, so there's no need to change anything yourself.
…en back
Turning Use Redis off with no URL saved drops what was typed, but it left
the switch's own choice set to off. Only a save or a discard cleared it,
and with nothing staged neither is offered, so a URL another admin saved
later stayed hidden until a reload. The switch now follows what is saved.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Emptying a secret field now takes its draft back even with nothing saved,
so an empty made while a save is in flight left nothing staged while the
save stored what was typed. Storage and Redis already freeze their secret
fields during a save; the SMTP password and the Meilisearch API key now do
too.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The approach holds. The rule that a setting the snapshot leaves out has nothing saved is correct for this server: the effective settings response carries a default for every setting that has one, including all 18 fallbacks this PR removes, and leaves out only secrets and internal state no settings page edits. Secrets the server holds are told apart through the credential status, and a status that hasn't loaded keeps the old behavior. The AI job limit already comes back under ai.max_concurrent_jobs when only the older key is stored. All nine new or changed tests fail on the merge base and pass here.
Fixed on this branch
Turning Use Redis off with no URL saved left the switch stuck off, so a URL saved elsewhere later stayed hidden until a reload (a8a2e0b, with a test that fails on 6af11af).
Emptying the Email or Search secret field while a save was in flight dropped the draft while the save still stored what was typed. Both fields now hold still during a save, as the Storage and Redis secrets already do (112ac0e).
Left for the maintainers
These behave the same on main and stay out of this PR: a Redis URL of only spaces stages a clear of the saved URL; a credential status refresh that fails right after a Redis switch-off save can show the switch on; and a Notifications channel card can fold over an unsaved edit, with its summary chip still reading 08:00 for an emptied digest hour. The Features step hiding edits is already [bug] AI settings, the setup wizard's Features step, and Playback markers save changes the admin can't see #4697.
The two passwordConfigured/passwordNotConfigured catalog keys lose their last caller, as the PR body notes; removing them is a silo-translations change.
Validated features: the PR names Server branding / theming, Web admin C1 (#1228). That case's Default accent path goes through the form's save baseline, which this PR releases more often; it's a minor change, and the branding page's behavior is unchanged. I couldn't read the validation board itself from this session, so the board check is unconfirmed.
User manual: unaffected. No labels or defaults change, and the S3 storage page already describes the Link lifetime and Token Secret fields the way they now behave.
Apple/Android: not applicable; the change is limited to web admin pages and the setup wizard.
Council: round 1 reviewed 6af11af, round 2 re-scored the final head 112ac0e.
Round 1: Sol's switch finding and Gemini's in-flight save finding are fixed above; the other findings were the same on main or already tracked. Round 2 (Sol and Gemini separately) found one low-severity issue this PR introduces, left unfixed here: turning Use Redis off and back on while a URL is saved leaves the switch's own choice set to on, so if another admin later removes the URL, the switch stays on over an empty field until a save or discard. Before this PR, that choice reset once nothing was staged. It mirrors the case a8a2e0b fixed, and nothing wrong is saved. Everything else round 2 raised is the same on main or already tracked in #4870.
Fit: 9/10 · Readiness: 9/10 — ready (assuming CI is green)
Fit: it fixes settings fields that show one value while Save sends another, in the shared settings form rather than page by page, and adds no new settings or surface area. Readiness: the author showed each symptom live before and after, the new tests fail on the base, and the two review fixes are small, one of them covered by a test that fails without it.
Turning Use Redis off and back on without saving always set the switch's
override to on. If another admin then removed the saved URL, the switch
stayed on over an empty field until Save or Discard. With a URL saved,
switching back on now clears the override, so the switch follows what is
saved again; with none saved it stays on so a URL can be typed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
silo-triageBot
added
size/XL
500–999 added + deleted lines (all files); change volume, not priority.
and removed
size/L
200–499 added + deleted lines (all files); change volume, not priority.
labels
Nov 22, 2026
Fixed the low-severity display defect from the re-score round (Sol S1 / Gemini G1) in 81aa451: turning Use Redis back on with a URL saved now clears the switch's override, so it follows the saved URL again instead of staying on if another admin removes it. With no URL saved it still stays on so one can be typed.
New test follows a saved URL removed elsewhere after Use Redis was turned off and back on fails on 112ac0e and passes on 81aa451. The admin-settings and settings-form suites (208 tests), typecheck, ESLint and Prettier pass.
Posted by Claude Code (claude-opus-5-5) for the maintainers.
After Use Redis was turned off and back on, the switch followed the saved
URL. If the database number was then edited and another admin removed the
URL, the fields hid while the number stayed staged, and a save dropped it.
The fields now stay in view while either Redis field has a staged edit.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bugSomething isn't workingimpact: usabilityCore flow broken or severely blockedpriority: P1Core-path bug; painful workaround — next after P0size/XL500–999 added + deleted lines (all files); change volume, not priority.
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Closes #4698
Related issue: N/A
Validation tasks: changes #1228 C1
Other clients: N/A (web admin pages and the web setup wizard only)
Some settings fields stage a value they don't show. On an admin settings page, erasing what you typed into a setting that has nothing saved (a token secret, the CDN address, a bucket region) leaves "1 unsaved change" for an empty field. On Admin › Server › Storage the row then stays on screen as "Will be cleared on save", even with no secret saved. Number fields with a default, such as Link lifetime, show the default once emptied while Save sends the empty value, and the server rejects the whole save. In the setup wizard's Storage step, typing over a saved storage secret and erasing it stages a clear that Continue saves, deleting the secret. Hide also folds a storage backend's edited fields out of view while Continue still saves them.
With this change, a field shows what Save will send, and erasing an edit goes back to what is saved.
Approach
SecretFieldgoes back to the saved state whenever it is emptied, not only when a secret is saved. The wizard's four storage secrets (access key, secret key, token secret, Redis URL) now useSecretField, the control the admin pages already use, with no clear action. A saved secret there shows the mask and "Type to replace the saved value; leave blank to keep it.", as on the admin pages.text-wrap: pretty, so the secret hint no longer leaves one word on its last line, and the unsaved-change dot stays beside the first line of a label that wraps.SettingField'spasswordtype had no callers left and is removed.This touches the same lines of
useSettingsForm.setValueas #4684; whichever merges second needs a small rebase.Validation
main(262ac3d), then checked on a deployment of this branch at bd585ba cloned from the same data. The later commits (AI Services' failed-load message, and a merge ofmain) don't reach any of these screens:10800and Save failed withs3.public_token_ttl must be an integer between 1 and 2147483647. After, it shows empty and Save fails with the same error.SecretField, the Storage page, the Use Redis switch and the wizard step. All eight fail onmainand pass here. A ninth covers the save baseline after an edit undone in place; it fails on 89793ad and passes on e384b0a.make lint-changedandmake verify-local-paths. No Go or API changes. In the full web suite (make test-web), 29 tests in four files fail on this machine and fail the same way onmain: auth, request-deadline and player tests whose test environment has nolocalStorage. One collections test hit its 5-second timeout during the full run and passes on its own.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/issue-4698/
Risks
The form rule applies to every settings page: an edit erased back to empty on a setting with nothing saved no longer counts as a change. A saved secret's staged clear still counts. While the secret status is unavailable, a setting the snapshot leaves out keeps the old behavior.
Follow-ups
web.admin.settings.fields.passwordConfiguredandpasswordNotConfiguredlose their last web caller withSettingField'spasswordtype; removing them is a catalog change in silo-translations.Checklist
Council review
Background adversarial review: round 1 reviewed 30fba6d, round 2 bd585ba, round 3 af62e14.
Fixed after round 1: AI Services checks only the tuning values a save sends, so a failed settings load reports "Reload settings before saving." again (Sol, 89793ad); the save baseline is released when an edit is undone in place, which a Default accent click could otherwise pin until a later save hit a 412 (Gemini, e384b0a); Discard on General resets the Use Redis switch only once the settings have loaded (Gemini, e384b0a). Fixed after round 2: with the settings failed to load, a tuning field typed into and erased no longer hides the reload message (Sol, af62e14). Answered: erasing a wizard credential while Continue's save is in flight (Kody) is the wizard's existing editable-during-save window, fixed in #4870; a Redis database number left staged after a refresh (Sol) is the same on
mainand filed as #4834.Plan round before implementing (Sol
gpt-6.2-solxhigh 6/10, Opusclaude-opus-5-5high 7/10, Geminigemini-4-neonxhigh 6.5/10). Gemini found that a setting with nothing saved and no default stayed changed after it was typed into and erased, which moved the main fix into the settings form. Sol found that erasing a typed Redis URL would close the Use Redis switch, and Sol and Gemini both found the same default-fallback pattern on Notifications and AI Services, which is now included. Answered: Opus proposed leaving the wizard's Hide behavior out; the issue asks for it.Visual review: round 1 on captures from an earlier build of this branch, round 2 on the final captures.
Fixed after visual round 1: the secret hint no longer leaves its last word on a line of its own, and a wizard backend holding an edit keeps Hide in place (disabled) with the unsaved-change dot on its header instead of dropping the button. Answered: the hint's length on tablet comes from the admin pages' shared copy; the wizard deliberately offers no "Clear saved value"; the raw setting name in the Link lifetime error, the input border contrast, and the other layout notes are the same on
main. Round 2 confirmed both fixes and found that the disabled Hide doesn't say why it's disabled; the backend now shows "Unsaved changes in this group" under its status while it holds an edit (bd585ba). Answered: a typed replacement and the saved-value mask look alike, as they do on the admin pages, and the unsaved-change dot shifts a title the way it does on every settings row.Code review (multi-agent, xhigh) found that erasing any edit on the General page with nothing saved could switch Use Redis off while the admin was still typing, and a few cleanups. All are fixed.
Maintainer review (reviewed 6af11af): a council round of Sol (gpt-6.2-sol, xhigh) 7/10, Opus (claude-opus-5-5, high) 8.5/10 and Gemini (gemini-4-neon, xhigh) 8/10, and a multi-agent code review at high. Fixed: turning Use Redis off with no URL saved no longer leaves the switch stuck off when a URL is saved elsewhere later (Sol, a8a2e0b); the Email and Search secret fields hold still while a save is in flight, so emptying one then no longer drops a draft the save still stores (Gemini, 112ac0e). Answered: a whitespace-only Redis URL staging a clear and a stale switch after a failed credential refresh are the same on
main; the Features step hiding edits is #4697, and a Notifications channel card folding over an edit is the same onmain.AI Disclosure
🤖 Generated with Claude Code
Note
Fix settings form staging empty secret and unset fields as changes
SecretFieldnow callsonKeepwhenever its input is emptied, instead of only when a saved secret is configured. This means erasing a typed value reverts it rather than staging an empty string.useSettingsForm.setValuein useSettingsForm.ts compares drafts against a saved value inferred from both the settings snapshot and configured-secret status. An empty value for a key that is not configured clears its dirty state instead of being staged.RedisGroupin RedisGroup.tsx keeps its fields visible while any Redis key is dirty and clears its local switch override via a new save/discard counter fromGeneralSettings, rather than on dirty-count changes.SecretFieldinstead of password-styleSettingField, and a backend with an edited field stays expanded with its hide toggle disabled.SettingFieldin SettingField.tsx no longer accepts thepasswordtype or thesensitiveConfiguredprop; secret fields must useSecretField.LEGACY_AI_KEYSno longer includessubtitle_ai.max_concurrent_jobs.Macroscope summarized 2fb2c30.