Skip to content

Add nested categorical insights and "plan inventory" - #228

Merged
vogelsgesang merged 35 commits into
mainfrom
feature/plan-inventory
Oct 29, 2026
Merged

vogelsgesang merged 35 commits into
mainfrom
feature/plan-inventory

Conversation

@vogelsgesang

Copy link
Copy Markdown
Collaborator

This commit generalizes the existing "categorical insights" to also
support nested categories, rendered as tree views. This new capability
is then used to render a "plan inventory", providing an overview over
all expressions / operators in the plan. Furthermore, we also provide a
list of scanned tables. We support this for almost all supported plan
formats, except for the Tableau XML formats.

The tree-views support linked graph and source highlighting.
Furthermore, they support the usual keyboard navigation as recommended
by the ARIA standard for tree-views (arrow-keys, Home, End, Space, and
type-ahead navigation). Enter remains available for future per-row
actions such as scrolling to a matching node.

A collapsed section header indicates when it contains the current
highlight.

Comment thread query-graphs/src/insights/presets.ts Resolved
Comment thread query-graphs/src/insights/presets.ts Resolved
Comment thread query-graphs/src/insights/presets.ts Resolved
Comment thread query-graphs/src/insights/presets.ts Resolved
Comment thread query-graphs/src/insights/presets.ts Resolved
This commit generalizes the existing "categorical insights" to also
support nested categories, rendered as tree views. This new capability
is then used to render a "plan inventory", providing an overview over
all expressions / operators in the plan. Furthermore, we also provide a
list of scanned tables. We support this for almost all supported plan
formats, except for the Tableau XML formats.

The tree-views support linked graph and source highlighting.
Furthermore, they support the usual keyboard navigation as recommended
by the ARIA standard for tree-views (arrow-keys, Home, End, Space, and
type-ahead navigation). Enter remains available for future per-row
actions such as scrolling to a matching node.

A collapsed section header indicates when it contains the current
highlight.
@vogelsgesang
vogelsgesang force-pushed the feature/plan-inventory branch from 1b38a80 to 7f2067d Compare October 28, 2026 00:31
Comment thread query-graphs/src/insights/presets.ts Resolved
Comment thread query-graphs/src/insights/presets.ts Resolved
Comment thread query-graphs/src/insights/presets.ts Resolved
Comment thread query-graphs/src/insights/presets.ts Resolved
Comment thread query-graphs/src/insights/presets.ts Resolved
Comment thread query-graphs/src/insights/presets.ts Resolved
Comment thread query-graphs/src/insights/presets.ts Resolved
Comment thread query-graphs/src/insights/presets.ts Resolved
Comment thread query-graphs/src/ui/CategoryTree.tsx Resolved
Comment thread query-graphs/src/ui/PlanInsights.tsx Resolved
Comment thread query-graphs/src/ui/PlanInsights.tsx Resolved
@vogelsgesang
vogelsgesang force-pushed the feature/plan-inventory branch 3 times, most recently from bf3cec7 to 3a563d8 Compare October 28, 2026 21:46
Remove default padding from collapsible panel bodies so each panel can control its content spacing. Give Plan Metadata its own margin and use consistent spacing around insight sections instead of divider borders. Organize the touched CSS around component rules and use a named insight toggle selector. Share one chevron SVG and rotation animation across panels, insight sections, and category trees, including reduced-motion behavior. Keep the focused tree row when its label matches the typed prefix, without special cycling behavior.
@vogelsgesang
vogelsgesang force-pushed the feature/plan-inventory branch from 3a563d8 to 92d3296 Compare October 28, 2026 22:00
Comment thread query-graphs/src/ui/CategoryTree.tsx Resolved
Comment thread query-graphs/src/ui/CategoryTree.tsx Resolved
Comment thread query-graphs/src/ui/CategoryTree.tsx Resolved
Comment thread query-graphs/src/ui/CategoryTree.tsx Resolved
Comment thread query-graphs/src/ui/CategoryTree.tsx Resolved
Comment thread query-graphs/src/ui/CategoryTree.tsx Resolved
Comment thread query-graphs/src/ui/CategoryTree.tsx Resolved
Comment thread query-graphs/src/ui/CategoryTree.tsx Resolved
Comment thread query-graphs/src/ui/CategoryTree.tsx Resolved
Use one disclosure slot for both expandable and leaf categories, since the shared chevron already hides its graphic from assistive technology. Use classcat for the active row class to match other conditional classes in the UI.
Let ChevronIcon own its compact and regular size, flex basis, and stroke width. Callers now choose the regular variant where needed instead of overriding the SVG styles from panel and insight CSS.
Expansion choices now belong to computed category objects and reset when those objects are recomputed. Preserve descendants while a parent is temporarily collapsed, and clear local hover, focus, tab stop, and type-ahead state when the category data changes.
Comment thread query-graphs/src/ui/CategoryTree.tsx Resolved
The recursive component renders a tree item and its descendants, so CategoryTreeElement describes its scope more accurately than CategoryRow.
Split the broad inventory UI scenario into focused tree interaction and insight panel tests. Share only the JSDOM fixture setup, keep engine-specific expectations together, and use synthetic definitions to cover generic categorical aggregation. Add checks for empty results, malformed property values, expansion restoration and reset, and the deepest displayed highlight. This makes failures point to the relevant contract and leaves room to extend the inventory without growing one end-to-end test.
Allow the shared fixture to render components without a graph store, then use it for the collapsible panel tests. This removes duplicate JSDOM, React root, CSS import, and global cleanup setup while keeping each test's component-specific callbacks local.
Document why each assertion group matters across aggregation, engine presets, tree interaction, panel disclosure, and property queries. Keep the existing test behavior unchanged so future failures are easier to interpret.
Comment thread query-graphs/test/ui-test-utils.ts Resolved
Comment thread query-graphs/test/category-tree.test.ts Resolved
Dump all configured insight sections, category levels, and occurrence counts for analyzed TPC-H Q2 plans from Hyper, Umbra, CedarDB, Postgres, and DuckDB. Keep the baselines as readable trees, remove redundant basic scan examples, and retain focused tests for edge cases absent from Q2.
Rename inventory baselines to insights so the same fixture setup can cover future insight definitions. Add golden output for set operations and alternate scan spellings, plus a small Hyper external-scan JSON plan. Document each plan's intended coverage in the test table and remove synthetic preset checks for missing values and unfamiliar tags.
@vogelsgesang
vogelsgesang merged commit 71958ce into main Oct 29, 2026
4 checks passed
@vogelsgesang
vogelsgesang deleted the feature/plan-inventory branch October 29, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant