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) <noreply@anthropic.com>
This commit is contained in:
Paul Trowbridge 2026-09-17 14:35:25 -04:00
parent e8e95bf4b9
commit a5bb814a68

View File

@ -685,8 +685,9 @@ export default function Forecast({ sources = [], sourceId, versions = [], versio
} }
async function initViewer(vid, sid) { async function initViewer(vid, sid) {
dbgOrder('initViewer start', { vid, sid, hasViewer: !!viewerRef.current })
const viewer = viewerRef.current const viewer = viewerRef.current
if (!viewer) return if (!viewer) return dbgOrder('initViewer: no viewer element')
const myId = ++initIdRef.current const myId = ++initIdRef.current
setLoading(true) setLoading(true)
setLargeDataset(false) setLargeDataset(false)
@ -724,7 +725,7 @@ export default function Forecast({ sources = [], sourceId, versions = [], versio
if (rowCount >= 500000) setLargeDataset(true) 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() if (!workerRef.current) workerRef.current = await perspective.worker()
const worker = workerRef.current 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 // by the very next line and the ordering columns never appeared in the
// column list. // column list.
try { try {
dbgOrder('reached the sync call')
await syncOrderExpressions() await syncOrderExpressions()
} catch (err) { } catch (err) {
// Its own try covers only restore(); save() and the builders sit outside // Its own try covers only restore(); save() and the builders sit outside