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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user