Skip to content

feat: radar, treemap and zenuml diagrams, icon setting, and code checks - #5

Merged
lam0819 merged 2 commits into
mainfrom
feat/radar-treemap-zenuml
Nov 17, 2026
Merged

lam0819 merged 2 commits into
mainfrom
feat/radar-treemap-zenuml

Conversation

@lam0819

@lam0819 lam0819 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Adds the last three Mermaid diagram types (radar, treemap and ZenUML), a setting to show or hide the emoji icons, and lint and type checks with CI.

Radar, treemap and ZenUML

Diagram types

Type How it plays
radar-beta Axes are spread around a circle. Each curve gets one point per axis, further out and taller for higher values, linked into a loop and drawn in the curve's colour. One step per axis compares the curves, e.g. "On Backend: Platform team 5, Web team 3. Platform team leads here." Supports axis labels, curves given as value lists or as axis: value pairs, and min / max.
treemap-beta One column (zone) per top-level section, with nested sections and leaves listed below. Block height follows the value. One step per section, e.g. "Build is 63% of the total (750). Biggest part: Website (320)…" classDef / :::class are ignored.
zenuml Read into the sequence-diagram model, which tracks who is calling whom through nested calls. It handles @Actor / @Database-style annotators, group {} (zones), @Starter, sync calls A.method() with nested {}, async A->B: msg, new X() and return. if / else / loop / par / try… become the step tag, and a // comment above a call becomes that step's text.

The "not supported yet" message now lists all 23 types.

Icons on / off

  • Settings → Icons → Show / Hide turns the emoji on the blocks on or off, in 2D and 3D.
  • The choice is saved in the browser, and client links carry &i=0 when icons are hidden.

Code checks (PHPStan level 10 style)

npm run check runs four checks. GitHub Actions runs them on every push and PR (.github/workflows/check.yml).

Check Tool Must be
Shared blocks in sync tools/sync-parser.py --check in sync
Lint ESLint 10, recommended plus stricter rules 0 problems
Type check TypeScript checkJs 0 errors
Strict type check TypeScript strict, the PHPStan level 10 equivalent no new errors vs tsc-baseline.json (1,997 known, mostly parameters with no types yet)

The page scripts live inside the HTML, so tools/extract-scripts.mjs copies them to .check/*.js with the same line numbers. Every error therefore points at the right line of index.html / 3d.html.

Fixes made to get the first three checks to zero:

  • removed useless regex escapes;
  • let changed to const where nothing reassigns it;
  • removed an unused helper;
  • promise executors no longer return values;
  • stop() renamed to stopPlay() in both pages, because in index.html it shadowed window.stop;
  • DOM typing casts and the toast timer.

Checked: parsing of all 21 existing examples is identical to main (nodes, links and step text compared), and each check fails on an injected bug.

Icons are shown by default. Hiding them is opt-in and saved per browser.

Also

  • New examples: three files in examples/, also added to the Examples menu: team-skills, where-the-budget-goes and checkout-zenuml.
  • README: supported-types table, "what one step shows" table and a new diagram-types-4.png.
  • Refreshed images: the Settings screenshot, and the cover and og-image.png, which now say "23 diagram types".

Testing

Run in headless Chromium:

  • All 24 built-in examples load in 2D and 3D, with the diagram style changing between examples, without errors.
  • The new examples were checked visually in both views.
  • Icons: 9 icons are shown before hiding and 0 after, in 2D and 3D. The client link ends with &i=0 and opens without icons.
  • tools/sync-parser.py --check reports the shared blocks in sync.

Refs AHL-571.

🤖 Generated with Claude Code

solutionforest team and others added 2 commits November 17, 2026 10:16
…setting

- radar-beta: axes on a circle, one point per curve and axis (further out
  and taller for higher values), one step per axis comparing curves.
- treemap-beta: one column per top-level section (zone), nested sections
  and leaves below, block height follows the value, one step per section.
- zenuml: read into the sequence model with a call stack: @Actor /
  @database annotators, group {}, @starter, sync calls with nested {},
  async A->B, new X(), return, if/else/loop/par/try..., // comments become
  the step text.
- Settings -> Icons: show or hide the emoji on blocks (2D and 3D); saved in
  the browser and carried in client links as &i=0.
- Three new examples (team-skills, where-the-budget-goes, checkout-zenuml)
  in examples/ and the Examples menu; README tables, a new diagram-types-4
  image, and refreshed Settings / cover / og images (23 types).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- npm run check: shared-block sync check, ESLint, TypeScript checkJs
  (0 errors) and TypeScript strict mode with a PHPStan-style baseline
  (tsc-baseline.json, 1997 known errors; any new error fails).
- tools/extract-scripts.mjs copies the inline page scripts to .check/
  keeping line numbers, so reports point at index.html / 3d.html lines.
- GitHub Actions workflow runs the same checks on pushes and PRs.
- Fixes found by the checks: useless regex escapes, let -> const, unused
  helper, promise executors returning values, stop() shadowing
  window.stop (now stopPlay), DOM typing casts, toast timer property.
  Parsing of all 21 existing examples is unchanged.
- README: Code checks section, icons shown by default, project layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lam0819 lam0819 changed the title feat: support radar, treemap and zenuml diagrams; add an icon on/off setting feat: radar, treemap and zenuml diagrams, icon setting, and code checks Nov 17, 2026
@lam0819
lam0819 merged commit 1b25825 into main Nov 17, 2026
1 check passed
@lam0819
lam0819 deleted the feat/radar-treemap-zenuml branch November 17, 2026 10:25
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