Make existing-key import discoverable — and available mid-onboarding#937
Open
tlongwell-block wants to merge 2 commits into
Open
Make existing-key import discoverable — and available mid-onboarding#937tlongwell-block wants to merge 2 commits into
tlongwell-block wants to merge 2 commits into
Conversation
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>
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>
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.
Summary
Two commits, same goal: a returning relay member (new laptop, fresh dev instance) can find and reuse their existing key.
Copy (commit 1):
Mid-onboarding import (commit 2):
NostrKeyImportForm; profile step gets an "I already have a key" ghost link that opens it.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 typecheckpnpm exec biome check(touched files)playwright test tests/e2e/onboarding.spec.ts— 21/21 passed, incl. new testonboarding can import an existing key when the workspace is already set up