From 5676ffff812e2e1c3459d52128883b7494d5ebff Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 28 Sep 2026 22:41:01 -0700 Subject: A quoted note that was slow to arrive turns into its card instead of staying a "view note" link. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A feed row keeps its first look, and a quote that missed the readiness gate froze as a link — with nothing asking for the note again. The frozen row now keeps asking (the existing 30s retry) and takes the card once the note and its own avatar/pictures are warm. quote-card-test: reach the feed through the bottom nav, seed the author's profile, and --slow drops the first ask for the quote to cover this. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Du1qT1wbkYwYK6zkGH79Rp --- src/features/messages.js | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/features/messages.js b/src/features/messages.js index bf3c9db..701b131 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -5318,15 +5318,32 @@ export function messagesFeature(ctx) { return c; } + // A feed row that froze before its quote arrived showed a link — and + // nothing asked for the note again. Keep asking, and once the note and its + // own faces/pictures are in, the row takes the card. + function quoteWarm(ref) { + const c = quotedNote(ref); + if (c.ev && !c.warm && !c.warming) { + c.warming = noteReady(c.ev, Date.now() + READY_MS, 1).catch(() => {}) + .then(() => { c.warm = true; c.warming = null; scheduleRepaint(); }); + } + return c; + } + // The card. Deliberately not a noteRow: a quote is context, not another // post to act on — no reply, no boost, no zap of its own. Tapping it opens // the note properly, which is where those live. function quoteCard(ref, depth) { if (feedPaint && !feedPaint.quotes.has(ref.id)) feedPaint.quotes.set(ref.id, { ...quoted.get(ref.id) }); - const c = feedPaint ? feedPaint.quotes.get(ref.id) : quotedNote(ref); - if (feedPaint && !c?.ev) return h('a', { - href: '#', onClick: (e) => { e.preventDefault(); e.stopPropagation(); openNoteRef(ref); }, - }, t('noteRefLink')); + let c = feedPaint ? feedPaint.quotes.get(ref.id) : quotedNote(ref); + if (feedPaint && !c?.ev) { + const live = quoteWarm(ref); + if (!(live.ev && live.warm)) return h('a', { + href: '#', onClick: (e) => { e.preventDefault(); e.stopPropagation(); openNoteRef(ref); }, + }, t('noteRefLink')); + c = { ...live }; + feedPaint.quotes.set(ref.id, c); + } if (c.status === 'loading') { return h('div', { class: 'quote-card quote-loading' }, h('span', { class: 'spinner sm' }), h('span', { class: 'small faint' }, t('noteRefLoading'))); -- cgit v1.2.3