feat: build the real symbol_graph/piano_roll viewer palette (musehub#117 Phase 2)
DOM_09: defined the v1 palette as exactly two real viewers plus the existing generic fallback (src/ts/domain-palette.ts) - symbol_graph (DAG-style node/edge layout, modeled on code-demo.html) and piano_roll (DAW-style track lanes, modeled on midi-demo.html). Both hand-rolled SVG via template strings, following the existing zero-dependency pattern already used in src/ts/pages/timeline.ts and the symbols.ts sparkline - no charting library added.
DOM_10: each viewer takes only viewerType + the domain's declared dimensions list (already schema-validated server-side per Phase 1's DomainCapabilities model) - no per-domain executable code anywhere in this path. Wired GET /domains/@author/slug's page_json to carry viewer_type/dimensions through to the client (domain_detail.html), and domain-detail.ts renders the live preview into a new #dd-viewer-preview section on the existing domain detail page.
DOM_11: replaced the duplicated inline domainColor/domainIcon/ domainLabel ternaries in user-profile.ts (used for the profile page's domain pills) with imports from the new shared domain-palette.ts module - one lookup table instead of two independent copies that could drift.
Scope note: the exit gate literally reads 'renders on its repo page,' but the repo<->domain linking mechanism doesn't exist yet - that's explicitly Phase 3's job (DOM_12, MusehubDomainInstall wiring + repo tab). Landed the real, data-driven viewers on the existing domain detail page (/domains/@author/slug) now; Phase 3 wires a repo to a registered domain and surfaces the same viewer there, per gabriel's explicit sequencing decision.
20 new vitest tests (domain-palette.test.ts, domain-viewers.test.ts) plus one new Python E2E test confirming the page_json wiring. 43/43 vitest, 77/77 test_domains.py, 9/9 test_repo_card_e2e.py, zero regressions. tsc --noEmit clean on all touched/new files (4 pre-existing unrelated errors in explore.ts, not touched here).
Semantic Changes
32 symbols
Files Changed
+4
~5
1002 in snapshot
0 comments
muse hub commit comment sha256:f04ce422239f0885c3f048bc171dd7ec1a99b7ba2126e5e51facb10920c1d440 --body "your comment"
No comments yet. Be the first to start the discussion.