feat(invite): show toast when invited to workspace

member:added event now includes workspace_name. Frontend shows a toast
notification when the current user is invited. Also clears stale member
list on workspace switch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Naiyuan Qing 2026-03-29 17:42:55 +08:00
parent 4914f1d5dd
commit 8d34e079e8
4 changed files with 11 additions and 4 deletions

View file

@ -96,7 +96,7 @@ export const useWorkspaceStore = create<WorkspaceStore>((set, get) => ({
// Clear stale data from other stores before switching
useIssueStore.getState().setIssues([]);
useInboxStore.getState().setItems([]);
set({ agents: [], skills: [] });
set({ members: [], agents: [], skills: [] });
await hydrateWorkspace(workspaces, ws.id);
},