From 86d5609a188ce4dae248d1b56c4563bae299af31 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 28 Sep 2026 22:53:37 -0700 Subject: A thread that starts from a poll (or any non-kind-1 post) is cached too, so a reload paints its replies at once. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The thread store accepted only kind 1 and silently skipped saving a thread rooted in a kind 1068 poll — every refresh then waited on the relays behind a spinner. Also guard the profile Back listener for window-less tests. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Du1qT1wbkYwYK6zkGH79Rp --- src/features/messages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/features') diff --git a/src/features/messages.js b/src/features/messages.js index dd31f46..2a3b400 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -3025,7 +3025,7 @@ export function messagesFeature(ctx) { // reader deep in that person's posts, which read as a thread. Back (a // popstate) puts them where they were on the page they left. const profReturn = []; // [{ pk, y }] per profile opened, newest last - window.addEventListener('popstate', () => { + if (typeof window !== 'undefined') window.addEventListener('popstate', () => { const top = profReturn[profReturn.length - 1]; if (!top || ui.profilePk === top.pk) return; profReturn.pop(); -- cgit v1.2.3