Perspective's column axis cannot be collapsed. The row axis has had it forever — GROUP BY ROLLUP holds every level and view.set_depth() hides the deeper ones — but nothing equivalent is exposed for split_by, so a Year over Month pivot can only ever be shown fully expanded. The engine already implements it. t_ctx2 is symmetric: set_depth(t_header, depth), open(t_header, idx) and close(t_header, idx) each have a real HEADER_COLUMN branch on m_ctraversal mirroring m_rtraversal, and t_view_config carries m_column_pivot_depth which server.cpp already applies. None of it is reachable: set_column_pivot_depth() is never called, so the depth stays -1, and View<t_ctx2>::expand/collapse hardcode HEADER_ROW. The patch is 193 lines of wiring across the protobuf, the Rust client and the datagrid — no new engine logic. Two capabilities result, mirroring the row axis: - split_by_depth in ViewConfig, the split_by counterpart to group_by_depth - expand_column()/collapse_column(), addressed by column traversal index exactly as the row methods are addressed by row index which together give the Excel behaviour — one year folded to its subtotal while its siblings stay expanded — that no combination of existing config could produce. Verified in this app against fc_cash_9: clicking a Year header goes from 27 columns to 15, totals reconciling at every level. Vendored rather than aliased - The previous approach pointed vite at a local checkout, which built only on one laptop and left package.json claiming npm 5.2.0 while the build used something else. The four packages are now committed as npm tarballs and package.json names them, so the declaration is true and `pf.sh deploy` works unchanged — npm install expands them like any registry package. - Packed with `pnpm pack`, not `npm pack`: Perspective is a pnpm workspace and cross-package deps are `workspace:^`, which npm rejects outright. pnpm rewrites those to real version ranges at pack time. - All four move together. Perspective couples loader, package versions, data format and apache-arrow; a partial vendor reintroduces exactly that drift. Cost, stated plainly: 12MB of opaque binaries in git that do not delta, a fork to maintain, and a second engine build for anyone changing it. rebuild-perspective.sh makes that repeatable and PROVENANCE.txt records the commit each tarball came from, because a committed .tgz otherwise has no recoverable source. README.md says how to delete all of it once upstream ships the feature. This also moves the app from 5.2.0 to 5.4.0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoxNi8cFsQLPUSw3obb5NH
2.3 MiB
2.3 MiB