From 4892b10dcfc6db32097a7cb325737dfb80f5406c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 4 Sep 2026 18:15:54 -0700 Subject: Every nostr post row carries a ↩ Reply button beside the ⚡ zap: it opens the post's thread focused on that note and puts the cursor straight in the reply box (inside an already-open thread it just re-targets the reply to that message). Verified headless on /adam: 51 rows all carry the button, tapping one lands with the thread reply input focused MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01MGzU12QrAA4G6BYGzGVdXz --- src/features/messages.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/features') diff --git a/src/features/messages.js b/src/features/messages.js index 20dd4ca..a75ae2a 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -1891,7 +1891,20 @@ export function messagesFeature(ctx) { }, name), h('span', { class: 'small faint', style: 'white-space:nowrap' }, (isReply ? '↩ ' + t('profReplyTag') + ' · ' : '') + timeLabel(ev.created_at * 1000))), - canZap ? h('button', { class: 'btn-sm', title: t('zapTitle'), onClick: (e) => { e.stopPropagation(); zapNote(pk, ev); } }, '⚡') : null), + h('div', { class: 'row', style: 'gap:6px;flex-shrink:0' }, + // Reply on every post: opens (or re-targets) its thread and puts + // the cursor in the reply box — no hunting for the row tap. + h('button', { + class: 'btn-sm', title: t('msgReply'), onClick: (e) => { + e.stopPropagation(); + if (ui.noteThread && ui.noteThread.rootId === rootIdOf(ev)) { + ui.noteThread.focusId = ev.id; + render(); + } else openNoteThread(ev); + setTimeout(() => document.querySelector('.thread-reply-input')?.focus(), 120); + }, + }, '↩'), + canZap ? h('button', { class: 'btn-sm', title: t('zapTitle'), onClick: (e) => { e.stopPropagation(); zapNote(pk, ev); } }, '⚡') : null)), h('div', { class: 'small', style: 'white-space:pre-wrap;overflow-wrap:anywhere' }, ...noteBody(ev.content)))); } -- cgit v1.2.3