Conversation
Dzejkop
force-pushed
the
codex/persistent-browser-demo
branch
2 times, most recently
from
September 9, 2026 15:47
deb1ee9 to
e1cdf67
Compare
Dzejkop
added this pull request to stack #529
September 10, 2026 09:20
Dzejkop
force-pushed
the
codex/persistent-browser-demo
branch
from
September 10, 2026 09:33
e1cdf67 to
19a9a8c
Compare
Dzejkop
force-pushed
the
codex/persistent-browser-demo
branch
from
September 10, 2026 09:39
19a9a8c to
aa77e1e
Compare
Dzejkop
marked this pull request as ready for review
September 10, 2026 12:22
Dzejkop
requested review from
Guardiola31337,
Takaros999,
danielle-tfh,
kilianglas,
murph,
paolodamico and
philsippl
as code owners
September 10, 2026 12:22
Dzejkop
force-pushed
the
codex/persistent-browser-demo
branch
from
September 10, 2026 12:28
aa77e1e to
6e36f51
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6e36f51. Configure here.
| @@ -79,6 +111,8 @@ export default function Home() { | |||
| if (status.state === "finalized") break; | |||
| await new Promise((resolve) => setTimeout(resolve, 500)); | |||
| } | |||
| saved.registered = true; | |||
| saveDemoProfile(saved); | |||
There was a problem hiding this comment.
Failed save leaves profile flags inconsistent
Low Severity
register and issue set saved.registered / saved.credentialIssued on the live profile.current object before saveDemoProfile returns. A failed write leaves memory marked complete while React state and localStorage stay incomplete, so Derive stays enabled and can persist a new seed as already registered.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 6e36f51. Configure here.
piohei
previously approved these changes
Sep 10, 2026
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.


Reopen the same staging demo account and encrypted OPFS databases after a page reload. Previously every load generated a new database key, storage namespace, and seed, leaving the previous databases inaccessible.
Validation: production Next.js build and TypeScript checks pass; four persistence tests pass. A Chrome smoke check verified reload key/identity retention, re-derived identity retention, restored-progress button gating, and corrupt-profile rejection. No staging registration or issuance calls were made.
Stacked above #523. This PR changes only the demo.
Note
Low Risk
Demo-only localStorage persistence and example/docs updates; no production WalletKit or auth path changes.
Overview
The Next.js examples/web demo no longer throws away identity on every reload: it persists a versioned demo profile in
localStorage(storageId,databaseKey, seed, and registration/issuance flags) and passes the savedstorageIdand key intoinitializeWalletKit()so encrypted OPFS SQLite can be reopened after refresh.demo-profile.tsvalidates stored JSON (version, key shapes, progress consistency) and fails closed on corrupt or unsupported profiles instead of silently rotating keys.page.tsxrestores UI gating from saved progress, updates the profile when registering, issuing, or deriving a new seed, and requires authenticator initialization before proof generation. Fourbun testcases cover persistence and error paths; docs and root README point atexamples/weband call out staging-only raw key retention.The example package is renamed to
walletkit-web-example; changes are limited to the demo and documentation.Reviewed by Cursor Bugbot for commit bc85fd2. Bugbot is set up for automated code reviews on this repo. Configure here.