Skip to content

feat: publish the UI as a static site - #2

Merged
warroyo merged 1 commit into
mainfrom
feat/static-site
Aug 9, 2026
Merged

feat: publish the UI as a static site#2
warroyo merged 1 commit into
mainfrom
feat/static-site

Conversation

@warroyo

@warroyo warroyo commented Aug 9, 2026

Copy link
Copy Markdown
Owner

The map pins one version at a time, so the set of questions it can ask is finite: the unpinned view plus one per clickable node, 55 in all. vkstack static drives every one of them through the same handlers serve uses and writes the answers as a single bundle, so a published site and a hosted one cannot disagree.

Deployed to Cloudflare Pages at vkstack.warroyo.com by a new pages workflow, on push to main, on release, and nightly to pick up upstream.

Scope

This covers the UI's questions, not the tool's. Multi-pin solves (stack --vcenter … --vks …) and check span combinations that cannot be enumerated ahead of time, and stay on the CLI, the HTTP API and MCP. serve, the container and deploy/k8s are unchanged.

Two consequences of shipping a snapshot

  • The page says which build generated it. Nothing else can place a file with no process behind it.
  • Age is derived from fetchedAt in the client rather than read off the response. The server stamps ageHours when it answers, which is the same instant on a live server and days earlier on a static build. The server's figure stays in the payload for API consumers.

Verification

  • gofmt, go build, go vet, go test ./... pass.
  • All 57 generated responses are byte-identical to a live serve --read-only.
  • All 54 clickable nodes resolve in the bundle using the same key the client derives (node.pin || node.label).
  • data.json is 1.5 MB, 45 KB gzipped; the page already ships 3.5 MB of mermaid.

Before merging

The pages workflow needs CLOUDFLARE_API_TOKEN (Account → Cloudflare Pages → Edit) and CLOUDFLARE_ACCOUNT_ID, and the vkstack Pages project must exist. Merging without them fails the first run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Mgcy2W4YFEKvgqoN3nvw1J

The map pins one version at a time, so the set of questions it can ask is
finite: the unpinned view plus one per clickable node, 55 in all. `vkstack
static` drives every one of them through the same handlers `serve` uses and
writes the answers as a single bundle, so a published site and a hosted one
cannot disagree — the same code produced both. Selecting a version becomes a
lookup rather than a round trip.

This covers the UI's questions, not the tool's. Multi-pin solves and `check`
span combinations that cannot be enumerated ahead of time, and stay on the
CLI, the HTTP API and MCP. A static site is the sample for people.

Two things follow from shipping a snapshot rather than a server. The page now
says which build generated it, because nothing else can place a file that has
no process behind it. And age is derived from fetchedAt in the client instead
of being read off the response: the server stamps ageHours when it answers,
which is the same instant on a live server and days earlier on a static build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mgcy2W4YFEKvgqoN3nvw1J
@warroyo
warroyo merged commit 1e833a1 into main Aug 9, 2026
2 checks passed
@warroyo
warroyo deleted the feat/static-site branch August 9, 2026 19:07
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