Skip to content

feat(e2e-ui): blob simulate_move via WASM domain core - #174

Open
patrickleet wants to merge 6 commits into
feat/e2e-command-session-guardsfrom
feat/blob-simulate-move-wasm
Open

feat(e2e-ui): blob simulate_move via WASM domain core#174
patrickleet wants to merge 6 commits into
feat/e2e-command-session-guardsfrom
feat/blob-simulate-move-wasm

Conversation

@patrickleet

Copy link
Copy Markdown
Collaborator

Summary

  • blob-core: pure board rules (simulate_move, tiles, direction) with no distributed dependency — WASM-eligible.
  • blob-domain: uses blob-core; maps pure errors to BlobError.
  • blob-wasm: blobSimulateMove export for the client pure inventory.
  • Client: $lib/blob/simulate-move.ts is a thin WASM host (fail-closed until init); drops the hand-written twin algorithm.
  • Tooling: make wasm (hooked into ui-install); e2e CI installs wasm-pack + wasm32-unknown-unknown.

Pure-reduce wiring is unchanged: gen-client still maps blob.simulate_movesimulateMove.

Stack

Stacked on feat/e2e-command-session-guards (PR #173) → tooling-1 (PR #172).

Test plan

  • cargo test -p blob-core -p blob-domain
  • cargo check -p blob-wasm --target wasm32-unknown-unknown
  • make wasm
  • CI e2e-ui offline + browser

Extract pure simulate_move into blob-core (no distributed host), export
it via blob-wasm, and replace the TypeScript board twin with a thin
loader that registers the same pure id for auto-optimism.

make wasm / ui-install builds pkg; CI installs wasm-pack + wasm32.
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 81ad9d40-e377-4cd2-8f3f-10adc944da9f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Collapse blob-core and blob-wasm into blob-domain: pure rules live in
src/core/, WASM exports in src/wasm.rs behind --features wasm, aggregate
host stays default --features domain. make wasm builds that one package.
Update blob walkthrough for known-row pure reduce + blob-domain WASM,
session guards/principal in command mounts and handlers, and add a
Service module tab on every demo (MODULE_ID, routes, compose).
Add createWasmJsonPure for load/JSON/fail-closed hosting. blobSimulateMove
now takes record+args JSON and validates inside blob-domain wasm. App
simulate-move.ts is a short pure registration only.
Declare CommandProjectionPureReduce::wasm(package, export); render_pures
emits createWasmJsonPure hosts and ensurePureFunctionsReady. Blob move
registers blob/pkg/blob_wasm; delete hand pure host. board.ts stays as
UI presentation helpers (tiles/parse), not domain pure.
Expand every Service tab with compose, host.run_e2e_host, and e2e-runner
main. Blob commands tab explains pure-reduce reasoning, benefits, gen-client
WASM host, and fail-closed authority; domain tab covers core vs wasm faces.
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