Repository navigation
feat: add hosted and local metric and finding starters - #128
Conversation
albert20260301
left a comment
There was a problem hiding this comment.
The four use-case starters keep fixture evidence explicit and preserve hosted/local execution boundaries. Optional story/export props remove only their controls; the default toolbar and supplied presentation/export behavior remain compatible. No blocking findings.
Local checks pass: 19 starter/authoring/presentation/export browser tests, 97 manifest tests, build/types/lint, boundaries, generated reference, docs/style/format/Knip, all three local starters, and packed consumers/preview launchers.
This remains stacked on #125. Human merge and an SDK publication are still required before consumers can rely on the new starter paths and props.
| expect(errors).toEqual([]); | ||
| }); | ||
| } | ||
| } |
There was a problem hiding this comment.
not sure those tests are really worth it
| The metric starter queries `SEMANTIC_VIEW` for group and segment breakdowns. | ||
| Its group action filters both charts; choose All groups to reset. The Finding | ||
| starter uses ordinary SQL over the same sample rows to support prose, inline | ||
| values, a compact ranking, and a table. Its example headings are not a prescribed | ||
| Finding structure. |
There was a problem hiding this comment.
Not sure this kind of details is needed
There was a problem hiding this comment.
Agreed, removed the sample-content walkthrough and mock version details in cf067a5. Kept the launch command, preview URLs, and guidance to replace demo queries with real sources.
| DataApp (component, @altertable/data-app-react): <Data, Input>(props: DataAppProps<Data, Input>) — Executes the primary view and owns its controls, inspection, exports, and stories. | ||
| DataApp.children: ReactNode | ||
| DataApp.description?: ReactNode — Override the declared subtitle; null hides it. | ||
| DataApp.showToolbar?: boolean — Show page actions. Defaults to true; does not hide filters or data states. |
There was a problem hiding this comment.
I realize we have DataApp.showToolbar showing up twice. Are we exporting <DataApp> from multiple export paths?
There was a problem hiding this comment.
Yes, these are two existing variants: @altertable/data-app-react exports the declared-view DataApp, which handles data loading and controls; @altertable/data-app-react/ui exports the static DataApp for setup/static screens. Both use DataAppFrame, where showToolbar is defined, so the generated reference lists it for both. The two exports predate this PR.
## Summary
Metric illustrations and Finding documents currently start from the
generic exploration scaffold. Add a focused starter for each use case in
both hosted and local execution, and register all four in the examples
catalog.
The metric starter renders a main chart and a secondary segment
breakdown. Selecting a group filters both charts; the group control
resets the scope. The Finding starter renders a single-column document
with a supporting chart. The metric starter queries a seeded semantic
view with `SEMANTIC_VIEW`, including dimension filters. The Finding
starter queries the same fictional rows with ordinary SQL and renders
inline values, a compact ranking, and an evidence table. Both retain app
identity for standalone viewing and defer embedded header presentation
to the host.
`bun run dev:gallery` seeds the sample data in a pinned Altertable mock
image containing DuckDB 2 and `semantic_layer`. Copied apps retain the
normal lakehouse connection; no mock or demo creation is added to app
runtime code.
Make bound `<DataApp>` story and export configuration optional, and add
`showToolbar={false}` for apps whose brief does not need page actions.
Existing defaults and supplied story/export behavior remain unchanged.
Package and release checks cover the new templates.
## Validation
- Hosted and local starters were checked against the live mock preview,
including semantic filtering and Finding values. Starter-specific
browser tests were removed following review; shared SDK regression and
starter build checks remain.
- Type checks and all three local starter builds pass.
- Full `bun run check` passes with pinned Bun 1.4.4 and Node 24.18.0:
1,015 tests across 77 files, package boundaries, type/lint/style/docs
checks, generated reference, packed consumers, and all local starter
checks.
Stacked on #125. Companion:
altertable-ai/skills#113 selects these starters
by use case and execution mode. Publish the SDK before relying on the
new starter paths and props; skill guidance falls back to the installed
version's shared starter when needed.
## Screenshots
### Finding starter

### Metric starter — filtered to Alpha

Summary
Metric illustrations and Finding documents currently start from the generic exploration scaffold. Add a focused starter for each use case in both hosted and local execution, and register all four in the examples catalog.
The metric starter renders a main chart and a secondary segment breakdown. Selecting a group filters both charts; the group control resets the scope. The Finding starter renders a single-column document with a supporting chart. The metric starter queries a seeded semantic view with
SEMANTIC_VIEW, including dimension filters. The Finding starter queries the same fictional rows with ordinary SQL and renders inline values, a compact ranking, and an evidence table. Both retain app identity for standalone viewing and defer embedded header presentation to the host.bun run dev:galleryseeds the sample data in a pinned Altertable mock image containing DuckDB 2 andsemantic_layer. Copied apps retain the normal lakehouse connection; no mock or demo creation is added to app runtime code.Make bound
<DataApp>story and export configuration optional, and addshowToolbar={false}for apps whose brief does not need page actions. Existing defaults and supplied story/export behavior remain unchanged. Package and release checks cover the new templates.Validation
bun run checkpasses with pinned Bun 1.4.4 and Node 24.18.0: 1,015 tests across 77 files, package boundaries, type/lint/style/docs checks, generated reference, packed consumers, and all local starter checks.Stacked on #125. Companion: altertable-ai/skills#113 selects these starters by use case and execution mode. Publish the SDK before relying on the new starter paths and props; skill guidance falls back to the installed version's shared starter when needed.
Screenshots
Finding starter
Metric starter — filtered to Alpha