refactor(web): unify session creation into single page with path history

This commit is contained in:
weishu
2025-12-22 21:45:11 +08:00
parent 4290f539bd
commit 999ee64852
5 changed files with 323 additions and 74 deletions
+2 -7
View File
@@ -8,17 +8,12 @@ export function useAppGoBack(): () => void {
return useCallback(() => {
// Use explicit path navigation for consistent behavior across all environments
if (pathname.startsWith('/sessions/')) {
if (pathname === '/sessions/new') {
navigate({ to: '/sessions' })
return
}
if (pathname.endsWith('/spawn')) {
navigate({ to: '/machines' })
return
}
if (pathname.startsWith('/machines')) {
if (pathname.startsWith('/sessions/')) {
navigate({ to: '/sessions' })
return
}