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 settings pages from saving changes the admin can't see - #4696
Other clients: N/A (web admin and setup wizard only; no other client shows these settings)
Several settings pages hide a field when the setting that controls it changes, but keep the field's unsaved edit. The save bar then counts a change the admin can't see, and Save writes it. Examples on main:
Compatibility: turning Allow Jellyfin apps to connect off and back on leaves "1 unsaved change" with nothing changed on screen. Saving it turns Jellyfin Web off (jellyfin_compat.web_enabled=false).
Storage: after picking Cloudflare signed token, filling in the read address and token secret, and switching back to Signed links, both fields disappear and Save still writes them, the token secret included.
Playback: a changed Buffer ahead disappears when Throttle transcoding is turned off and is still saved. The hardware device picker and the 1080p preference behave the same way.
Setup wizard: the Storage step drops the same link-mode fields, and Connect apps drops a typed Jellyfin address when Jellyfin is turned off. Continue saves both.
Redis: with no saved URL, turning Use Redis on and back off stages an empty URL while the switch looks unchanged.
This change keeps every counted change on screen. Most of these cases came up in review of #4673.
Approach
The pages follow the rule Search settings already uses: a field shown only for some value of another setting also stays while it holds an unsaved edit. A row kept for that reason carries the existing unsaved-change dot, so the admin can see which rows the save bar counts, change them back, or discard them. Storage keeps each link-mode row on its own, so only the edited ones stay.
Two places have no field to keep in view:
Compatibility: Jellyfin Web goes off with a real API switch-off, as the server's own Jellyfin settings endpoint does. Flipping the switch back, switching off an API that is already saved off, or the environment taking the API switch over (fix(web): save the rest of a settings page when an edited field becomes environment-managed #4673 then drops its draft) now takes that change back too.
Redis: turning the switch off with no saved URL drops what was typed. Once REDIS_URL manages the connection, the switch follows the environment instead of a choice made before it took over.
The other option was to reset dependent fields whenever their controlling setting changes. That breaks the Storage flow where a token secret clear is saved together with a switch away from Cloudflare token links, and it throws away typed values on every flip.
The hardware device picker keeps saved paths in their saved order, so switching a device off and back on restores the saved list instead of staging a reordered one. When it stays in view under NVENC or Software only because it holds a change, any device can be switched off and only saved devices on, so the saved list is always reachable: NVENC reads the setting as a CUDA device, so render paths can't be added there. Switching back to the saved devices lets the form undo the edit, and while a save is running the change stays staged.
Validation
Reproduced each Problem example on a dev deployment built from main: the save bar counted the hidden edit, and Save or Continue wrote it (read back from the database). On this branch the same steps leave every counted edit on screen, and the Jellyfin flip stages nothing.
The setup wizard closes once setup finishes, so it was reopened on that deployment to walk its steps.
Admin settings, setup wizard, settings component, and hooks tests pass. Web lint, format check, build, and bundle budget pass.
Full web test run: 29 tests in 4 files (auth and request-deadline code) fail on this host's Node 26, and fail the same way on main.
Not reproduced live: the Redis cases (the test deployment runs Redis from REDIS_URL), an environment variable taking over the Jellyfin API switch, and the hardware device picker (no render devices there). The device-order fix was checked against the real row and toggle helpers.
Evidence
Before-and-after captures on a dev deployment for Compatibility, Storage, Playback, and the setup wizard's Storage and Connect apps steps (desktop, plus phone width for the kept rows), with the database reads after Save, and the failing test runs on main.
None identified. The change is limited to which rows these pages render and to what the Jellyfin and Redis switches stage. No server, API, or stored-data change.
Known gaps left for follow-ups, all present on main today:
Visual review: 2 rounds, captures from da3d77e (the later rebase on #4673 and the Jellyfin changes look the same; recaptured on d93afbd, Compatibility on 1b4f2ba)
Member
Round 1
Round 2
Sol
better, 8/10
better, 8/10
Opus
better, 6/10
better, 7/10
Gemini
better, 6.5/10
better, 6.5/10
Plan round (Sol, Opus, Gemini) before implementing: the Jellyfin switch now stages the Jellyfin Web switch-off only for a real switch-off, the marker settings and their automatic lazy_playback write were left for a follow-up, and Redis gained the no-saved-URL case. Code review at high effort: fixed the device picker reordering a saved list on undo. After rebasing on #4673: the Jellyfin Web switch-off is now dropped when the environment takes the API switch over. Visual review: only edited Storage rows stay, and kept rows carry the unsaved-change dot. Background round 1: fixed the device picker accepting render paths under NVENC (S1), the saved device order on undo (S2, G2, and Kody), the unmarked kept device rows (G1), the Redis test's environment shape (S4, G3), and folded the Jellyfin rule into one effect (O1). The cleared Link lifetime showing its default (S3) happens on main too and went to #4698. Background round 2: a device toggle back to the saved list now drops the draft, so a non-canonical or unset saved value can't leave a kept picker with every switch locked (O2, G4, S5); the Redis test models a saved number (S4). Answered: the marker settings (G5) are in #4697, and S3 groups kept under Local disk by main's existing rule (G6) are unchanged. Background round 3: a device revert made while a save runs now stays staged (O3, S6, G7, and the Kody and CodeRabbit comments), and a kept picker can always reach the saved list after a refresh (S7, G8). One corner is left: with no detected devices and both lists empty, a dirty empty draft has no row to show, and Save writes that same unset value. Answered: the dot's inline placement is the shared row component's, used the same way on other settings pages; the second change counted when the Jellyfin API is switched off is the Jellyfin Web switch-off that goes with it, unchanged.
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 high effort, and two visual review rounds ran before opening, and a simplify pass ran on the code; the background adversarial review is in progress. See Council review.
Keep unsaved admin settings visible and marked dirty across mode switches
Settings pages previously hid fields when a control or mode changed, so admins could stage changes they could not see. Now a field with an unsaved edit stays rendered and shows a dirty marker, even when the current selection no longer uses it.
Adds a dirty prop to SecretField so retained secret rows (e.g. a typed Cloudflare token) can be marked as changed.
Playback settings: keeps the device picker and lower-version/throttle fields visible when dirty, and limits device edits under an inapplicable acceleration mode to removing or reselecting saved devices.
Redis: turning Redis off with no saved URL now discards URL/database drafts instead of staging an empty URL; an environment-provided REDIS_URL clears the local toggle override.
Compatibility proxies: a staged Jellyfin Web-off value is discarded unless Jellyfin API is also staged off.
Several settings pages hid a field when the setting that controls it
changed, but kept the field's unsaved edit. The save bar counted it and
Save wrote it.
- Storage (admin and setup wizard): the link-mode settings stay in view
while they hold an edit.
- Setup wizard Connect apps: a typed Jellyfin address stays in view after
Jellyfin is turned off.
- Playback: the device picker, Buffer ahead, and the lower-version
preference stay in view while they hold an edit; saved device paths
keep their rows.
- Compatibility: Jellyfin Web's switch-off is staged only with a real API
switch-off and is taken back by any other flip.
- Redis: switching it off with no saved URL drops what was typed, and the
switch follows REDIS_URL once the environment takes over.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-ups for the hidden-draft fix:
- A link-mode setting the selected mode doesn't use stays only while it
holds an edit, row by row, rather than keeping the whole Cloudflare
group in view.
- A row kept in view for an unsaved edit after its switch or mode would
hide it carries the existing unsaved-change dot. SecretField forwards
that marker.
- The device picker builds rows from the saved list first and orders a
toggle by the rows, so switching a device back on restores the saved
order instead of leaving a reordered list staged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With #4673, a draft for a key the environment takes over is dropped. When
SILO_JELLYFIN_ENABLED takes over a staged API switch-off, the Jellyfin
Web switch-off staged with it stayed, with no field to show it, and Save
wrote it. The page now drops that switch-off whenever the API switch-off
it goes with is no longer staged.
The Redis takeover test now keeps a staged database number, the case in
which the old switch state outlived #4673's draft drop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings pages and setup-wizard steps now retain and mark certain unsaved fields when their current mode would otherwise hide them. Jellyfin and Redis settings also reset drafts in specified toggle and environment-managed cases. Added tests cover these behaviors.
Changes: Settings draft visibility and reset behavior
Layer / File(s)
Summary
Retain edited fields across modes web/src/components/settings/SecretField.tsx, web/src/pages/admin-settings/StorageSettings.tsx, web/src/pages/admin-settings/StorageSettings.test.tsx, web/src/pages/setup-wizard/steps/StorageStep.tsx, web/src/pages/setup-wizard/steps/ConnectStep.tsx
SecretField forwards a dirty flag. Storage fields and the Jellyfin address remain visible and marked dirty when their edits persist outside the selected mode. A test checks that a token secret remains staged after switching authorization modes.
Preserve playback device and dependent-field edits web/src/pages/admin-settings/PlaybackSettings.tsx
Device rows include saved paths and order. Device switches and dependent fields account for saved selections, mode applicability, environment management, and unsaved edits.
Reset compatibility and Redis drafts web/src/pages/admin-settings/CompatibilityProxiesSettings.tsx, web/src/pages/admin-settings/CompatibilityProxiesSettings.test.tsx, web/src/pages/admin-settings/RedisGroup.tsx, web/src/pages/admin-settings/RedisGroup.test.tsx
Jellyfin and Redis drafts reset in specified toggle or environment-managed cases. Tests check staged-change counts and verify that an unrelated staged edit remains.
Silo-Server/silo-server#4668: The PR description identifies a shared write path for Playback marker settings and the setup-wizard Features step, which this change excludes.
Silo-Server/silo-server#4498: This PR adds the managed-environment status used by the Redis and Jellyfin settings changes.
Suggested reviewers:blurbery, rhainland
Merge Risk: Low · up to 92bb2
Toggling a hardware device back to its saved selection while a save is still running can leave the server with the earlier staged device list while the page shows the saved list with no unsaved marker. The window is small and affects only the admin playback settings page. Blocking device toggles during a save, or keeping the field marked unsaved in that case, should be done before or soon after merge.
Security architecture risk: Minimal · up to 92bb2
The change makes pending settings edits visible and cancels specified dependent drafts without changing who can access settings or how settings are persisted. No introduced or worsened architecture-level security risk was established.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: settings pages no longer save unsaved edits the admin cannot see. The changeset keeps hidden-but-dirty fields visible across Compatibility, Storage, Playback, Redis, a…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description is specific to the changeset. It names the affected pages (Compatibility, Storage, Playback, Redis, setup wizard Storage and Connect apps steps), explains the hidden-edit problem, desc…
Full details: Title check
Explanation
The title names the main change: settings pages no longer save unsaved edits the admin cannot see. The changeset keeps hidden-but-dirty fields visible across Compatibility, Storage, Playback, Redis, and setup wizard steps, which matches the title's scope.
Full details: Description check
Explanation
The description is specific to the changeset. It names the affected pages (Compatibility, Storage, Playback, Redis, setup wizard Storage and Connect apps steps), explains the hidden-edit problem, describes the approach (keeping rows with unsaved edits visible and marked dirty, Jellyfin Web switch-off handling, Redis no-saved-URL handling, device picker ordering), and lists validation, evidence, and known follow-ups. It matches the raw summary of changes to SecretField, CompatibilityProxiesSettings, PlaybackSettings, RedisGroup, StorageSettings, ConnectStep, and StorageStep.
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
One simplification, no defects found. The Storage, Playback, wizard, SecretField, and Redis changes each fix a reported case, and I found nothing in them to cut. I read the diff and the code around it but did not run the tests: this checkout has no web/node_modules.
O1 (nit, simplification) is on the Compatibility page. Two rules now enforce the same thing there, and the new effect could carry it alone. Details are on the line.
AI disclosure: written by Claude Opus 5.5 (claude-opus-5-5) in Claude Code, running in T3 Code.
The four added tests pass on this head and fail on the merge base. Additional component tests reproduced the Playback and Storage findings below and checked the Redis test against the production metadata shape.
AI disclosure: Reviewed with gpt-6.2-sol in Codex.
… order
Review follow-ups on #4696:
- Compatibility: the switch handler is back to staging Jellyfin Web off
with every API switch-off, and one layout effect drops that draft
whenever an API switch-off isn't staged. That covers flipping back,
switching off an API already saved off, the window right after a save,
and the environment taking the switch over.
- Playback: a device toggle orders the list saved paths first, so turning
a device off and back on restores the saved list even when detection
lists the devices in another order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-ups on #4696:
- Playback: shown under NVENC or "none" only because it holds an unsaved
change, the device picker now only takes devices back to their saved
state. NVENC reads the setting as a CUDA device, so adding render paths
there would save a value NVENC can't use.
- The Redis takeover test uses the server's shape (REDIS_URL manages both
Redis keys) and keeps an unrelated edit staged, the case where the old
switch state outlived the dropped drafts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three findings against d93afbda66dc5ce5d674913a8b4f34778d14d5c4:
G1 (medium) — PlaybackSettings keeps the hardware device picker visible while playback.hw_device is dirty under Software or NVENC, but passes no dirty prop to its SettingFieldRow items.
G2 (medium) — PlaybackSettings builds deviceOrder from buildHWDeviceRows, which puts detected devices ahead of undetected saved ones, so undoing a toggle still reorders a mixed saved list and leaves playback.hw_device dirty.
G3 (low) — The REDIS_URL takeover test in RedisGroup.test.tsx omits redis.db from managed_by_env_vars, which does not match what addRedisBootstrapSettings sends.
The other checked areas hold against d93afbd: SecretField forwards dirty to SettingFieldRow; the link-mode gates in StorageSettings and StorageStep, the address gate in ConnectStep, and CompatibilityProxiesSettings's useEffect placement and toggle handler all work as claimed; no removed names (PUBLIC_S3_TOKEN_KEYS, detectedPaths, showReadEndpoint) remain; and the new tests fail on 28dd14847c and pass on d93afbd.
AI-assisted review: gemini-4-neon (Antigravity harness in T3 Code).
Review follow-up on #4696: under a mode the device picker doesn't apply
to, a device row whose switch differs from the saved list now carries the
unsaved-change dot, like every other row kept for an edit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
All round 1 findings are resolved: O1, S1, S2/G2/Kody, G1, and S4/G3. S3 was answered as behavior already on main; I didn't re-check it.
This round's changes are the smallest form of each fix. The handler is back to main's version and the Jellyfin rule lives in one layout effect. Its === "false" check also covers an unset jellyfin_compat.enabled, which the old persisted-value check missed. Saved-first ordering gives the same order as main on a fresh install (no saved list) and keeps the saved order in a mixed list. The Redis harness's extra key keeps dirtyCount above zero, so the test now depends on the urlEnv reset and not on the dirtyCount === 0 path. Ordering with a save in flight holds: an edit made during the save bumps its version, so save() settles neither key, and the effect then drops the Web switch-off.
One nit, inline (O2).
I didn't run the web tests because this checkout has no web/node_modules. Everything above comes from reading the code.
Reviewed with AI assistance: Claude Opus 5.5 (claude-opus-5-5) in Claude Code.
S5 [P3] The GPU picker can keep an edit that none of its switches can undo. On a fresh install with a detected GPU, select and deselect it under VAAPI, then switch to Software. The settings snapshot omits an unset playback.hw_device. useSettingsForm.setValue therefore leaves the empty string dirty. PlaybackSettings.tsx:103–110 keeps the picker open for that draft but compares only path membership for the dots and locks. Every row is locked and has no dot. The same state occurs if a saved list has spaces after commas, since toggleHWDevice rewrites the string when restoring the same paths. Give the picker a field-level way to restore its saved value, including the unset Auto value. If undo is handled by comparing lists, account for a save in flight so a newer edit can survive its acknowledgment.
S4 [P3] The Redis takeover test still skips the staged database number. The fixture at RedisGroup.test.tsx:23 returns an empty redis.db even in the saved-URL case. The server returns an effective number for a valid saved URL, including 0 when the URL omits a database. With the blank fixture, stageRedisUrl stages only the URL when Use Redis is switched off. The assertions would still pass if a staged database number survived takeover. Give the initial snapshot a number, assert three drafts before takeover, then assert that only the unrelated edit remains after both Redis keys become environment-managed.
Review follow-up on #4696: a saved device list that isn't in canonical
form (a space after a comma) never matched the toggled string, so
switching back to the saved devices left a draft with every switch of a
kept picker locked. A toggle that lands on the saved devices now drops
the draft.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
O1: resolved. setJellyfinAPIEnabled matches main, and the single useLayoutEffect runs before the loading return (CompatibilityProxiesSettings.tsx:188-197) and drops jellyfin_compat.web_enabled whenever an API switch-off is no longer staged.
S1: resolved for preventing new render paths under NVENC or Software, though the lock exposes a new dead-end state when taking a staged device back off (G4 below).
S2 / G2 / Kody: resolved for reordering (deviceOrder leads with savedDevices in saved order).
G1: resolved for changed rows in a kept device picker (deviceKeptForEdit on SettingFieldRow), except in the G4 state where playback.hw_device stays dirty with no differing switches.
S4 / G3: resolved. RedisGroup.test.tsx models REDIS_URL managing both redis.url and redis.db while an unrelated key keeps dirtyCount non-zero.
S3: deferred (pre-existing on main, tracked in #4698).
G5 (P2) — Skip markers on PlaybackSettings.tsx still hides dirty edits and leaves a coupled markers.lazy_playback draft
Trigger:
On PlaybackSettings.tsx, edit any of markers.detect_intros, markers.detect_credits, markers.detection_workers, markers.online_storage, or markers.lazy_playback, then switch markers.mode to "off" (or "online" for the local fields, "local" for online storage).
With markers.mode set to "both" or "online", markers.online_storage saved as "stored", and markers.lazy_playback saved as "false", change markers.online_storage to "on_demand" and then back to "stored".
Impact: In (1), every edited marker field unmounts while SaveBar still counts it and Save writes it. In (2), markers.online_storage's onChange stages markers.lazy_playback = "true" while showLazyPlayback hides that row (2 unsaved changes for one visible edit), and switching back to "stored" leaves markers.lazy_playback staged as "true" (1 unsaved change). Switching markers.mode to "off" while "on_demand" is selected hides both drafts.
Evidence: web/src/pages/admin-settings/PlaybackSettings.tsx:171-176 and :664-736 (the coupled write is at :702-705).
Suggested repair: Keep each of the five marker rows on screen with dirty when it holds an unsaved edit that markers.mode or markers.online_storage would hide (matching preferLowerKept and throttleSecondsKept in the same file), and drop a coupled markers.lazy_playback switch-on once "on_demand" is no longer staged.
Note on tests: web/node_modules is absent in this checkout, so the five new test cases were verified statically against 28dd14847c and 1b4f2bae54 rather than executed. All five fail on main for the stated reason.
AI disclosure: Review generated by Gemini 4 Neon (gemini-4-neon) via Antigravity in T3 Code.
… test
Review follow-up on #4696: the fixture reports a saved database number,
as the server does for a saved URL, so the switch-off stages both Redis
keys and the test checks that only the unrelated edit survives REDIS_URL
taking them over.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
S5 (Sol): fixed in ebd7e19, same repair as O2 and G4. A device toggle that lands on the saved list resets the draft, including the unset value on a fresh install.
S4 (Sol): fixed in c5c64cd and 92bb206. The Redis fixture now reports a saved number, the switch-off stages three drafts, and after REDIS_URL takes both Redis keys over only the unrelated edit remains. The test fails on main and passes here.
Round 2 items O2, G4, and S5 are resolved for an idle form: a toggle back to the saved list now clears the draft, so a kept picker never stays dirty with every switch locked. S4 is resolved too. With redis.db reported as 0, the switch-off stages the URL and the number, so 3 staged and then 1 staged check what the comments say. I couldn't run vitest here (no node_modules in this checkout), so I checked these by reading the code.
One new finding, inline (O3): the reset can drop a device edit made while a save is running.
AI disclosure: written by Claude Opus 5.5 (claude-opus-5-5) in Claude Code, as an adversarial reviewer.
Review follow-up on #4696 (Kody): a device toggle back to the saved list
reset the draft directly, so during a save of that setting the revert
was dropped and the save wrote the unwanted devices. The toggle now
stages the saved string itself and lets the form decide whether that
undoes the edit, as it does for every other field; only an unset value,
which the snapshot never carries, is dropped directly, and not while a
save is in flight.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
S6 [P2] Preserve a device edit made during Save. With GPU A saved under QSV, turn on GPU B and click Save. Turn B off before the settings refresh. The switch is still enabled, but the toggle handler compares against the old snapshot and calls resetValue, clearing the edit. When the refresh arrives, B turns back on and the Save bar is gone. I reproduced the same loss after the save acknowledged the write while the settings snapshot was still stale. useSettingsForm.setValue guards both windows. PlaybackSettings.tsx:453
S7 [P3] A settings refresh can lock every switch in a staged GPU picker. With A saved under QSV, turn on B and click Save. While the save is pending, turn A off and back on, then select Software. The refreshed snapshot includes both devices, and the newer edit version keeps the device key staged. Both switches are disabled, yet the next Save still submits the device key. A refresh that leaves only a difference in device order also disables every switch while the key stays staged. PlaybackSettings.tsx:103
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Review follow-up on #4696 (Sol S7): after a settings refresh, a staged
device list could match the saved devices or differ only in order, and
the kept picker under NVENC or Software then locked every switch. Under a
mode the picker doesn't apply to, any device can now be switched off and
only saved devices switched on, so the saved list is always reachable and
no render path can be added for NVENC. A list that differs only in order
marks its selected rows.
Component tests cover NVENC refusing a new render path and an order-only
list going back to the saved one; both fail on main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 21, 2026
S6 (Sol): fixed in 9c49a5a, the same repair as O3 and the Kody and CodeRabbit comments. A device revert stages the saved string through setValue, so it stays staged while a save runs and until the refreshed snapshot arrives.
S7 (Sol): fixed in 6ea774b. Under NVENC or Software, a kept device picker now lets any device be switched off and only saved devices be switched on. The saved list is always reachable, including after a refresh leaves the staged list matching the saved devices or differing only in order, and no render path can be added for NVENC. A list that differs only in order marks its selected rows. New component tests cover NVENC refusing a new render path and an order-only list going back to the saved one; both fail on main and pass here.
G7: form.resetValue drops a wanted device edit during or right after a save
web/src/pages/admin-settings/PlaybackSettings.tsx:453-457 calls form.resetValue("playback.hw_device") whenever next === savedDevices.join(","). Because savedDevices comes from form.getPersistedValue("playback.hw_device"), it reads settings directly (web/src/hooks/useSettingsForm.ts:121). Calling resetValue bypasses the two guards useSettingsForm.setValue applies to avoid comparing against a stale snapshot (!savePending.current and settings !== savedOver.current in web/src/hooks/useSettingsForm.ts:137-143, tested in web/src/hooks/useSettingsForm.test.ts:220-266).
That drops a real edit in two cases:
In-flight save. Start from saved /dev/dri/renderD128 (or unset "" on a fresh install), enable /dev/dri/renderD129, and click Save. The device switches are not disabled while form.isSaving is true (PlaybackSettings.tsx:109-110,444), and settings stays on the pre-save snapshot until the PUT and its invalidateQueries refetch finish. Toggling /dev/dri/renderD129 back off hits next === savedDevices.join(",") and calls form.resetValue("playback.hw_device"), removing the key from dirty. When the refetch returns the saved /dev/dri/renderD128,/dev/dri/renderD129, useSettingsForm's sync effect (useSettingsForm.ts:104) sees the key is not dirty and overwrites localValues, snapping the switch back on with dirtyCount === 0.
Post-save window (settings === savedOver.current). After save() settles /dev/dri/renderD128,/dev/dri/renderD129, if the post-save settings refetch fails, TanStack Query's invalidateQueries resolves without throwing and keeps the previous settings object. form.getValue("playback.hw_device") then holds the saved pair while savedDevices still holds pre-save /dev/dri/renderD128. Toggling /dev/dri/renderD129 off matches stale savedDevices.join(",") and calls resetValue: dirtyCount stays 0, SaveBar never appears, the switch shows off while the server holds both devices, and the next successful refetch flips it back on.
G8: A kept device picker can still lock every switch when settings refreshes to match the staged list
showDevicePicker stays true on form.isDirty("playback.hw_device") (PlaybackSettings.tsx:103), while deviceKeptForEdit and deviceSwitchLocked compare selectedDevices against live savedDevices (PlaybackSettings.tsx:104-110). useSettingsForm's sync effect (useSettingsForm.ts:104) leaves dirty keys alone when a newer settings snapshot arrives with the same value.
That leaves a kept picker with every switch disabled and no dirty markers in two cases:
Single admin after a failed post-save refetch. After saving /dev/dri/renderD128,/dev/dri/renderD129 over stale settings (/dev/dri/renderD128), enable a third device, switch playback.hw_accel to none or nvenc, and toggle the third device back off. Because next (/dev/dri/renderD128,/dev/dri/renderD129) differs from stale savedDevices.join(",") (/dev/dri/renderD128), form.setValue keeps playback.hw_device dirty. Once a later refetch delivers /dev/dri/renderD128,/dev/dri/renderD129, savedDevices matches selectedDevices while playback.hw_device stays dirty, so every switch in the kept picker locks with no dirty markers.
Concurrent edit in another tab. Stage /dev/dri/renderD129, switch playback.hw_accel to none or nvenc, then save the same list in another tab. When this tab refetches settings, savedDevices matches selectedDevices while form.isDirty("playback.hw_device") stays true, locking every switch in the kept picker. If both savedDevices and selectedDevices become empty with no detected devices, deviceRows.length drops to 0 and the picker hides while playback.hw_device stays dirty.
AI disclosure: Reviewed with gemini-4-neon (Antigravity in T3 Code).
Gemini's round 3 (reviewed 92bb206), both fixed in later commits:
G7: fixed in 9c49a5a, the same repair as O3, S6, and the Kody and CodeRabbit comments. A device toggle back to the saved list now stages the saved string through setValue, so the hook's save-pending and stale-snapshot guards apply. Only an unset value, which the snapshot never carries, is dropped directly, and only outside a save.
G8: fixed in 6ea774b, together with Sol's S7. Under NVENC or Software, a kept picker lets every selected device be switched off and saved devices back on. After a refresh leaves the staged list matching the saved devices, the selected rows are marked and unlocked, and switching one off and on lands on the saved list, which undoes the edit. A component test covers the refreshed-list case. One corner remains: with no detected devices and both lists empty, a dirty empty draft has no row to show. Save writes that empty value, the same unset setting.
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 workingpriority: P2Limited scope, workaround exists, or polishsize/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
Related issue: N/A
Validation tasks: none
Other clients: N/A (web admin and setup wizard only; no other client shows these settings)
Several settings pages hide a field when the setting that controls it changes, but keep the field's unsaved edit. The save bar then counts a change the admin can't see, and Save writes it. Examples on main:
jellyfin_compat.web_enabled=false).This change keeps every counted change on screen. Most of these cases came up in review of #4673.
Approach
The pages follow the rule Search settings already uses: a field shown only for some value of another setting also stays while it holds an unsaved edit. A row kept for that reason carries the existing unsaved-change dot, so the admin can see which rows the save bar counts, change them back, or discard them. Storage keeps each link-mode row on its own, so only the edited ones stay.
Two places have no field to keep in view:
REDIS_URLmanages the connection, the switch follows the environment instead of a choice made before it took over.The other option was to reset dependent fields whenever their controlling setting changes. That breaks the Storage flow where a token secret clear is saved together with a switch away from Cloudflare token links, and it throws away typed values on every flip.
The hardware device picker keeps saved paths in their saved order, so switching a device off and back on restores the saved list instead of staging a reordered one. When it stays in view under NVENC or Software only because it holds a change, any device can be switched off and only saved devices on, so the saved list is always reachable: NVENC reads the setting as a CUDA device, so render paths can't be added there. Switching back to the saved devices lets the form undo the edit, and while a save is running the change stays staged.
Validation
REDIS_URL), an environment variable taking over the Jellyfin API switch, and the hardware device picker (no render devices there). The device-order fix was checked against the real row and toggle helpers.Evidence
Before-and-after captures on a dev deployment for Compatibility, Storage, Playback, and the setup wizard's Storage and Connect apps steps (desktop, plus phone width for the kept rows), with the database reads after Save, and the failing test runs on main.
Evidence: https://evidence.siloserver.org/r/silo-server/pr-4696/
Risks
None identified. The change is limited to which rows these pages render and to what the Jellyfin and Redis switches stage. No server, API, or stored-data change.
Known gaps left for follow-ups, all present on main today:
Checklist
Council review
Background adversarial review: 3 rounds, last reviewed 92bb206; its findings are fixed on 6ea774b
Visual review: 2 rounds, captures from da3d77e (the later rebase on #4673 and the Jellyfin changes look the same; recaptured on d93afbd, Compatibility on 1b4f2ba)
Plan round (Sol, Opus, Gemini) before implementing: the Jellyfin switch now stages the Jellyfin Web switch-off only for a real switch-off, the marker settings and their automatic
lazy_playbackwrite were left for a follow-up, and Redis gained the no-saved-URL case. Code review at high effort: fixed the device picker reordering a saved list on undo. After rebasing on #4673: the Jellyfin Web switch-off is now dropped when the environment takes the API switch over. Visual review: only edited Storage rows stay, and kept rows carry the unsaved-change dot. Background round 1: fixed the device picker accepting render paths under NVENC (S1), the saved device order on undo (S2, G2, and Kody), the unmarked kept device rows (G1), the Redis test's environment shape (S4, G3), and folded the Jellyfin rule into one effect (O1). The cleared Link lifetime showing its default (S3) happens on main too and went to #4698. Background round 2: a device toggle back to the saved list now drops the draft, so a non-canonical or unset saved value can't leave a kept picker with every switch locked (O2, G4, S5); the Redis test models a saved number (S4). Answered: the marker settings (G5) are in #4697, and S3 groups kept under Local disk by main's existing rule (G6) are unchanged. Background round 3: a device revert made while a save runs now stays staged (O3, S6, G7, and the Kody and CodeRabbit comments), and a kept picker can always reach the saved list after a refresh (S7, G8). One corner is left: with no detected devices and both lists empty, a dirty empty draft has no row to show, and Save writes that same unset value. Answered: the dot's inline placement is the shared row component's, used the same way on other settings pages; the second change counted when the Jellyfin API is switched off is the Jellyfin Web switch-off that goes with it, unchanged.AI Disclosure
🤖 Generated with Claude Code
Note
Keep unsaved admin settings visible and marked dirty across mode switches
dirtyprop toSecretFieldso retained secret rows (e.g. a typed Cloudflare token) can be marked as changed.REDIS_URLclears the local toggle override.Macroscope summarized 6ea774b.