fix(routing): split stack detail URL from compose editor URL (#1605)

Sidebar opens /stacks/:name (anatomy). Monaco uses /compose|/env|/files.
Refresh of a detail URL no longer opens the editor, and editor deep links
keep a hydration shell instead of flashing the dashboard.
This commit is contained in:
Anso
2026-07-09 12:05:36 -04:00
committed by GitHub
parent 7517a4f49c
commit 296ddff2a0
11 changed files with 216 additions and 28 deletions
@@ -1248,6 +1248,10 @@ export function useStackActions(options: UseStackActionsOptions) {
if (targetView !== 'editor' || !targetStack || targetStack !== stackListState.selectedFile) {
return isComposeDirty() || isEnvDirty();
}
// Leaving Monaco for stack detail on the same stack.
if (editorState.editingCompose && parsed.editorTab == null) {
return isComposeDirty() || isEnvDirty();
}
if (
parsed.editorTab === 'env'
&& editorState.activeTab === 'env'