pf_app/ui/src
Paul Trowbridge 87ad5b1997 Fix the depth steppers' off-by-one, and fit row labels on restore
The stepper's depth and ViewConfig's group_by_depth/split_by_depth are
the same unit -- a count of levels to show -- but applyDepth and
applySplitDepth sent d + 1 and every readback subtracted the same 1.
Self-consistent, so the toolbar always agreed with itself, and off by
one against the grid at every position: picking partgroup showed one
level past it. server.cpp turns group_by_depth into set_depth(n - 1)
and t_traversal::set_depth adds the 1 back, so n asks for n levels.

The +1 existed to dodge depth 0, which reaches the engine as
set_depth(-1) on an unsigned t_depth, underflows, and clamps to fully
expanded. The value is floored at 1 instead, so the stepper's "Total"
slot goes on showing the first level as it always has -- the wart is
kept deliberately rather than traded for the underflow. A bare total
needs group_rollup_mode.

Separately: fitRowLabels() has been written and unused since it was
judged to read worse than the default spacing. That judgement has
changed -- row labels come back clipped after a restore -- so it is now
called after both restore paths, initViewer and applyLayout. It is not
routed through the Fit widths button on purpose: that path goes via
regular-table's auto-size, which measures the leaf header's rendered
box over viewport rows only, while fitRowLabels canvas-measures the
label text.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 23:44:07 -04:00
..
assets Scaffold React/Vite/Tailwind UI with 3-step Setup → Baseline → Forecast flow 2026-04-25 16:28:45 -04:00
components Collapse untagged adjustments into one bridge step 2026-09-22 22:55:49 -04:00
views Fix the depth steppers' off-by-one, and fit row labels on restore 2026-09-22 23:44:07 -04:00
App.css Scaffold React/Vite/Tailwind UI with 3-step Setup → Baseline → Forecast flow 2026-04-25 16:28:45 -04:00
App.jsx Land on the forecast somebody chose, not the newest one 2026-09-22 08:34:46 -04:00
auth.jsx Put the app behind a login 2026-09-14 22:20:25 -04:00
index.css Make the toolbar section labels readable 2026-09-19 15:22:20 -04:00
main.jsx Set row depth through ViewConfig instead of restoring it after every rebuild 2026-09-17 03:05:36 -04:00
theme.jsx Add light/dark mode with theme toggle 2026-04-25 23:29:25 -04:00