@devries-cameron20 / t3code Mirror · read-only / commits / 3ba121e9e8
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 23, 06:45 UTC

perf(web): the chat route layout compiles without manual memoization (#20667)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Oct 16, 2026 at 21:55 UTC 3ba121e9e843fbbc66111e65c18e37b6f102a56d
1 file changed +7 -11
apps/web/src/routes/_chat.tsx
+7 -11
@@ -1,7 +1,7 @@
1 import { AuthPreviewOperateScope } from "@t3tools/contracts";
2 import { Outlet, createFileRoute, redirect, useParams } from "@tanstack/react-router";
3 import { useAtomValue } from "@effect/atom-react";
4 -import { useEffect, useMemo } from "react";
4 +import { useEffect } from "react";
5
6 import { isCommandPaletteOpen } from "../commandPaletteBus";
7 import { ThreadRouteView } from "../components/ThreadRouteView";
@@ -46,16 +46,12 @@ function ChatRouteGlobalShortcuts() {
46 const projects = useProjects();
47 const primaryEnvironmentId = usePrimaryEnvironmentId();
48 const { scratchEnvironmentId, startScratchThread } = useScratchProject();
49 - const projectGroupCount = useMemo(
50 - () =>
51 - buildSidebarProjectSnapshots({
52 - projects,
53 - settings: projectGroupingSettings,
54 - primaryEnvironmentId,
55 - resolveEnvironmentLabel: () => null,
56 - }).length,
57 - [primaryEnvironmentId, projectGroupingSettings, projects],
58 - );
49 + const projectGroupCount = buildSidebarProjectSnapshots({
50 + projects,
51 + settings: projectGroupingSettings,
52 + primaryEnvironmentId,
53 + resolveEnvironmentLabel: () => null,
54 + }).length;
55 const terminalOpen = useTerminalUiStateStore((state) =>
56 routeThreadRef
57 ? selectThreadTerminalUiState(state.terminalUiStateByThreadKey, routeThreadRef).terminalOpen