Skip to content

feat: phase-based passkey wizard with inline stepper#125

Open
erdemyerebasmaz wants to merge 2 commits intomainfrom
feat/onboarding-stepper
Open

feat: phase-based passkey wizard with inline stepper#125
erdemyerebasmaz wants to merge 2 commits intomainfrom
feat/onboarding-stepper

Conversation

@erdemyerebasmaz
Copy link
Contributor

@erdemyerebasmaz erdemyerebasmaz commented Mar 13, 2026

Guided passkey onboarding wizard that adapts to new and returning users, with reliable label storage and FIDO-standard icons.

Summary

  • Rewrites PasskeyPage as a phase-based state machine that detects existing passkeys on mount via listLabels() WebAuthn call
  • New users get a 3-step flow (Create Passkey → Connect to Nostr → Initialize Glow), returning users get a streamlined 2-step flow (Your Label → Initialize Glow)
  • Replaces overlay stepper with an inline top-bar stepper integrated into the page layout
  • Restructures passkeyPrfProvider with pure WebAuthn functions, injectable config, and fresh Passkey instance per operation (removes singleton caching to prevent stale state)
  • Adds intermediate confirmation screens ensuring every WebAuthn prompt is preceded by a user interaction

Label input improvements

  • "Create a new label" row highlights on focus and stays selected when input is cleared (sticky selection mode)
  • 24-character limit, alphanumeric + spaces only, case-insensitive duplicate detection with inline error
  • New labels stored to Nostr relays via explicit new-storing phase (replaces fire-and-forget storeLabel which caused a surprise WebAuthn prompt and silently failed)
  • Context-aware UI: returning users see "Storing label…" / "Label Stored" instead of "Connecting to Nostr…" / "Connected to Nostr"

Icon updates

  • Replaces FingerprintIcon with FIDO Alliance standard PasskeyIcon (platform-agnostic — passkeys don't always use biometrics)
  • Two-tone depth matching the official FIDO icon: person at full color, key left half at 90% opacity, key right half at full color
  • Replaces UploadIcon with NostrKeyIcon (key/plug from nwc.dev) for the label picker screen

Test plan

  • New user: Use Passkey → spinner (Authenticating…) → WebAuthn fails (no passkey) → Review → I understand → Create Passkey → Continue → WebAuthn create → Passkey Created → Connect → WebAuthn + Nostr → Connected to Nostr → Initialize Glow → WebAuthn → Initializing Glow
  • Returning user (existing label): Use Passkey → spinner (Authenticating… → Discovering labels…) → WebAuthn → label picker → Initialize Glow → WebAuthn → Initializing Glow
  • Returning user (new label): Use Passkey → spinner (Authenticating… → Discovering labels…) → WebAuthn → label picker → type new label → Continue → Storing label… → WebAuthn → Label Stored → Initialize Glow → WebAuthn → Initializing Glow
  • Returning user (0 labels on relay): Use Passkey → spinner (Authenticating… → Discovering labels…) → WebAuthn → picker with "Default" pre-filled → Continue → Storing label… → WebAuthn → Label Stored → Initialize Glow → WebAuthn → Initializing Glow
  • Label validation: 24-char max enforced, special characters rejected, duplicate names show error + disable button, clearing input keeps "Create a new label" selected
  • Error handling: Cancel WebAuthn during create/store/connect → error shown with Retry/Go Back. Go Back routes to previous interactive screen for both flows. Canceling the initial detection prompt routes to the new-user flow.
  • Back button navigates home and resets state
  • npx tsc --noEmit passes

@vercel
Copy link

vercel bot commented Mar 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
breez-glow-web Ready Ready Preview, Comment Mar 13, 2026 6:08pm
breez-sdk-spark-example Ready Ready Preview, Comment Mar 13, 2026 6:08pm
savage-glow-web Ready Ready Preview, Comment Mar 13, 2026 6:08pm

Each WebAuthn operation (listLabels, getWallet, storeLabel, createPasskey)
now creates a fresh Passkey instance internally, ensuring every prompt is
preceded by a user interaction. Adds createPasskey and setPasskeyMode
exports. Removes singleton caching from passkeyPrfProvider.
Replace overlay stepper with a horizontal top-bar StepperBar that renders
inline in PasskeyPage. The page manages a phase state machine covering
both new-user (Create Passkey → Connect to Nostr → Initialize) and
returning-user (Your Label → Initialize) flows.

- Add StepperBar component with numbered circles and connector lines
- Add PasskeyIcon (FIDO Alliance standard, three-tone depth) and
  NostrKeyIcon for the label picker
- Label input: 24-char alphanumeric limit, duplicate detection,
  sticky manual-input mode
- Explicit new-storing phase for reliable relay label storage
- Simplify App.tsx: remove overlay stepper state, signal SDK connection
  via sdkConnected prop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant