diff --git a/frontend/packages/dashboard/src/tabs.js b/frontend/packages/dashboard/src/tabs.js index f8fb9bd8..60feefbb 100644 --- a/frontend/packages/dashboard/src/tabs.js +++ b/frontend/packages/dashboard/src/tabs.js @@ -1564,6 +1564,13 @@ window.marked = marked; // no-op when the section is missing. `question_added` / // `question_resolved` SSE events route through here. if (!root) return; + // Snapshot open
state before wiping the DOM so SSE-triggered + // calls (applyQuestionAdded / applyQuestionResolved) preserve it just + // as well as the full refreshState path. The double-restore that happens + // when renderQuestions is called from inside refreshState is harmless — + // restoreOpenDetails is a no-op when the set is empty, and re-opening an + // already-open
is idempotent. + const openDetails = snapshotOpenDetails(); root.replaceChildren(); const fmt = (n) => new Date(n * 1000).toISOString().replace('T', ' ').slice(0, 19); const allPending = questionsState.pending; @@ -1741,6 +1748,7 @@ window.marked = marked; details.append(hul); root.append(details); } + restoreOpenDetails(openDetails); } // Format a remaining-seconds count as the `⏳ …` TTL chip text on a