# Vendored Perspective pf_app runs a **patched build of Perspective**. Upstream's C++ engine has always implemented column-axis expand/collapse — `t_ctx2::set_depth(HEADER_COLUMN, …)` and `open`/`close(HEADER_COLUMN, idx)` are fully written — but nothing above C++ could reach it: `set_column_pivot_depth()` was never called, and `View::expand/collapse` hardcoded `HEADER_ROW`. The patch is wiring, not new engine logic. It buys two things the released packages cannot do at all: - `split_by_depth` in `ViewConfig`, the `split_by` counterpart to `group_by_depth` - `expand_column()` / `collapse_column()`, so one column branch can fold to its subtotal while its siblings stay expanded — the Excel behaviour **Source:** https://github.com/fleetside72/perspective, branch `column-axis-expand-collapse`. See `PROVENANCE.txt` for the exact commit these tarballs were built from. ## Why tarballs and not npm The feature is not released upstream. Until it is, the four packages are built from the fork and committed here as npm tarballs. `npm install` expands them exactly as it expands anything from the registry — no special tooling, and `pf.sh deploy` works unchanged. A deploy machine needs node and nothing else: no emscripten, no cmake, no protoc, no Rust. All four move together, never a subset. Perspective couples loader, package versions, data format and `apache-arrow`; vendoring a partial set reintroduces exactly the drift that causes trouble. ## Changing the engine ./rebuild-perspective.sh # builds the fork, repacks, rewrites PROVENANCE.txt cd .. && npm install git add vendor && git commit Push the fork first — the script warns if the source tree is dirty, because a tarball built from uncommitted code has no recoverable source. The build itself needs cmake >= 3.29.5, protoc >= 22 (its version silently selects which protobuf source tree gets cloned), pnpm, and the Rust nightly the repo pins. Roughly 40 minutes cold. Only ever on a machine changing the engine. ## Getting rid of this This is a fork, with the maintenance that implies. The exit is upstream taking the change — the patch is small and additive, and the engine work is already theirs. When a release ships it, delete this directory and put normal version ranges back in `ui/package.json`.