Skip to content

Make existing-key import discoverable — and available mid-onboarding#937

Open
tlongwell-block wants to merge 2 commits into
mainfrom
eva/key-import-blurb
Open

Make existing-key import discoverable — and available mid-onboarding#937
tlongwell-block wants to merge 2 commits into
mainfrom
eva/key-import-blurb

Conversation

@tlongwell-block

@tlongwell-block tlongwell-block commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two commits, same goal: a returning relay member (new laptop, fresh dev instance) can find and reuse their existing key.

Copy (commit 1):

  • Welcome screen ghost button: "Continue using Nostr" → "I already have a key"
  • Import page heading "Use your existing key" + blurb saying the relay profile (name + avatar) is restored automatically — Revamp first-run onboarding #924 already does this, we just never said so
  • Submit: "Continue with this key"

Mid-onboarding import (commit 2):

  • Previously the import option only existed on WelcomeSetup, which renders only when no workspace is configured. With a workspace already set up you land straight on the profile step with no way to reuse a key (exactly how Tyler hit it).
  • Extracted the paste-or-drop nsec form into a shared NostrKeyImportForm; profile step gets an "I already have a key" ghost link that opens it.
  • Import reuses the existing membership-denied identity-swap path: flow remounts keyed on pubkey, relay profile reseeds the steps; a key that already completed onboarding here skips straight into the app.
  • Shared-form testids renamed welcome-nostr-*nostr-import-*.

Context: requested by Tyler in #sprout-frontend (thread bf411361).

Note: conflicts trivially with #866 (arcade onboarding) which rewrites these files — happy to rebase either direction.

Checks

  • pnpm typecheck
  • pnpm exec biome check (touched files)
  • playwright test tests/e2e/onboarding.spec.ts — 21/21 passed, incl. new test onboarding can import an existing key when the workspace is already set up

The welcome screen's third option read "Continue using Nostr" — protocol
jargon a returning member (new laptop, fresh dev instance) won't scan
for. Rename it to "I already have a key" and note on the import page
that an existing relay profile (name + avatar) is restored
automatically, which the onboarding flow already does.

Copy-only change: WelcomeSetup heading/blurb/submit label, App.tsx
connecting-state ghost button, and the matching e2e heading assertion.

Co-authored-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@sprout-oss.stage.blox.sqprod.co>
@tlongwell-block tlongwell-block requested a review from a team as a code owner June 10, 2026 02:39
The key-import option only existed on the WelcomeSetup screen, which
renders solely when no workspace is configured. A returning member
whose workspace is already set up (new laptop with synced config, dev
worktree, re-onboarding) lands directly on the profile step and never
sees a way to reuse their key.

Extract the paste-or-drop nsec form out of WelcomeSetup into a shared
NostrKeyImportForm and add an "I already have a key" link on the
profile step that opens it. Import reuses the membership-denied swap
path: the identity changes, the flow remounts keyed on pubkey, and the
new key's relay profile reseeds the steps — a key that already
completed onboarding on this machine skips straight into the app.

Adds an e2e test for the workspace-already-set-up import scenario;
shared-form testids renamed welcome-nostr-* -> nostr-import-*.

Co-authored-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@sprout-oss.stage.blox.sqprod.co>
Signed-off-by: npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67d <011987e296fd5006292d2f930b574be47c7801048d1983c46c425d3c95f0cffd@sprout-oss.stage.blox.sqprod.co>
@tlongwell-block tlongwell-block changed the title Make existing-key import discoverable on the welcome screen Make existing-key import discoverable — and available mid-onboarding Jun 10, 2026
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