Debug Sieve scripts in a playground that ships with the console #97

Merged
jcoffey-dev merged 1 commits from sieve-playground into main 2026-10-09 08:34:02 +00:00
Owner

The Debug button on a Sieve script sent a copy to an outside playground. Its interpreter only knows upstream's extension names, so a script that requires vnd.inbuxa.expressions or vnd.inbuxa.while failed to compile there, and the button took admins to another project's site.

The playground now ships with the console and runs the server's own interpreter, built from inbuxa/inbuxa-server#181.

  • sieve-playground/: built by that PR's tools/sieve-playground/build.sh --admin. It's generated, and SOURCE.md names the server commit. The build is reproducible: rebuilding from the pushed commit gave the same bytes.
  • sieve-playground.ts (Vite plugin): copies that directory, plus Monaco 0.52.2's editor core from node_modules (new exact devDependency, MIT), into sieve-playground/<content hash>/. The hash matters because the server caches every file but the console's index.html for good. The plugin gives the console the path as __SIEVE_PLAYGROUND__ and serves the same files under npm run dev.
  • The button opens ./sieve-playground/<hash>/index.html#w=…: same origin, same link format as before. The warning dialog is gone, since nothing leaves the console.

Strings (en.json, the console's only catalogue): sievepad.failed reworded, sievepad.debugHint added (the button's tooltip), and dontShowAgain, warningTitle and warningDescription removed.

Size: webui.zip grows from 1.3 MB to 3.4 MB: 0.9 MB of compressed WebAssembly, the rest Monaco.

Checked: typecheck, lint, i18n:check, test (651), build and notice-check all pass locally. I also opened the built dist/ in Chrome through a Debug-style link: the engine loaded, the script compiled and ran (fileinto, vacation reply, llm_prompt note), and the console showed no errors.

Merge after inbuxa/inbuxa-server#181, so SOURCE.md names a commit on main.

The **Debug** button on a Sieve script sent a copy to an outside playground. Its interpreter only knows upstream's extension names, so a script that requires `vnd.inbuxa.expressions` or `vnd.inbuxa.while` failed to compile there, and the button took admins to another project's site. The playground now ships with the console and runs the server's own interpreter, built from inbuxa/inbuxa-server#181. - `sieve-playground/`: built by that PR's `tools/sieve-playground/build.sh --admin`. It's generated, and `SOURCE.md` names the server commit. The build is reproducible: rebuilding from the pushed commit gave the same bytes. - `sieve-playground.ts` (Vite plugin): copies that directory, plus Monaco 0.52.2's editor core from `node_modules` (new exact devDependency, MIT), into `sieve-playground/<content hash>/`. The hash matters because the server caches every file but the console's `index.html` for good. The plugin gives the console the path as `__SIEVE_PLAYGROUND__` and serves the same files under `npm run dev`. - The button opens `./sieve-playground/<hash>/index.html#w=…`: same origin, same link format as before. The warning dialog is gone, since nothing leaves the console. **Strings (en.json, the console's only catalogue):** `sievepad.failed` reworded, `sievepad.debugHint` added (the button's tooltip), and `dontShowAgain`, `warningTitle` and `warningDescription` removed. **Size:** webui.zip grows from 1.3 MB to 3.4 MB: 0.9 MB of compressed WebAssembly, the rest Monaco. **Checked:** typecheck, lint, i18n:check, test (651), build and notice-check all pass locally. I also opened the built `dist/` in Chrome through a Debug-style link: the engine loaded, the script compiled and ran (fileinto, vacation reply, `llm_prompt` note), and the console showed no errors. **Merge after inbuxa/inbuxa-server#181**, so `SOURCE.md` names a commit on main.
jcoffey-dev added 1 commit 2026-10-09 08:15:11 +00:00
Debug Sieve scripts in a playground that ships with the console
ci / build (pull_request) Skipped
ci / publish (pull_request) Skipped
ci / notices (pull_request) Successful in 49s
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 1m3s
98413e684c
The Debug button on a Sieve script sent a copy to an outside site, whose
interpreter knows only upstream's extension names: a script that requires
vnd.inbuxa.expressions or vnd.inbuxa.while failed to compile there, and
the button took admins to another project's site.

The playground now ships inside the console and runs the server's own
interpreter. sieve-playground/ is built by inbuxa-server's
tools/sieve-playground (SOURCE.md names the commit); sieve-playground.ts
copies it, with Monaco 0.52.2 from node_modules, into
sieve-playground/<content hash>/ (the server caches every file but the
console's index.html for good) and gives the console its path. The
script stays on the console's origin, so the warning dialog before
opening it is gone.

Strings (en.json): sievepad.failed reworded, sievepad.debugHint added,
the three warning-dialog strings removed.

webui.zip grows from 1.3 MB to 3.4 MB: 0.9 MB of compressed WebAssembly,
the rest Monaco's editor core.
jcoffey-dev merged commit 6d7ed82806 into main 2026-10-09 08:34:02 +00:00
jcoffey-dev deleted branch sieve-playground 2026-10-09 08:34:02 +00:00
Sign in to join this conversation.