Repository navigation
Add an IR view to the playground and feature the open beta in the README - #5
Merged
Merged
Conversation
Expose `openiacIR` from the WebAssembly module so the browser renders the same JSON IR that `openiac ir` prints. The output pane gains an IR toggle that is off by default: pressing it switches the pane to read-only JSON, retitles the file to ir.json and makes copy and download follow the active view; pressing it again, or picking a target, returns to the generated TypeScript. Point the README at openiac.codewithzeal.com with a screenshot of the live playground and an open-beta call to action, and document the new export in the architecture notes.
The IR view was reachable only through a muted icon button that read like
the Copy and download buttons next to it. Give it the accent treatment
instead: a tinted pill carrying the { } glyph and a View IR / Hide IR
label, a soft glow while the TypeScript view is showing, and a solid
gradient with dark text while the IR is active.
The label collapses to the glyph below 640px so the pane header stays on
one line, and the glow is dropped under prefers-reduced-motion. The
README screenshot is regenerated with the new control.
The screenshot links to the live playground, but the only hint was a caption that read like a label. Keep the image link, move the privacy line into its own caption, and put a bold "Click here to get open beta access" link under the image so the way in is visible without guessing.
be-thomas
commented
Oct 26, 2026
be-thomas
commented
Oct 26, 2026
The IR response dropped the data-source count that Graph.Stats returns, so the status line under-reported the document the pane was showing. Report it, and render it in both views through one stats helper so the numbers always describe the same graph. Booting now refuses a WebAssembly bundle that lacks the openiacIR export instead of letting the IR toggle relabel the pane while the editor still holds TypeScript. The check runs as soon as the runtime is up, so a stale cached main.wasm names the cause immediately.
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
openiacIR(source)from the WebAssembly module: it parses withengine.ParseSourceand marshals withengine.MarshalIR, so the browser shows exactly the JSON IR thatopeniac irprints.ir.json, switches the editor language, and makes Copy/download follow the active view. Pressing it again, or choosing AWS CDK / Pulumi, returns to the generated TypeScript.openiac.codewithzeal.com, add a screenshot of the playground at the top with an open-beta call to action, and document the new export in the architecture notes.Testing
node --check playground/app.js;gofmt -l .,go vet ./...,go test ./...make wasm,make build,make conformance-status-check0.2, expected resource IDs, parse errors surface asok: falseir.jsonwith "Generated the universal IR. · schema 0.2"; pressing it again restoresindex.tswith "Converted to AWS CDK."Notes
The screenshot is captured from this branch's build, so the live Worker shows the IR button once the playground is deployed with
make wasm && cd deploy/cloudflare && wrangler deploy.