mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
A runtime host emits one `reposChanged` client event for project-group and folder-workspace mutations as well as repo mutations (createProjectGroup, moveProjectToGroup, createFolderWorkspace, ... all call notifyReposChanged), but the client's handler only refetched that host's repo catalog, worktrees, and lineage. Group and folder-workspace rows for a remote runtime therefore stayed stale for the rest of the session unless an unrelated *local* `repos:changed` happened to fire the all-host sweep. Refetch the environment's project group and folder workspace catalogs in the same scheduled refresh. Groups are fetched first because folder workspaces resolve their owning group from `projectGroups`. Both fetches are host-fenced (`claimHostCatalogFence`), so they cannot clobber local or other runtimes' rows, and the scheduler's existing debounce/min-interval still bounds them.