pf_app/ui/src
Paul Trowbridge 916229bdab Sequence the bucket and segment columns with expression columns
Perspective orders column groups by the value string, and SortDir's col asc /
col desc only reverses that -- so Prior Year -> Plan -> Actual -> Forecast is
expressible as neither, being alphabetical in neither direction. The order
has to be part of the value, as a "01 · " prefix.

Done as Perspective expression columns, named Bucket and Segment, generated
from pf.version.bucket_order and pf.log.seq. The first attempt computed the
prefix in the served SQL (archived on feature/column-sequencing-sql), which
was the wrong layer: the prefix is a pivot-ordering concern, and putting it
in the query put it in every other reader too -- the change log and the
bridge's basis list would both have read "04 · Forecast". It also meant a
Generate SQL to introduce the placeholder, and a reload to see any change.

As expressions it stays in the pivot, travels with saved layouts because it
lives in ViewConfig, and reordering on the Baseline page takes effect
immediately -- the expressions are rebuilt and the pivot re-renders, no
reload.

Kept from the SQL attempt: pf.version.bucket_order and pf.log.seq, which are
needed either way, and the Baseline controls -- a seq column per segment and
a reorderable row of bucket chips. bucket_order is on the version because
the Baseline page is version-scoped; Setup is the only source-level context
and not where anyone would look for this.

Anything unordered falls through to the raw column, so it sorts after the
ordered entries (digits before letters) rather than silently landing first.
The expressions are merged into the live config rather than replacing it, so
a user's own expressions survive, and an expression that stops existing is
dropped from the axes first -- restore() rejects a config that pivots on an
expression it no longer defines.

Needs 01_schema.sql for the two columns. No Generate SQL.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-17 13:33:12 -04:00
..
assets Scaffold React/Vite/Tailwind UI with 3-step Setup → Baseline → Forecast flow 2026-04-25 16:28:45 -04:00
components Lay the adjustment panel out on a grid, and count what a clone will copy 2026-09-17 02:46:05 -04:00
views Sequence the bucket and segment columns with expression columns 2026-09-17 13:33:12 -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 Stop loading the whole version twice on every page load 2026-09-16 22:42:38 -04:00
auth.jsx Put the app behind a login 2026-09-14 22:20:25 -04:00
index.css Fix period col dropdown dark mode: custom dropdown with theme-aware colors 2026-06-13 00:48:25 -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