From 215f51526a3d8d0c185887674bd9532d83ea3564 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 4 Aug 2026 01:59:29 -0700 Subject: The wizard can no longer trap anyone MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Publishing the profile on the avatar step is best-effort now — a signer that can't sign (a sleeping phone bunker) skips it with a toast instead of erroring the Continue button forever. And once a wallet exists, the logo leads home even out of a resumed wizard. Co-Authored-By: Claude Fable 5 --- src/app.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index 4b6dd6b..38d1e6e 100644 --- a/src/app.js +++ b/src/app.js @@ -1808,7 +1808,10 @@ function goHome() { // so the logo is always a way back to your wallet. if (activeAccount()) { ui.screen = 'wallet'; - // Home means home: clear every takeover a feature or subpage may hold — + // Home means home: with a wallet already minted, even the wizard yields — + // its remaining steps are niceties, not something to be trapped in. + if (ui.onb || onbInProgress()) { ui.onb = null; try { localStorage.removeItem(ONB_STEP_KEY); } catch {} } + // Clear every takeover a feature or subpage may hold — // chat, profile, ark exit, settings subpages, the address rescan list. ui.chatOpen = false; ui.profilePk = null; @@ -2306,7 +2309,12 @@ function onboardScreen() { // their face on every nostr client, not just here const picture = o.avatar || (me ? 'https://v3.coinos.io/' + punkUrl(me) : undefined); const fields = { name: addr ? addr.split('@')[0] : undefined, picture }; - if (fields.name || fields.picture) await featureHook('publishProfile', fields); + // Publishing the profile is a nicety — a signer that can't sign + // right now (a sleeping phone bunker) must not trap the wizard. + if (fields.name || fields.picture) { + try { await featureHook('publishProfile', fields); } + catch (e) { toast(t('onbProfileSkipped')); console.warn('onboarding: profile publish failed —', e.message); } + } o.step = 'success'; } catch (e) { ui.onbError = e.message; } ui.onbBusy = false; render(); -- cgit v1.2.3