@devries-cameron20 / t3code Mirror · read-only / commits / 8e8904a159
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 25, 08:45 UTC

refactor(web): remove redundant double parse of diff route search params (#598)

`rawSearch` is already the output of `parseDiffRouteSearch` via the `useSearch` select transform. The `useMemo` at line 760 re-parsed it through the same function with an unsafe `as Record<string, unknown>` cast, producing an identical result. Use `rawSearch` directly instead.

0x1f99d committed Mar 9, 2026 at 15:55 UTC 8e8904a159e3b29fa1eae0e6f023872ef03a3f63
1 file changed +1 -5
apps/web/src/components/ChatView.tsx
+1 -5
@@ -753,11 +753,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
753 composerDraft.interactionMode ?? activeThread?.interactionMode ?? DEFAULT_INTERACTION_MODE;
754 const isServerThread = serverThread !== undefined;
755 const isLocalDraftThread = !isServerThread && localDraftThread !== undefined;
756 - const diffSearch = useMemo(
757 - () => parseDiffRouteSearch(rawSearch as Record<string, unknown>),
758 - [rawSearch],
759 - );
760 - const diffOpen = diffSearch.diff === "1";
756 + const diffOpen = rawSearch.diff === "1";
757 const activeThreadId = activeThread?.id ?? null;
758 const activeLatestTurn = activeThread?.latestTurn ?? null;
759 const latestTurnSettled = isLatestTurnSettled(activeLatestTurn, activeThread?.session ?? null);