History

Complete orchestration V2 frontend cutover

- Migrate web and mobile state, commands, and persistence to V2 projections - Render conversations from authoritative visible turn items - Harden runtime policy, launch handling, attachments, and cache invalidation

Julius Marminge committed 4 months ago

Commit 3991a001 parent 75e1269111 files · +6259 −9197Browse files

Showing the changes to apps/web/src/diffPanelStore.ts (1 of 111 files). Show all

Unified · Split

apps/web/src/diffPanelStore.ts+5−5
@@ -1,5 +1,5 @@
11 import { scopedThreadKey } from "@t3tools/client-runtime/environment";
2−import type { ScopedThreadRef, TurnId } from "@t3tools/contracts";
2+import type { RunId, ScopedThreadRef } from "@t3tools/contracts";
33 import { create } from "zustand";
44 import { createJSONStorage, persist } from "zustand/middleware";
55
@@ -8,7 +8,7 @@ import { resolveStorage } from "./lib/storage"; · 2 unmodified lines
88 export type DiffPanelSelection =
99 | { kind: "branch"; baseRef: string | null }
1010 | { kind: "unstaged" }
11− | { kind: "turn"; turnId: TurnId; filePath: string | null; revealRequestId: number };
11+ | { kind: "turn"; turnId: RunId; filePath: string | null; revealRequestId: number };
1212
1313 const DEFAULT_SELECTION: DiffPanelSelection = { kind: "branch", baseRef: null };
1414 const DEFAULT_WORKING_TREE_SELECTION: DiffPanelSelection = { kind: "unstaged" };
@@ -18,8 +18,8 @@ interface DiffPanelStoreState { · 3 unmodified lines
1818 branchBaseRefByThreadKey: Record<string, string | null>;
1919 selectGitScope: (ref: ScopedThreadRef, scope: "branch" | "unstaged") => void;
2020 selectBranchBaseRef: (ref: ScopedThreadRef, baseRef: string | null) => void;
21− selectTurn: (ref: ScopedThreadRef, turnId: TurnId, filePath?: string) => void;
22− reconcileTurnSelection: (ref: ScopedThreadRef, availableTurnIds: ReadonlyArray<TurnId>) => void;
21+ selectTurn: (ref: ScopedThreadRef, turnId: RunId, filePath?: string) => void;
22+ reconcileTurnSelection: (ref: ScopedThreadRef, availableTurnIds: ReadonlyArray<RunId>) => void;
2323 removeThread: (ref: ScopedThreadRef) => void;
2424 }
2525
@@ -119,7 +119,7 @@ export const useDiffPanelStore = create<DiffPanelStoreState>()( · 93 unmodified lines
119119 }),
120120 {
121121 name: "t3code:diff-panel-state:v1",
122− version: 1,
122+ version: 2,
123123 storage: createJSONStorage(() =>
124124 resolveStorage(typeof window !== "undefined" ? window.localStorage : undefined),
125125 ),