Skip to content

The open source coding agent.

TypeScript

fix(app): open workspace if navigating to session in workspace

Adam2ccaa10e7961
diff --git a/packages/app/src/pages/layout.tsx b/packages/app/src/pages/layout.tsx
index 83350306818..c48c43b0bf5 100644
--- a/packages/app/src/pages/layout.tsx
+++ b/packages/app/src/pages/layout.tsx
@@ -745,7 +745,10 @@ export default function Layout(props: ParentProps) {
const directory = base64Decode(dir)
setStore("lastSession", directory, id)
notification.session.markViewed(id)
- untrack(() => setStore("workspaceExpanded", directory, (current) => current ?? true))
+ const expanded = untrack(() => store.workspaceExpanded[directory])
+ if (expanded === false) {
+ setStore("workspaceExpanded", directory, true)
+ }
requestAnimationFrame(() => scrollToSession(id, `${directory}:${id}`))
},
{ defer: true },