pf_app
Go to file
Paul Trowbridge 42d9d51f63 SPIKE fix: stop corrupting group header colspans
Reported symptom: with split_rollup_mode on, columns looked shuffled and
some month columns had no year header above them. That was this spike, not
Perspective.

Two mistakes, either enough on its own:

- The original span was stashed on the cell as `_pfFullSpan` the first time
  it was seen. regular-table recycles header cells between draws, so the
  stashed value reappeared on an unrelated group and truncated it.
- The work was guarded on `colSpan > 1`, so once a cell had been set to 1 it
  could never grow back.

Both fired even with nothing collapsed, which is why merely turning rollup
on was enough to break the header.

Now the span is derived from the column paths every draw, and colSpan is
only touched while something is actually collapsed — with nothing hidden,
regular-table's own merge of adjacent equal header values is the right
answer and is left alone.

Measured on Reason x (Year, Month), 18 leaf columns, across first draw,
sort, sort-cleared and horizontal scroll:

  before fix   2025 spans 3,  group row covers  8/18  (10 orphaned)
  after fix    2025 spans 13, group row covers 18/18
  no spike     2025 spans 13, group row covers 18/18

Collapse behaviour is unchanged: 8 -> 6 -> 3 -> 5 cells across collapse
2025, collapse 2026, expand 2025, with header and body width-aligned
throughout and the state surviving a sort.

Not fixed, because it is not a bug: rollup emits totals BEFORE their
members, so the grand total sits far left and each year's subtotal precedes
its own months. SplitRollupMode documents this as "totals before" order and
offers only flat|rollup, so it cannot be moved to Excel's convention.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LoxNi8cFsQLPUSw3obb5NH
2026-09-12 12:11:25 -04:00
lib Multi-slice operations, tagged bridge, and a reworked adjustment panel 2026-09-11 23:30:56 -04:00
public Add UX mockup and update spec with navigation direction 2026-04-25 14:56:29 -04:00
routes Multi-slice operations, tagged bridge, and a reworked adjustment panel 2026-09-11 23:30:56 -04:00
setup_sql Multi-slice operations, tagged bridge, and a reworked adjustment panel 2026-09-11 23:30:56 -04:00
ui SPIKE fix: stop corrupting group header colspans 2026-09-12 12:11:25 -04:00
.env.example Initial commit — pivot forecast application 2026-04-01 07:59:05 -04:00
.gitignore Scaffold React/Vite/Tailwind UI with 3-step Setup → Baseline → Forecast flow 2026-04-25 16:28:45 -04:00
CLAUDE.md Collapse the column hierarchy from the toolbar 2026-09-12 09:15:15 -04:00
install.sh Initial commit — pivot forecast application 2026-04-01 07:59:05 -04:00
package-lock.json Fix forecast data load and add byte-progress UI 2026-04-28 19:51:39 -04:00
package.json Add CLAUDE.md project instructions and license field to package.json 2026-05-02 20:47:15 -04:00
PERSPECTIVE.md Load Perspective from bundle, not CDN; pin all packages at 5.2.0 2026-08-17 21:30:19 -04:00
pf_perspective_options.md Record DuckDB virtual-server spike findings; choose display-grain pre-aggregation 2026-08-17 21:47:55 -04:00
pf_spec.md Merge perspective-inline-5.2.0: 5.2.0 pin, multi-slice ops, bridge, drag-select 2026-09-12 09:11:11 -04:00
pf.sh Add pf.sh — interactive deployment and service management script 2026-05-02 20:58:39 -04:00
server.js Fix forecast data load and add byte-progress UI 2026-04-28 19:51:39 -04:00