feat: add unsaved changes confirmation to settings page (Closes #1086) - #1154
Open
sojetunde8 wants to merge 4 commits into
Open
feat: add unsaved changes confirmation to settings page (Closes #1086)#1154sojetunde8 wants to merge 4 commits into
sojetunde8 wants to merge 4 commits into
Conversation
ogazboiz
requested changes
Aug 3, 2026
ogazboiz
left a comment
Contributor
There was a problem hiding this comment.
good instinct on #1086 and the test coverage is appreciated, but two design problems block this:
- settings on main persist immediately (toggleTheme writes localStorage on click), yet isDirty stays true forever after any change, so users get warned about "unsaved" changes that are already saved. either introduce a real draft-plus-save model or reset initialValuesRef after each apply.
- the guard only wraps the two in-page buttons. all navbar links and any other internal Link navigation bypass it entirely, so the stated goal is not met. cover app-internal navigation or scope the issue down explicitly.
- small ones: the Link to button swap loses link semantics, and there is a stray blank-line diff where handleDisconnect was touched.
if you want to keep contributing, join us on Telegram: https://t.me/+DOylgFv1jyJlNzM0
Contributor
Author
Rsolved, @ogazboiz |
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.
Closes #1086
Summary
beforeunloadhandler to warn on tab close, browser refresh, and back/forward navigationwindow.confirmprompts for in-app navigation via the "Connect Wallet" button and "Disconnect Wallet" button when dirty<Link>with a<button>to intercept navigation with confirmationTesting