Uh oh!
There was an error while loading. Please reload this page.
Feat: edit Display Name & remove "continue" step - #987
Conversation
📝 WalkthroughWalkthroughThis PR replaces the splash-screen "Continue" button for returning users with automatic biometric authentication, and adds display-name loading, caching, and editing on the home screen. Users can now edit their display name via a new bottom sheet on the wallet home screen, and returning users automatically attempt biometric unlock instead of tapping "Continue." ChangesAuthentication, Display Name, and User Profile Management
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
infrastructure/eid-wallet/src/routes/+page.svelte (1)
63-81:⚠️ Potential issue | 🟠 Major | ⚡ Quick winDon't default failed user-state reads to the first-time-user flow.
If
getGlobalState()never resolves here, or either state read throws,onboardingCompleteanduserExistsstayfalseand the code later falls into the Create/Restore drawer. That misclassifies returning users during slow init or transient state errors and defeats the new auto-auth path.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@infrastructure/eid-wallet/src/routes/`+page.svelte around lines 63 - 81, The current logic defaults onboardingComplete and userExists to false when getGlobalState() is slow or reads throw, causing returning users to be misrouted; change onboardingComplete and userExists to start as undefined (or null) and only set them to boolean true/false after successfully reading globalState.isOnboardingComplete and globalState.userController.user; in the retry/failure paths (after the retries loop or inside the catch) leave them undefined and surface a loading/error state instead of falling back to the Create/Restore drawer; update any downstream checks that inspect onboardingComplete/userExists to treat undefined as "unknown" and defer routing until a definitive boolean is available.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@infrastructure/eid-wallet/src/lib/fragments/SplashScreen/SplashScreen.svelte`:
- Around line 113-129: The two anchor elements in SplashScreen.svelte that
render "Terms & Conditions" and "Privacy Policy" currently point to the same
generic URL; update the href attributes on the corresponding <a> tags in the
SplashScreen.svelte fragment so each link targets its specific document (replace
the first link with the real Terms & Conditions URL and the second with the real
Privacy Policy URL), preserving target="_blank" and rel="noopener noreferrer"
and keeping class="text-primary".
In `@infrastructure/eid-wallet/src/lib/utils/postLogin.ts`:
- Around line 55-65: The code sets sessionStorage key "deepLinkData" from
pendingDeepLink before awaiting goto("/scan-qr") but only removes
"pendingDeepLink" in the catch, leaving stale "deepLinkData" if navigation
fails; update the error handling in the pendingDeepLink block (the try/catch
around sessionStorage.setItem("deepLinkData") and await goto("/scan-qr")) to
also remove sessionStorage.removeItem("deepLinkData") when an exception is
caught so the stale payload cannot be replayed, ensuring both pendingDeepLink
and deepLinkData are cleared on navigation failure.
---
Outside diff comments:
In `@infrastructure/eid-wallet/src/routes/`+page.svelte:
- Around line 63-81: The current logic defaults onboardingComplete and
userExists to false when getGlobalState() is slow or reads throw, causing
returning users to be misrouted; change onboardingComplete and userExists to
start as undefined (or null) and only set them to boolean true/false after
successfully reading globalState.isOnboardingComplete and
globalState.userController.user; in the retry/failure paths (after the retries
loop or inside the catch) leave them undefined and surface a loading/error state
instead of falling back to the Create/Restore drawer; update any downstream
checks that inspect onboardingComplete/userExists to treat undefined as
"unknown" and defer routing until a definitive boolean is available.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1200afd2-03c5-4f28-b364-16234b888d8f
📒 Files selected for processing (9)
infrastructure/eid-wallet/src/lib/fragments/SplashScreen/SplashScreen.svelteinfrastructure/eid-wallet/src/lib/ui/PinDots/PinDots.svelteinfrastructure/eid-wallet/src/lib/utils/personalBinding.tsinfrastructure/eid-wallet/src/lib/utils/postLogin.tsinfrastructure/eid-wallet/src/routes/(app)/main/+page.svelteinfrastructure/eid-wallet/src/routes/(app)/main/components/EditNameSheet.svelteinfrastructure/eid-wallet/src/routes/(app)/main/components/Greeting.svelteinfrastructure/eid-wallet/src/routes/(auth)/login/+page.svelteinfrastructure/eid-wallet/src/routes/+page.svelte
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description of change
Issue Number
Closes#982
Closes#981
Type of change
How the change has been tested
Change checklist
Summary by CodeRabbit
New Features
Bug Fixes
Refactor