Isolate branch switcher query from WorkspaceScreenContent to prevent 20ms re-renders

Move useBranchSwitcher into BranchSwitcher component so query state
changes only re-render the small header widget instead of the entire
workspace screen. Also memo-wrap AgentStatusBar to skip re-renders
on keystroke.
This commit is contained in:
Mohamed Boudra
2026-04-12 12:38:46 +07:00
parent cde10485d4
commit acb294b9eb
4 changed files with 43 additions and 37 deletions
+5 -1
View File
@@ -5876,7 +5876,11 @@ export class Session {
};
const lastEmitted = subscription.lastEmittedByWorkspaceId.get(workspaceId);
if (lastEmitted && lastEmitted.kind === "upsert" && equal(lastEmitted.workspace, nextWorkspace)) {
if (
lastEmitted &&
lastEmitted.kind === "upsert" &&
equal(lastEmitted.workspace, nextWorkspace)
) {
continue;
}