Skip to content

feat(playground): show the sandbox prelude output collapsed - #74

Open
pavlof01 wants to merge 2 commits into
mainfrom
feat/strip-prelude-output
Open

pavlof01 wants to merge 2 commits into
mainfrom
feat/strip-prelude-output

Conversation

@pavlof01

@pavlof01 pavlof01 commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Under --print-bytecode the V8 tab printed five generated bytecode blocks for a one-line snippet; four of them belonged to the sandbox lockdown shim the engine service loads ahead of the snippet.

  • engine-runtime: whenever any prelude loads (the lockdown shim for d8 and jsc, the console shim for jsc), a final prelude-end.js prints a marker line. stdout is returned from the line after it, and everything before it comes back as meta.preludeStdout. Output without a marker is returned untouched; Hermes and SpiderMonkey have no preludes and are unaffected.
  • frontend: the playground shows preludeStdout as a collapsed "sandbox prelude · N lines" row above the engine output; clicking it expands the prelude with the same highlighting and diff support. The snippet's own bytecode is what the pane opens on.

Verified on the dev stack: for function f(x){ return x + 1 } f(41); the pane shows the snippet's two blocks, and the collapsed row holds the 150-line prelude. For jsc one End: undefined line from prelude-end.js itself remains in stdout and the marker text shows up in the -d disassembly on stderr; that is left for a follow-up.

🤖 Generated with Claude Code

@pavlof01 pavlof01 changed the title feat(engine-runtime): drop prelude output from stdout feat(playground): show the sandbox prelude output collapsed Sep 8, 2026
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