Skip to content

feat(visualize): add theme layer with cascade and bland built-in themes - #359

Merged
joshua-temple merged 1 commit into
mainfrom
feat/visualizer-theme
Jun 25, 2026
Merged

joshua-temple merged 1 commit into
mainfrom
feat/visualizer-theme

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Diagram styling was a near-stub Theme threaded through the emitter but never rendered, and cascade graph --theme accepted only default.

This fleshes out Theme into a separable type holding a Mermaid base, a line color, and per-NodeKind styles. It ships two built-in palettes: cascade (branded, the new default) and bland (grayscale). The emitter renders the theme into a leading init directive plus classDef and class lines in both the flowchart and stateDiagram paths, so a theme swap restyles only the header block and the view model stays render-agnostic. The flag --theme cascade|bland| is wired through; a path loads and validates a JSON theme file with a clear error on a missing or malformed file, and default aliases cascade.

Verification: golden tests for both built-ins (valid Mermaid, outputs differ, per-theme determinism), a user-supplied-theme load-and-apply test, and error paths for missing and malformed files. The existing jobs, stages, and env goldens are regenerated to reflect the now-styled default; the regeneration is additive (the diagram structure is unchanged, only the init directive and classDef lines are added). Full suite, vet, and golangci-lint green. No schema or generator-output change.

Closes #304.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple enabled auto-merge (squash) June 25, 2026 18:29
@joshua-temple
joshua-temple merged commit e128f92 into main Jun 25, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

visualizer: theme layer with cascade and bland built-in themes

1 participant