[pull] main from Comfy-Org:main - #36
Merged
Merged
Conversation
…5094) ## Summary Model the existing workspace lifecycle invariant directly in the store: the active workspace is selected during initialization and changing workspaces performs a full page reload, so consumers must not mutate `activeWorkspaceId` in the current document. ## Why The previous implementation exposed `activeWorkspaceId` as writable even though production workspace transitions always persist the target and reload. That allowed tests and defensive consumer logic to model an unsupported same-document A → B transition. In `useSubscription`, this led to workspace-keyed request coalescing and stale-workspace handling for a transition that cannot occur through the production API. The `null → workspace` initialization transition remains internal to `teamWorkspaceStore` and is completed behind `WorkspaceAuthGate` before routed content renders. ## Changes - Expose `activeWorkspaceId` as a readonly computed value while retaining mutations inside `teamWorkspaceStore` initialization and identity reset. - Coalesce subscription status requests only when both the authenticated user and workspace context match. - Discard responses from the previous account after an identity switch, while removing tests based on unsupported direct workspace-only mutation. - Replace cross-store tests that need synthetic workspace state with explicit dependency mocks rather than mutating the production store. ## Validation - `pnpm typecheck` - ESLint on all changed files - 235 focused tests across subscription, workspace UI, partner-node governance, and auth stores No UI changed, so screenshots and E2E coverage are not applicable. --------- Co-authored-by: Connor Byrne <c.byrne@comfy.org> Co-authored-by: dante01yoon <bunggl@naver.com> Co-authored-by: Amp <amp@ampcode.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )