From 333b8e907bb758adca3da69f4af72b9abe08777a Mon Sep 17 00:00:00 2001
From: Adam <2363879+adamdotdevin@users.noreply.github.com>
Date: Tue, 18 Nov 2025 11:35:17 -0600
Subject: fix(desktop): busy state and reactivity

---
 packages/desktop/src/context/global-sync.tsx | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'packages/desktop/src/context/global-sync.tsx')

diff --git a/packages/desktop/src/context/global-sync.tsx b/packages/desktop/src/context/global-sync.tsx
index 99c679c93..785a39928 100644
--- a/packages/desktop/src/context/global-sync.tsx
+++ b/packages/desktop/src/context/global-sync.tsx
@@ -11,6 +11,7 @@ import type {
   Project,
   FileDiff,
   Todo,
+  SessionStatus,
 } from "@opencode-ai/sdk"
 import { createStore, produce, reconcile } from "solid-js/store"
 import { Binary } from "@/utils/binary"
@@ -25,6 +26,9 @@ type State = {
   config: Config
   path: Path
   session: Session[]
+  session_status: {
+    [sessionID: string]: SessionStatus
+  }
   session_diff: {
     [sessionID: string]: FileDiff[]
   }
@@ -68,6 +72,7 @@ export const { use: useGlobalSync, provider: GlobalSyncProvider } = createSimple
           agent: [],
           provider: [],
           session: [],
+          session_status: {},
           session_diff: {},
           todo: {},
           limit: 10,
@@ -108,6 +113,10 @@ export const { use: useGlobalSync, provider: GlobalSyncProvider } = createSimple
         case "todo.updated":
           setStore("todo", event.properties.sessionID, event.properties.todos)
           break
+        case "session.status": {
+          setStore("session_status", event.properties.sessionID, event.properties.status)
+          break
+        }
         case "message.updated": {
           const messages = store.message[event.properties.info.sessionID]
           if (!messages) {
-- 
cgit v1.2.3

