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))