From e8e95bf4b9f233e496c83d5105e405c3711d7973 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Thu, 17 Sep 2026 14:29:43 -0400 Subject: [PATCH] Log every entry and exit of the ordering sync Neither the success nor the failure line appeared, and save() reports no expressions at all -- so the function is either not being called or leaving by a path that says nothing. Two of its exits were silent: the no-viewer guard, and the case where the computed expressions already match what is applied. Logs on entry, logs the inputs it actually saw (the version it resolved, its bucket_order, how many log entries carry a seq, and what it decided to build), and logs every exit. One reload should end the guessing. Co-Authored-By: Claude Opus 5 (1M context) --- ui/src/views/Forecast.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/src/views/Forecast.jsx b/ui/src/views/Forecast.jsx index 4fbd522..ffedd80 100644 --- a/ui/src/views/Forecast.jsx +++ b/ui/src/views/Forecast.jsx @@ -796,7 +796,14 @@ export default function Forecast({ sources = [], sourceId, versions = [], versio // `expressions` wholesale, so expressions applied earlier were being wiped // by the very next line and the ordering columns never appeared in the // column list. - await syncOrderExpressions() + try { + await syncOrderExpressions() + } catch (err) { + // Its own try covers only restore(); save() and the builders sit outside + // it, and a throw there would abort the rest of initViewer silently. + console.error('[pf-order] threw', err) + flash(`Column ordering failed: ${err.message || err}`, 'error') + } if (viewer._pspUpdate) viewer.removeEventListener('perspective-config-update', viewer._pspUpdate) viewer._pspUpdate = async () => {