Skip to content

fix(onboarding): skip onboarding when relay already has a profile#973

Merged
tlongwell-block merged 7 commits into
mainfrom
fix/skip-onboarding-existing-profile
Jun 11, 2026
Merged

fix(onboarding): skip onboarding when relay already has a profile#973
tlongwell-block merged 7 commits into
mainfrom
fix/skip-onboarding-existing-profile

Conversation

@tlongwell-block

Copy link
Copy Markdown
Collaborator

Problem

When a user reclones the repo or gets a new app data directory (e.g. the Tauri bundle identifier changes during the Sprout → Buzz rename), the WebView's localStorage is empty. The onboarding gate checks localStorage for a completion flag — if it's missing, onboarding is shown even though:

  1. The user's identity.key is already on disk (valid nsec)
  2. The relay already has a kind:0 profile with their display name

This forces existing users through the full onboarding flow unnecessarily.

Fix

In useFirstRunOnboardingGate, after the profile query settles, check if the relay returned a profile with a non-empty displayName. If so, the user has already completed onboarding previously — auto-mark it complete (persist to localStorage) and skip straight to the app.

This means:

  • New users (no kind:0 on relay): still see full onboarding ✓
  • Existing users (kind:0 exists with display name): skip onboarding ✓
  • Shared identity worktrees: still fast-pathed as before ✓

Also

  • Renamed "Continue using Nostr" → "I have my own Nostr key" (clearer intent)
  • Updated copy to reference Buzz instead of Sprout in the key import page

… this identity

If the user's pubkey already has a kind:0 profile with a display name on
the relay, they've previously completed onboarding (possibly from another
machine or app data directory). In that case, auto-mark onboarding as
complete and go straight to the app instead of forcing them through the
setup flow again.

Also renames 'Continue using Nostr' to 'I have my own Nostr key' for
clarity, and updates copy to reference Buzz instead of Sprout.
Cherry-picks the mid-onboarding key import from #937:
- Extracts NostrKeyImportForm as a shared component
- Adds 'I already have a key' button on the profile step
- Importing a key remounts the flow keyed on the new pubkey, so an
  existing relay profile auto-seeds the steps (and our earlier commit
  auto-completes onboarding if the profile has a display name)
@tlongwell-block tlongwell-block force-pushed the fix/skip-onboarding-existing-profile branch from f8019ef to 3703bd7 Compare June 11, 2026 15:20
The 'failed saved profile saves can continue without retrying' test
assumed a user with an existing relay profile would still see onboarding.
With the auto-skip logic, that scenario is now impossible — users with a
display name on the relay skip onboarding entirely. Replace with a test
that verifies the new auto-complete behavior.
When importing a key that already has a relay profile with a display
name, onboarding auto-completes. Update the 'import existing key' and
'membership denial import' tests to expect landing in the app instead
of staying in onboarding.
- 'welcome can continue using an existing Nostr key': after importing
  alice's key (which has a relay profile), onboarding auto-completes
- 'identity fallback text': use BLANK_TYLER_IDENTITY so the mock returns
  an empty display_name and the test stays in onboarding as intended
- 'existing relay profile prefills': replaced with auto-skip verification
  since users with an existing profile no longer see onboarding
Use BLANK_TYLER_IDENTITY (no display name) so the auto-skip logic
doesn't fire and the test can verify stepper UX while staying in
onboarding. All 21 onboarding tests pass locally.
@tlongwell-block tlongwell-block merged commit e4a0824 into main Jun 11, 2026
15 checks passed
@tlongwell-block tlongwell-block deleted the fix/skip-onboarding-existing-profile branch June 11, 2026 17:09
tlongwell-block pushed a commit that referenced this pull request Jun 12, 2026
Co-authored-by: npub1mprnacetjua2xx3p5eddmhxyk6wv929ymm5py8kd2xfxurxahspqqlgyta <d8473ee32b973aa31a21a65adddcc4b69cc2a8a4dee8121ecd51926e0cddbc02@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: npub1mprnacetjua2xx3p5eddmhxyk6wv929ymm5py8kd2xfxurxahspqqlgyta <d8473ee32b973aa31a21a65adddcc4b69cc2a8a4dee8121ecd51926e0cddbc02@sprout-oss.stage.blox.sqprod.co>

* origin/main: (35 commits)
  feat(huddle): sentence-at-a-time voice-mode guidelines for lower TTS latency (#996)
  Shard desktop Playwright CI jobs (#992)
  chore(release): release version 0.3.18 (#995)
  Video Player Improvements  (#993)
  Improve first-run welcome setup (#970)
  fix(release): use legacy updater key secret (#991)
  Replace built-in personas with Fizz (#987)
  docs(buzz-acp): rewrite Communication Patterns for mention accuracy and threading clarity (#982)
  chore(justfile): build git-credential-nostr in dev and staging recipes (#980)
  Fix Buzz command migration for saved agents (#979)
  fix(desktop): resolve effective model and prompt from persona in display path (#972)
  docs: clean up remaining Buzz references (#977)
  chore(release): release version 0.3.17 (#976)
  fix(onboarding): skip onboarding when relay already has a profile (#973)
  docs: finish Buzz rename cleanup (#974)
  fix(desktop): let channel members bypass mention agent gate (#965)
  Rename desktop app to Buzz (#960)
  feat(desktop): open profile panel from MembersSidebar rows (#962)
  feat(desktop): per-event notification sounds and alert controls (#968)
  fix(desktop): make header chrome zoom-correct and tidy split-pane (#941)
  ...

# Conflicts:
#	crates/buzz-agent/README.md
#	crates/buzz-agent/src/config.rs
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.

3 participants