Gate workspace_update emissions to prevent unnecessary sidebar re-renders

Server: remove activityAt computation from workspace descriptors (always
sends null for backwards compat) and deduplicate emissions in
emitWorkspaceUpdatesForWorkspaceIds using fast-deep-equal — workspace
updates are now only sent when the descriptor actually changed.

Client: remove activityAt from WorkspaceDescriptor, sidebar entry types,
and baseline sort comparators. Workspace/project ordering is fully
handled by the persisted sidebar order store.
This commit is contained in:
Mohamed Boudra
2026-04-12 12:10:14 +07:00
parent b9269df3e4
commit 0d340959d7
12 changed files with 29 additions and 99 deletions
@@ -15,7 +15,6 @@ function workspace(overrides: Partial<SidebarWorkspaceEntry> = {}): SidebarWorks
workspaceId: "/repo",
workspaceKind: "directory",
name: "paseo",
activityAt: null,
statusBucket: "done",
diffStat: null,
...overrides,
@@ -31,7 +30,6 @@ function project(overrides: Partial<SidebarProjectEntry> = {}): SidebarProjectEn
statusBucket: "done",
activeCount: 0,
totalWorkspaces: 1,
latestActivityAt: null,
workspaces: [workspace()],
...overrides,
};