From f3c8ef86b869ef7a2a14bd7cc149c23a1c62cd6e Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Thu, 12 Nov 2026 20:17:55 -0800 Subject: [PATCH] perf(sidebar): skip Hidden projects host labels while collapsed (#41788) --- .../sidebar/hidden-projects/HiddenProjectsSection.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/renderer/src/components/sidebar/hidden-projects/HiddenProjectsSection.tsx b/src/renderer/src/components/sidebar/hidden-projects/HiddenProjectsSection.tsx index 9c8d48edc52..c349572193f 100644 --- a/src/renderer/src/components/sidebar/hidden-projects/HiddenProjectsSection.tsx +++ b/src/renderer/src/components/sidebar/hidden-projects/HiddenProjectsSection.tsx @@ -36,8 +36,10 @@ const HiddenProjectsSection = React.memo(function HiddenProjectsSection() { const [expanded, setExpanded] = useState(false) const [pendingKeys, setPendingKeys] = useState>(new Set()) // Name hosts only when one is not this computer; a local-only list needs no host column. + // Why: this selector reruns on every store write; skip it while the list is collapsed. const hostLabels = useAppStore( useShallow((state) => + expanded && hiddenRepos.some((repo) => getRepoExecutionHostId(repo) !== LOCAL_EXECUTION_HOST_ID) ? hiddenRepos.map((repo) => selectExecutionHostDisplayLabel(state, getRepoExecutionHostId(repo))