diff --git a/frontend/src/lib/components/apps/editor/AppEditorHeaderDeploy.svelte b/frontend/src/lib/components/apps/editor/AppEditorHeaderDeploy.svelte index f31339df70..880c24810d 100644 --- a/frontend/src/lib/components/apps/editor/AppEditorHeaderDeploy.svelte +++ b/frontend/src/lib/components/apps/editor/AppEditorHeaderDeploy.svelte @@ -299,7 +299,13 @@ checked={policy.sandbox == true} on:change={(e) => { policy.sandbox = e.detail || undefined - setPublishState(e.detail ? 'Sandbox isolation enabled' : 'Sandbox isolation disabled') + // A not-yet-deployed app has no row to PATCH — `setPublishState` (POST + // /apps/update) would 404. The flag rides along in the `policy` the first + // deploy sends (createApp), so here we only mutate it locally. Persist + // incrementally once the app exists. + if (savedApp && !newApp) { + setPublishState(e.detail ? 'Sandbox isolation enabled' : 'Sandbox isolation disabled') + } }} disabled={!savedApp} /> @@ -310,8 +316,8 @@ on every surface (public URL and in-workspace). Leave it off if the app needs full browser features (IndexedDB, third-party auth/SDKs, OAuth redirects). - {#if !savedApp} -