fix: bug sweep — profile, mentions, deep links, channel links, doctor page (#480)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Wes
2026-05-05 12:08:22 -07:00
committed by GitHub
co-authored by Claude Opus 4.6
parent ea62664759
commit 89f4b5de07
7 changed files with 126 additions and 284 deletions
@@ -25,6 +25,8 @@ export type UseWorkspacesReturn = {
addWorkspace: (workspace: Workspace) => string;
removeWorkspace: (id: string) => void;
switchWorkspace: (id: string) => void;
/** Force the active workspace to re-init (e.g. after a deep-link reconnect). */
reconnectWorkspace: () => void;
updateWorkspace: (
id: string,
updates: Partial<Pick<Workspace, "name" | "relayUrl" | "token" | "pubkey">>,
@@ -117,15 +119,17 @@ function useWorkspacesInternal(): UseWorkspacesReturn {
const switchWorkspace = useCallback(
(id: string) => {
if (id === activeId) {
return;
}
if (id === activeId) return;
saveActiveWorkspaceId(id);
setActiveId(id);
},
[activeId],
);
const reconnectWorkspace = useCallback(() => {
setReinitKey((k) => k + 1);
}, []);
const updateWorkspace = useCallback(
(
id: string,
@@ -164,6 +168,7 @@ function useWorkspacesInternal(): UseWorkspacesReturn {
addWorkspace,
removeWorkspace,
switchWorkspace,
reconnectWorkspace,
updateWorkspace,
};
}