Fix workspace switch cache isolation#517
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c4cf2a541
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| activeWorkspace?.id, | ||
| activeWorkspace?.relayUrl, | ||
| activeWorkspace?.token, | ||
| workspaceKey, |
There was a problem hiding this comment.
Exclude reinit-only key from workspace reset trigger
Adding workspaceKey to this effect’s dependencies makes every reconnectWorkspace() bump run resetWorkspaceState(), even when the active workspace is unchanged. In the deep-link flow, reconnectWorkspace() is always called after connect handling, so reconnecting to an already-active relay now clears module caches such as drafts (clearAllDrafts) and search hits for the same workspace, which is user-visible data loss rather than cross-workspace isolation.
Useful? React with 👍 / 👎.
Summary
Testing