aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/messages.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-28 22:41:01 -0700
committerAdam Soltys <[email protected]>2026-09-28 22:41:01 -0700
commit5676ffff812e2e1c3459d52128883b7494d5ebff (patch)
treeb2b0b3ae90520cda6e59f80043574195f5fd1736 /src/features/messages.js
parent615e8fa6ea643660ae6b6d35e669d6ad4816728a (diff)
downloadcoinosv3-5676ffff812e2e1c3459d52128883b7494d5ebff.tar.gz
coinosv3-5676ffff812e2e1c3459d52128883b7494d5ebff.zip
A quoted note that was slow to arrive turns into its card instead of staying a "view note" link.
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 <[email protected]> Claude-Session: https://claude.ai/code/session_01Du1qT1wbkYwYK6zkGH79Rp
Diffstat (limited to 'src/features/messages.js')
-rw-r--r--src/features/messages.js25
1 files changed, 21 insertions, 4 deletions
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')));