summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/pages
diff options
context:
space:
mode:
authorParker Smith <[email protected]>2026-02-04 13:27:02 -0700
committerGitHub <[email protected]>2026-02-04 14:27:02 -0600
commit41bc4ec7f0a42d6350b2af5ad44c7a308ee26b25 (patch)
tree66080e51f77d89279cd6c28254a820aa1649ec85 /packages/app/src/pages
parent912098928a2c77537a632aee841daf95c6971e04 (diff)
downloadopencode-41bc4ec7f0a42d6350b2af5ad44c7a308ee26b25.tar.gz
opencode-41bc4ec7f0a42d6350b2af5ad44c7a308ee26b25.zip
fix(desktop): Refresh file contents when changing workspaces to not have stale contents (#11728)
Diffstat (limited to 'packages/app/src/pages')
-rw-r--r--packages/app/src/pages/session.tsx16
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/app/src/pages/session.tsx b/packages/app/src/pages/session.tsx
index 7f005c56e..3fa71244b 100644
--- a/packages/app/src/pages/session.tsx
+++ b/packages/app/src/pages/session.tsx
@@ -1670,6 +1670,22 @@ export default function Page() {
void (refresh ? file.tree.refresh("") : file.tree.list(""))
})
+ createEffect(
+ on(
+ () => params.dir,
+ () => {
+ void file.tree.list("")
+
+ const active = tabs().active()
+ if (!active) return
+ const path = file.pathFromTab(active)
+ if (!path) return
+ void file.load(path, { force: true })
+ },
+ { defer: true },
+ ),
+ )
+
const autoScroll = createAutoScroll({
working: () => true,
overflowAnchor: "dynamic",