graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
Fix project draft loading state
Pranav P450519e0da66
diff --git a/gui/src/app/sessionStore.test.ts b/gui/src/app/sessionStore.test.tsindex 55a56667..dfa3b733 100644--- a/gui/src/app/sessionStore.test.ts+++ b/gui/src/app/sessionStore.test.ts@@ -119,6 +119,8 @@ const {ensureWorkspaceRuntimeStatusLoaded,getAttachments,getPromptDraftState,+ getUiActiveConversationId,+ getUiActiveWorkspacePath,getWorkspaceMetaState,resetSessionStore,sessionStore,@@ -309,6 +311,17 @@ describe("sessionStore", () => {).toBeUndefined();});+ test("workspace draft selection ignores a stale active conversation", () => {+ sessionStore.getState().applySessionSnapshot(createSnapshot());+ sessionStore.getState().setBoardSelection({+ kind: "workspace-draft",+ workspacePath: "/workspace/other",+ });++ expect(getUiActiveWorkspacePath()).toBe("/workspace/other");+ expect(getUiActiveConversationId()).toBeNull();+ });+test("workspace meta loaders dedupe concurrent runtime requests and cache prompt settings", async () => {const pendingRuntimeStatus = deferred<RuntimeStatus | null>();runtimeStatusImpl = async () => pendingRuntimeStatus.promise;diff --git a/gui/src/app/sessionStore.ts b/gui/src/app/sessionStore.tsindex 279b9ceb..d9c0a44b 100644--- a/gui/src/app/sessionStore.ts+++ b/gui/src/app/sessionStore.ts@@ -755,6 +755,8 @@ export function getUiActiveConversationId(return state.selection.activeChat?.conversationId ?? null;case "single-chat":return state.selection.chat.conversationId;+ case "workspace-draft":+ return null;default:return state.activeConversationId;}