Files
windmill/frontend
Ruben Fiszel 28966bdbf1 fix(frontend): curl fallback for +Variable/+Resource in bash sandbox mode (#10235)
* fix(frontend): use curl fallback for +Variable/+Resource in bash sandbox mode

When a bash script uses `# sandbox <image>` or `# docker`, the body runs
inside a custom container image that does not have the `wmill` CLI
installed, so the `wmill variable get` / `wmill resource get` snippets
inserted by the +Variable and +Resource pickers fail.

Detect `# sandbox`/`# docker` in the editor code and insert a curl-based
snippet using the BASE_INTERNAL_URL, WM_TOKEN and WM_WORKSPACE env vars
(available in sandbox) instead.

Fixes WIN-2215

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(frontend): mirror worker grammar and use curl/wget fallback in sandbox mode

Address review of the bash sandbox picker fallback:

- Extract detection into `bashRunsInCustomImage`, mirroring the worker's
  BashAnnotations grammar (leading comment lines only; `# sandbox <image>`
  or bare `# docker`). A bare `# sandbox` is the nsjail-bash modifier that
  still runs on the worker rootfs where `wmill` is available, so it now
  correctly keeps the `wmill` snippet. This also fixes the substring
  false positives (`# sandboxed`, `# docker` in prose/body) and false
  negatives (`#sandbox <image>`).
- The default `# sandbox alpine:latest` image ships busybox `wget`, not
  `curl`, so the snippet now tries `curl` then falls back to `wget`.
- `variables/get_value` returns a JSON-quoted string; strip the outer
  quotes with `sed` so the sandbox snippet matches the `jq -r .value`
  output of the non-sandbox branch. Resources return JSON either way.
- Add focused unit tests for the detection grammar.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 10:53:52 +00:00
..
2026-01-22 16:20:01 +00:00
2025-12-23 18:19:30 +00:00
2026-02-19 09:33:33 +00:00
2026-03-05 18:11:40 +01:00
2026-01-22 16:20:01 +00:00
2026-03-18 11:38:22 +00:00

Windmill frontend

The Windmill frontend written in Svelte 5 + Tailwind CSS

The frontend is under AGPL, see the LICENSE file at the root of this repo