Skip to content

Add the web version: Go/WASM page on GitHub Pages, zero storage - #2

Merged
bmmmm merged 1 commit into
mainfrom
web-pages
Sep 21, 2026
Merged

bmmmm merged 1 commit into
mainfrom
web-pages

Conversation

@bmmmm

@bmmmm bmmmm commented Sep 21, 2026

Copy link
Copy Markdown
Owner

What

The CLI pipeline compiled to WebAssembly (cmd/epcii-wasm over the new internal/webapi) behind a static page in web/, deployed to GitHub Pages by pages.yml.

  • No server, no cookies, no web storage, no service worker, no external resource; meta CSP with default-src 'none'.
  • Share links carry the fields only in the URL #fragment; the address bar is never written automatically.
  • UI in English and German (switch without persistence).
  • scripts/web-smoke.mjs loads the built wasm through Go's wasm_exec.js and compares SVG and PNG byte for byte with the CLI. It runs in ci.yml and before every deploy.
  • pages.yml: build job has contents: read only; the deploy job alone holds pages: write / id-token: write. Actions SHA-pinned.

Verified

  • gofmt, go vet ./..., GOOS=js GOARCH=wasm go vet ./cmd/epcii-wasm, go test ./... green.
  • webapi_test shown red under two mutations (PNG scale, error prefix); web-smoke.mjs shown red with a mutated CLI reference.
  • Manual Chrome pass on web/dist: only the page's own five files are requested, no console messages, inline script blocked by the CSP, fragment round trip, error path, language switch, blob contents equal to the CLI output.

After merge

Enable Pages with source "GitHub Actions" (gh api -X POST repos/bmmmm/epcii/pages -f build_type=workflow), then the first pages run publishes https://bmmmm.github.io/epcii/.

The CLI pipeline compiled to WebAssembly (cmd/epcii-wasm over the new
internal/webapi) behind a static page in web/. No server, no cookies, no
web storage, no service worker, no external resource; share links carry
the fields only in the URL fragment and the address bar is never written
automatically. UI in English and German, switchable without persistence.

scripts/web-smoke.mjs loads the built wasm through Go's wasm_exec.js and
compares SVG and PNG byte for byte with the CLI; it runs in ci.yml and in
the new pages.yml before every deploy. The build job holds read access
only; the deploy job alone gets pages/id-token write.
@bmmmm
bmmmm merged commit a26b9eb into main Sep 21, 2026
4 checks passed
@bmmmm
bmmmm deleted the web-pages branch September 21, 2026 09:02

This branch was successfully deployed

1 active deployment
github-pages a26b9eb6 Deployed Sep 21, 2026 by bmmmm via deploy #1
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