From 3a839b781b17ef1b6d0ce2b8bb8028c423ca21ed Mon Sep 17 00:00:00 2001 From: Anso Date: Tue, 19 May 2026 00:13:44 -0400 Subject: [PATCH] fix(stack-editor): reset tab to compose.yaml when clicking edit (#1107) The Edit affordance on the stack anatomy panel previously only flipped the editor visibility flag and left activeTab whatever it was. After a user clicked Files (which set activeTab to 'files'), closed the editor, then clicked Edit, the editor reopened still on the Files tab instead of showing the compose.yaml editor. Make onEditCompose mirror the sibling onOpenFiles handler by also setting activeTab to 'compose', so the Edit button always lands on the compose editor regardless of which tab was last viewed. --- frontend/src/components/EditorLayout/EditorView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/EditorLayout/EditorView.tsx b/frontend/src/components/EditorLayout/EditorView.tsx index 4e558645..f10ec608 100644 --- a/frontend/src/components/EditorLayout/EditorView.tsx +++ b/frontend/src/components/EditorLayout/EditorView.tsx @@ -823,7 +823,7 @@ export function EditorView({ envContent={envContent} selectedEnvFile={selectedEnvFile} gitSourcePending={Boolean(gitSourcePendingMap[stackName])} - onEditCompose={() => setEditingCompose(true)} + onEditCompose={() => { setEditingCompose(true); setActiveTab('compose'); }} onOpenFiles={() => { setEditingCompose(true); setActiveTab('files'); }} onOpenGitSource={() => setGitSourceOpen(true)} onApplyUpdate={() => { void updateStack(); }}