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.
This commit is contained in:
Anso
2026-05-19 00:13:44 -04:00
committed by GitHub
parent 1f673073ca
commit 3a839b781b
@@ -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(); }}