feat(e2e-ui): blob simulate_move via WASM domain core - #174
Open
patrickleet wants to merge 6 commits into
Open
Conversation
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.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
simulate_move, tiles, direction) with nodistributeddependency — WASM-eligible.BlobError.blobSimulateMoveexport for the client pure inventory.$lib/blob/simulate-move.tsis a thin WASM host (fail-closed until init); drops the hand-written twin algorithm.make wasm(hooked intoui-install); e2e CI installswasm-pack+wasm32-unknown-unknown.Pure-reduce wiring is unchanged: gen-client still maps
blob.simulate_move→simulateMove.Stack
Stacked on
feat/e2e-command-session-guards(PR #173) → tooling-1 (PR #172).Test plan
cargo test -p blob-core -p blob-domaincargo check -p blob-wasm --target wasm32-unknown-unknownmake wasm