Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

Fix web typecheck regressions after rebase

Julius Marminge978c8101395e
diff --git a/apps/web/src/components/DiffPanel.tsx b/apps/web/src/components/DiffPanel.tsx
index 6cf7b61ce..bb2664564 100644
--- a/apps/web/src/components/DiffPanel.tsx
+++ b/apps/web/src/components/DiffPanel.tsx
@@ -6,6 +6,7 @@ import {
WorkerPoolContextProvider,
} from "@pierre/diffs/react";
import { useQuery, useQueryClient } from "@tanstack/react-query";
+import { useParams } from "@tanstack/react-router";
import { Columns2Icon, Rows3Icon } from "lucide-react";
import { type ReactNode, useEffect, useMemo, useRef, useState } from "react";
import { checkpointDiffQueryOptions, providerQueryKeys } from "~/lib/providerReactQuery";
@@ -105,7 +106,10 @@ export default function DiffPanel({ mode = "inline" }: DiffPanelProps) {
const queryClient = useQueryClient();
const [diffRenderMode, setDiffRenderMode] = useState<DiffRenderMode>("stacked");
const patchViewportRef = useRef<HTMLDivElement>(null);
- const activeThread = state.threads.find((thread) => thread.id === state.activeThreadId);
+ const params = useParams({ strict: false });
+ const routeThreadId = typeof params.threadId === "string" ? params.threadId : null;
+ const activeThreadId = state.diffThreadId ?? routeThreadId;
+ const activeThread = state.threads.find((thread) => thread.id === activeThreadId);
const activeThreadRuntimeId =
activeThread?.codexThreadId ?? activeThread?.session?.threadId ?? null;
const activeSessionId = activeThread?.session?.sessionId ?? null;
diff --git a/apps/web/src/threadFactory.ts b/apps/web/src/threadFactory.ts
index 812564c0c..8b8449164 100644
--- a/apps/web/src/threadFactory.ts
+++ b/apps/web/src/threadFactory.ts
@@ -33,6 +33,7 @@ export function createThread(projectId: string, options: CreateThreadOptions = {
session: null,
messages: [],
events: [],
+ turnDiffSummaries: [],
error: null,
createdAt,
branch: options.branch ?? null,