From 24a7ca81e58e4cc4b54d658fa5befc69f6a5498f Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 30 Aug 2026 21:30:00 -0700 Subject: The migration round trip stops eating its own homework: the ?migrated= return is stashed synchronously at boot and claimed whenever the wallet actually opens (the old 1.5s one-shot silently dropped it), the wizard's 'I'm done, continue' state survives the trip to coinos.io as a persisted step, the legacy page shows the claim in progress instead of re-asking, and a finished claim advances the wizard by itself. Fresh-seed polish riding along: the spending-setup ask stops waiting out registrar round trips that only exist for restored wallets, and the header punk paints synchronously instead of after an async identity fetch Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr --- src/features/messages.js | 16 +++++++++------- src/features/names.js | 4 ++++ 2 files changed, 13 insertions(+), 7 deletions(-) (limited to 'src/features') diff --git a/src/features/messages.js b/src/features/messages.js index 637c2d1..2249c8f 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -2620,13 +2620,15 @@ export function messagesFeature(ctx) { // A seed minted seconds ago has no kind-0 anywhere — don't make the // avatar sit white while a relay lookup confirms that; paint the punk now. identityGenerated() { - identity().then((id) => { - if (!id) return; - const entry = { name: null, picture: null, t: Date.now() }; - profiles.set(id.pubkey, entry); - persistProfile(id.pubkey, entry); - scheduleRepaint(); - }).catch(() => {}); + // Synchronous on purpose: identity() can await a signer resume, and + // the header sat avatar-less for that beat. A generated seed's pubkey + // is right here — paint the punk before the next frame. + const pk = (hook('nostrLoginIdentity') || {}).pubkey || (wallet.nostr && wallet.nostr.pk); + if (!pk) return; + const entry = { name: null, picture: null, t: Date.now() }; + profiles.set(pk, entry); + persistProfile(pk, entry); + scheduleRepaint(); }, headerAvatar(pk) { // A fresh node every render: the morph keeps the live element (and its diff --git a/src/features/names.js b/src/features/names.js index ac54079..f794790 100644 --- a/src/features/names.js +++ b/src/features/names.js @@ -771,6 +771,10 @@ export function namesFeature(ctx) { // 'pending' while the restore/claim pass is still running — the wallet // screen holds spending-setup prompts until the name question is settled. namesSettled() { return checked ? 'yes' : 'pending'; }, + // A seed minted seconds ago has nothing to restore anywhere: don't make + // the spending-setup ask wait out registrar round trips that only exist + // for wallets with a history. The background claim still runs. + identityGenerated() { checked = true; }, // the onboarding wizard renders the same claim form on its username step namesClaimForm() { return claimForm(true); }, // claim a specific name (the migration flow, after coinos.io released it) -- cgit v1.2.3