From c19fd63f1687c8fdfd38a8446e7cf936342ba4ef Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 4 Aug 2026 01:50:24 -0700 Subject: Avatars stop flashing everywhere: backgrounds, not MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A recreated decodes async — one blank frame per render, and boot renders in bursts. A CSS background paints synchronously from cache, so the profile page, chat rows, and send candidates all hold steady now. Co-Authored-By: Claude Fable 5 --- src/features/messages.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/features') diff --git a/src/features/messages.js b/src/features/messages.js index f9a2176..293ebd9 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -962,7 +962,9 @@ export function messagesFeature(ctx) { const node = p === null ? h('div', { class: cls + ' fallback loading' }) : p.picture - ? h('img', { class: cls, src: p.picture, alt: '' }) + // A background paints synchronously from cache; a fresh decodes + // async, so recreating one per render made avatars visibly flash. + ? h('div', { class: cls + ' ava-img', style: `background-image:url(${JSON.stringify(p.picture)})` }) : fallbackAvatar(h, pk, p.name, cls); if (clickable) { node.classList.add('clickable'); -- cgit v1.2.3