From 6fa5ce85b2c0d7d4f7d041b44a39b4d45f2ff3be Mon Sep 17 00:00:00 2001 From: Jeffrey Alan Scudder Date: Mon, 2 Feb 2026 08:06:19 +0000 Subject: [PATCH] chat: fix online counter position - filter out animation qrSize fallback --- system/public/aesthetic.computer/disks/chat.mjs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/system/public/aesthetic.computer/disks/chat.mjs b/system/public/aesthetic.computer/disks/chat.mjs index 7f296f8b61..1bc053512f 100644 --- a/system/public/aesthetic.computer/disks/chat.mjs +++ b/system/public/aesthetic.computer/disks/chat.mjs @@ -1664,8 +1664,10 @@ function paint( const hudLabelHeight = hudLabelBox?.h ?? 10; // QR code size from HUD label (if present, e.g., in laer-klokken) - // QR is rendered inside the HUD buffer, so we need its pixel width - const qrSize = hudLabel?.qrSize ?? 0; // Cells = pixels (1:1) + // Only use qrSize if it's from actual QR cells (not animation state fallback) + // QR cells length is typically 21-29 for URLs, hudAnimationState.qrSize is 80 + const rawQrSize = hudLabel?.qrSize ?? 0; + const qrSize = rawQrSize > 0 && rawQrSize < 50 ? rawQrSize : 0; // Filter out animation default (80) const qrTotalWidth = qrSize > 0 ? qrSize + 6 : 0; // QR + 2px border + 4px gap // Position presence text under the HUD label, shifted right by QR width -- knotmirror 0.0.1