mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-20 15:22:59 +00:00
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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user