From 7b7e93a6086171fec8a710063c86dbe5d4b9841f Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 3 Aug 2026 22:52:54 -0700 Subject: Give the nostr settings page a way to reconnect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The app could tell you your signer wasn't connected and then send you somewhere with nothing to click: once an account was linked, the nostr card showed only an npub. It now shows connected/not connected, says what's missing, and offers the same signer options as signing in — refusing a different account rather than quietly swapping identities, since this is a reconnect and not a login. Pasted keys go back to not being persisted at all. Storing one would have survived a reload, but the UI promises a pasted key is used once and never kept, and that promise is worth more than saving a paste; those logins reconnect from this card like any other. The chat banner now tracks the live signer alone. The flag that suppressed it after a reconnect would also have hidden a later genuine disconnect. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi --- src/features/messages.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/features/messages.js') diff --git a/src/features/messages.js b/src/features/messages.js index 7f21d53..e9d1799 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -1232,7 +1232,7 @@ export function messagesFeature(ctx) { // missing — so this offers to fetch it back rather than to log in again. function signerNotice() { const id = hook('nostrLoginIdentity'); - if (!id || id.signer || ui.msgReconnected) return null; + if (!id || id.signer) return null; return h('div', { class: 'row gap6 chat-signer-off', style: 'align-items:center' }, h('span', { class: 'small muted grow' }, t('msgSignerOff')), h('button', { @@ -1241,7 +1241,7 @@ export function messagesFeature(ctx) { ui.msgReconnecting = true; render(); const s = await hook('nostrLoginResume'); ui.msgReconnecting = false; - if (s) { ui.msgReconnected = true; toast(t('msgSignerBack')); } + if (s) toast(t('msgSignerBack')); else { ui.chatOpen = false; ui.screen = 'wallet'; ui.tab = 'settings'; ui.settingsPage = 'nostr'; } render(); }, -- cgit v1.2.3