DX: add a dev:reset script that clears local storage - #1576
Merged
Baskarayelu merged 4 commits intoJul 30, 2026
Conversation
Conflict resolution for PR Remitwise-Org#1576.
Conflict resolution for PR Remitwise-Org#1576.
Conflict resolution for PR Remitwise-Org#1576.
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
npm run dev:resetprints the URL (http://localhost:<port>/?dev-reset) that clears the app'slocalStorage. A Node script can't reach into a running browser's storage directly, so the actual clearing happens client-side: a newDevResetHandler(mounted inProviders.tsx, sameSuspense-wrappeduseSearchParamspattern as the existingDevRequestIdDisplay) watches for the?dev-resetparam, clears every key in the newDEV_RESET_LOCAL_STORAGE_KEYSregistry (theme preference, display density, "what's new" seen-state, dev mode), then strips the param so a refresh doesn't re-clear.Testing
node scripts/dev-reset.mjs-- prints the expected URLnode node_modules/vitest/vitest.mjs run ... tests/unit/dev/resetLocalStorage.test.ts-- 3/3 passnpm run test:unit:vitest-- 300 passing (was 297 onmain), zero regressionsnpx eslinton all touched files -- cleannpx tsc --noEmit-- no new errors in any touched fileCloses #1500