Skip to content

Fix(cloud)/pricing annual misc#7701

Merged
christian-byrne merged 3 commits intomainfrom
fix(cloud)/pricing-annual-misc
Dec 22, 2025
Merged

Fix(cloud)/pricing annual misc#7701
christian-byrne merged 3 commits intomainfrom
fix(cloud)/pricing-annual-misc

Conversation

@simula-r
Copy link
Contributor

@simula-r simula-r commented Dec 22, 2025

Summary

Fix: PricingTable showed "Current Plan" on the wrong billing cycle (e.g., showing it on Yearly when subscribed to Monthly) because we weren't checking subscription_duration. Now we check for ANNUAL | MONTHLY match.

Fix: Subscribed users were being sent to billing portal instead of checkout. Now routes to checkout.

Improved: Types now use openapi.yml as source of truth. Tier names in user popover and subscription panels now reflect the billing cycle (YEARLY/MONTHLY).

Recommended to merge this before #7692

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 22, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 22, 2025

📝 Walkthrough

Walkthrough

This PR adds yearly subscription billing support by introducing a new translation key for yearly tier names, refactoring tier pricing functions to accept a yearly parameter, deriving yearly subscription state in the subscription composable, and updating UI components to display yearly-specific pricing and naming.

Changes

Cohort / File(s) Change Summary
Localization
src/locales/en/main.json
Added tierNameYearly translation key for yearly subscription tier naming
Subscription Composables
src/platform/cloud/subscription/composables/useSubscription.ts
Introduced isYearlySubscription computed value derived from subscription status; added TIER_TO_KEY import; removed legacy TIER_TO_I18N_KEY mapping; updated subscriptionTierName resolution to include yearly suffix when applicable; exposed subscriptionDuration and isYearlySubscription in public API
Tier Pricing Constants
src/platform/cloud/subscription/constants/tierPricing.ts
Made TIER_FEATURES non-exported constant; added getTierFeatures() public function to access tier feature data; extended getTierPrice() to accept isYearly parameter and return yearly or monthly pricing accordingly
Subscription UI Components
src/platform/cloud/subscription/components/PricingTable.vue, src/platform/cloud/subscription/components/SubscriptionPanel.vue
Updated PricingTable to always use initiateCheckout and expose isYearlySubscription; modified isCurrentPlan logic to include selected billing cycle consistency check; updated button label generation to include yearly suffix; updated SubscriptionPanel to switch from TIER_FEATURES to getTierFeatures; passed isYearlySubscription to getTierPrice; removed TIER_FEATURES import; updated useFirebaseAuthActions to remove accessBillingPortal export
Subscription Tests
tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
Added mockIsYearlySubscription flag; introduced isYearlySubscription computed in mock subscription data; updated subscriptionTierName to append " Yearly" suffix when applicable

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 fix(cloud)/pricing-annual-misc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions
Copy link

github-actions bot commented Dec 22, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/22/2025, 11:51:39 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 22, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 12/22/2025, 12:01:04 PM UTC

📈 Summary

  • Total Tests: 508
  • Passed: 497 ✅
  • Failed: 0
  • Flaky: 3 ⚠️
  • Skipped: 8 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 485 / ❌ 0 / ⚠️ 3 / ⏭️ 8
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 9 / ❌ 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 22, 2025

Bundle Size Report

Summary

  • Raw size: 17.3 MB baseline 17.3 MB — 🔴 +664 B
  • Gzip: 3.53 MB baseline 3.53 MB — 🔴 +186 B
  • Brotli: 2.69 MB baseline 2.69 MB — 🔴 +154 B
  • Bundles: 98 current • 98 baseline • 42 added / 42 removed

Category Glance
App Entry Points 🔴 +692 B (3.22 MB) · Other 🟢 -28 B (3.44 MB) · Vendor & Third-Party ⚪ 0 B (9.1 MB) · Graph Workspace ⚪ 0 B (993 kB) · Panels & Settings ⚪ 0 B (297 kB) · UI Components ⚪ 0 B (186 kB) · + 3 more

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

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-DoZMDJ_N.js (new) 2.99 MB 🔴 +2.99 MB 🔴 +631 kB 🔴 +480 kB
assets/index-BL_Qt5c2.js (removed) 2.99 MB 🟢 -2.99 MB 🟢 -631 kB 🟢 -480 kB
assets/index-DyRAQ3ky.js (new) 228 kB 🔴 +228 kB 🔴 +48.7 kB 🔴 +40 kB
assets/index-S20aOWpc.js (removed) 228 kB 🟢 -228 kB 🟢 -48.7 kB 🟢 -40 kB
assets/index-CU8g-uy3.js (new) 345 B 🔴 +345 B 🔴 +246 B 🔴 +235 B
assets/index-G3ytuGwp.js (removed) 345 B 🟢 -345 B 🟢 -246 B 🟢 -202 B

Status: 3 added / 3 removed

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

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-B7PEaCld.js (removed) 993 kB 🟢 -993 kB 🟢 -194 kB 🟢 -148 kB
assets/GraphView-BX1X9mI-.js (new) 993 kB 🔴 +993 kB 🔴 +194 kB 🔴 +148 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-BxcVCfwS.js (removed) 6.54 kB 🟢 -6.54 kB 🟢 -2.14 kB 🟢 -1.9 kB
assets/UserSelectView-DR8-hHpb.js (new) 6.54 kB 🔴 +6.54 kB 🔴 +2.14 kB 🔴 +1.9 kB

Status: 1 added / 1 removed

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

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-C9HKNpA9.js (new) 21.4 kB 🔴 +21.4 kB 🔴 +5.16 kB 🔴 +4.51 kB
assets/LegacyCreditsPanel-CI9kHXyj.js (removed) 21.4 kB 🟢 -21.4 kB 🟢 -5.16 kB 🟢 -4.51 kB
assets/KeybindingPanel-BtCIX6Nq.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.42 kB 🔴 +3.02 kB
assets/KeybindingPanel-D1Ngh2sp.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.01 kB
assets/ExtensionPanel-99hvmdBQ.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.57 kB 🔴 +2.25 kB
assets/ExtensionPanel-FDPj5NJy.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.57 kB 🟢 -2.24 kB
assets/AboutPanel-CQJQcs5o.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/AboutPanel-GczHveHQ.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/ServerConfigPanel-b1q_yPna.js (new) 7.07 kB 🔴 +7.07 kB 🔴 +1.98 kB 🔴 +1.76 kB
assets/ServerConfigPanel-DYxnP4TJ.js (removed) 7.07 kB 🟢 -7.07 kB 🟢 -1.98 kB 🟢 -1.76 kB
assets/UserPanel-D8mKfIC3.js (new) 6.23 kB 🔴 +6.23 kB 🔴 +1.72 kB 🔴 +1.5 kB
assets/UserPanel-DpctBCQT.js (removed) 6.23 kB 🟢 -6.23 kB 🟢 -1.72 kB 🟢 -1.5 kB
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BvFz-TmQ.js 33.1 kB 33.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BxYnTA2y.js 21.5 kB 21.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C6bMjAne.js 27.1 kB 27.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C7Yhp7H7.js 24 kB 24 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CsnOn8G0.js 25.7 kB 25.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-D5BGNZ7M.js 24.8 kB 24.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-D7k3huHm.js 25 kB 25 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DamkILzl.js 26.4 kB 26.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-s1k0gw1Y.js 20.9 kB 20.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/Load3D.vue_vue_type_script_setup_true_lang-C1BTtMfa.js (new) 54.3 kB 🔴 +54.3 kB 🔴 +8.62 kB 🔴 +7.41 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-CtWF0ZDe.js (removed) 54.3 kB 🟢 -54.3 kB 🟢 -8.62 kB 🟢 -7.42 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-DYvpFTL0.js (removed) 50 kB 🟢 -50 kB 🟢 -11 kB 🟢 -9.63 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-WMc7yst9.js (new) 50 kB 🔴 +50 kB 🔴 +11 kB 🔴 +9.63 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-CkK-QiJS.js (new) 48.8 kB 🔴 +48.8 kB 🔴 +10.5 kB 🔴 +9.14 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-ZaEIZoMx.js (removed) 48.8 kB 🟢 -48.8 kB 🟢 -10.5 kB 🟢 -9.14 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-AiFyIX8G.js (new) 14.3 kB 🔴 +14.3 kB 🔴 +3.74 kB 🔴 +3.31 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-FvcQfgNq.js (removed) 14.3 kB 🟢 -14.3 kB 🟢 -3.74 kB 🟢 -3.28 kB
assets/ComfyQueueButton-BFXA4LCL.js (new) 8.45 kB 🔴 +8.45 kB 🔴 +2.47 kB 🔴 +2.2 kB
assets/ComfyQueueButton-MoX4H_oq.js (removed) 8.45 kB 🟢 -8.45 kB 🟢 -2.47 kB 🟢 -2.2 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-BuHRFEYi.js (removed) 3.68 kB 🟢 -3.68 kB 🟢 -1.45 kB 🟢 -1.31 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-CdzrR1PB.js (new) 3.68 kB 🔴 +3.68 kB 🔴 +1.45 kB 🔴 +1.31 kB
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-8x99B2z1.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -890 B 🟢 -768 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-BgaYDZ6T.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +890 B 🔴 +771 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-3ZhOGtRU.js (new) 897 B 🔴 +897 B 🔴 +503 B 🔴 +474 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-BEuZhlID.js (removed) 897 B 🟢 -897 B 🟢 -503 B 🟢 -461 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-DymEwRe0.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-U5ly29Pt.js 2.04 kB 2.04 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 8 added / 8 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-Bey2xcs9.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.58 kB
assets/keybindingService-CW7xY5es.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.58 kB
assets/audioService-BPCndbnm.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -959 B 🟢 -822 B
assets/audioService-CNfnXbw1.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +962 B 🔴 +826 B
assets/serverConfigStore-7JI8VFS2.js 2.83 kB 2.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 2 added / 2 removed

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

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-BpO5rNVf.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -651 B 🟢 -549 B
assets/audioUtils-CZ0skduL.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +651 B 🔴 +548 B

Status: 1 added / 1 removed

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

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-DaR9dw3X.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-Cf7iqkoX.js 3.86 MB 3.86 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-BIgr9yoj.js 1.96 MB 1.96 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-DYL0ZbEr.js 2.02 MB 2.02 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-C1NB2Q_L.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-DSfeuQOV.js 160 kB 160 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BF8peZ5_.js 420 kB 420 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 3.44 MB (baseline 3.44 MB) • 🟢 -28 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/SubscriptionRequiredDialogContent-CTZPbMQ2.js (removed) 28 kB 🟢 -28 kB 🟢 -6.34 kB 🟢 -5.49 kB
assets/SubscriptionRequiredDialogContent-B14KC9Ck.js (new) 28 kB 🔴 +28 kB 🔴 +6.27 kB 🔴 +5.44 kB
assets/WidgetRecordAudio-C6GUCT8u.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.23 kB 🟢 -4.63 kB
assets/WidgetRecordAudio-KsD2IT6R.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.24 kB 🔴 +4.64 kB
assets/AudioPreviewPlayer-CUGeVYyB.js (new) 13.3 kB 🔴 +13.3 kB 🔴 +3.35 kB 🔴 +2.99 kB
assets/AudioPreviewPlayer-m0o-g_49.js (removed) 13.3 kB 🟢 -13.3 kB 🟢 -3.35 kB 🟢 -2.99 kB
assets/ValueControlPopover-7h5_QjAl.js (removed) 5.49 kB 🟢 -5.49 kB 🟢 -1.7 kB 🟢 -1.52 kB
assets/ValueControlPopover-DA4Q3UDV.js (new) 5.49 kB 🔴 +5.49 kB 🔴 +1.7 kB 🔴 +1.51 kB
assets/WidgetGalleria-DBzpcyOl.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.31 kB
assets/WidgetGalleria-DFeY7ILY.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.45 kB 🟢 -1.3 kB
assets/WidgetColorPicker-B-qMocYB.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetColorPicker-BJ1IVosT.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetTextarea-CEM0-CNB.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.21 kB 🟢 -1.08 kB
assets/WidgetTextarea-D_m5UzrE.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.21 kB 🔴 +1.08 kB
assets/WidgetMarkdown-CEhaAc4Y.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.13 kB
assets/WidgetMarkdown-DICKrjP4.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.12 kB
assets/WidgetAudioUI-CnrZtUZj.js (removed) 2.89 kB 🟢 -2.89 kB 🟢 -1.17 kB 🟢 -1.06 kB
assets/WidgetAudioUI-KGaYE7ao.js (new) 2.89 kB 🔴 +2.89 kB 🔴 +1.17 kB 🔴 +1.06 kB
assets/WidgetInputText-CTKwgspX.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -919 B 🟢 -847 B
assets/WidgetInputText-DYu_pBfR.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +920 B 🔴 +848 B
assets/WidgetToggleSwitch-B26iwt1N.js (new) 1.76 kB 🔴 +1.76 kB 🔴 +832 B 🔴 +735 B
assets/WidgetToggleSwitch-CcNkT12A.js (removed) 1.76 kB 🟢 -1.76 kB 🟢 -834 B 🟢 -727 B
assets/MediaImageBottom-CrRTALre.js (new) 1.55 kB 🔴 +1.55 kB 🔴 +732 B 🔴 +638 B
assets/MediaImageBottom-JicmWml3.js (removed) 1.55 kB 🟢 -1.55 kB 🟢 -734 B 🟢 -639 B
assets/MediaAudioBottom-CubN2Xvs.js (removed) 1.51 kB 🟢 -1.51 kB 🟢 -731 B 🟢 -647 B
assets/MediaAudioBottom-vU1NHTt7.js (new) 1.51 kB 🔴 +1.51 kB 🔴 +733 B 🔴 +647 B
assets/Media3DBottom-BQwZcR2O.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -730 B 🟢 -643 B
assets/Media3DBottom-DILp91sM.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +731 B 🔴 +644 B
assets/MediaVideoBottom-B1wxn9pM.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +732 B 🔴 +643 B
assets/MediaVideoBottom-BQ76wvF1.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -731 B 🟢 -644 B
assets/Media3DTop-CmLY-wZ4.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -767 B 🟢 -649 B
assets/Media3DTop-h10O8qUn.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +767 B 🔴 +652 B
assets/WidgetSelect-D0jfgdSK.js (new) 733 B 🔴 +733 B 🔴 +363 B 🔴 +327 B
assets/WidgetSelect-Dph9XZYE.js (removed) 733 B 🟢 -733 B 🟢 -363 B 🟢 -329 B
assets/WidgetInputNumber-CLDnDBgA.js (removed) 673 B 🟢 -673 B 🟢 -349 B 🟢 -289 B
assets/WidgetInputNumber-DvndGxsw.js (new) 673 B 🔴 +673 B 🔴 +350 B 🔴 +291 B
assets/Load3D-Br9LoxAc.js (new) 424 B 🔴 +424 B 🔴 +267 B 🔴 +224 B
assets/Load3D-mtzeggKa.js (removed) 424 B 🟢 -424 B 🟢 -267 B 🟢 -223 B
assets/WidgetLegacy-BOrBQUCh.js (removed) 364 B 🟢 -364 B 🟢 -237 B 🟢 -196 B
assets/WidgetLegacy-j3847_Pm.js (new) 364 B 🔴 +364 B 🔴 +238 B 🔴 +195 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CcfGaui5.js 14.4 kB 14.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CisfgZf5.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CkU12Foh.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CoH2DJa6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-COSt-Bjx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DalfIW5f.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DfTl0eCm.js 13.5 kB 13.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwSJL865.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-Zxyx15Vd.js 12.8 kB 12.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BDhxs-bB.js 79.9 kB 79.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BtXVDFw6.js 84.7 kB 84.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Buv6RhU4.js 82.4 kB 82.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CgJ6zvJL.js 97.2 kB 97.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CI9qb0E5.js 112 kB 112 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cu4LqtW0.js 81.6 kB 81.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Dm19QY4N.js 92.2 kB 92.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Tihe0h_r.js 71.3 kB 71.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-wPWMutMw.js 70.4 kB 70.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-Dr0afgCA.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-BXa-oKEc.js 1.75 kB 1.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-BVdg2b8C.js 2.65 kB 2.65 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-1Vh3MCrN.js 240 kB 240 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-aW9En70v.js 260 kB 260 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BIckSVgU.js 273 kB 273 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BiYpVi7D.js 263 kB 263 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CCEXtYfM.js 243 kB 243 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CvmVDWYd.js 323 kB 323 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-D_wreoPJ.js 267 kB 267 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Dz-0ZIBN.js 297 kB 297 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-VZsNmhG7.js 264 kB 264 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-BU__hen8.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-0zJeINY-.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: 20 added / 20 removed

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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6b62d9c and e2f572e.

📒 Files selected for processing (7)
  • packages/registry-types/src/comfyRegistryTypes.ts
  • src/locales/en/main.json
  • src/platform/cloud/subscription/components/PricingTable.vue
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
🧰 Additional context used
📓 Path-based instructions (15)
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not use any type or as any type assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code

Files:

  • packages/registry-types/src/comfyRegistryTypes.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/PricingTable.vue
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width

Files:

  • packages/registry-types/src/comfyRegistryTypes.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/PricingTable.vue
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/locales/en/main.json
  • src/platform/cloud/subscription/constants/tierPricing.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Minimize the surface area (exported values) of each module and composable

Files:

  • packages/registry-types/src/comfyRegistryTypes.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/PricingTable.vue
  • src/platform/cloud/subscription/constants/tierPricing.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
src/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety

Files:

  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
src/**/{services,composables}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/{services,composables}/**/*.{ts,tsx}: Use api.apiURL() for backend endpoints instead of constructing URLs directly
Use api.fileURL() for static file access instead of constructing URLs directly

Files:

  • src/platform/cloud/subscription/composables/useSubscription.ts
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/PricingTable.vue
  • src/platform/cloud/subscription/constants/tierPricing.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/PricingTable.vue
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/PricingTable.vue
  • src/platform/cloud/subscription/constants/tierPricing.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
src/**/{components,composables}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Use vue-i18n for ALL user-facing strings by adding them to src/locales/en/main.json

Files:

  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/PricingTable.vue
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
**/**/use[A-Z]*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables using the pattern useXyz.ts

Files:

  • src/platform/cloud/subscription/composables/useSubscription.ts
src/**/*.vue

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.vue: Use the Vue 3 Composition API instead of the Options API when writing Vue components (exception: when overriding or extending PrimeVue components for compatibility)
Use setup() function for component logic
Utilize ref and reactive for reactive state
Implement computed properties with computed()
Use watch and watchEffect for side effects
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection
Use vue 3.5 style of default prop declaration
Use Tailwind CSS for styling
Implement proper props and emits definitions
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Follow Vue 3 style guide and naming conventions

Files:

  • src/platform/cloud/subscription/components/PricingTable.vue
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
**/*.vue

📄 CodeRabbit inference engine (AGENTS.md)

**/*.vue: Use Vue 3.5+ with TypeScript in .vue files, exclusively using Composition API with <script setup lang="ts"> syntax
Use Tailwind 4 for styling in Vue components; avoid <style> blocks
Name Vue components using PascalCase (e.g., MenuHamburger.vue)
Use Vue 3.5 TypeScript-style default prop declaration with reactive props destructuring; do not use withDefaults or runtime props declaration
Prefer computed() over ref with watch when deriving values
Prefer useModel over separately defining prop and emit for two-way binding
Use vue-i18n in composition API for string literals; place new translation entries in src/locales/en/main.json
Use cn() utility function from @/utils/tailwindUtil for merging Tailwind class names; do not use :class="[]" syntax
Do not use the dark: Tailwind variant; use semantic values from the style.css theme instead (e.g., bg-node-component-surface)
Do not use !important or the ! important prefix for Tailwind classes; find and correct interfering !important classes instead
Avoid new usage of PrimeVue components; use VueUse, shadcn/vue, or Reka UI instead
Leverage VueUse functions for performance-enhancing styles in Vue components
Implement proper props and emits definitions in Vue components
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Follow Vue 3 style guide and naming conventions

Files:

  • src/platform/cloud/subscription/components/PricingTable.vue
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
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
**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.test.ts: Use unit/component tests in tests-ui/ or src/**/*.test.ts with Vitest framework
For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files
Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles
Aim for behavioral coverage of critical and new features in unit tests

Files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
🧠 Learnings (14)
📚 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:

  • packages/registry-types/src/comfyRegistryTypes.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.

Applied to files:

  • packages/registry-types/src/comfyRegistryTypes.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).

Applied to files:

  • packages/registry-types/src/comfyRegistryTypes.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/platform/cloud/subscription/constants/tierPricing.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:

  • packages/registry-types/src/comfyRegistryTypes.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/PricingTable.vue
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
📚 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:

  • src/platform/cloud/subscription/components/PricingTable.vue
📚 Learning: 2025-12-09T03:49:52.828Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/platform/updates/components/WhatsNewPopup.vue:5-13
Timestamp: 2025-12-09T03:49:52.828Z
Learning: In Vue files across the ComfyUI_frontend repo, when a button is needed, prefer the repo's common button components from src/components/button/ (IconButton.vue, TextButton.vue, IconTextButton.vue) over plain HTML <button> elements. These components wrap PrimeVue with the project’s design system styling. Use only the common button components for consistency and theming, and import them from src/components/button/ as needed.

Applied to files:

  • src/platform/cloud/subscription/components/PricingTable.vue
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
📚 Learning: 2025-12-09T21:40:12.361Z
Learnt from: benceruleanlu
Repo: Comfy-Org/ComfyUI_frontend PR: 7297
File: src/components/actionbar/ComfyActionbar.vue:33-43
Timestamp: 2025-12-09T21:40:12.361Z
Learning: In Vue single-file components, allow inline Tailwind CSS class strings for static classes and avoid extracting them into computed properties solely for readability. Prefer keeping static class names inline for simplicity and performance. For dynamic or conditional classes, use Vue bindings (e.g., :class) to compose classes.

Applies to all Vue files in the repository (e.g., src/**/*.vue) where Tailwind utilities are used for static styling.

Applied to files:

  • src/platform/cloud/subscription/components/PricingTable.vue
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
📚 Learning: 2025-12-16T22:26:49.463Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.vue:17-17
Timestamp: 2025-12-16T22:26:49.463Z
Learning: In Vue 3.5+ with <script setup>, when using defineProps<Props>() with partial destructuring (e.g., const { as = 'button', class: customClass = '' } = defineProps<Props>() ), props that are not destructured (e.g., variant, size) stay accessible by name in the template scope. This pattern is valid: you can destructure only a subset of props for convenience while referencing the remaining props directly in template expressions. Apply this guideline to Vue components across the codebase (all .vue files).

Applied to files:

  • src/platform/cloud/subscription/components/PricingTable.vue
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
📚 Learning: 2025-12-18T02:07:38.870Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7598
File: src/components/sidebar/tabs/AssetsSidebarTab.vue:131-131
Timestamp: 2025-12-18T02:07:38.870Z
Learning: Tailwind CSS v4 safe utilities (e.g., items-center-safe, justify-*-safe, place-*-safe) are allowed in Vue components under src/ and in story files. Do not flag these specific safe variants as invalid when reviewing code in src/**/*.vue or related stories.

Applied to files:

  • src/platform/cloud/subscription/components/PricingTable.vue
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
📚 Learning: 2025-12-18T21:15:46.862Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7603
File: src/components/queue/QueueOverlayHeader.vue:49-59
Timestamp: 2025-12-18T21:15:46.862Z
Learning: In the ComfyUI_frontend repository, for Vue components, do not add aria-label to buttons that have visible text content (e.g., buttons containing <span> text). The visible text provides the accessible name. Use aria-label only for elements without visible labels (e.g., icon-only buttons). If a button has no visible label, provide a clear aria-label or associate with an aria-labelledby describing its action.

Applied to files:

  • src/platform/cloud/subscription/components/PricingTable.vue
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
📚 Learning: 2025-12-21T01:06:02.786Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: src/components/graph/selectionToolbox/ColorPickerButton.vue:15-18
Timestamp: 2025-12-21T01:06:02.786Z
Learning: In Comfy-Org/ComfyUI_frontend, in Vue component files, when a filled icon is required (e.g., 'pi pi-circle-fill'), you may mix PrimeIcons with Lucide icons since Lucide lacks filled variants. This mixed usage is acceptable when one icon library does not provide an equivalent filled icon. Apply consistently across Vue components in the src directory where icons are used, and document the rationale when a mixed approach is chosen.

Applied to files:

  • src/platform/cloud/subscription/components/PricingTable.vue
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
📚 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-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-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
🧬 Code graph analysis (1)
src/platform/cloud/subscription/composables/useSubscription.ts (1)
src/platform/cloud/subscription/constants/tierPricing.ts (1)
  • TIER_TO_KEY (7-12)
⏰ 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). (5)
  • GitHub Check: deploy-and-comment
  • GitHub Check: setup
  • GitHub Check: test
  • GitHub Check: lint-and-format
  • GitHub Check: collect
🔇 Additional comments (13)
packages/registry-types/src/comfyRegistryTypes.ts (3)

3956-3960: LGTM! Well-structured enum type for subscription billing duration.

The new SubscriptionDuration type follows the existing enum pattern used by SubscriptionTier and properly supports the yearly subscription feature.


12110-12175: LGTM! Well-defined API key verification operation.

The VerifyApiKey operation is properly structured with:

  • Required admin secret header for authorization
  • Typed request body for the API key
  • Appropriate response schemas with proper HTTP status codes
  • Use of unknown instead of any for header indexer

12076-12076: LGTM! Consistent addition of subscription duration metadata.

The subscription_duration field additions to both customer balance responses follow the existing pattern of subscription_tier and properly use the new SubscriptionDuration type with nullable union.

Also applies to: 12203-12203

src/locales/en/main.json (1)

1948-1948: LGTM!

The new tierNameYearly translation key is correctly placed in the subscription section and follows the existing i18n interpolation pattern with the {name} placeholder.

tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts (1)

15-37: Good mock setup for yearly subscription, but consider adding a test case.

The mock structure correctly mirrors the useSubscription composable's new isYearlySubscription property. However, there's no test case that explicitly validates the yearly subscription tier name behavior (e.g., verifying that "Creator Yearly" appears when mockIsYearlySubscription is true).

Consider adding a test like:

it('displays tier name with Yearly suffix for yearly subscription', () => {
  mockIsYearlySubscription.value = true
  mockSubscriptionTier.value = 'CREATOR'
  const wrapper = createWrapper()
  expect(wrapper.text()).toContain('Creator Yearly')
})
src/platform/cloud/subscription/components/SubscriptionPanel.vue (2)

397-399: LGTM!

The tierPrice computed property correctly passes the isYearlySubscription flag to getTierPrice, enabling proper yearly vs. monthly price display.


439-445: LGTM!

The refactor to use getTierFeatures(key).customLoRAs instead of direct constant access correctly aligns with the updated module API where TIER_FEATURES is now internal.

src/platform/cloud/subscription/components/PricingTable.vue (1)

348-357: Core fix looks correct – properly validates billing cycle consistency.

The updated isCurrentPlan function now correctly checks both the tier key AND the billing cycle match. This addresses the PR objective by preventing "Current Plan" from appearing when the user selects a different billing cycle than their current subscription.

src/platform/cloud/subscription/constants/tierPricing.ts (2)

43-47: LGTM!

The updated getTierPrice function correctly supports yearly pricing with a clean optional parameter. The logic properly handles the founder tier special case and routes other tiers through the pricing lookup.


54-56: LGTM!

Good encapsulation – making TIER_FEATURES internal and providing getTierFeatures as a controlled accessor follows good module design practices.

src/platform/cloud/subscription/composables/useSubscription.ts (3)

85-93: LGTM!

The subscriptionTierName logic correctly uses TIER_TO_KEY for key resolution and applies the tierNameYearly i18n key when the subscription is yearly. This centralizes the yearly naming format in the locale file.


247-248: LGTM!

The new subscriptionDuration and isYearlySubscription properties are correctly exposed in the return object, making them available to consuming components.


77-83: The code correctly uses 'ANNUAL' as the subscription duration value, which matches the API schema definition (SubscriptionDuration: "MONTHLY" | "ANNUAL"). No changes needed.

@simula-r simula-r added needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch cloud/1.35 labels Dec 22, 2025
@christian-byrne
Copy link
Contributor

I'll apply CodeRabbit's nit while waiting for CI.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Dec 22, 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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/platform/cloud/subscription/components/PricingTable.vue (1)

297-330: Existing pattern note: Module-level t() calls may not react to locale changes.

The billingCycleOptions and tiers arrays use t() at module level (outside the reactive Vue context). If the application supports runtime locale switching, these labels won't update. This is pre-existing code and not within scope of this PR, but worth noting for future consideration.

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e2f572e and 380e112.

📒 Files selected for processing (1)
  • src/platform/cloud/subscription/components/PricingTable.vue
🧰 Additional context used
📓 Path-based instructions (9)
src/**/*.vue

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.vue: Use the Vue 3 Composition API instead of the Options API when writing Vue components (exception: when overriding or extending PrimeVue components for compatibility)
Use setup() function for component logic
Utilize ref and reactive for reactive state
Implement computed properties with computed()
Use watch and watchEffect for side effects
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection
Use vue 3.5 style of default prop declaration
Use Tailwind CSS for styling
Implement proper props and emits definitions
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Follow Vue 3 style guide and naming conventions

Files:

  • src/platform/cloud/subscription/components/PricingTable.vue
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/platform/cloud/subscription/components/PricingTable.vue
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/platform/cloud/subscription/components/PricingTable.vue
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/platform/cloud/subscription/components/PricingTable.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/platform/cloud/subscription/components/PricingTable.vue
src/**/{components,composables}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Use vue-i18n for ALL user-facing strings by adding them to src/locales/en/main.json

Files:

  • src/platform/cloud/subscription/components/PricingTable.vue
**/*.vue

📄 CodeRabbit inference engine (AGENTS.md)

**/*.vue: Use Vue 3.5+ with TypeScript in .vue files, exclusively using Composition API with <script setup lang="ts"> syntax
Use Tailwind 4 for styling in Vue components; avoid <style> blocks
Name Vue components using PascalCase (e.g., MenuHamburger.vue)
Use Vue 3.5 TypeScript-style default prop declaration with reactive props destructuring; do not use withDefaults or runtime props declaration
Prefer computed() over ref with watch when deriving values
Prefer useModel over separately defining prop and emit for two-way binding
Use vue-i18n in composition API for string literals; place new translation entries in src/locales/en/main.json
Use cn() utility function from @/utils/tailwindUtil for merging Tailwind class names; do not use :class="[]" syntax
Do not use the dark: Tailwind variant; use semantic values from the style.css theme instead (e.g., bg-node-component-surface)
Do not use !important or the ! important prefix for Tailwind classes; find and correct interfering !important classes instead
Avoid new usage of PrimeVue components; use VueUse, shadcn/vue, or Reka UI instead
Leverage VueUse functions for performance-enhancing styles in Vue components
Implement proper props and emits definitions in Vue components
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Follow Vue 3 style guide and naming conventions

Files:

  • src/platform/cloud/subscription/components/PricingTable.vue
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not use any type or as any type assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code

Files:

  • src/platform/cloud/subscription/components/PricingTable.vue
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width

Files:

  • src/platform/cloud/subscription/components/PricingTable.vue
🧠 Learnings (8)
📚 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:

  • src/platform/cloud/subscription/components/PricingTable.vue
📚 Learning: 2025-12-09T03:49:52.828Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/platform/updates/components/WhatsNewPopup.vue:5-13
Timestamp: 2025-12-09T03:49:52.828Z
Learning: In Vue files across the ComfyUI_frontend repo, when a button is needed, prefer the repo's common button components from src/components/button/ (IconButton.vue, TextButton.vue, IconTextButton.vue) over plain HTML <button> elements. These components wrap PrimeVue with the project’s design system styling. Use only the common button components for consistency and theming, and import them from src/components/button/ as needed.

Applied to files:

  • src/platform/cloud/subscription/components/PricingTable.vue
📚 Learning: 2025-12-09T21:40:12.361Z
Learnt from: benceruleanlu
Repo: Comfy-Org/ComfyUI_frontend PR: 7297
File: src/components/actionbar/ComfyActionbar.vue:33-43
Timestamp: 2025-12-09T21:40:12.361Z
Learning: In Vue single-file components, allow inline Tailwind CSS class strings for static classes and avoid extracting them into computed properties solely for readability. Prefer keeping static class names inline for simplicity and performance. For dynamic or conditional classes, use Vue bindings (e.g., :class) to compose classes.

Applies to all Vue files in the repository (e.g., src/**/*.vue) where Tailwind utilities are used for static styling.

Applied to files:

  • src/platform/cloud/subscription/components/PricingTable.vue
📚 Learning: 2025-12-16T22:26:49.463Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.vue:17-17
Timestamp: 2025-12-16T22:26:49.463Z
Learning: In Vue 3.5+ with <script setup>, when using defineProps<Props>() with partial destructuring (e.g., const { as = 'button', class: customClass = '' } = defineProps<Props>() ), props that are not destructured (e.g., variant, size) stay accessible by name in the template scope. This pattern is valid: you can destructure only a subset of props for convenience while referencing the remaining props directly in template expressions. Apply this guideline to Vue components across the codebase (all .vue files).

Applied to files:

  • src/platform/cloud/subscription/components/PricingTable.vue
📚 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:

  • src/platform/cloud/subscription/components/PricingTable.vue
📚 Learning: 2025-12-18T02:07:38.870Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7598
File: src/components/sidebar/tabs/AssetsSidebarTab.vue:131-131
Timestamp: 2025-12-18T02:07:38.870Z
Learning: Tailwind CSS v4 safe utilities (e.g., items-center-safe, justify-*-safe, place-*-safe) are allowed in Vue components under src/ and in story files. Do not flag these specific safe variants as invalid when reviewing code in src/**/*.vue or related stories.

Applied to files:

  • src/platform/cloud/subscription/components/PricingTable.vue
📚 Learning: 2025-12-18T21:15:46.862Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7603
File: src/components/queue/QueueOverlayHeader.vue:49-59
Timestamp: 2025-12-18T21:15:46.862Z
Learning: In the ComfyUI_frontend repository, for Vue components, do not add aria-label to buttons that have visible text content (e.g., buttons containing <span> text). The visible text provides the accessible name. Use aria-label only for elements without visible labels (e.g., icon-only buttons). If a button has no visible label, provide a clear aria-label or associate with an aria-labelledby describing its action.

Applied to files:

  • src/platform/cloud/subscription/components/PricingTable.vue
📚 Learning: 2025-12-21T01:06:02.786Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: src/components/graph/selectionToolbox/ColorPickerButton.vue:15-18
Timestamp: 2025-12-21T01:06:02.786Z
Learning: In Comfy-Org/ComfyUI_frontend, in Vue component files, when a filled icon is required (e.g., 'pi pi-circle-fill'), you may mix PrimeIcons with Lucide icons since Lucide lacks filled variants. This mixed usage is acceptable when one icon library does not provide an equivalent filled icon. Apply consistently across Vue components in the src directory where icons are used, and document the rationale when a mixed approach is chosen.

Applied to files:

  • src/platform/cloud/subscription/components/PricingTable.vue
⏰ 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: setup
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect
🔇 Additional comments (4)
src/platform/cloud/subscription/components/PricingTable.vue (4)

334-336: LGTM!

The destructuring now correctly includes isYearlySubscription to support the billing cycle matching logic, and the removal of accessBillingPortal aligns with the PR objective to always route to checkout.


348-357: LGTM!

The isCurrentPlan function now correctly validates both the tier and the billing cycle, ensuring "Current Plan" only displays when the user's subscription matches both the selected tier and the selected billing period (yearly/monthly). This directly addresses the PR objective.


363-374: LGTM!

The yearly plan label now uses the i18n key t('subscription.tierNameYearly', { name: tier.name }), which aligns with the approach in useSubscription.ts and centralizes the label format in the locale file. This addresses the previous review comment.


446-449: LGTM!

The simplified checkout flow now consistently routes to the checkout URL regardless of subscription status. This aligns with the PR objective and the subsequent PR #7692 that will handle billing portal deep linking.

Consider adding TypeScript typing for the initiateCheckout response to ensure checkout_url is explicitly defined in the expected response shape:

interface CheckoutResponse {
  checkout_url: string
}

const initiateCheckout = async (tierKey: CheckoutTierKey): Promise<CheckoutResponse> => {
  // ...existing implementation
}

This would provide compile-time safety for the response.checkout_url access on line 447.

@christian-byrne
Copy link
Contributor

Rebasing for #7702.

@christian-byrne christian-byrne force-pushed the fix(cloud)/pricing-annual-misc branch from 380e112 to de5edd3 Compare December 22, 2025 11:50
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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/platform/cloud/subscription/constants/tierPricing.ts (1)

31-36: Improved encapsulation and completeness.

Making TIER_FEATURES private (no longer exported) and adding the missing founder entry improves the module's API surface. The getTierFeatures() accessor (lines 54-56) provides controlled access to feature data.

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 380e112 and de5edd3.

📒 Files selected for processing (6)
  • src/locales/en/main.json
  • src/platform/cloud/subscription/components/PricingTable.vue
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
🧰 Additional context used
📓 Path-based instructions (15)
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width

Files:

  • src/locales/en/main.json
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
  • src/platform/cloud/subscription/components/PricingTable.vue
src/**/*.vue

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.vue: Use the Vue 3 Composition API instead of the Options API when writing Vue components (exception: when overriding or extending PrimeVue components for compatibility)
Use setup() function for component logic
Utilize ref and reactive for reactive state
Implement computed properties with computed()
Use watch and watchEffect for side effects
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection
Use vue 3.5 style of default prop declaration
Use Tailwind CSS for styling
Implement proper props and emits definitions
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Follow Vue 3 style guide and naming conventions

Files:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/components/PricingTable.vue
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
  • src/platform/cloud/subscription/components/PricingTable.vue
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
  • src/platform/cloud/subscription/components/PricingTable.vue
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/PricingTable.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
  • src/platform/cloud/subscription/components/PricingTable.vue
src/**/{components,composables}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Use vue-i18n for ALL user-facing strings by adding them to src/locales/en/main.json

Files:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/PricingTable.vue
**/*.vue

📄 CodeRabbit inference engine (AGENTS.md)

**/*.vue: Use Vue 3.5+ with TypeScript in .vue files, exclusively using Composition API with <script setup lang="ts"> syntax
Use Tailwind 4 for styling in Vue components; avoid <style> blocks
Name Vue components using PascalCase (e.g., MenuHamburger.vue)
Use Vue 3.5 TypeScript-style default prop declaration with reactive props destructuring; do not use withDefaults or runtime props declaration
Prefer computed() over ref with watch when deriving values
Prefer useModel over separately defining prop and emit for two-way binding
Use vue-i18n in composition API for string literals; place new translation entries in src/locales/en/main.json
Use cn() utility function from @/utils/tailwindUtil for merging Tailwind class names; do not use :class="[]" syntax
Do not use the dark: Tailwind variant; use semantic values from the style.css theme instead (e.g., bg-node-component-surface)
Do not use !important or the ! important prefix for Tailwind classes; find and correct interfering !important classes instead
Avoid new usage of PrimeVue components; use VueUse, shadcn/vue, or Reka UI instead
Leverage VueUse functions for performance-enhancing styles in Vue components
Implement proper props and emits definitions in Vue components
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Follow Vue 3 style guide and naming conventions

Files:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/components/PricingTable.vue
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not use any type or as any type assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code

Files:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
  • src/platform/cloud/subscription/components/PricingTable.vue
src/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety

Files:

  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
src/**/{services,composables}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/{services,composables}/**/*.{ts,tsx}: Use api.apiURL() for backend endpoints instead of constructing URLs directly
Use api.fileURL() for static file access instead of constructing URLs directly

Files:

  • src/platform/cloud/subscription/composables/useSubscription.ts
**/**/use[A-Z]*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables using the pattern useXyz.ts

Files:

  • src/platform/cloud/subscription/composables/useSubscription.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Minimize the surface area (exported values) of each module and composable

Files:

  • src/platform/cloud/subscription/composables/useSubscription.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
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
**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.test.ts: Use unit/component tests in tests-ui/ or src/**/*.test.ts with Vitest framework
For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files
Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles
Aim for behavioral coverage of critical and new features in unit tests

Files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
🧠 Learnings (15)
📚 Learning: 2025-12-09T03:49:52.828Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/platform/updates/components/WhatsNewPopup.vue:5-13
Timestamp: 2025-12-09T03:49:52.828Z
Learning: In Vue files across the ComfyUI_frontend repo, when a button is needed, prefer the repo's common button components from src/components/button/ (IconButton.vue, TextButton.vue, IconTextButton.vue) over plain HTML <button> elements. These components wrap PrimeVue with the project’s design system styling. Use only the common button components for consistency and theming, and import them from src/components/button/ as needed.

Applied to files:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/components/PricingTable.vue
📚 Learning: 2025-12-09T21:40:12.361Z
Learnt from: benceruleanlu
Repo: Comfy-Org/ComfyUI_frontend PR: 7297
File: src/components/actionbar/ComfyActionbar.vue:33-43
Timestamp: 2025-12-09T21:40:12.361Z
Learning: In Vue single-file components, allow inline Tailwind CSS class strings for static classes and avoid extracting them into computed properties solely for readability. Prefer keeping static class names inline for simplicity and performance. For dynamic or conditional classes, use Vue bindings (e.g., :class) to compose classes.

Applies to all Vue files in the repository (e.g., src/**/*.vue) where Tailwind utilities are used for static styling.

Applied to files:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/components/PricingTable.vue
📚 Learning: 2025-12-16T22:26:49.463Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.vue:17-17
Timestamp: 2025-12-16T22:26:49.463Z
Learning: In Vue 3.5+ with <script setup>, when using defineProps<Props>() with partial destructuring (e.g., const { as = 'button', class: customClass = '' } = defineProps<Props>() ), props that are not destructured (e.g., variant, size) stay accessible by name in the template scope. This pattern is valid: you can destructure only a subset of props for convenience while referencing the remaining props directly in template expressions. Apply this guideline to Vue components across the codebase (all .vue files).

Applied to files:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/components/PricingTable.vue
📚 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:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
  • src/platform/cloud/subscription/components/PricingTable.vue
📚 Learning: 2025-12-18T02:07:38.870Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7598
File: src/components/sidebar/tabs/AssetsSidebarTab.vue:131-131
Timestamp: 2025-12-18T02:07:38.870Z
Learning: Tailwind CSS v4 safe utilities (e.g., items-center-safe, justify-*-safe, place-*-safe) are allowed in Vue components under src/ and in story files. Do not flag these specific safe variants as invalid when reviewing code in src/**/*.vue or related stories.

Applied to files:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/components/PricingTable.vue
📚 Learning: 2025-12-18T21:15:46.862Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7603
File: src/components/queue/QueueOverlayHeader.vue:49-59
Timestamp: 2025-12-18T21:15:46.862Z
Learning: In the ComfyUI_frontend repository, for Vue components, do not add aria-label to buttons that have visible text content (e.g., buttons containing <span> text). The visible text provides the accessible name. Use aria-label only for elements without visible labels (e.g., icon-only buttons). If a button has no visible label, provide a clear aria-label or associate with an aria-labelledby describing its action.

Applied to files:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/components/PricingTable.vue
📚 Learning: 2025-12-21T01:06:02.786Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: src/components/graph/selectionToolbox/ColorPickerButton.vue:15-18
Timestamp: 2025-12-21T01:06:02.786Z
Learning: In Comfy-Org/ComfyUI_frontend, in Vue component files, when a filled icon is required (e.g., 'pi pi-circle-fill'), you may mix PrimeIcons with Lucide icons since Lucide lacks filled variants. This mixed usage is acceptable when one icon library does not provide an equivalent filled icon. Apply consistently across Vue components in the src directory where icons are used, and document the rationale when a mixed approach is chosen.

Applied to files:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/platform/cloud/subscription/components/PricingTable.vue
📚 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:

  • src/platform/cloud/subscription/composables/useSubscription.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.

Applied to files:

  • src/platform/cloud/subscription/composables/useSubscription.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/platform/cloud/subscription/constants/tierPricing.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).

Applied to files:

  • src/platform/cloud/subscription/composables/useSubscription.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/platform/cloud/subscription/constants/tierPricing.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-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-11-24T19:48:09.318Z
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

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-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:

  • src/platform/cloud/subscription/components/PricingTable.vue
🧬 Code graph analysis (1)
src/platform/cloud/subscription/composables/useSubscription.ts (1)
src/platform/cloud/subscription/constants/tierPricing.ts (1)
  • TIER_TO_KEY (7-12)
⏰ 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: setup
  • GitHub Check: test
  • GitHub Check: lint-and-format
  • GitHub Check: collect
🔇 Additional comments (8)
src/locales/en/main.json (1)

1948-1948: LGTM! Clean i18n addition for yearly tier naming.

The new tierNameYearly translation key provides a consistent, parameterized format for displaying yearly tier names across the UI. This aligns well with the PR's objective to reflect billing cycles in tier labels.

tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts (1)

15-36: Excellent test coverage for yearly subscription behavior.

The mock properly introduces yearly subscription state testing:

  • mockIsYearlySubscription ref allows tests to toggle yearly mode
  • subscriptionTierName logic mirrors production code by appending " Yearly" suffix
  • Exposed isYearlySubscription computed enables testing of yearly-dependent UI

This scaffolding ensures the component's yearly/monthly naming and pricing behavior can be thoroughly validated.

src/platform/cloud/subscription/composables/useSubscription.ts (1)

77-93: Robust implementation of yearly subscription detection.

The computed properties correctly derive yearly state from subscription data:

  • subscriptionDuration extracts duration from subscription status (handles null safely)
  • isYearlySubscription compares against 'ANNUAL' (returns false when null)
  • subscriptionTierName applies i18n yearly suffix only when yearly subscription is active

This approach ensures consistent yearly/monthly labeling across the UI and fixes the "Current Plan" display issue mentioned in the PR objectives.

src/platform/cloud/subscription/components/SubscriptionPanel.vue (1)

370-399: Clean integration of yearly subscription pricing.

The component now:

  • Uses getTierFeatures() accessor for better encapsulation (replacing direct TIER_FEATURES access)
  • Consumes isYearlySubscription from useSubscription
  • Passes yearly flag to getTierPrice() for correct price display

These changes ensure the subscription panel displays accurate yearly/monthly pricing and align with the PR's objective to reflect billing cycles in the UI.

src/platform/cloud/subscription/constants/tierPricing.ts (1)

43-47: Proper yearly pricing support added.

The updated getTierPrice() signature now accepts an isYearly parameter (defaulting to false for backward compatibility) and returns the appropriate price:

  • Founder tier: fixed monthly price (unchanged behavior)
  • Other tiers: pricing.yearly or pricing.monthly based on isYearly flag

This enables accurate pricing display across both billing cycles and directly addresses the PR's goal to fix the "Current Plan" display issue.

src/platform/cloud/subscription/components/PricingTable.vue (3)

334-357: Excellent fix for the "Current Plan" display bug!

The updated isCurrentPlan() logic now correctly validates both dimensions:

  1. Tier match: currentTierKey.value === tierKey
  2. Billing cycle match: isYearlySubscription.value === selectedIsYearly

This ensures "Current Plan" is displayed only when both the tier and billing cycle (yearly/monthly) match the user's actual subscription, fixing the issue described in the PR objectives where the indicator appeared on the wrong billing cycle tab.


366-374: Consistent i18n usage for yearly tier labels.

The planName computation now uses t('subscription.tierNameYearly', { name: tier.name }) for yearly plans, addressing the previous review comment about consistency. This ensures:

  • Centralized yearly label format in locale files
  • Support for future translations
  • Consistency with useSubscription.ts implementation

The button label logic properly distinguishes between:

  • Current plan: "Current Plan"
  • Active subscription: "Change to {plan}"
  • No subscription: "Subscribe to {plan}"

446-449: Simplified checkout flow aligns with backend changes.

The subscription flow now always initiates checkout via initiateCheckout() and opens the returned checkout_url. Based on past review comments, this aligns with PR #7692 where the billing portal will deep link to the update subscription flow, eliminating the need for conditional routing.

]

if (TIER_FEATURES[key].customLoRAs) {
if (getTierFeatures(key).customLoRAs) {
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Consistent use of tier feature accessor.

Migrating from TIER_FEATURES[key] to getTierFeatures(key) improves encapsulation and maintains consistency with the refactored pricing constants.

🤖 Prompt for AI Agents
In src/platform/cloud/subscription/components/SubscriptionPanel.vue around line
439, replace the direct access to the old pricing constant
(TIER_FEATURES[key].customLoRAs) with the new accessor by calling
getTierFeatures(key).customLoRAs; update this single conditional to use
getTierFeatures(key) and remove any remaining uses of TIER_FEATURES[key] in
nearby lines so the component consistently uses the refactored pricing accessor.

} from '@/stores/firebaseAuthStore'
import { useDialogService } from '@/services/dialogService'
import type { components, operations } from '@/types/comfyRegistryTypes'
import { TIER_TO_KEY } from '@/platform/cloud/subscription/constants/tierPricing'
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Good refactoring to centralize tier key mapping.

Importing TIER_TO_KEY from tierPricing.ts eliminates duplication and establishes a single source of truth for tier key resolution.

🤖 Prompt for AI Agents
In src/platform/cloud/subscription/composables/useSubscription.ts around line
16, replace any local tier-key mapping with the centralized TIER_TO_KEY import:
remove the duplicated mapping constant from this file, update all uses to
reference TIER_TO_KEY, and ensure exported/internal functions read from
TIER_TO_KEY (not a local copy); run/adjust any unit tests or callers that
referenced the removed local constant to use the imported TIER_TO_KEY.

@christian-byrne christian-byrne merged commit 9514e5d into main Dec 22, 2025
28 checks passed
@christian-byrne christian-byrne deleted the fix(cloud)/pricing-annual-misc branch December 22, 2025 12:01
github-actions bot pushed a commit that referenced this pull request Dec 22, 2025
## Summary

Fix: PricingTable showed "Current Plan" on the wrong billing cycle
(e.g., showing it on Yearly when subscribed to Monthly) because we
weren't checking subscription_duration. Now we check for ANNUAL |
MONTHLY match.

Fix: Subscribed users were being sent to billing portal instead of
checkout. Now routes to checkout.

Improved: Types now use openapi.yml as source of truth. Tier names in
user popover and subscription panels now reflect the billing cycle
(YEARLY/MONTHLY).

Recommended to merge this before
#7692

---------

Co-authored-by: bymyself <cbyrne@comfy.org>
@comfy-pr-bot
Copy link
Member

@simula-r Successfully backported to #7704

@github-actions github-actions bot removed the needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch label Dec 22, 2025
christian-byrne added a commit that referenced this pull request Dec 22, 2025
Backport of #7701 to `cloud/1.35`

Automatically created by backport workflow.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7704-backport-cloud-1-35-Fix-cloud-pricing-annual-misc-2d16d73d365081868447db732608a2c7)
by [Unito](https://www.unito.io)

Co-authored-by: Simula_r <18093452+simula-r@users.noreply.github.com>
Co-authored-by: bymyself <cbyrne@comfy.org>
Yourz pushed a commit that referenced this pull request Dec 24, 2025
## Summary

Fix: PricingTable showed "Current Plan" on the wrong billing cycle
(e.g., showing it on Yearly when subscribed to Monthly) because we
weren't checking subscription_duration. Now we check for ANNUAL |
MONTHLY match.

Fix: Subscribed users were being sent to billing portal instead of
checkout. Now routes to checkout.

Improved: Types now use openapi.yml as source of truth. Tier names in
user popover and subscription panels now reflect the billing cycle
(YEARLY/MONTHLY).

Recommended to merge this before
#7692

---------

Co-authored-by: bymyself <cbyrne@comfy.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants