Skip to content

feat(#506): add Import example dashboard to the File menu - #510

Merged
BorisTyshkevich merged 1 commit into
mainfrom
feat/import-example-dashboard-506
Jul 27, 2026
Merged

feat(#506): add Import example dashboard to the File menu#510
BorisTyshkevich merged 1 commit into
mainfrom
feat/import-example-dashboard-506

Conversation

@BorisTyshkevich

Copy link
Copy Markdown
Collaborator

What & why

Adds File ▾ → Import example dashboard… — a modal that lists the three
shipped flagship example dashboards (ClickHouse Operations, Shop Charts,
OnTime Charts) from a checked-in manifest, and imports the selected one
through the existing Dashboard import/codec/validation/dependency-closure/
commit pipeline. It's purely additive (same rule as the existing Import
dashboard…
row): an existing Dashboard is never replaced or merged into,
and Cancel/Escape/an outside click leave the workspace untouched.

The catalogue (examples/dashboard-manifest.json + the three referenced
examples/*.json files) is compiled at build time by the new
build/compile-example-dashboards.mjs into a checked-in generated module
(src/generated/example-dashboards.ts), mirroring the existing JSON-Schema
generation pipeline (build/compile-json-schemas.mjs) — so it ships embedded
in the single-file production artifact rather than as separate served files.
npm run check:examples (wired into prebuild/pretest, alongside
check:schemas) fails the build on a missing, malformed, or stale example so
one can't ship unnoticed.

Closes #506

Checklist

Test plan

  • npm test — 5961 unit tests, 100%/100% statements/lines per-file coverage gate green
  • npm run pretest — schemas, examples, arch boundaries, tsc --noEmit all green
  • npm run build — artifact builds (~2 MiB raw / ~585 KiB gzip)
  • Full Playwright e2e suite (chromium/firefox/webkit, --workers=1) — 481 passed, 2 skipped (unrelated), 0 failed, including the new tests/e2e/import-example-dashboard.spec.js (first-ever File-menu e2e spec: dialog listing/selection, Cancel-no-change, Escape-no-change, Import-appends-and-opens)
  • Independent read-only review pass over the full diff — no correctness bugs found; one docs nit fixed (README example order) and one non-blocking a11y follow-up filed as a11y: example-dashboard radiogroup lacks roving tabindex + arrow-key navigation #509 (radiogroup keyboard pattern)

Adds a File ▾ → Import example dashboard… action that opens a modal listing
the three shipped flagship examples (ClickHouse Operations, Shop Charts,
OnTime Charts) from a checked-in manifest, and imports the selected one
through the existing Dashboard import/codec/validation/commit pipeline —
purely additive, so an existing Dashboard is never replaced or merged.

The catalogue is generated at build time (build/compile-example-dashboards.mjs
-> src/generated/example-dashboards.ts, mirroring the JSON-Schema pipeline)
so it ships embedded in the single-file artifact; npm run check:examples
(wired into prebuild/pretest) fails on a missing, malformed, or stale example.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P47CfxtXoAC2WiPKDiWudp
@BorisTyshkevich
BorisTyshkevich merged commit aecee4c into main Jul 27, 2026
7 checks passed
@BorisTyshkevich
BorisTyshkevich deleted the feat/import-example-dashboard-506 branch August 6, 2026 15:28
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.

Add example Dashboard import from the File menu

1 participant