Skip to content

WASM showcase page - #100

Merged
tamirelazar merged 15 commits into
devfrom
feat/wasm-showcase-page
Jun 29, 2026
Merged

WASM showcase page#100
tamirelazar merged 15 commits into
devfrom
feat/wasm-showcase-page

Conversation

@tamirelazar

Copy link
Copy Markdown
Owner

Client-side WASM→ANSI→xterm.js showcase page for GitHub Pages (tamirelazar.github.io/tslime).

What it does

  • Promotes the crossterm-free ANSI renderer (src/render/ansi.rs) + the tslime-wasm shell from the prototype onto dev.
  • wasm API: set_preset (sim params only, reuses constructor seed), set_palette (render-only, no sim recreate), plus registry accessors. Fixes the hardcoded-seed-42 reconfigure bug.
  • web/: vanilla-TS Vite app, warm "Variant A" chrome, static-HTML SEO first paint (title/meta/OG + poster), curated preset/palette pills, pause control, load-failure fallback, reduced-motion handling, mobile reduced workload.
  • pages.yml: builds wasm + Vite and deploys web/dist to GitHub Pages (base /tslime/).
  • Font subset 2.5 MB → 73 KB.

Scope

v1 presets apply simulation params only (curated structure-driven set: Network/Organic/Vortex/Lightning/Tendrils); TUI-identical per-preset render looks are intentionally deferred. Palette switch recolors live.

Test plan

  • cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test (1213 unit + 56 golden + 19 doc) — all green; goldens unchanged.
  • cargo build --no-default-features --lib + wasm-pack build (wasm32) — clean.
  • web/: tsc --noEmit + pnpm build clean; dist served at /tslime/.
  • Browser-verified: chrome + framed network + preset/palette pills + pause render; reduced-motion paints a mature first frame (no blank box).

…t, cleanups

- terminal.ts: paint one unconditional frame after refit() so reduced-motion
  visitors (and the first rAF before pause fires) always see a mature network
- terminal.ts: capture agentCount at mount time; re-apply after set_preset so
  mobile's 12k override survives preset switches
- tslime-wasm/Cargo.toml: drop silently-ignored [profile.release] (workspace
  profile wins; cargo was warning on every build)
- tslime-wasm/src/lib.rs: doc tick() noting it is a no-op in headless/ANSI mode
- pages.yml: widen path filter to include src/render/** and src/simulation/**
  so wasm rebuilds trigger on any core rendering or simulation change
@tamirelazar
tamirelazar merged commit 57b66b8 into dev Jun 29, 2026
3 checks passed
@tamirelazar
tamirelazar deleted the feat/wasm-showcase-page branch June 29, 2026 19:55
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