mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
perf(sidebar): skip Hidden projects host labels while collapsed (#41788)
This commit is contained in:
@@ -36,8 +36,10 @@ const HiddenProjectsSection = React.memo(function HiddenProjectsSection() {
|
||||
const [expanded, setExpanded] = useState(false)
|
||||
const [pendingKeys, setPendingKeys] = useState<ReadonlySet<string>>(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))
|
||||
|
||||
Reference in New Issue
Block a user