Skip to content

feat(viewer): link the stackmap mark to the website, and export as offline HTML - #78

Merged
hyamero merged 4 commits into
stagingfrom
feat/viewer-brand-html-export
Nov 19, 2026
Merged

hyamero merged 4 commits into
stagingfrom
feat/viewer-brand-html-export

Conversation

@hyamero

@hyamero hyamero commented Nov 15, 2026

Copy link
Copy Markdown
Member

Summary

This PR makes three changes: the viewer header's icon becomes the stackmap mark, linked to the website; the Export menu can save the diagram again as one offline HTML file; and deliver --open on macOS waits for open to finish.

 header        [generic Workflow icon] Title    →  [stackmap mark, links to stackmap.omsimos.com] Title
 Export menu   PNG · JPEG · WebP · SVG · Video  →  … SVG · HTML (offline) · Video
 macOS --open  done after 3s, finished or not   →  waits up to 15s for open's exit code
  • Header mark: it uses each theme's own colours: the text colour, the edge grey and the database blue. It opens https://stackmap.omsimos.com/ in a new tab, and screen readers announce it as "stackmap website (opens in a new tab)".
  • HTML export: it saves the page as delivered. The viewer reads that page when it starts, before rendering into it, so the export is the same offline file deliver writes, named after the diagram's title. A page from serve is saved without its live-reload block, so the file doesn't keep trying to reach the server. The website's viewers have no delivered page to save, so they don't show the item.
  • macOS open: it can take seconds to hand the file to a browser that is starting up. The CLI used to report success after 3s and exit. When an agent's tool then closed its shell, the leftover open was killed, so nothing opened and no warning was printed. The CLI now waits up to 15s for open to exit, the same wait the Windows openers on WSL get.

Evidence

  • New CLI e2e tests:
    • From a delivered file, Export → HTML downloads platform.html. Its #root is empty, and opened from disk it renders every card. The mark's link points to the website.
    • From a page served by serve, the exported HTML contains the diagram data and no live-reload block.
  • New unit tests: the saved page drops the live-reload block and leaves the live page alone, and it's undefined when no diagram is embedded.
  • Visual baselines: regenerated with bun run visual:update, 14 of 14 passed. Comparing old and new pixels, the only change is the 20×18 box where the icon sits.
  • Suites: viewer unit tests pass, 169 of 169, and so do the CLI opener tests (18) and CLI e2e (9). bun run typecheck is clean.
  • Not tested: I didn't reproduce the macOS case where an agent's shell closes. The change only lengthens the wait.

Merge Danger

Door: two-way

Blast Radius: viewer-header-and-export

Every viewer header changes, including the website's embedded viewers. On macOS, deliver --open can now take up to 15s to return when open is slow.

@vercel

vercel Bot commented Nov 15, 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 15, 2026 1:11pm UTC

@hyamero
hyamero merged commit 29433a3 into staging Nov 19, 2026
8 checks passed
@hyamero
hyamero deleted the feat/viewer-brand-html-export branch November 19, 2026 03:23
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.7.0-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.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

This branch was successfully deployed

1 active deployment
Preview — b386ef1e Deployed Nov 15, 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