Skip to content

fix: work through a full-source review of the CLI, layout, viewer and site - #74

Merged
hyamero merged 64 commits into
stagingfrom
fix/review-findings
Nov 14, 2026
Merged

hyamero merged 64 commits into
stagingfrom
fix/review-findings

Conversation

@hyamero

@hyamero hyamero commented Nov 14, 2026

Copy link
Copy Markdown
Member

Summary

Fixes from a full-source review of every package and the site. Each finding was checked against the code before it was changed, and each fix is its own commit (63 in all), so the log reads as the list of what changed.

packages/
├── cli/      11 commits  serve survives a `//` request, accepts a port-less Host header, picks up saves
│                         made during the first layout and reports progress; deliver refuses to overwrite
│                         its input on a case-insensitive filesystem; --port rejects non-numbers
├── schema/    6 commits  suggested fixes that could not be applied (self-loop on compact cards,
│                         phase-order, numeric bounds, prototype-named keys); new empty-footer warning
├── core/      1 commit   padded row values no longer raise a false card-fit error
├── layout/   13 commits  lane routes stay off cards, facing port runs and lane edges; labels stay inside
│                         the bounds and off long group titles; sequence activations no longer nest
│                         without bound; label placement is about 4x faster on large diagrams
└── viewer/   10 commits  export menu works with a mouse in Safari; search centres an off-screen result;
                          an interrupted pan no longer snaps the zoom back; routes drop loops back through
                          an endpoint; ⌘/Ctrl/Alt combinations reach the browser; in-flight edges are
                          tracked per diagram
site/         22 commits  walkthrough runway reserved in CSS (removes the hash re-scroll and its URIError);
                          docs search retries after a failed load and keeps its keys; linked figures light
                          edges; gallery filter follows the URL; dead code and duplicated constants removed

Left as they are, because each needs a product decision or changes shipped layouts:

  • Wrapping of DOWN diagrams (packages/layout/src/index.ts): both candidate fixes re-lay out existing diagrams.
  • A biased label still takes the middle of its run first: the fix moves labels in 8 of 23 shipped diagrams.
  • Group frames that are unphased or span stages can still straddle a stage band; ELK ignores a partition on a group, so this needs a validation rule.
  • Very crowded lane diagrams (30–40 nodes, 170+ edges) still show some port-run overlaps, far fewer than before.

Evidence

  • Before: curl --path-as-is http://127.0.0.1:4400// ends stackmap serve with TypeError: Invalid URL.
    After: the request gets a 404 and the server keeps running.
  • Before: on macOS, stackmap deliver case.json -o CASE.JSON replaces the diagram source with the HTML viewer.
    After: the command refuses, as it already did for the same-case path.
  • Before: in WebKit, pressing an export menu item closes the menu with nothing saved.
    After: a new WebKit e2e presses the item and gets the download.
  • Before: placeLabels on 500 nodes and 2000 labelled edges takes 14,657 ms under Bun.
    After: 3,577 ms, with byte-identical output.
  • Before: fuzzed lane diagrams show port-run overlaps in 19 and 14 of 300 (≤16 and ≤22 nodes) and card crossings in crowded ones.
    After: 0 and 0, and the fuzz test now asserts both.

Full run on the branch tip, on macOS:

bun run test         core, schema 113, layout 750, viewer 167, cli 64   all pass
bun run typecheck    pass
bun run build        pass
cli   smoke + e2e    pass (7)
viewer e2e           100 passed, 14 skipped (the visual spec is Linux-only)
site  test           116 passed; typecheck and build pass
site  e2e            85 passed

Merge Danger

Door: two-way

Every fix is a separate commit and can be reverted on its own. One pair is not: the serve test added in 6c914fb only passes with the next commit, db15abf.

Blast Radius: Broad

  • Visual baselines: three gallery diagrams lay out differently (release-delivery, incident-response, deployment-release: one edge's route and label each, and deployment-release is 24px wider). Their baselines need regenerating with the update-visual run.
  • CLI behaviour: --port takes digits only (1e3 and 0x10 are now rejected); an empty card.footer raises a new semantics/empty-footer warning.
  • Viewer behaviour: a route no longer includes nodes that are only on a loop back through one of its ends. An existing test that kept such a node was changed.
  • Site behaviour: arriving at a #hash now jumps there at once; in-page links still glide.
  • The fullscreen refit is tested with a stand-in for the Fullscreen API, not in a real full-screen window.

@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
stackmap-site Ready Ready Preview Nov 14, 2026 5:20am UTC

@hyamero
hyamero merged commit d096c73 into staging Nov 14, 2026
8 checks passed
@hyamero
hyamero deleted the fix/review-findings branch November 14, 2026 06:03
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.6.3-rc.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.6.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

This branch was successfully deployed

1 active deployment
Preview — 5b8492b6 Deployed Nov 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant