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): keep hidden AI, Features, and marker edits from being saved - #5202
Closes#4697
Related issue: N/A
Validation tasks: none
Other clients: Apple N/A (no client-visible change); Android N/A (no client-visible change); Roku N/A (no client-visible change)
On AI settings, the setup wizard's Features step, and the Skip markers settings on Playback, a field hidden by another setting kept its unsaved edit, and Save or Continue wrote it. In the wizard, a download bandwidth typed before turning Downloads off was saved. On Playback, setting the marker source back after picking "Fetch when needed" left the save bar counting changes that no field on screen showed. This change keeps such a field on screen, marked with the unsaved-change dot, or takes the edit back with the change that hid it, as #4696 did for the other settings pages.
Approach
Features step: the download bandwidth fields, the recommendation provider and model, and Save online markers stay in view while they hold an edit after their switch is turned off. Turning push back to how it was saved takes both platform keys back.
Skip markers on Playback: the intro and credits detection switches, Detection workers, Save online markers, and Find markers on playback stay in view while they hold an edit. The group moved into its own component to keep PlaybackSettings.tsx under the size ratchet.
markers.lazy_playback follows one rule on both pages. On-demand online storage turns it on while online markers are on, and in the wizard, which has no row for it, a source switch sets it too. The value comes from the source and storage edits that remain, and once none of them implies one, lazy playback goes back to what it held before, including the admin's own edit. A staged value other than the one on-demand storage turned on keeps its row in view.
AI settings: a chosen service tier stays in view after switching to a provider or plan without tiers. Choosing the ChatGPT plan takes back a provider that was picked but not saved; the saved provider stays, as before.
Only the web admin changes. useSettingsForm is untouched; #4684 changes it.
Validation
Reproduced on origin/main on a local build with the production web bundle, in headless Chromium at 1440 px and 390 px. In the wizard, download.server_bandwidth_mbps=50 was saved with the field hidden. On Playback, the save bar showed 2 changes with no storage field on screen.
On the fix build, with the same data and steps, the bandwidth field stays in view with the dot. On Playback, Save online markers stays in view, the count is 1, and setting it back to "Save to library" clears the save bar. Saving on-demand storage with online markers on still saves markers.lazy_playback=true.
Component tests cover each kept field, the lazy playback rule (taken back with the storage edit, restoring the admin's own edit, independent of the order of the wizard's switches), push, and the AI service tier and ChatGPT provider cases. The AI cases were checked in tests only, not in a browser.
Maintainer review (see the summary comment): reproduced the wizard, Playback, and AI cases on a main build and confirmed the fix on this branch at 1440 px and 390 px, including the AI cases in a browser. The review added three commits: a kept service tier also offers the saved tier, and lazy playback taken back during an in-flight save stays staged for the next save, each with a test that fails without it.
pnpm run lint, format:check, build, budget:check, make test-web, tsc, make verify-local-paths, verify-size-ratchet, verify-settings-bindings-all, and verify-case-collisions pass. The Go half of the gate was not run because no Go file changed.
Adversarial review: dual-code-review (gpt-6.2-sol through Codex CLI and a separate claude-opus-5-5 reviewer), three rounds on correctness, standards, and spec. Round 1: both reviewers found that lazy playback stayed staged and hidden when on-demand storage was undone while the marker source stayed edited. Gpt-6.2-sol also found a wizard switch sequence that staged a value no remaining edit implied, and claude-opus-5-5 found that the admin's own lazy playback edit was not restored. All three were fixed by working out the value from the remaining edits, and the tests now share the Radix DOM stub. Round 2: on-demand storage turned lazy playback on with every source off, and a source change could override the admin's own edit. Both were fixed by applying on-demand storage only while online markers are on, and the marker-mode checks moved into a shared helper. Round 3: a memo added in round 2 outlived a discard and was removed. Dismissed: a service tier hidden by a manually collapsed Advanced section (existing AdvancedSection behavior), an edit made while a save is in flight staying dirty (by design in useSettingsForm), and a request to test the removed memo. Bot follow-up: kody found that a kept service tier could not be set back to Default while AI capabilities were loading or had failed; fixed in 1831150 with a test, and a re-review of that change found nothing.
Note
Fix hidden AI, Features, and marker settings edits being saved or lost
Admin settings and the setup wizard now keep a settings row visible while it holds an unsaved edit, even after its parent feature is turned off. Applies to service tier, marker storage, detection workers, download bandwidth, and embedding fields in AISettings.tsx, FeaturesStep.tsx, and the new MarkerSettingsGroup.tsx.
Marker source and storage edits move into a shared useMarkerSourceDraft hook in useMarkerSourceDraft.ts. It stages lazy playback only while an edit implies it, restores the prior lazy-playback draft when the implication is removed (including mid-save), and tracks when a storage choice carries the lazy-playback edit.
Selecting the ChatGPT plan in selectTextProvider now discards a staged API-key provider, and returning the push switch to its saved aggregate state in setPush resets both platform keys to persisted values.
Extensive new tests cover kept dirty rows, undo flows, and in-flight saves across AISettings, PlaybackSettings, and FeaturesStep.
Risk: the lazy-playback restore logic in useMarkerSourceDraft handles mode transitions and on-demand storage interplay; check lazyPlaybackForMode and lazyPlaybackCarriedByStorage if staged lazy-playback values behave unexpectedly.
…dits
A field hidden by another setting kept its unsaved edit, and Save or the
wizard's Continue wrote it.
- Setup wizard Features: the bandwidth fields, the recommendation provider
and model, and the online marker storage stay in view, marked as changed,
while they hold an edit. Turning push back to how it was saved takes both
platform keys back.
- Playback Skip markers: detection switches, the worker count, online
storage, and Find markers on playback stay in view while they hold an
edit. The group moves to its own component.
- Lazy playback staged by a marker source or storage change belongs to that
change and is taken back once neither holds an edit, on both pages.
- AI settings: a chosen service tier stays in view after switching to a
provider without tiers, and choosing the ChatGPT plan takes back a staged
provider.
Review follow-up. Lazy playback staged with a marker source or storage
change was taken back only once both were clean, so undoing on-demand
storage while the source stayed edited left a hidden value staged, and a
sequence of switch changes in the wizard could stage one none of the
standing edits implied.
The staged value is now worked out from the source and storage edits that
remain, and goes back to what it held before (including the admin's own
edit) once none implies one. The new tests share the Radix DOM stub.
…nges
Second review follow-up. A source change re-staged the lazy playback value
that pending on-demand storage implied, overriding a value the admin had
just set, and on-demand storage turned it on even with every source off.
Lazy playback is now staged only when the value the standing edits imply
changes, on-demand storage implies it only while online markers are on, and
a staged value other than the one storage turned on keeps its row in view.
The pages share one helper for which sources a marker mode turns on.
Third review follow-up. The memo of the last implied lazy playback value
outlived a discard, so choosing on-demand storage again could skip
turning lazy playback on. The online-markers gate already keeps the
admin's own edit, so the memo goes. The storage-revert test now keeps
online markers on, so it exercises the take-back it names.
AI settings, Playback marker settings, and the setup wizard’s Features step now keep edited fields visible when controlling settings change. Marker source and online-storage edits also coordinate staged lazy-playback values.
Changes: Visible setting drafts
Layer / File(s)
Summary
Retain AI setting drafts web/src/pages/admin-settings/AIModelField.tsx, web/src/pages/admin-settings/AIProviders.tsx, web/src/pages/admin-settings/AISettings.tsx, web/src/pages/admin-settings/AISettings.test.tsx
Service-tier fields can remain visible and marked dirty when the selected provider does not support tiers. Selecting the ChatGPT plan resets the staged text-provider ID. Tests cover tier selection and provider changes.
Coordinate marker source and lazy playback web/src/pages/admin-settings/useMarkerSourceDraft.ts
The marker draft hook stages or restores lazy playback based on marker-mode and online-storage edits. It also identifies when an online-storage edit carries a lazy-playback value.
The Features step keeps edited dependent fields visible and uses the marker draft hook for source and storage changes. Tests cover marker, bandwidth, recommendation-provider, and push-setting edits.
The change keeps edited AI, marker, and Features settings visible instead of silently saving hidden edits. One narrow case remains: if an admin undoes a provider change while a save is running, the form briefly shows a value that differs from the server. This is low risk and can be mergeable with owner awareness.
Security architecture risk: Low · up to 0922a
An administrator who changes the marker source while saving an on-demand storage change can unintentionally stage a change that turns off marker lookup during playback. A second save is required to apply it. The change does not appear to expand access or permissions.
Retained concerns
Low · reliability · inferred: Playback can restore a pre-save lazy-playback value after its triggering storage edit has already been committed. Starting with online markers, stored storage, and lazy playback off, an administrator can select on-demand storage, start saving, and switch the source to both while the save is pending. That newer source edit remains dirty after acknowledgement, so the hook does not clear its remembered value. Returning the source to online after the refreshed snapshot arrives can then stage lazy playback off even though on-demand storage remains saved. A subsequent save can submit that unintended setting. This is a rollback defect in the existing admin flow, not an authorization bypass.
Security review details
Trust Boundaries and Controls
observed — The existing settings write sends an If-Match validator under the captured profile context with authentication retry disabled. The marker hook can change the staged values submitted by that path but makes no request itself.
Hardening Proposals
proposed — Track the remembered lazy-playback value with the draft or save generation that created it. Retire it when the triggering edit is acknowledged, while preserving explicit reversions made before acknowledgement. Verify that reversing a newer source edit does not undo an already-committed storage change.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: hidden AI, Features, and marker edits with unsaved changes are kept from being saved. The changeset matches that: AISettings, FeaturesStep, and the new MarkerSettingsG…
Linked Issues check
Issue #4697 requires that AI settings, the wizard Features step, and Playback marker settings never save a value the admin cannot see. Each listed case has a matching change in the whole-PR summary (m…
Out of Scope Changes check
All changed files are in the web admin settings pages and setup wizard, which #4697 covers: AISettings.tsx, AIModelField.tsx, AIProviders.tsx, FeaturesStep.tsx, PlaybackSettings.tsx, MarkerSettingsGro…
Description check
The description is specific and on-topic. It names the affected surfaces (AI settings, the setup wizard Features step, and Playback skip markers), describes the approach per page, lists the validation…
Full details: Title check
Explanation
The title names the main change: hidden AI, Features, and marker edits with unsaved changes are kept from being saved. The changeset matches that: AISettings, FeaturesStep, and the new MarkerSettingsGroup keep hidden dirty fields visible or discard them. The title does not cover the lazy-playback rule or push handling, which is expected for a short title.
Full details: Linked Issues check
Explanation
Issue #4697 requires that AI settings, the wizard Features step, and Playback marker settings never save a value the admin cannot see. Each listed case has a matching change in the whole-PR summary (merge base to head):
Playback markers [#4697]: MarkerSettingsGroup.tsx keeps detection switches, detection workers, Save online markers, and Find markers on playback in view while they are dirty. The summary states the dirty-visibility conditions for each row.
markers.lazy_playback [#4697]: useMarkerSourceDraft.ts derives the staged value from the source and storage edits that remain. When none implies a value, it restores the prior value, including the admin's own edit. On-demand storage implies "true" only while online markers are on. The wizard sets the value through modeStagesLazyPlayback.
Features step [#4697]: FeaturesStep.tsx keeps bandwidth, recommendation provider and model, and Save online markers in view while dirty. Push toggles clear both platform keys when the combined state matches the saved state.
AI settings [#4697]: AISettings.tsx keeps a dirty service tier in view after a switch to a provider without tiers. Choosing the ChatGPT plan resets the staged text-provider ID and keeps the saved provider. AIModelField.tsx and AIProviders.tsx accept a dirty prop for these rows.
The author reports browser reproduction and fix checks at 1440 px and 390 px for the wizard and Playback. The AI cases were checked in component tests only. I did not read FeaturesStep.tsx, AISettings.tsx, or the test files directly in this assessment. This verdict relies on the summary and the earlier review. No unmet coding requirement is shown.
Full details: Out of Scope Changes check
Explanation
All changed files are in the web admin settings pages and setup wizard, which #4697 covers: AISettings.tsx, AIModelField.tsx, AIProviders.tsx, FeaturesStep.tsx, PlaybackSettings.tsx, MarkerSettingsGroup.tsx, useMarkerSourceDraft.ts, and their test files. The move of marker markup from PlaybackSettings.tsx to MarkerSettingsGroup.tsx is a refactor. The PR states it is needed for the size ratchet, and the behavior is unchanged apart from dirty visibility. The PR states that useSettingsForm is untouched, and the summary lists no change to it. The summary shows no changes to the #4696 pages, which the issue excludes. The lazy-playback commits and the service tier fallback are tied to #4697 requirements.
Full details: Description check
Explanation
The description is specific and on-topic. It names the affected surfaces (AI settings, the setup wizard Features step, and Playback skip markers), describes the approach per page, lists the validation performed, and links to evidence. It clearly relates to the changeset, which covers AISettings, FeaturesStep, PlaybackSettings, MarkerSettingsGroup, and useMarkerSourceDraft.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Please add before-and-after captures of AI Settings at desktop and phone widths showing the service-tier field after switching to a provider or plan without tiers, and the ChatGPT plan/provider reset. The description says these visible changes were checked only in tests; they also need visual evidence alongside the Features and Playback cases. Name the build or commit used.
Review follow-up. While the AI capabilities request loads or after it
fails, the tier list is empty, so a kept tier was the only option and
could not be set back to Default before saving.
Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.
Reviewing changes in Silo
Include the related issue, expected behavior, and validation steps in the PR description.
For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
Follow this repository's AGENTS.md and CONTRIBUTING.md.
Request another review with @kody start-review in a PR comment.
React with 👍 or 👎 to give feedback on individual suggestions.
Review settingsReview Options
The following review options are enabled or disabled:
Options
Enabled
Bug
✅
Performance
✅
Security
✅
Business Logic
❌
⚠️ 4 Kody Rule(s) were not evaluated
These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:
Preserve optional store capabilities through production wrappers
Detach mandatory cleanup from request cancellation and bound its lifetime
Preserve durable media identity and share identity-evidence precedence
Bound decoder throughput trades and share direct-play eligibility
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.
A tier kept in view after switching to a provider without tiers listed
Default and the staged tier only while AI capabilities were unavailable,
so a non-default saved tier could not be chosen again without discarding
every other edit on the page.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
Review of df21263 (this branch with main merged in; the only conflict was the new Paused playback group next to the marker group in PlaybackSettings, and I kept both). One finding below. The rest of the review is in the summary comment.
Taking on-demand storage back restored lazy playback with resetValue,
which clears the key's dirty state even while a save is in flight. The
in-flight save still wrote lazy playback on, and the next save left it
on. setValue keeps an edit made during a save staged, so the next save
writes the restored value.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
silo-triageBot
added
size/XXL
1000–2999 added + deleted lines (all files); change volume, not priority.
and removed
size/XL
500–999 added + deleted lines (all files); change volume, not priority.
labels
Nov 24, 2026
…e is taken back
The settings mutation waits for its refetch, so a take-back made while a
save is in flight usually lands after the refetch already shows the
write. Restoring the saved value then staged the value that save wrote.
Restore the value remembered from before on-demand storage staged lazy
playback instead.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The reason will be displayed to describe this comment to others. Learn more.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Minor · Reconcile a provider undo that races an in-flight save. · AISettings.tsx:751
web/src/pages/admin-settings/AISettings.tsx:751 Minor · Data Integrity & Integration · Quick win
Reconcile a provider undo that races an in-flight save.
When an admin undoes a staged ai.text_provider_id edit while its save is pending, the save still writes the submitted value. The completion step skips this key because its edit version changed, so the local value stays at the restored saved value with no dirty mark. Until the settings snapshot refreshes, the form shows a value that differs from the server.
Completion must either keep the undone key dirty or update its local value from the server result. The choice between these is a design decision for the save flow. Either option must leave the displayed value matching the server value once the save completes.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: d656daaa-9895-4503-9609-1de4f6405be1
Commits
Reviewing files that changed from the base of the PR and between df21263 and 0922a8d.
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.
Reviewed head: 0922a8d (this branch with main merged in, plus three review commits).
Fit: 9/10 · Readiness: 9/10 — ready
Fit: it fixes a real correctness bug, Save writing values the admin can't see, on the pages #4696 left out. It uses #4696's pattern (keep the row while it holds an edit, mark it with the dot) and adds no setting, field, or API. Readiness: the bug was reproduced live on a main build and is gone on this branch at both widths; the behavior tests fail on main; and the validation board check ran.
What I verified
On a dev sandbox, first built from main (cce98c5), then rebuilt from this branch (87f86d2; the one later commit only changes the in-flight-save path, and in these flows it restores the same value):
Setup wizard: typing 50 into Total download bandwidth and turning Downloads off hid the field, and Continue saved download.server_bandwidth_mbps=50 (read back from the database at both widths). On the branch the field stays with the dot.
Playback > Skip markers: after "Fetch when needed" and setting the source back to "Detect on this server", main hid Save online markers, showed Find markers on playback on, and counted 2 changes. The branch keeps the storage row with the dot, puts lazy playback back to its saved off, and counts 1.
AI Services: the Service tier row disappeared after switching to a provider without tiers (2 changes). It now stays under Advanced with the dot. Picking another provider and then the ChatGPT plan left 2 changes on main and leaves 1 now. These are the AI captures the earlier evidence comment asked for.
Of the PR's tests, 12 fail on main for the reported reason and pass here. One more, which checks that lazy playback follows the edits still standing, passes on main because it guards the new logic. tsc -b, eslint, prettier, and the admin settings and setup wizard test folders (241 tests) pass, and CI is green.
Merged main. The only conflict was the new Paused playback group next to the marker group in PlaybackSettings, and both are kept.
A kept service tier couldn't go back to a non-default saved tier while AI capabilities were unavailable. The row now also offers the saved tier (3ea38ea).
Taking on-demand storage back while a save was in flight lost the take-back: the save still wrote lazy playback on, and the next save left it on. CodeRabbit and two reviewers found this. The take-back now restores the value from before the edit through setValue, which keeps an edit made during a save staged (87f86d2, refined in 0922a8d for the usual order, where the refetch lands before the save settles). Both fixes come with a test that fails on the head before the fix.
Reviewers raised more sequences that edit marker settings while a save is in flight, or right after one before its refetch arrives. Each one ends with a staged value that shows on screen, with the dot and in the save count. A concurrent change by another admin ends in the settings If-Match conflict, not a silent overwrite. I left these alone.
All three visual reviewers rated the change better. They suggested a short note on kept rows saying the value doesn't apply to the current selection, for example a kept service tier under a non-OpenAI provider. That would change the kept-row pattern from fix(web): stop settings pages from saving changes the admin can't see #4696 on every page and needs new strings, so it belongs in a separate change if wanted.
LazyPlaybackBefore.dirty in useMarkerSourceDraft.ts is no longer read. It can be dropped in a later cleanup and changes no behavior.
Checks
Validated features: none affected. No passed case on the 1.0 board covers the setup wizard, AI settings, or the Playback marker settings, and Validation tasks: none is correct.
User manual: unaffected. siloserver.org doesn't describe these fields, and the change makes the pages behave as intended.
Other clients: N/A. These are web admin and setup screens with no counterpart on Apple, Android, or Roku, and jellycompat has nothing equivalent.
Lane: logic fix. Each touched page now shows the edits it already holds, using the existing dot from fix(web): stop settings pages from saving changes the admin can't see #4696, and saves only values on screen. AIModelField.tsx and AIProviders.tsx pass the existing dot through; AISettings.tsx, MarkerSettingsGroup.tsx, FeaturesStep.tsx, and useMarkerSourceDraft.ts keep or take back staged values; PlaybackSettings.tsx moves the marker group into its own file. No migration, contract, or auth change.
Council
Code review, three rounds, all members at medium effort:
Round 1 found the tier option gap and the in-flight take-back. Both are fixed. Round 2 found that the first take-back fix missed the order where the refetch lands first, which is now fixed. Round 3's new findings are the in-flight sequences above and the unused field. A suggested unset markers.mode mismatch doesn't happen, because the admin settings snapshot always includes the default mode.
Visual review of the before/after captures: Sol better, 8/10; Opus better, 7/10; Gemini better, 7/10. Their requested phone captures of the kept rows were added after the round.
@coderabbitai On the outside-diff note about AISettings.tsx:751 (a provider undo during an in-flight save): no change needed.
When the ChatGPT plan is chosen, the provider select shows "ChatGPT plan", so the provider id isn't on screen. The take-back leaves the id unstaged, so no later save writes it. useUpdateServerSettings waits for the settings refetch before mutateAsync resolves, and the hook then syncs every unstaged key from that snapshot, so the local id matches the server once the save completes. I checked this with a throwaway test against the real useSettingsForm: hold the save open, switch to the plan, then land the refetch before or after the save settles. In both orders the save sent only ai.text_provider_id, the page showed "ChatGPT plan" with 1 unsaved change, and only ai.auth_mode stayed staged.
The in-flight save can still write the submitted provider ID. Choosing the ChatGPT plan clears its draft and displays the plan, not the ID. After a successful settings refetch, useSettingsForm syncs the unstaged ID from the snapshot.
Thanks for checking both orders.
Learnings added
Learnt from: Quick104
URL: https://github.com/Silo-Server/silo-server/pull/5202
Timestamp: 2026-11-24T02:53:07.076Z
Learning: Within repository "Silo-Server/silo-server", only for files matching one of ["web/src/pages/admin-settings/AISettings.tsx"]: In web/src/pages/admin-settings/AISettings.tsx, choosing the ChatGPT plan during an in-flight provider save clears the staged ai.text_provider_id rather than staging the pre-save ID for another write. The in-flight request can still save its submitted ID, but the select displays the ChatGPT plan rather than that ID. When the settings refetch succeeds, useSettingsForm syncs the unstaged ID from the refreshed snapshot. Do not require a second provider write solely to reconcile this sequence.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
You are interacting with an AI system.
Quick104
added a commit
to Rhainland/silo-server
that referenced
this pull request
Nov 24, 2026
Main's Features step test (Silo-Server#5202) stubs the AI providers module and now
renders the add provider dialog, which reads useAIProviderCreatePending.
Add it to that mock and to the AI settings test's matching mock.
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 workingevidence-requiredNeeds before-and-after evidence before the Evidence check passesimpact: polishAnnoyance, cosmetic, or nice-to-havejavascriptPull requests that update javascript codepriority: P2Limited scope, workaround exists, or polishsize/XXL1000–2999 added + deleted lines (all files); change volume, not priority.
2 participants
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 #4697
Related issue: N/A
Validation tasks: none
Other clients: Apple N/A (no client-visible change); Android N/A (no client-visible change); Roku N/A (no client-visible change)
On AI settings, the setup wizard's Features step, and the Skip markers settings on Playback, a field hidden by another setting kept its unsaved edit, and Save or Continue wrote it. In the wizard, a download bandwidth typed before turning Downloads off was saved. On Playback, setting the marker source back after picking "Fetch when needed" left the save bar counting changes that no field on screen showed. This change keeps such a field on screen, marked with the unsaved-change dot, or takes the edit back with the change that hid it, as #4696 did for the other settings pages.
Approach
PlaybackSettings.tsxunder the size ratchet.markers.lazy_playbackfollows one rule on both pages. On-demand online storage turns it on while online markers are on, and in the wizard, which has no row for it, a source switch sets it too. The value comes from the source and storage edits that remain, and once none of them implies one, lazy playback goes back to what it held before, including the admin's own edit. A staged value other than the one on-demand storage turned on keeps its row in view.Only the web admin changes.
useSettingsFormis untouched; #4684 changes it.Validation
origin/mainon a local build with the production web bundle, in headless Chromium at 1440 px and 390 px. In the wizard,download.server_bandwidth_mbps=50was saved with the field hidden. On Playback, the save bar showed 2 changes with no storage field on screen.markers.lazy_playback=true.pnpm run lint,format:check,build,budget:check,make test-web,tsc,make verify-local-paths,verify-size-ratchet,verify-settings-bindings-all, andverify-case-collisionspass. The Go half of the gate was not run because no Go file changed.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-5202/
Surface and build: web admin and setup wizard, desktop 1440 px and phone 390 px, local build of this branch on
3b2b32168.Risks
None identified. On Playback, a marker setting with an unsaved edit now stays on screen where it used to disappear.
Checklist
AI Disclosure
useSettingsForm), and a request to test the removed memo. Bot follow-up: kody found that a kept service tier could not be set back to Default while AI capabilities were loading or had failed; fixed in 1831150 with a test, and a re-review of that change found nothing.Note
Fix hidden AI, Features, and marker settings edits being saved or lost
useMarkerSourceDrafthook in useMarkerSourceDraft.ts. It stages lazy playback only while an edit implies it, restores the prior lazy-playback draft when the implication is removed (including mid-save), and tracks when a storage choice carries the lazy-playback edit.selectTextProvidernow discards a staged API-key provider, and returning the push switch to its saved aggregate state insetPushresets both platform keys to persisted values.useMarkerSourceDrafthandles mode transitions and on-demand storage interplay; checklazyPlaybackForModeandlazyPlaybackCarriedByStorageif staged lazy-playback values behave unexpectedly.Macroscope summarized 0922a8d.