Skip to content

Commit 964b129

Browse files
icecrasher321claude
andcommitted
docs(sandboxes): note that a JavaScript sandbox needs an import to apply
Cursor Bugbot pointed out that `useRemoteSandbox` keys on detected static import/require and never on the selected sandbox, so JavaScript without one runs locally and the selection has no effect. Keeping the behaviour: honouring the selection would force those blocks remote, and the large-value-ref guard immediately below would then reject code that runs fine today. Documenting it instead, next to the picker, since a selection that silently does nothing is only surprising if nothing says so. Python is unaffected — it always runs remotely, so its sandbox always applies. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c505851 commit 964b129

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

apps/docs/content/docs/en/workflows/blocks/function.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ pandas
100100

101101
Then open the block's advanced options and choose the sandbox under **Sandbox**.
102102

103+
In JavaScript the sandbox applies to code that uses `import` or `require`that is
104+
what sends the block to a remote sandbox in the first place, so a block without them
105+
keeps running locally and ignores the selection. Python always runs remotely, so a
106+
selected sandbox always applies.
107+
103108
<Callout type="info">
104109
Two sandboxes with the same language and the same package list share one build,
105110
so duplicating a set costs nothing. Editing a package list starts a new build;

0 commit comments

Comments
 (0)