Skip to content

Feat: Separate Subscription management and Upgrade options#7419

Merged
christian-byrne merged 2 commits intomainfrom
drjkl/management-button
Dec 12, 2025
Merged

Feat: Separate Subscription management and Upgrade options#7419
christian-byrne merged 2 commits intomainfrom
drjkl/management-button

Conversation

@DrJKL
Copy link
Contributor

@DrJKL DrJKL commented Dec 12, 2025

Summary

Manage Subscription vs Upgrade Plan

┆Issue is synchronized with this Notion page by Unito

@DrJKL DrJKL requested review from a team, KarryCharon, Yorha4D and shinshin86 as code owners December 12, 2025 21:35
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Dec 12, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 12, 2025

📝 Walkthrough

Walkthrough

Adds an "Upgrade Plan" localization string, introduces "Manage Subscription" and "Upgrade Plan" buttons to the subscription panel, and integrates useFirebaseAuthActions() so the Manage button calls authActions.accessBillingPortal(). Tests are updated to mock the auth composable.

Changes

Cohort / File(s) Summary
Localization
src/locales/en/main.json
Added upgradePlan: "Upgrade Plan" in the subscriptions/credits section.
Subscription Panel UI
src/platform/cloud/subscription/components/SubscriptionPanel.vue
Added two action buttons shown for active subscriptions: a "Manage Subscription" button that calls authActions.accessBillingPortal() (imports/initializes useFirebaseAuthActions, adds ml-auto and PT props, async handler) and an "Upgrade Plan" button that calls showSubscriptionDialog(). Added gap-2 to the button container.
Tests (mocks)
tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
Added a mock for @/composables/auth/useFirebaseAuthActions returning accessBillingPortal stub to simulate billing-portal access in tests.
Manifest listing
package.json
Included in PR manifest metadata (no code changes described).

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant UI as SubscriptionPanel.vue
  participant Auth as useFirebaseAuthActions
  participant Dialog as SubscriptionDialog
  participant Billing as Billing Portal

  rect rgb(240,248,255)
  User->>UI: Click "Manage Subscription"
  UI->>Auth: authActions.accessBillingPortal()
  Auth->>Billing: Request access / redirect token
  Billing-->>User: Open billing portal (redirect)
  end

  rect rgb(255,250,240)
  User->>UI: Click "Upgrade Plan"
  UI->>Dialog: showSubscriptionDialog()
  Dialog-->>User: Display upgrade dialog
  end
Loading

Possibly related PRs

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch drjkl/management-button

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Dec 12, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 12/12/2025, 10:00:45 PM UTC

📈 Summary

  • Total Tests: 502
  • Passed: 492 ✅
  • Failed: 0
  • Flaky: 1 ⚠️
  • Skipped: 9 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 483 / ❌ 0 / ⚠️ 1 / ⏭️ 9
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 6 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@github-actions
Copy link

github-actions bot commented Dec 12, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/12/2025, 09:51:42 PM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 12, 2025

Bundle Size Report

Summary

  • Raw size: 17.1 MB baseline 17.1 MB — 🔴 +31 B
  • Gzip: 3.39 MB baseline 3.39 MB — 🔴 +20 B
  • Brotli: 2.6 MB baseline 2.6 MB — 🟢 -224 B
  • Bundles: 97 current • 97 baseline • 39 added / 39 removed

Category Glance
App Entry Points 🔴 +31 B (3.24 MB) · Vendor & Third-Party ⚪ 0 B (8.56 MB) · Other ⚪ 0 B (3.81 MB) · Graph Workspace ⚪ 0 B (983 kB) · Panels & Settings ⚪ 0 B (298 kB) · UI Components ⚪ 0 B (178 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.24 MB (baseline 3.24 MB) • 🔴 +31 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-3VNJse85.js (new) 3.01 MB 🔴 +3.01 MB 🔴 +626 kB 🔴 +476 kB
assets/index-Cptm5_HR.js (removed) 3.01 MB 🟢 -3.01 MB 🟢 -626 kB 🟢 -477 kB
assets/index-D3yUQ2Y2.js (new) 227 kB 🔴 +227 kB 🔴 +48.6 kB 🔴 +39.8 kB
assets/index-ncDDatU8.js (removed) 227 kB 🟢 -227 kB 🟢 -48.6 kB 🟢 -39.8 kB
assets/index-BydX8XP4.js (removed) 345 B 🟢 -345 B 🟢 -245 B 🟢 -235 B
assets/index-Cf_HvC8F.js (new) 345 B 🔴 +345 B 🔴 +247 B 🔴 +208 B

Status: 3 added / 3 removed

Graph Workspace — 983 kB (baseline 983 kB) • ⚪ 0 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-BiMSDFHs.js (new) 983 kB 🔴 +983 kB 🔴 +190 kB 🔴 +145 kB
assets/GraphView-DjJAWPeR.js (removed) 983 kB 🟢 -983 kB 🟢 -190 kB 🟢 -145 kB

Status: 1 added / 1 removed

Views & Navigation — 6.54 kB (baseline 6.54 kB) • ⚪ 0 B

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-ChgGBVvP.js (removed) 6.54 kB 🟢 -6.54 kB 🟢 -2.14 kB 🟢 -1.89 kB
assets/UserSelectView-CmKt67WW.js (new) 6.54 kB 🔴 +6.54 kB 🔴 +2.14 kB 🔴 +1.89 kB

Status: 1 added / 1 removed

Panels & Settings — 298 kB (baseline 298 kB) • ⚪ 0 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-D9Nhc5FL.js (removed) 21.4 kB 🟢 -21.4 kB 🟢 -5.16 kB 🟢 -4.5 kB
assets/LegacyCreditsPanel-DPCKtEod.js (new) 21.4 kB 🔴 +21.4 kB 🔴 +5.16 kB 🔴 +4.5 kB
assets/KeybindingPanel-BeUC9oHl.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.01 kB
assets/KeybindingPanel-Cn1RbvkH.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.42 kB 🔴 +3.03 kB
assets/ExtensionPanel-CHyaGC0y.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.57 kB 🔴 +2.26 kB
assets/ExtensionPanel-TP0BLWlV.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.57 kB 🟢 -2.26 kB
assets/AboutPanel-B6Mlo1E4.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/AboutPanel-BKCXbsJV.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/ServerConfigPanel-CK6fEHXF.js (removed) 6.56 kB 🟢 -6.56 kB 🟢 -1.83 kB 🟢 -1.63 kB
assets/ServerConfigPanel-Iaitm1yf.js (new) 6.56 kB 🔴 +6.56 kB 🔴 +1.83 kB 🔴 +1.63 kB
assets/UserPanel-C2GMnPBX.js (new) 6.23 kB 🔴 +6.23 kB 🔴 +1.72 kB 🔴 +1.51 kB
assets/UserPanel-CWUrmDBR.js (removed) 6.23 kB 🟢 -6.23 kB 🟢 -1.72 kB 🟢 -1.51 kB
assets/settings-B_sqawkt.js 27.3 kB 27.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BlDXT7wp.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Bz8HAvJu.js 21.1 kB 21.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C2vW8UNv.js 24.2 kB 24.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C9vsDM17.js 25.1 kB 25.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DWD49kQp.js 33.3 kB 33.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DZE27_Iz.js 25.9 kB 25.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-OXaZPcZF.js 26.6 kB 26.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-RbkKsnDG.js 25.2 kB 25.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

UI Components — 178 kB (baseline 178 kB) • ⚪ 0 B

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/Load3D.vue_vue_type_script_setup_true_lang-C--PQusH.js (new) 53.7 kB 🔴 +53.7 kB 🔴 +8.49 kB 🔴 +7.29 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-DL69-Wfc.js (removed) 53.7 kB 🟢 -53.7 kB 🟢 -8.49 kB 🟢 -7.29 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-BFfV5w6L.js (removed) 48.1 kB 🟢 -48.1 kB 🟢 -10.4 kB 🟢 -9 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-CmKncAKd.js (new) 48.1 kB 🔴 +48.1 kB 🔴 +10.4 kB 🔴 +8.98 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-DZc3TYje.js (removed) 48 kB 🟢 -48 kB 🟢 -10.6 kB 🟢 -9.32 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-xi0srceT.js (new) 48 kB 🔴 +48 kB 🔴 +10.6 kB 🔴 +9.31 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-CikKY5sh.js (removed) 12.9 kB 🟢 -12.9 kB 🟢 -3.37 kB 🟢 -2.98 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-DLgNadBR.js (new) 12.9 kB 🔴 +12.9 kB 🔴 +3.37 kB 🔴 +2.96 kB
assets/ComfyQueueButton-Bk7wF2jo.js (removed) 8.44 kB 🟢 -8.44 kB 🟢 -2.48 kB 🟢 -2.22 kB
assets/ComfyQueueButton-DCGCUE49.js (new) 8.44 kB 🔴 +8.44 kB 🔴 +2.48 kB 🔴 +2.21 kB
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-BrrUZVDC.js (removed) 2.15 kB 🟢 -2.15 kB 🟢 -897 B 🟢 -766 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-Ctl2AOAx.js (new) 2.15 kB 🔴 +2.15 kB 🔴 +898 B 🔴 +767 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-BKJ8MyOC.js (new) 897 B 🔴 +897 B 🔴 +505 B 🔴 +444 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-BoiIFHqp.js (removed) 897 B 🟢 -897 B 🟢 -501 B 🟢 -429 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-Bjfb_hoW.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-Bm2lwPFd.js 2.04 kB 2.04 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 7 added / 7 removed

Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/keybindingService-CIcC579y.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.58 kB
assets/keybindingService-DgJCYixI.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.84 kB 🔴 +1.58 kB
assets/audioService-CMXy4dxJ.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +964 B 🔴 +830 B
assets/audioService-D13ci3Zv.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -963 B 🟢 -822 B
assets/serverConfigStore-BP9UaJXd.js 2.83 kB 2.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 2 added / 2 removed

Utilities & Hooks — 3.18 kB (baseline 3.18 kB) • ⚪ 0 B

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-D5l5aGC2.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -650 B 🟢 -543 B
assets/audioUtils-KzkfcQL5.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +652 B 🔴 +544 B
assets/mathUtil-CD4DsosH.js 1.32 kB 1.32 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeFilterUtil-CXKCRJ-m.js 460 B 460 B ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 1 added / 1 removed

Vendor & Third-Party — 8.56 MB (baseline 8.56 MB) • ⚪ 0 B

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-W_3Knk2t.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-BzuNIfYH.js 3.98 MB 3.98 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-CmhMHYBF.js 1.96 MB 1.96 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-aR6ntw5X.js 1.37 MB 1.37 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-DCLYW5rb.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-C3MDzIsc.js 160 kB 160 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BZLod3g9.js 407 kB 407 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 3.81 MB (baseline 3.81 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/WidgetRecordAudio-CIQwtJK9.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.23 kB 🟢 -4.63 kB
assets/WidgetRecordAudio-CtGWG1cA.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.24 kB 🔴 +4.62 kB
assets/AudioPreviewPlayer-1OawtQz8.js (removed) 13.4 kB 🟢 -13.4 kB 🟢 -3.37 kB 🟢 -3.01 kB
assets/AudioPreviewPlayer-BcZlnFql.js (new) 13.4 kB 🔴 +13.4 kB 🔴 +3.37 kB 🔴 +3 kB
assets/WidgetGalleria-BFrCzXUE.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.44 kB 🟢 -1.3 kB
assets/WidgetGalleria-BRb6X1Tr.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.3 kB
assets/WidgetColorPicker-BXBF8go4.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetColorPicker-JPiA9k8j.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetTextarea-BoLriZVt.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.21 kB 🟢 -1.08 kB
assets/WidgetTextarea-C2iW4dot.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.21 kB 🔴 +1.08 kB
assets/WidgetMarkdown-BiOnv-S1.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.12 kB
assets/WidgetMarkdown-ZJUWIl7A.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.13 kB
assets/WidgetAudioUI-DjFmZJ54.js (removed) 2.86 kB 🟢 -2.86 kB 🟢 -1.17 kB 🟢 -1.06 kB
assets/WidgetAudioUI-DzcwNtWg.js (new) 2.86 kB 🔴 +2.86 kB 🔴 +1.16 kB 🔴 +1.05 kB
assets/WidgetInputText-3HePtraT.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +917 B 🔴 +856 B
assets/WidgetInputText-DLaxcKd8.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -917 B 🟢 -852 B
assets/WidgetToggleSwitch-B56OjlL-.js (removed) 1.76 kB 🟢 -1.76 kB 🟢 -831 B 🟢 -732 B
assets/WidgetToggleSwitch-BxOdwUph.js (new) 1.76 kB 🔴 +1.76 kB 🔴 +834 B 🔴 +732 B
assets/MediaImageBottom-BLsYaIl8.js (new) 1.55 kB 🔴 +1.55 kB 🔴 +737 B 🔴 +641 B
assets/MediaImageBottom-J1undEoi.js (removed) 1.55 kB 🟢 -1.55 kB 🟢 -734 B 🟢 -639 B
assets/MediaAudioBottom-1wtWhgy1.js (removed) 1.51 kB 🟢 -1.51 kB 🟢 -733 B 🟢 -652 B
assets/MediaAudioBottom-B-3QXQga.js (new) 1.51 kB 🔴 +1.51 kB 🔴 +737 B 🔴 +651 B
assets/Media3DBottom-CC4Iuk2b.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -730 B 🟢 -650 B
assets/Media3DBottom-CLl7NU77.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +735 B 🔴 +652 B
assets/MediaVideoBottom-BThJ0WNZ.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -732 B 🟢 -652 B
assets/MediaVideoBottom-CnJ7Pm4Z.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +735 B 🔴 +650 B
assets/Media3DTop-CM0-Knty.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +764 B 🔴 +653 B
assets/Media3DTop-Lz7-u4QU.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -765 B 🟢 -654 B
assets/WidgetSelect-B5eZoilB.js (new) 655 B 🔴 +655 B 🔴 +341 B 🔴 +289 B
assets/WidgetSelect-CTWWfAj-.js (removed) 655 B 🟢 -655 B 🟢 -340 B 🟢 -291 B
assets/WidgetInputNumber-B0o3AqFF.js (removed) 595 B 🟢 -595 B 🟢 -328 B 🟢 -274 B
assets/WidgetInputNumber-C-L-eYDk.js (new) 595 B 🔴 +595 B 🔴 +327 B 🔴 +278 B
assets/Load3D-CbVhIbCV.js (new) 424 B 🔴 +424 B 🔴 +265 B 🔴 +224 B
assets/Load3D-Cph909oB.js (removed) 424 B 🟢 -424 B 🟢 -263 B 🟢 -223 B
assets/WidgetLegacy-CsX1yaQH.js (removed) 364 B 🟢 -364 B 🟢 -235 B 🟢 -193 B
assets/WidgetLegacy-oOtxQr_p.js (new) 364 B 🔴 +364 B 🔴 +236 B 🔴 +193 B
assets/commands-_s-RvhJR.js 13.6 kB 13.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BuUILW6P.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BV4R6fLx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CLwPdnT6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CWMchBmd.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DazTQhtc.js 12.9 kB 12.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DmWrOe93.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwiH7Kr6.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-mS3LCNPn.js 14.5 kB 14.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BMi-Aksj.js 99 kB 99 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CqR8skJT.js 73.1 kB 73.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DcRHAFEy.js 81.7 kB 81.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DdFdLxku.js 72.2 kB 72.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DJAtuVu5.js 84.3 kB 84.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DK8I9Rk3.js 114 kB 114 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-gP_ssnMb.js 83.4 kB 83.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-nxXY9vGp.js 94 kB 94 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Ycd3gqkA.js 86.5 kB 86.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-taU5Yj_Q.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-BoT3yC-l.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-Csf8f_9c.js 2.65 kB 2.65 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BC3OlaIn.js 342 kB 342 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BsqN8-W1.js 285 kB 285 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CK2saYDx.js 307 kB 307 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Cm5kR4Hi.js 306 kB 306 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CMrh-uxB.js 310 kB 310 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DlUIOit1.js 369 kB 369 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DNu_xoP2.js 282 kB 282 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DpcvlpZe.js 303 kB 303 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-IyjOYIl-.js 317 kB 317 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-CWEwKtMY.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-DSf2ZEwg.js 2.21 kB 2.21 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 18 added / 18 removed

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Dec 12, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bfcd358 and b069aa5.

📒 Files selected for processing (1)
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
tests-ui/**/*.test.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (tests-ui/CLAUDE.md)

tests-ui/**/*.test.{js,ts,jsx,tsx}: Write tests for new features
Follow existing test patterns in the codebase
Use existing test utilities rather than writing custom utilities
Mock external dependencies in tests
Always prefer vitest mock functions over writing verbose manual mocks

Files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
**/*.{ts,tsx,js,jsx,vue,json}

📄 CodeRabbit inference engine (AGENTS.md)

Code style: Use 2-space indentation, single quotes, no trailing semicolons, and 80-character line width (see .prettierrc)

Files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Imports must be sorted and grouped by plugin; run pnpm format before committing
Use TypeScript for type safety; never use any type - use proper TypeScript types
Never use as any type assertions; fix the underlying type issue instead
Use es-toolkit for utility functions
Write code that is expressive and self-documenting; avoid comments unless absolutely necessary; do not add or retain redundant comments
Keep functions short and functional
Minimize nesting in code (e.g., deeply nested if or for statements); apply the Arrow Anti-Pattern principle
Avoid mutable state; prefer immutability and assignment at point of declaration
Favor pure functions, especially testable ones

Files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.test.ts: Write tests for all changes, especially bug fixes to catch future regressions
Unit/component test files must be named **/*.test.ts or in tests-ui/ directory
Do not write change detector tests that just assert default values
Do not write tests dependent on non-behavioral features like utility classes or styles
Be parsimonious in testing; do not write redundant tests; see composable tests approach
Follow 'Don't Mock What You Don't Own' principle - avoid mocking external dependencies
Do not write tests that just test the mocks; ensure tests fail when code behaves unexpectedly
Leverage Vitest's mocking utilities where possible for test mocking
Keep module mocks contained in test files; do not use global mutable state within test files; use vi.hoisted() if necessary
For Component testing, use Vue Test Utils and follow advice about making components easy to test
Aim for behavioral coverage of critical and new features in unit tests

Files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
🧠 Learnings (10)
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests

Applied to files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.test.ts : Leverage Vitest's mocking utilities where possible for test mocking

Applied to files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features

Applied to files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.test.ts : Keep module mocks contained in test files; do not use global mutable state within test files; use `vi.hoisted()` if necessary

Applied to files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Always prefer vitest mock functions over writing verbose manual mocks

Applied to files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.test.ts : Follow 'Don't Mock What You Don't Own' principle - avoid mocking external dependencies

Applied to files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/{composables,components}/**/*.{ts,tsx,vue} : Clean up subscriptions in state management to prevent memory leaks

Applied to files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.

Applied to files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
📚 Learning: 2025-12-10T03:09:13.807Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7303
File: src/components/topbar/CurrentUserPopover.test.ts:199-205
Timestamp: 2025-12-10T03:09:13.807Z
Learning: In test files, prefer selecting or asserting on accessible properties (text content, aria-label, role, accessible name) over data-testid attributes. This ensures tests validate actual user-facing behavior and accessibility, reducing reliance on implementation details like test IDs.

Applied to files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.

Applied to files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: test
  • GitHub Check: setup
  • GitHub Check: lint-and-format
  • GitHub Check: collect

Comment on lines +78 to +85
vi.mock('@/composables/auth/useFirebaseAuthActions', () => ({
useFirebaseAuthActions: vi.fn(() => ({
authActions: vi.fn(() => ({
accessBillingPortal: vi.fn()
}))
}))
}))

Copy link
Contributor

@coderabbitai coderabbitai bot Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find the composable definition
fd -e ts -e js "useFirebaseAuthActions" src/ --exec cat -n {} +

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 8410


🏁 Script executed:

find src -name "*useFirebaseAuthActions*" -type f

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 116


🏁 Script executed:

rg "useFirebaseAuthActions" --type ts -l | head -20

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 712


🏁 Script executed:

find src -path "*composables/auth*" -type f | head -20

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 155


🏁 Script executed:

cat -n tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts | head -100

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 3639


🏁 Script executed:

rg "export.*function.*useFirebaseAuthActions|export.*const.*useFirebaseAuthActions" -A 15 --type ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 1375


🏁 Script executed:

rg "useFirebaseAuthActions" -A 20 --type ts --max-count 5

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 27592


🏁 Script executed:

wc -l tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 153


🏁 Script executed:

cat -n tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 13161


🏁 Script executed:

cat -n src/platform/cloud/subscription/components/SubscriptionPanel.vue 2>/dev/null | head -150

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 6460


🏁 Script executed:

find . -path "*/composables/auth/*" -type f 2>/dev/null | grep -v node_modules

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 159


🏁 Script executed:

git ls-files "src/**/composables/**" | grep -i auth

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 52


🏁 Script executed:

git ls-files "src/**" | grep -i firebase

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 171


🏁 Script executed:

ls -la src/ 2>/dev/null | head -20

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 1179


🏁 Script executed:

git ls-files | grep -E "(useFirebaseAuthActions|SubscriptionPanel)" | head -20

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 261


🏁 Script executed:

sed -n '60,70p' src/platform/cloud/subscription/components/SubscriptionPanel.vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 446


🏁 Script executed:

grep -n "authActions\|useFirebaseAuthActions" src/platform/cloud/subscription/components/SubscriptionPanel.vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 268


🏁 Script executed:

grep -A 50 "<script" src/platform/cloud/subscription/components/SubscriptionPanel.vue | head -60

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 1969


🏁 Script executed:

wc -l src/platform/cloud/subscription/components/SubscriptionPanel.vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 138


🏁 Script executed:

cat src/platform/cloud/subscription/components/SubscriptionPanel.vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 16203


🏁 Script executed:

grep -n "authActions\|useFirebaseAuthActions" src/platform/cloud/subscription/composables/useSubscriptionActions.ts -A 3 | head -30

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 732


🏁 Script executed:

wc -l src/platform/cloud/subscription/composables/useSubscriptionActions.ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 142


🏁 Script executed:

cat src/platform/cloud/subscription/composables/useSubscriptionActions.ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 1999


🏁 Script executed:

grep -B 10 -A 10 "authActions" src/platform/cloud/subscription/components/SubscriptionPanel.vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 1287


🏁 Script executed:

sed -n '200,300p' src/platform/cloud/subscription/components/SubscriptionPanel.vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 3579


🏁 Script executed:

file src/platform/cloud/subscription/components/SubscriptionPanel.vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 114


🏁 Script executed:

tail -100 src/platform/cloud/subscription/components/SubscriptionPanel.vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 2561


Fix mock shape to match real composable return type and add behavioral test for "Manage Subscription" click.

The mock incorrectly wraps accessBillingPortal in a nested authActions function. The real useFirebaseAuthActions() returns an object with methods directly ({ logout, sendPasswordReset, purchaseCredits, accessBillingPortal, ... }), not nested under a function.

+const accessBillingPortalMock = vi.fn()
+
 vi.mock('@/composables/auth/useFirebaseAuthActions', () => ({
-  useFirebaseAuthActions: vi.fn(() => ({
-    authActions: vi.fn(() => ({
-      accessBillingPortal: vi.fn()
-    }))
-  }))
+  useFirebaseAuthActions: () => ({
+    logout: vi.fn(),
+    sendPasswordReset: vi.fn(),
+    purchaseCredits: vi.fn(),
+    accessBillingPortal: accessBillingPortalMock,
+    fetchBalance: vi.fn(),
+    signInWithGoogle: vi.fn(),
+    signInWithGithub: vi.fn(),
+    signInWithEmail: vi.fn(),
+    signUpWithEmail: vi.fn(),
+    updatePassword: vi.fn(),
+    deleteAccount: vi.fn(),
+    accessError: ref(false),
+    reportError: vi.fn()
+  })
 }))

Add test for the "Manage Subscription" button click:

   it('shows correct UI for active subscription', () => {
     mockIsActiveSubscription.value = true
     const wrapper = createWrapper()
     expect(wrapper.text()).toContain('Manage Subscription')
     expect(wrapper.text()).toContain('Add Credits')
   })
+
+  it('calls accessBillingPortal when Manage Subscription button is clicked', async () => {
+    mockIsActiveSubscription.value = true
+    const wrapper = createWrapper()
+    const manageButton = wrapper.find('[data-testid="Manage Subscription"]')
+    expect(manageButton.exists()).toBe(true)
+    await manageButton.trigger('click')
+    expect(accessBillingPortalMock).toHaveBeenCalledOnce()
+  })
🤖 Prompt for AI Agents
In
tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
around lines 78 to 85, the vi.mock currently nests accessBillingPortal under
authActions() but the real useFirebaseAuthActions() returns an object whose
methods are top-level; change the mock to return an object with
accessBillingPortal: vi.fn() (and any other used methods) directly instead of
authActions: vi.fn(...). Then add a behavioral test that renders
SubscriptionPanel, finds the "Manage Subscription" button (by role or text),
simulates a user click (userEvent.click) and asserts that the mocked
accessBillingPortal was called once. Ensure the mock is reset between tests
(vi.clearAllMocks or similar) so the call assertion is reliable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, keep the mock simple until we have a real reusable mock.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DrJKL, understood! We'll keep the mock simple as-is for now. 👍


🧠 Learnings used
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.test.ts : Keep module mocks contained in test files; do not use global mutable state within test files; use `vi.hoisted()` if necessary

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.test.ts : Leverage Vitest's mocking utilities where possible for test mocking

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Always prefer vitest mock functions over writing verbose manual mocks

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/{composables,components}/**/*.{ts,tsx,vue} : Clean up subscriptions in state management to prevent memory leaks

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.test.ts : For Component testing, use Vue Test Utils and follow advice about making components easy to test

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Mocks should be cleanly written and easy to understand, with reusable mocks where possible

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.test.ts : Do not write tests that just test the mocks; ensure tests fail when code behaves unexpectedly

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.test.ts : Follow 'Don't Mock What You Don't Own' principle - avoid mocking external dependencies

Copy link
Contributor

@simula-r simula-r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@christian-byrne christian-byrne merged commit 3e97225 into main Dec 12, 2025
33 checks passed
@christian-byrne christian-byrne deleted the drjkl/management-button branch December 12, 2025 22:40
Yourz pushed a commit that referenced this pull request Dec 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants