From a67165ba5ddb999d630b55d10ae9dc89ea10e335 Mon Sep 17 00:00:00 2001 From: Guilhem Lemouel Date: Tue, 22 Sep 2026 09:05:20 +0200 Subject: [PATCH] fix: preserve raw app editor focus during ai file updates --- frontend/src/lib/components/raw_apps/RawAppEditor.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/components/raw_apps/RawAppEditor.svelte b/frontend/src/lib/components/raw_apps/RawAppEditor.svelte index 1154bb308b..1b8578c3ef 100644 --- a/frontend/src/lib/components/raw_apps/RawAppEditor.svelte +++ b/frontend/src/lib/components/raw_apps/RawAppEditor.svelte @@ -994,9 +994,9 @@ files = {} } files[path] = content - // Combined setFilesAndSelect avoids a race, so let it do the telling. - select({ kind: 'file', path }, { notifyIframe: false }) - setFilesAndSelectInIframe(files, path) + // AI edits must not switch away from the file the user is editing. + ensureFileTab(path) + setFilesInIframe(files) return lint() }, deleteFrontendFile: (path) => {