MCPcopy Create free account
hub / github.com/block/buzz / resetWorkspaceState

Function resetWorkspaceState

desktop/src/features/workspaces/useWorkspaceInit.ts:27–36  ·  view source on GitHub ↗

* Tear down all workspace-scoped module singletons so the new * workspace starts with a clean slate. Hook-managed singletons * (e.g. ChannelMuteSyncManager, ChannelSectionSyncManager) are * destroyed via effect cleanup and do not need entries here. * See AGENTS.md "Workspace Switching" for the f

()

Source from the content-addressed store, hash-verified

25 * See AGENTS.md "Workspace Switching" for the full contract.
26 */
27function resetWorkspaceState(): void {
28 relayClient.disconnect();
29 resetAgentObserverStore();
30 resetSidebarRelayConnectionCardState();
31 resetMediaCaches();
32 resetVideoPlayerState();
33 resetRenderScopedReactionHydration();
34 clearSearchHitEventCache();
35 clearAllDrafts();
36}
37
38type WorkspaceInitResult =
39 | { isReady: true; needsSetup: false; appliedKey: string }

Callers 1

initFunction · 0.85

Calls 8

resetAgentObserverStoreFunction · 0.90
resetMediaCachesFunction · 0.90
resetVideoPlayerStateFunction · 0.90
clearSearchHitEventCacheFunction · 0.90
clearAllDraftsFunction · 0.90
disconnectMethod · 0.45

Tested by

no test coverage detected