From 02a0db386ec7dfac003b39ac601d7d150f53cd88 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Thu, 17 Sep 2026 03:12:38 -0400 Subject: [PATCH] Send the whole config when changing row depth A partial restore({ group_by_depth: d }) had no effect -- the buttons did nothing, and the depth appearing to survive every rebuild was simply a tree that had never been collapsed. So the full config goes back with the one field changed. table is dropped from it: the table is loaded by reference, and a stale name in a restored config fails the lookup -- the same reason every other restore in this file strips it. If this still does nothing then group_by_depth is not applied when the view is constructed, and the fix belongs in the fork beside split_by_depth. Co-Authored-By: Claude Opus 5 (1M context) --- ui/src/views/Forecast.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/src/views/Forecast.jsx b/ui/src/views/Forecast.jsx index f3bc304..977294b 100644 --- a/ui/src/views/Forecast.jsx +++ b/ui/src/views/Forecast.jsx @@ -832,7 +832,11 @@ export default function Forecast({ sources = [], sourceId, versions = [], versio async function applyDepth(d) { const viewer = viewerRef.current if (!viewer) return - await viewer.restore({ group_by_depth: d }) + // A partial restore({ group_by_depth }) on its own did nothing, so the whole + // config goes back with the field changed. table is dropped: it is loaded by + // reference, and a stale name in the config fails the lookup. + const { table: _t, ...cfg } = await viewer.save() + await viewer.restore({ ...cfg, group_by_depth: d }) setExpandDepth(d) }