Repository navigation
[backport core/1.49] fix: align profile billing action with distribution - #14806
Merged
Merged
Conversation
## Summary Align the profile billing action with the surface available in each distribution: - **Local/desktop:** show **Credits** with `lucide--coins`, opening Settings → Credits. - **Cloud:** keep **Manage plan** with `lucide--credit-card`, opening the workspace **Plan & Credits** surface. - **Cloud permissions:** hide **Manage plan** from members who cannot manage subscriptions; keep it visible for eligible owners of both personal and team workspaces. [FE-1485](https://linear.app/comfyorg/issue/FE-1485/credits-tab-is-visible-on-personal-workspace) · [final requirement clarification](https://comfy-organization.slack.com/archives/C0A4XMHANP3/p1785784408518089?thread_ts=1785681144.818179&cid=C0A4XMHANP3) ## Root cause The legacy profile popover hardcoded **Manage plan** and a file-text icon across distributions, even though local/desktop has no workspace plan-management surface and the action opens its standalone Credits panel. The workspace popover already enforced subscription-management permissions correctly, but its generic file-text icon did not distinguish plan management from the separate Plans & pricing action. The earlier version of this PR treated the standalone Credits settings tab as the regression and removed it from V0. The clarified requirement confirms that tab is required on local/desktop, so that change is fully reverted. ## Changes - Derive the legacy profile action label and icon from the distribution: - local/desktop → **Credits** + coins → `credits` - Cloud → **Manage plan** + credit card → `subscription` - Use the credit-card icon for Cloud workspace plan management. - Preserve existing `canManageSubscription` gating in the workspace popover. - Restore the original standalone Credits settings behavior. - Add regression coverage for local and Cloud legacy routing plus personal-owner, team-owner, and team-member workspace roles. ## Why previous tests missed it Existing tests only checked that the menu item existed. They did not assert its distribution-specific label, destination, or icon semantics. Workspace tests covered billing visibility in several roles but did not exercise plan-management navigation for both personal and team owners. The new tests assert the action text and destination in each distribution and cover owner/member permission behavior across workspace types. ## Review focus - Local/desktop must retain Settings → Credits and expose it as **Credits** with the coins icon. - Cloud must expose **Manage plan** with the credit-card icon only when the active user can manage subscriptions. - Eligible personal and team owners must both open workspace Plan & Credits. ## Verification - `pnpm test:unit src/components/topbar/CurrentUserPopoverLegacy.test.ts src/platform/workspace/components/CurrentUserPopoverWorkspace.test.ts` — 39 passed - `pnpm typecheck` - `pnpm typecheck:browser` - ESLint, Stylelint, oxlint, and oxfmt on touched files - pre-push `pnpm knip --cache` - Full GitHub CI, including Cloud and local Playwright projects — passed ## Screenshots ### AS IS — local/desktop The original real-app report shows **Manage plan** opening the local Credits surface. See the [source screenshots in the report](https://comfy-organization.slack.com/archives/C0A4XMHANP3/p1785681144818179). ### TO BE — local/desktop The profile action reads **Credits** and opens Settings with the standalone Credits panel selected.   ### TO BE — Cloud Cloud retains **Manage plan** and uses the credit-card icon, distinct from the receipt icon used by **Plans & pricing**.  Captured from the current PR head in the route-mocked real Cloud app. [Approved Cloud reference](https://comfy-organization.slack.com/archives/C0A4XMHANP3/p1785784445105449?thread_ts=1785681144.818179&cid=C0A4XMHANP3). --------- Co-authored-by: dante01yoon <6510430+dante01yoon@users.noreply.github.com> Co-authored-by: Amp <amp@ampcode.com>
comfy-pr-bot
enabled auto-merge (squash)
August 5, 2026 14:53
Contributor
🎭 Playwright: ✅ 1783 passed, 0 failed · 4 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook |
dante01yoon
approved these changes
Aug 5, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## core/1.49 #14806 +/- ##
==========================================
Coverage 78.75% 78.76%
==========================================
Files 1791 1791
Lines 104546 104548 +2
Branches 32923 32924 +1
==========================================
+ Hits 82338 82348 +10
+ Misses 21778 21770 -8
Partials 430 430
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Backport of #14602 to
core/1.49Automatically created by backport workflow.