Fix settings form state ownership - #1669
Open
skyfallwastaken wants to merge 2 commits into
Open
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-01a05ac8-06f4-747e-9645-75acf8e495d6 Co-authored-by: Amp <amp@ampcode.com>
Contributor
Greptile SummaryThe PR moves editable settings values from direct mutation of Inertia props into locally owned Svelte state that resynchronizes when fresh server props arrive.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Important Files Changed
Reviews (2): Last reviewed commit: "Preserve settings state during SSR" | Re-trigger Greptile |
Amp-Thread-ID: https://ampcode.com/threads/T-01a05ac8-06f4-747e-9645-75acf8e495d6 Co-authored-by: Amp <amp@ampcode.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary of the problem
Settings controls mutated nested Inertia props directly, leaving editable state without a clear local owner or an explicit resynchronisation path when Rails returned fresh props.
Describe your changes
Editors, Notifications, Privacy and Slack & GitHub now bind through minimal local scalar state that resynchronises from the corresponding user prop. Editors continues to derive the goals control state from the editable display style. Browser coverage verifies dependent state and restoration after a rejected update.
Appearance keeps its overrideable derived theme value because it already follows prop updates without mutating the user prop.
Screenshots / Media
No visual changes.