Skip to content

Commit 497a2f9

Browse files
perf(web): settings project groups compile without manual memoization
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 70d60e0 commit 497a2f9

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

‎apps/web/reactCompiledFiles.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,5 @@ export const REACT_COMPILED_FILES = [
9696
"apps/web/src/components/pullRequest/PullRequestDetailPanel.tsx",
9797
"apps/web/src/components/ThreadTerminalDrawer.tsx",
9898
"apps/web/src/components/settings/SettingsPanels.tsx",
99+
"apps/web/src/components/settings/useSettingsProjectGroups.ts",
99100
] as const;
Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { useMemo } from "react";
2-
31
import { useClientSettings } from "../../hooks/useSettings";
42
import { selectProjectGroupingSettings } from "../../logicalProject";
53
import { buildSidebarProjectSnapshots } from "../../sidebarProjectGrouping";
@@ -11,13 +9,11 @@ export function useSettingsProjectGroups() {
119
const settings = useClientSettings(selectProjectGroupingSettings);
1210
const primaryEnvironmentId = usePrimaryEnvironmentId();
1311
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));
2319
}

0 commit comments

Comments
 (0)