aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-04 18:15:54 -0700
committerAdam Soltys <[email protected]>2026-09-04 18:15:54 -0700
commit4892b10dcfc6db32097a7cb325737dfb80f5406c (patch)
tree8171f1ed91a92429db0629c89432b355cce4269b
parent19c56ef572a0c6c9b6dcaa85033dd407ace85425 (diff)
downloadcoinosv3-4892b10dcfc6db32097a7cb325737dfb80f5406c.tar.gz
coinosv3-4892b10dcfc6db32097a7cb325737dfb80f5406c.zip
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
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MGzU12QrAA4G6BYGzGVdXz
-rw-r--r--src/features/messages.js15
1 files changed, 14 insertions, 1 deletions
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))));
}