summaryrefslogtreecommitdiffhomepage
path: root/packages/app/src/context
diff options
context:
space:
mode:
Diffstat (limited to 'packages/app/src/context')
-rw-r--r--packages/app/src/context/global-sync.tsx9
-rw-r--r--packages/app/src/context/platform.tsx3
2 files changed, 11 insertions, 1 deletions
diff --git a/packages/app/src/context/global-sync.tsx b/packages/app/src/context/global-sync.tsx
index ea0b90d5d..a0b257056 100644
--- a/packages/app/src/context/global-sync.tsx
+++ b/packages/app/src/context/global-sync.tsx
@@ -124,12 +124,19 @@ function createGlobalSync() {
return globalSDK.client.session
.list({ directory, roots: true })
.then((x) => {
- const fourHoursAgo = Date.now() - 4 * 60 * 60 * 1000
const nonArchived = (x.data ?? [])
.filter((s) => !!s?.id)
.filter((s) => !s.time?.archived)
.slice()
.sort((a, b) => a.id.localeCompare(b.id))
+
+ const sandboxWorkspace = globalStore.project.some((p) => (p.sandboxes ?? []).includes(directory))
+ if (sandboxWorkspace) {
+ setStore("session", reconcile(nonArchived, { key: "id" }))
+ return
+ }
+
+ const fourHoursAgo = Date.now() - 4 * 60 * 60 * 1000
// Include up to the limit, plus any updated in the last 4 hours
const sessions = nonArchived.filter((s, i) => {
if (i < limit) return true
diff --git a/packages/app/src/context/platform.tsx b/packages/app/src/context/platform.tsx
index b0822e707..6d2d3db06 100644
--- a/packages/app/src/context/platform.tsx
+++ b/packages/app/src/context/platform.tsx
@@ -5,6 +5,9 @@ export type Platform = {
/** Platform discriminator */
platform: "web" | "desktop"
+ /** Desktop OS (Tauri only) */
+ os?: "macos" | "windows" | "linux"
+
/** App version */
version?: string