From a5bb814a68614782395e5aeb1b4ff33833abe13f Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Thu, 17 Sep 2026 14:35:25 -0400 Subject: [PATCH] Trace how far initViewer gets before the ordering sync No [pf-order] line appeared at all, and the sync call is unconditional inside initViewer, so initViewer is not reaching it. Logs on entry, on the superseded-by-a-newer-load guard, and immediately before the call, so the next reload says which. Co-Authored-By: Claude Opus 5 (1M context) --- ui/src/views/Forecast.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/src/views/Forecast.jsx b/ui/src/views/Forecast.jsx index ffedd80..59e8d0f 100644 --- a/ui/src/views/Forecast.jsx +++ b/ui/src/views/Forecast.jsx @@ -685,8 +685,9 @@ export default function Forecast({ sources = [], sourceId, versions = [], versio } async function initViewer(vid, sid) { + dbgOrder('initViewer start', { vid, sid, hasViewer: !!viewerRef.current }) const viewer = viewerRef.current - if (!viewer) return + if (!viewer) return dbgOrder('initViewer: no viewer element') const myId = ++initIdRef.current setLoading(true) setLargeDataset(false) @@ -724,7 +725,7 @@ export default function Forecast({ sources = [], sourceId, versions = [], versio if (rowCount >= 500000) setLargeDataset(true) - if (myId !== initIdRef.current) return + if (myId !== initIdRef.current) return dbgOrder('initViewer: superseded before table') if (!workerRef.current) workerRef.current = await perspective.worker() const worker = workerRef.current @@ -797,6 +798,7 @@ export default function Forecast({ sources = [], sourceId, versions = [], versio // by the very next line and the ordering columns never appeared in the // column list. try { + dbgOrder('reached the sync call') await syncOrderExpressions() } catch (err) { // Its own try covers only restore(); save() and the builders sit outside