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): settings project groups compile without manual memoization (#20668)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 16, 2026 at 21:55 UTC
3f5c16fa2b97597f85ec31dff5dc4db06f377483
1 file changed
+7
-11
apps/web/src/components/settings/useSettingsProjectGroups.ts
+7
-11
@@ -1,5 +1,3 @@
1
-import { useMemo } from "react";
2
-
1
import { useClientSettings } from "../../hooks/useSettings";
2
import { selectProjectGroupingSettings } from "../../logicalProject";
3
import { buildSidebarProjectSnapshots } from "../../sidebarProjectGrouping";
@@ -11,13 +9,11 @@ export function useSettingsProjectGroups() {
9
const settings = useClientSettings(selectProjectGroupingSettings);
10
const primaryEnvironmentId = usePrimaryEnvironmentId();
11
const { environments } = useEnvironments();
14
- return useMemo(() => {
15
- const labels = new Map(environments.map((entry) => [entry.environmentId, entry.label]));
16
- return buildSidebarProjectSnapshots({
17
- projects,
18
- settings,
19
- primaryEnvironmentId,
20
- resolveEnvironmentLabel: (id) => labels.get(id) ?? null,
21
- }).sort((a, b) => a.displayName.localeCompare(b.displayName));
22
- }, [environments, primaryEnvironmentId, projects, settings]);
12
+ const labels = new Map(environments.map((entry) => [entry.environmentId, entry.label]));
13
+ return buildSidebarProjectSnapshots({
14
+ projects,
15
+ settings,
16
+ primaryEnvironmentId,
17
+ resolveEnvironmentLabel: (id) => labels.get(id) ?? null,
18
+ }).sort((a, b) => a.displayName.localeCompare(b.displayName));
19
}