Skip to content

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Dec 3, 2025

Renames the shared subscription state export to keep the descriptive name isSubscribedOrIsNotCloud. Previously it was just isSubscribed which led to some misunderstandings and could lie

In some call sites, short-circuit on isCloud earlier, to avoid initializing a cloud-specific module (which can have non-breaking but inadvertant side-effects like network requests) on local. We want that all to be tree-shaken on local

┆Issue is synchronized with this Notion page by Unito

@christian-byrne christian-byrne requested review from a team and pythongosssss as code owners December 3, 2025 06:57
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 3, 2025
@github-actions
Copy link

github-actions bot commented Dec 3, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/04/2025, 08:28:00 PM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

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

📈 Summary

  • Total Tests: 493
  • Passed: 478 ✅
  • Failed: 0
  • Flaky: 5 ⚠️
  • Skipped: 10 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 469 / ❌ 0 / ⚠️ 5 / ⏭️ 10
  • 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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

📝 Walkthrough

Walkthrough

The pull request renames the subscription state property from isActiveSubscription to isSubscribedOrIsNotCloud across the codebase and makes subscription checks cloud-aware: non-cloud builds bypass subscription gating while cloud builds enforce the renamed subscription state for purchases, dialogs, and command gating.

Changes

Cohort / File(s) Change Summary
Subscription Composables
src/platform/cloud/subscription/composables/useSubscription.ts, src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
Public API and watcher option field renamed from isActiveSubscriptionisSubscribedOrIsNotCloud. Internal watcher and cancellation logic updated to use the renamed computed.
Subscription UI Components
src/platform/cloud/subscription/components/SubscribeButton.vue, src/platform/cloud/subscription/components/SubscriptionPanel.vue
Templates and setup now destructure/use isSubscribedOrIsNotCloud instead of isActiveSubscription; polling/completion and conditional rendering updated accordingly.
Subscription Integration UI
src/components/topbar/CurrentUserPopover.vue, src/components/dialog/content/setting/CreditsPanel.vue, src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
Conditional rendering and button/key selection switched to rely on isSubscribedOrIsNotCloud. CreditsPanel adds cloud-aware subscription handling (useSubscription only in cloud).
Cloud-Aware Command & Auth Logic
src/composables/useCoreCommands.ts, src/composables/auth/useFirebaseAuthActions.ts
Subscription guards adapted to use a cloud-aware subscription state (isSubscribedOrIsNotCloud when cloud, fallback/noop otherwise). Credit purchase flow skips subscription check on non-cloud builds.
App & Service Layer
src/scripts/app.ts, src/services/dialogService.ts
Payment-required handling and top-up dialog gating made cloud-aware: non-cloud always shows top-up; cloud shows only when isSubscribedOrIsNotCloud is true.
Platform Subscribe Button Wrapper
src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
Button selection and template key switched to use isSubscribedOrIsNotCloud for choosing queue vs subscribe UI.
Tests & Mocks
src/components/topbar/CurrentUserPopover.test.ts, tests-ui/tests/composables/useCoreCommands.test.ts, tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts, tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts, tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
Test fixtures and assertions updated to reference isSubscribedOrIsNotCloud (often changed from a function mock to a { value: true/false } computed-style mock).
✨ 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/top-up-local

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

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

🧹 Nitpick comments (1)
src/composables/useCoreCommands.ts (1)

66-67: Consider gating useSubscription() to avoid initializing cloud logic on local builds

The new guards using isSubscribedOrIsNotCloud.value and showSubscriptionDialog() look correct and preserve the prior behavior with the renamed flag.

To better match the PR objective of not initializing cloud modules on local, you could avoid calling useSubscription() at module scope and instead gate it, for example:

export function useCoreCommands(): ComfyCommand[] {
  // ...
  const subscription =
    isCloud /* from '@/platform/distribution/types' */ ? useSubscription() : null
  const isSubscribedOrIsNotCloud = subscription?.isSubscribedOrIsNotCloud
  const showSubscriptionDialog = subscription?.showSubscriptionDialog
  // use these in the queue commands, with a null check if needed
}

This would prevent the subscription composable (and its network activity) from being set up when running non‑cloud builds, while keeping the command guards unchanged for cloud.

Also applies to: 468-488, 491-512, 514-557

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6827413 and 79ddb75.

📒 Files selected for processing (16)
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue (2 hunks)
  • src/components/dialog/content/setting/CreditsPanel.vue (3 hunks)
  • src/components/topbar/CurrentUserPopover.test.ts (1 hunks)
  • src/components/topbar/CurrentUserPopover.vue (3 hunks)
  • src/composables/auth/useFirebaseAuthActions.ts (1 hunks)
  • src/composables/useCoreCommands.ts (4 hunks)
  • src/platform/cloud/subscription/components/SubscribeButton.vue (2 hunks)
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue (5 hunks)
  • src/platform/cloud/subscription/composables/useSubscription.ts (2 hunks)
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts (2 hunks)
  • src/scripts/app.ts (1 hunks)
  • src/services/dialogService.ts (1 hunks)
  • tests-ui/tests/composables/useCoreCommands.test.ts (1 hunks)
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts (3 hunks)
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts (3 hunks)
  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts (5 hunks)
🧰 Additional context used
📓 Path-based instructions (23)
**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{vue,ts,tsx}: Leverage VueUse functions for performance-enhancing utilities
Use vue-i18n in Composition API for any string literals and place new translation entries in src/locales/en/main.json

Files:

  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/composables/useCoreCommands.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/scripts/app.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/services/dialogService.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • src/components/topbar/CurrentUserPopover.vue
  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/platform/cloud/subscription/components/SubscribeButton.vue
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursorrules)

Use es-toolkit for utility functions

Files:

  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
  • src/composables/useCoreCommands.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/scripts/app.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/services/dialogService.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • tests-ui/tests/composables/useCoreCommands.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

Use TypeScript for type safety

**/*.{ts,tsx}: Never use any type - use proper TypeScript types
Never use as any type assertions - fix the underlying type issue

Files:

  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
  • src/composables/useCoreCommands.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/scripts/app.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/services/dialogService.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • tests-ui/tests/composables/useCoreCommands.test.ts
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (.cursorrules)

Implement proper error handling in components and services

**/*.{ts,tsx,js,vue}: Use 2-space indentation, single quotes, no semicolons, and maintain 80-character line width as configured in .prettierrc
Organize imports by sorting and grouping by plugin, and run pnpm format before committing

Files:

  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/composables/useCoreCommands.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/scripts/app.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/services/dialogService.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • src/components/topbar/CurrentUserPopover.vue
  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/platform/cloud/subscription/components/SubscribeButton.vue
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Use camelCase for variable and setting names in TypeScript/Vue files

Files:

  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/composables/useCoreCommands.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/scripts/app.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/services/dialogService.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • src/components/topbar/CurrentUserPopover.vue
  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/platform/cloud/subscription/components/SubscribeButton.vue
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,vue}: Use const settingStore = useSettingStore() and settingStore.get('Comfy.SomeSetting') to retrieve settings in TypeScript/Vue files
Use await settingStore.set('Comfy.SomeSetting', newValue) to update settings in TypeScript/Vue files
Check server capabilities using api.serverSupportsFeature('feature_name') before using enhanced features
Use api.getServerFeature('config_name', defaultValue) to retrieve server feature configuration

Enforce ESLint rules for Vue + TypeScript including: no floating promises, no unused imports, and i18n raw text restrictions in templates

Files:

  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/composables/useCoreCommands.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/scripts/app.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/services/dialogService.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • src/components/topbar/CurrentUserPopover.vue
  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/platform/cloud/subscription/components/SubscribeButton.vue
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.ts: Define dynamic setting defaults using runtime context with functions in settings configuration
Use defaultsByInstallVersion property for gradual feature rollout based on version in settings configuration

Files:

  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
  • src/composables/useCoreCommands.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/scripts/app.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • src/services/dialogService.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • tests-ui/tests/composables/useCoreCommands.test.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/useSubscriptionCancellationWatcher.test.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • tests-ui/tests/composables/useCoreCommands.test.ts
**/*.{test,spec}.{ts,tsx,js}

📄 CodeRabbit inference engine (AGENTS.md)

Unit and component tests should be located in tests-ui/ or co-located with components as src/components/**/*.{test,spec}.ts; E2E tests should be in browser_tests/

Files:

  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • tests-ui/tests/composables/useCoreCommands.test.ts
**/*.vue

📄 CodeRabbit inference engine (.cursorrules)

**/*.vue: Use setup() function for component logic in Vue 3 Composition API
Utilize ref and reactive for reactive state in Vue 3
Implement computed properties with computed() function
Use watch and watchEffect for side effects in Vue 3
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection in Vue 3
Use Vue 3.5 style of default prop declaration with defineProps()
Organize Vue components in <script> <style> order
Use Tailwind CSS for styling Vue components
Implement responsive design with Tailwind CSS
Do not use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage). Use replacements: Select, Popover, DatePicker, ToggleSwitch, Drawer, AutoComplete, Tabs, Stepper, Message respectively
Implement proper props and emits definitions in Vue components
Utilize Vue 3's Teleport component when needed
Use Suspense for async components in Vue 3
Follow Vue 3 style guide and naming conventions
Never use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage)

Never use :class="[]" to merge class names - always use import { cn } from '@/utils/tailwindUtil' for class merging in Vue templates

**/*.vue: Use TypeScript with Vue 3 Single File Components (.vue files)
Name Vue components in PascalCase (e.g., MenuHamburger.vue)

Files:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/platform/cloud/subscription/components/SubscribeButton.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/components/dialog/content/setting/CreditsPanel.vue
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/platform/cloud/subscription/components/SubscribeButton.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/composables/useCoreCommands.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/scripts/app.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/services/dialogService.ts
  • src/components/topbar/CurrentUserPopover.vue
  • src/platform/cloud/subscription/components/SubscribeButton.vue
**/*.{vue,html}

📄 CodeRabbit inference engine (CLAUDE.md)

Never use dark: or dark-theme: Tailwind variants - instead use semantic values from style.css theme, e.g. bg-node-component-surface

Files:

  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/platform/cloud/subscription/components/SubscribeButton.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/composables/useCoreCommands.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/scripts/app.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/services/dialogService.ts
  • src/components/topbar/CurrentUserPopover.vue
  • src/platform/cloud/subscription/components/SubscribeButton.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/composables/useCoreCommands.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/platform/cloud/subscription/components/SubscribeButton.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/composables/useCoreCommands.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/scripts/app.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/services/dialogService.ts
  • src/components/topbar/CurrentUserPopover.vue
  • src/platform/cloud/subscription/components/SubscribeButton.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/composables/useCoreCommands.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/platform/cloud/subscription/components/SubscribeButton.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/composables/useCoreCommands.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/scripts/app.ts
  • src/services/dialogService.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/composables/useCoreCommands.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/services/dialogService.ts
**/composables/use*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables in the format useXyz.ts

Files:

  • src/composables/useCoreCommands.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • tests-ui/tests/composables/useCoreCommands.test.ts
src/components/**/*.{vue,ts,js}

📄 CodeRabbit inference engine (src/components/CLAUDE.md)

src/components/**/*.{vue,ts,js}: Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners
Use useIntersectionObserver for visibility detection instead of custom scroll handlers
Use vue-i18n for ALL UI strings

Files:

  • src/components/topbar/CurrentUserPopover.test.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/components/topbar/CurrentUserPopover.vue
src/components/**/*.vue

📄 CodeRabbit inference engine (src/components/CLAUDE.md)

src/components/**/*.vue: Use setup() function in Vue 3 Composition API
Destructure props using Vue 3.5 style in Vue components
Use ref/reactive for state management in Vue 3 Composition API
Implement computed() for derived state in Vue 3 Composition API
Use provide/inject for dependency injection in Vue components
Prefer emit/@event-name for state changes over other communication patterns
Use defineExpose only for imperative operations (such as form.validate(), modal.open())
Replace PrimeVue Dropdown component with Select
Replace PrimeVue OverlayPanel component with Popover
Replace PrimeVue Calendar component with DatePicker
Replace PrimeVue InputSwitch component with ToggleSwitch
Replace PrimeVue Sidebar component with Drawer
Replace PrimeVue Chips component with AutoComplete with multiple enabled
Replace PrimeVue TabMenu component with Tabs without panels
Replace PrimeVue Steps component with Stepper without panels
Replace PrimeVue InlineMessage component with Message
Extract complex conditionals to computed properties
Implement cleanup for async operations in Vue components
Use lifecycle hooks: onMounted, onUpdated in Vue 3 Composition API
Use Teleport/Suspense when needed for component rendering
Define proper props and emits definitions in Vue components

Files:

  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/components/topbar/CurrentUserPopover.vue
src/components/**/*.{vue,css}

📄 CodeRabbit inference engine (src/components/CLAUDE.md)

src/components/**/*.{vue,css}: Use Tailwind CSS only for styling (no custom CSS)
Use the correct tokens from style.css in the design system package

Files:

  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/components/topbar/CurrentUserPopover.vue
🧠 Learnings (9)
📓 Common learnings
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
📚 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/useSubscriptionCancellationWatcher.test.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/composables/useCoreCommands.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • src/components/topbar/CurrentUserPopover.vue
  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/platform/cloud/subscription/components/SubscribeButton.vue
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Replace PrimeVue InputSwitch component with ToggleSwitch

Applied to files:

  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.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} : 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
  • tests-ui/tests/composables/useCoreCommands.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-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-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Replace PrimeVue OverlayPanel component with Popover

Applied to files:

  • src/components/topbar/CurrentUserPopover.vue
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Prefer emit/event-name for state changes over other communication patterns

Applied to files:

  • src/platform/cloud/subscription/components/SubscribeButton.vue
🧬 Code graph analysis (6)
src/composables/useCoreCommands.ts (1)
src/platform/cloud/subscription/composables/useSubscription.ts (1)
  • useSubscription (244-244)
src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts (2)
src/platform/cloud/subscription/composables/useSubscription.ts (1)
  • CloudSubscriptionStatusResponse (23-28)
src/platform/telemetry/types.ts (1)
  • TelemetryProvider (259-328)
src/composables/auth/useFirebaseAuthActions.ts (1)
src/platform/cloud/subscription/composables/useSubscription.ts (1)
  • useSubscription (244-244)
src/scripts/app.ts (1)
src/platform/cloud/subscription/composables/useSubscription.ts (1)
  • useSubscription (244-244)
src/services/dialogService.ts (1)
src/platform/cloud/subscription/composables/useSubscription.ts (1)
  • useSubscription (244-244)
tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts (1)
src/platform/cloud/subscription/composables/useSubscription.ts (1)
  • useSubscription (244-244)
🪛 ESLint
src/components/dialog/content/setting/CreditsPanel.vue

[error] 128-128: Unable to resolve path to module '@/platform/distribution/types'.

(import-x/no-unresolved)

⏰ 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: collect
  • GitHub Check: lint-and-format
🔇 Additional comments (19)
src/components/topbar/CurrentUserPopover.test.ts (1)

82-88: Subscription mock rename and shape look correct

Mocking isSubscribedOrIsNotCloud as { value: true } matches the composable’s ref-like API and aligns this test with the new subscription flag.

src/services/dialogService.ts (1)

380-399: Cloud‑gated top‑up dialog matches new subscription flag

The new isCloud guard plus isSubscribedOrIsNotCloud check correctly prevents the top‑up dialog (and useSubscription() usage) on local builds and when cloud users aren’t eligible.

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

27-28: Watcher tests correctly updated to isSubscribedOrIsNotCloud

Using a computed based on isActive and passing isSubscribedOrIsNotCloud into the watcher keeps the tests aligned with the new API and preserves the intended behavior.

Also applies to: 77-83, 107-113, 129-135, 155-160

src/composables/auth/useFirebaseAuthActions.ts (1)

84-89: Cloud‑only subscription check in purchaseCredits is consistent

Wrapping the useSubscription() access in an isCloud check and switching to isSubscribedOrIsNotCloud.value cleanly aligns this flow with the new flag while avoiding cloud subscription setup on local runs.

src/components/dialog/content/setting/CreditsPanel.vue (1)

18-23: Credits top‑up button now correctly respects new subscription flag

The isSubscribedOrIsNotCloud computed cleanly gates the purchase button for cloud users while avoiding useSubscription() calls on local builds; the template condition matches the new flag.

Also applies to: 128-152

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

34-38: Renamed subscription flag is consistently wired through the composable

isSubscribedOrIsNotCloud is correctly computed, passed into useSubscriptionCancellationWatcher, and exposed on the returned API, keeping behavior intact while giving downstream callers a clearer predicate.

Also applies to: 111-118, 224-241

src/scripts/app.ts (1)

679-690: Logic correctly short-circuits to avoid cloud module initialization in non-cloud builds.

The branching ensures useSubscription() is only called when isCloud is true, aligning with the PR's goal to prevent cloud-specific module initialization in local environments. The redundancy with showTopUpCreditsDialog's internal check is intentional defensive layering.

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

95-127: Test updates correctly reflect the API rename.

The test cases properly validate that isSubscribedOrIsNotCloud behaves as expected: true when the subscription is active, false when inactive. The mocked isCloud: true context at line 56 ensures these tests run in the cloud environment where this distinction matters.

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

9-17: Mock data correctly updated to use the renamed property.

The mock structure aligns with the updated useSubscription API, ensuring tests accurately simulate both subscribed and non-subscribed states via isSubscribedOrIsNotCloud.


121-151: Test cases properly exercise both subscription states.

Each test correctly mutates mockSubscriptionData.isSubscribedOrIsNotCloud before mounting to validate the expected UI behavior for active, inactive, and cancelled subscription scenarios.

src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue (1)

4-17: Component correctly updated to use the renamed subscription predicate.

The template key, destructuring, and computed logic all consistently reference isSubscribedOrIsNotCloud, maintaining the intended behavior: render ComfyQueueButton when the user is subscribed or not in cloud mode, otherwise render SubscribeToRunButton.

src/platform/cloud/subscription/components/SubscribeButton.vue (2)

54-54: Destructuring updated to use the renamed property.


79-83: Polling logic correctly uses the renamed predicate.

When the subscription checkout completes successfully, isSubscribedOrIsNotCloud.value becomes true in cloud mode, stopping the poll and emitting the subscribed event. The logic is semantically unchanged.

src/components/topbar/CurrentUserPopover.vue (2)

26-59: LGTM! Clear and consistent rename.

The rename from isActiveSubscription to isSubscribedOrIsNotCloud significantly improves code clarity by explicitly conveying that the UI shows credits/top-up functionality either when the user is subscribed OR when running locally (not in cloud mode). The conditional logic for toggling between the credits UI and the subscribe button is now more self-documenting.


128-128: Consistent destructuring update.

The script section correctly reflects the renamed property, maintaining consistency between the template and script logic.

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

7-72: LGTM! Comprehensive and consistent rename across subscription UI.

The rename improves clarity across multiple conditional blocks that control the subscription panel's UI state. The new name isSubscribedOrIsNotCloud makes it explicit that subscription features are available both for cloud subscribers and local installations.


322-330: Consistent destructuring with template usage.

The script correctly destructures isSubscribedOrIsNotCloud from useSubscription(), maintaining perfect alignment with all template conditional checks throughout the component.

src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts (2)

13-27: LGTM! Type definition and parameter consistently updated.

The rename propagates correctly through the type definition and function signature, maintaining type safety and consistency with the calling code.


69-101: Proper cancellation detection logic with correct cleanup.

The conditional check at line 76 correctly uses the renamed isSubscribedOrIsNotCloud to detect when a subscription becomes inactive. The watcher properly cleans up resources via onScopeDispose (lines 121-123), preventing memory leaks as emphasized in the project learnings.

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

🧹 Nitpick comments (2)
tests-ui/tests/composables/useCoreCommands.test.ts (1)

101-106: Consider aligning mocked subscription flag shape with real composable

Renaming the mocked field to isSubscribedOrIsNotCloud keeps these tests in sync with the new API. If the real useSubscription now exposes this as a Ref<boolean>, you might optionally switch the mock to isSubscribedOrIsNotCloud: ref(true) to better mirror production usage and catch future .value access changes, though the current truthy function works for these tests.

src/components/topbar/CurrentUserPopover.vue (1)

128-128: Consider adding cloud-aware initialization.

While the renaming is correct, this component could benefit from the conditional initialization pattern used in CreditsPanel.vue (line 148) to prevent cloud module initialization on local environments:

const subscription = isCloud ? useSubscription() : null
const isSubscribedOrIsNotCloud = computed(() => {
  if (!isCloud) return true
  return subscription?.isSubscribedOrIsNotCloud.value ?? false
})

This would align with the PR's goal to avoid initializing cloud modules on local environments.

Apply this pattern if the component can be loaded in non-cloud environments:

+import { isCloud } from '@/platform/distribution/types'
+
 const { userDisplayName, userEmail, userPhotoUrl, handleSignOut } =
   useCurrentUser()
 const authActions = useFirebaseAuthActions()
 const dialogService = useDialogService()
-const { isSubscribedOrIsNotCloud, fetchStatus } = useSubscription()
+const subscription = isCloud ? useSubscription() : null
+const isSubscribedOrIsNotCloud = computed(() => {
+  if (!isCloud) return true
+  return subscription?.isSubscribedOrIsNotCloud.value ?? false
+})
+const fetchStatus = subscription?.fetchStatus ?? (() => Promise.resolve())
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6827413 and 79ddb75.

📒 Files selected for processing (16)
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue (2 hunks)
  • src/components/dialog/content/setting/CreditsPanel.vue (3 hunks)
  • src/components/topbar/CurrentUserPopover.test.ts (1 hunks)
  • src/components/topbar/CurrentUserPopover.vue (3 hunks)
  • src/composables/auth/useFirebaseAuthActions.ts (1 hunks)
  • src/composables/useCoreCommands.ts (4 hunks)
  • src/platform/cloud/subscription/components/SubscribeButton.vue (2 hunks)
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue (5 hunks)
  • src/platform/cloud/subscription/composables/useSubscription.ts (2 hunks)
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts (2 hunks)
  • src/scripts/app.ts (1 hunks)
  • src/services/dialogService.ts (1 hunks)
  • tests-ui/tests/composables/useCoreCommands.test.ts (1 hunks)
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts (3 hunks)
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts (3 hunks)
  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts (5 hunks)
🧰 Additional context used
📓 Path-based instructions (23)
**/*.vue

📄 CodeRabbit inference engine (.cursorrules)

**/*.vue: Use setup() function for component logic in Vue 3 Composition API
Utilize ref and reactive for reactive state in Vue 3
Implement computed properties with computed() function
Use watch and watchEffect for side effects in Vue 3
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection in Vue 3
Use Vue 3.5 style of default prop declaration with defineProps()
Organize Vue components in <script> <style> order
Use Tailwind CSS for styling Vue components
Implement responsive design with Tailwind CSS
Do not use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage). Use replacements: Select, Popover, DatePicker, ToggleSwitch, Drawer, AutoComplete, Tabs, Stepper, Message respectively
Implement proper props and emits definitions in Vue components
Utilize Vue 3's Teleport component when needed
Use Suspense for async components in Vue 3
Follow Vue 3 style guide and naming conventions
Never use deprecated PrimeVue components (Dropdown, OverlayPanel, Calendar, InputSwitch, Sidebar, Chips, TabMenu, Steps, InlineMessage)

Never use :class="[]" to merge class names - always use import { cn } from '@/utils/tailwindUtil' for class merging in Vue templates

**/*.vue: Use TypeScript with Vue 3 Single File Components (.vue files)
Name Vue components in PascalCase (e.g., MenuHamburger.vue)

Files:

  • src/platform/cloud/subscription/components/SubscribeButton.vue
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{vue,ts,tsx}: Leverage VueUse functions for performance-enhancing utilities
Use vue-i18n in Composition API for any string literals and place new translation entries in src/locales/en/main.json

Files:

  • src/platform/cloud/subscription/components/SubscribeButton.vue
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • src/composables/useCoreCommands.ts
  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/services/dialogService.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/scripts/app.ts
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (.cursorrules)

Implement proper error handling in components and services

**/*.{ts,tsx,js,vue}: Use 2-space indentation, single quotes, no semicolons, and maintain 80-character line width as configured in .prettierrc
Organize imports by sorting and grouping by plugin, and run pnpm format before committing

Files:

  • src/platform/cloud/subscription/components/SubscribeButton.vue
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • src/composables/useCoreCommands.ts
  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/services/dialogService.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/scripts/app.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/SubscribeButton.vue
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.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/SubscribeButton.vue
  • src/composables/useCoreCommands.ts
  • src/services/dialogService.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/scripts/app.ts
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Use camelCase for variable and setting names in TypeScript/Vue files

Files:

  • src/platform/cloud/subscription/components/SubscribeButton.vue
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • src/composables/useCoreCommands.ts
  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/services/dialogService.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/scripts/app.ts
**/*.{vue,html}

📄 CodeRabbit inference engine (CLAUDE.md)

Never use dark: or dark-theme: Tailwind variants - instead use semantic values from style.css theme, e.g. bg-node-component-surface

Files:

  • src/platform/cloud/subscription/components/SubscribeButton.vue
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,vue}: Use const settingStore = useSettingStore() and settingStore.get('Comfy.SomeSetting') to retrieve settings in TypeScript/Vue files
Use await settingStore.set('Comfy.SomeSetting', newValue) to update settings in TypeScript/Vue files
Check server capabilities using api.serverSupportsFeature('feature_name') before using enhanced features
Use api.getServerFeature('config_name', defaultValue) to retrieve server feature configuration

Enforce ESLint rules for Vue + TypeScript including: no floating promises, no unused imports, and i18n raw text restrictions in templates

Files:

  • src/platform/cloud/subscription/components/SubscribeButton.vue
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • src/composables/useCoreCommands.ts
  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/services/dialogService.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/scripts/app.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/components/SubscribeButton.vue
  • src/composables/useCoreCommands.ts
  • src/services/dialogService.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/scripts/app.ts
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/SubscribeButton.vue
  • src/composables/useCoreCommands.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/platform/cloud/subscription/components/SubscribeButton.vue
  • src/composables/useCoreCommands.ts
  • src/services/dialogService.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
  • src/scripts/app.ts
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/SubscribeButton.vue
  • src/composables/useCoreCommands.ts
  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursorrules)

Use es-toolkit for utility functions

Files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • src/composables/useCoreCommands.ts
  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/services/dialogService.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/scripts/app.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

Use TypeScript for type safety

**/*.{ts,tsx}: Never use any type - use proper TypeScript types
Never use as any type assertions - fix the underlying type issue

Files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • src/composables/useCoreCommands.ts
  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/services/dialogService.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/scripts/app.ts
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.ts: Define dynamic setting defaults using runtime context with functions in settings configuration
Use defaultsByInstallVersion property for gradual feature rollout based on version in settings configuration

Files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • src/composables/useCoreCommands.ts
  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/services/dialogService.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/scripts/app.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
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • tests-ui/tests/composables/useCoreCommands.test.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
**/*.{test,spec}.{ts,tsx,js}

📄 CodeRabbit inference engine (AGENTS.md)

Unit and component tests should be located in tests-ui/ or co-located with components as src/components/**/*.{test,spec}.ts; E2E tests should be in browser_tests/

Files:

  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
src/**/*.ts

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

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

Files:

  • src/composables/useCoreCommands.ts
  • src/services/dialogService.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/composables/auth/useFirebaseAuthActions.ts
  • src/scripts/app.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/composables/useCoreCommands.ts
  • src/services/dialogService.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • src/composables/auth/useFirebaseAuthActions.ts
**/composables/use*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables in the format useXyz.ts

Files:

  • src/composables/useCoreCommands.ts
  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
src/components/**/*.vue

📄 CodeRabbit inference engine (src/components/CLAUDE.md)

src/components/**/*.vue: Use setup() function in Vue 3 Composition API
Destructure props using Vue 3.5 style in Vue components
Use ref/reactive for state management in Vue 3 Composition API
Implement computed() for derived state in Vue 3 Composition API
Use provide/inject for dependency injection in Vue components
Prefer emit/@event-name for state changes over other communication patterns
Use defineExpose only for imperative operations (such as form.validate(), modal.open())
Replace PrimeVue Dropdown component with Select
Replace PrimeVue OverlayPanel component with Popover
Replace PrimeVue Calendar component with DatePicker
Replace PrimeVue InputSwitch component with ToggleSwitch
Replace PrimeVue Sidebar component with Drawer
Replace PrimeVue Chips component with AutoComplete with multiple enabled
Replace PrimeVue TabMenu component with Tabs without panels
Replace PrimeVue Steps component with Stepper without panels
Replace PrimeVue InlineMessage component with Message
Extract complex conditionals to computed properties
Implement cleanup for async operations in Vue components
Use lifecycle hooks: onMounted, onUpdated in Vue 3 Composition API
Use Teleport/Suspense when needed for component rendering
Define proper props and emits definitions in Vue components

Files:

  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
src/components/**/*.{vue,css}

📄 CodeRabbit inference engine (src/components/CLAUDE.md)

src/components/**/*.{vue,css}: Use Tailwind CSS only for styling (no custom CSS)
Use the correct tokens from style.css in the design system package

Files:

  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
src/components/**/*.{vue,ts,js}

📄 CodeRabbit inference engine (src/components/CLAUDE.md)

src/components/**/*.{vue,ts,js}: Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners
Use useIntersectionObserver for visibility detection instead of custom scroll handlers
Use vue-i18n for ALL UI strings

Files:

  • src/components/dialog/content/setting/CreditsPanel.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue
🧠 Learnings (8)
📓 Common learnings
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
📚 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/SubscribeButton.vue
  • tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts
  • src/composables/useCoreCommands.ts
  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/platform/cloud/subscription/composables/useSubscription.ts
  • src/platform/cloud/subscription/components/SubscriptionPanel.vue
  • src/components/topbar/CurrentUserPopover.vue
  • src/components/topbar/CurrentUserPopover.test.ts
  • src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts
  • tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts
  • src/composables/auth/useFirebaseAuthActions.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
  • tests-ui/tests/composables/useCoreCommands.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-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} : Follow existing test patterns in the codebase

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
  • tests-ui/tests/composables/useCoreCommands.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-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Replace PrimeVue OverlayPanel component with Popover

Applied to files:

  • src/components/topbar/CurrentUserPopover.vue
🧬 Code graph analysis (6)
tests-ui/tests/platform/cloud/subscription/useSubscription.test.ts (1)
src/platform/cloud/subscription/composables/useSubscription.ts (1)
  • useSubscription (244-244)
src/composables/useCoreCommands.ts (1)
src/platform/cloud/subscription/composables/useSubscription.ts (1)
  • useSubscription (244-244)
src/services/dialogService.ts (1)
src/platform/cloud/subscription/composables/useSubscription.ts (1)
  • useSubscription (244-244)
src/platform/cloud/subscription/composables/useSubscriptionCancellationWatcher.ts (2)
src/platform/cloud/subscription/composables/useSubscription.ts (1)
  • CloudSubscriptionStatusResponse (23-28)
src/platform/telemetry/types.ts (1)
  • TelemetryProvider (259-328)
tests-ui/tests/platform/cloud/subscription/useSubscriptionCancellationWatcher.test.ts (1)
src/extensions/core/load3d/Load3d.ts (1)
  • isActive (383-391)
src/composables/auth/useFirebaseAuthActions.ts (1)
src/platform/cloud/subscription/composables/useSubscription.ts (1)
  • useSubscription (244-244)
🪛 ESLint
src/components/dialog/content/setting/CreditsPanel.vue

[error] 128-128: Unable to resolve path to module '@/platform/distribution/types'.

(import-x/no-unresolved)

⏰ 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). (1)
  • GitHub Check: merge-reports
🔇 Additional comments (13)
src/components/topbar/CurrentUserPopover.test.ts (1)

82-88: Subscription mock rename is consistent with composable API

Mocking useSubscription with isSubscribedOrIsNotCloud: { value: true } aligns with the new flag name and expected ref-like shape; no behavior change in the tests.

src/services/dialogService.ts (1)

380-399: Cloud-only subscription guard in showTopUpCreditsDialog

The early if (isCloud) { const { isSubscribedOrIsNotCloud } = useSubscription(); if (!isSubscribedOrIsNotCloud.value) return } cleanly avoids touching the subscription composable on local builds and prevents showing the top-up dialog for unsubscribed cloud users.

Please just confirm that a silent no-op in the unsubscribed cloud case is intentional and that all callers already gate the top‑up entry points on subscription state, so users never click a button that does nothing.

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

54-83: Polling now uses isSubscribedOrIsNotCloud consistently

Switching the destructured flag and the polling condition to isSubscribedOrIsNotCloud.value keeps the subscribe flow semantics intact while aligning with the new API; interval and loading-state cleanup remain correct.

src/components/actionbar/ComfyRunButton/CloudRunButtonWrapper.vue (1)

1-18: Run button wrapper correctly switched to isSubscribedOrIsNotCloud

The computed and template key now both depend on isSubscribedOrIsNotCloud instead of the old flag, preserving the queue/subscribe toggle behavior with the updated API.

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

8-17: Tests now track isSubscribedOrIsNotCloud for subscription state

Renaming the mock field and all subscription-state expectations to isSubscribedOrIsNotCloud keeps the active/inactive and renewal/expiry test scenarios aligned with the updated composable API, with no change to asserted behavior.

Also applies to: 121-152

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

23-32: Cancellation watcher tests aligned with isSubscribedOrIsNotCloud

Using a local computed isSubscribedOrIsNotCloud and passing it into useSubscriptionCancellationWatcher in all test setups preserves the prior behavior while matching the new option name expected by the composable.

Also applies to: 77-83, 107-113, 129-135, 155-160

src/composables/auth/useFirebaseAuthActions.ts (1)

84-89: Cloud-only subscription guard added to purchaseCredits

The new if (isCloud) { const { isSubscribedOrIsNotCloud } = useSubscription(); if (!isSubscribedOrIsNotCloud.value) return } guard cleanly avoids initializing subscription logic on local and prevents initiating a credit purchase when the cloud user isn’t subscribed.

Please double‑check that callers never invoke purchaseCredits for unsubscribed cloud users (or, if they can, that a silent early return without feedback is the desired UX).

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

95-127: LGTM! Test updates align with API rename.

The test correctly reflects the renamed subscription state property. The test logic and assertions remain unchanged, maintaining coverage.

src/components/dialog/content/setting/CreditsPanel.vue (1)

148-152: Excellent cloud-aware initialization pattern.

This is the correct approach to prevent cloud module initialization on local environments:

  1. Conditionally call useSubscription() only when isCloud is true
  2. The computed property correctly returns true for non-cloud (no subscription required)
  3. For cloud environments, it delegates to the subscription state

This pattern should be used consistently across the codebase where subscription status is needed.

src/scripts/app.ts (1)

679-690: Cloud-aware error handling is correct.

The logic properly short-circuits for non-cloud environments before initializing the subscription module. For cloud environments, the subscription is only checked when a payment error occurs.

Note: Since useSubscription() is a shared composable (via createSharedComposable), calling it multiple times returns the same instance, making this pattern safe.

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

15-27: LGTM! Parameter renaming is consistent.

The cancellation watcher correctly receives and uses the renamed subscription state property. No logic changes, maintaining existing behavior.

Also applies to: 76-76

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

7-11: LGTM! Consistent renaming throughout the component.

All references to the subscription state have been correctly updated to use isSubscribedOrIsNotCloud. Since this component is in the cloud-specific path, conditional initialization is not needed here.

Also applies to: 30-47, 50-72, 199-212, 323-330

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

34-38: LGTM! Public API renamed consistently.

The core subscription composable correctly:

  1. Computes isSubscribedOrIsNotCloud based on cloud status and subscription state
  2. Passes the renamed property to the cancellation watcher
  3. Exports the renamed property in the returned object

The logic correctly returns true for non-cloud environments, treating them as "effectively subscribed" for feature access purposes.

Also applies to: 114-114, 226-226

Copy link
Contributor

@DrJKL DrJKL left a comment

Choose a reason for hiding this comment

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

I don't love compound logic in names like this.

Is there something more essential about the gating that we can describe without exposing what specifically goes into it right now?

Maybe subscriptionIneligible?

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

Bundle Size Report

Summary

  • Raw size: 17 MB baseline 17 MB — 🔴 +373 B
  • Gzip: 3.38 MB baseline 3.38 MB — 🔴 +760 B
  • Brotli: 2.59 MB baseline 2.59 MB — 🔴 +316 B
  • Bundles: 98 current • 97 baseline • 53 added / 52 removed

Category Glance
UI Components 🔴 +9.26 kB (182 kB) · App Entry Points 🟢 -8.94 kB (3.19 MB) · Other 🔴 +60 B (3.81 MB) · Graph Workspace 🟢 -55 B (972 kB) · Panels & Settings 🔴 +44 B (298 kB) · Vendor & Third-Party ⚪ 0 B (8.56 MB) · + 3 more

Per-category breakdown
App Entry Points — 3.19 MB (baseline 3.2 MB) • 🟢 -8.94 kB

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-CV8hwdrX.js (removed) 2.97 MB 🟢 -2.97 MB 🟢 -619 kB 🟢 -471 kB
assets/index-Bux-UrE_.js (new) 2.97 MB 🔴 +2.97 MB 🔴 +618 kB 🔴 +469 kB
assets/index-CDuS3wC9.js (new) 223 kB 🔴 +223 kB 🔴 +47.6 kB 🔴 +39.3 kB
assets/index-DC2GnKmY.js (removed) 223 kB 🟢 -223 kB 🟢 -47.6 kB 🟢 -39.3 kB
assets/index-aQdK4fdU.js (new) 360 B 🔴 +360 B 🔴 +252 B 🔴 +229 B
assets/index-CLZVfFEf.js (new) 345 B 🔴 +345 B 🔴 +244 B 🔴 +202 B
assets/index-FfkQvRqM.js (removed) 345 B 🟢 -345 B 🟢 -246 B 🟢 -229 B

Status: 4 added / 3 removed

Graph Workspace — 972 kB (baseline 972 kB) • 🟢 -55 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-C1EAuk-3.js (removed) 972 kB 🟢 -972 kB 🟢 -188 kB 🟢 -143 kB
assets/GraphView-BsUSWQmo.js (new) 972 kB 🔴 +972 kB 🔴 +188 kB 🔴 +143 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-BWfxpef5.js (removed) 6.54 kB 🟢 -6.54 kB 🟢 -2.14 kB 🟢 -1.9 kB
assets/UserSelectView-kdv2YX76.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) • 🔴 +44 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/CreditsPanel-C1RcK0vR.js (new) 21.5 kB 🔴 +21.5 kB 🔴 +5.16 kB 🔴 +4.51 kB
assets/CreditsPanel-lcPn9-MB.js (removed) 21.4 kB 🟢 -21.4 kB 🟢 -5.15 kB 🟢 -4.49 kB
assets/KeybindingPanel-CGJJ2y6_.js (removed) 13.6 kB 🟢 -13.6 kB 🟢 -3.42 kB 🟢 -3.01 kB
assets/KeybindingPanel-CTaW0TIf.js (new) 13.6 kB 🔴 +13.6 kB 🔴 +3.42 kB 🔴 +3.02 kB
assets/ExtensionPanel-D2AWRKM5.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.58 kB 🟢 -2.26 kB
assets/ExtensionPanel-DZOqhwxc.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.57 kB 🔴 +2.25 kB
assets/AboutPanel-B674oOFl.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/AboutPanel-ntqODLhs.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/ServerConfigPanel-Bwh7hm9L.js (new) 6.56 kB 🔴 +6.56 kB 🔴 +1.83 kB 🔴 +1.63 kB
assets/ServerConfigPanel-DikSDtY-.js (removed) 6.56 kB 🟢 -6.56 kB 🟢 -1.83 kB 🟢 -1.63 kB
assets/UserPanel-BkGCWL1Z.js (removed) 6.23 kB 🟢 -6.23 kB 🟢 -1.72 kB 🟢 -1.5 kB
assets/UserPanel-CGGSp9QL.js (new) 6.23 kB 🔴 +6.23 kB 🔴 +1.72 kB 🔴 +1.51 kB
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BXTtSH4O.js 33.3 kB 33.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C9Pzn-NG.js 25.2 kB 25.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CCy2fA_h.js 27.3 kB 27.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CQpqEFfl.js 26.6 kB 26.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DHcnxypw.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DhFTK9fY.js 25.1 kB 25.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DlT4t_ui.js 25.9 kB 25.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DRgSrIdD.js 24.2 kB 24.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-tjkeqiZq.js 21.1 kB 21.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

UI Components — 182 kB (baseline 173 kB) • 🔴 +9.26 kB

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/Load3D.vue_vue_type_script_setup_true_lang-B2Xjo6t3.js (removed) 53.9 kB 🟢 -53.9 kB 🟢 -8.52 kB 🟢 -7.31 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-DqXGaPI-.js (new) 53.9 kB 🔴 +53.9 kB 🔴 +8.52 kB 🔴 +7.32 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-Dj170R6L.js (new) 52.5 kB 🔴 +52.5 kB 🔴 +11.6 kB 🔴 +10.2 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-BaZfwzB-.js (removed) 47.6 kB 🟢 -47.6 kB 🟢 -10.3 kB 🟢 -8.9 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-qYpAqXJM.js (new) 47.6 kB 🔴 +47.6 kB 🔴 +10.3 kB 🔴 +8.91 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-DvQiHvku.js (removed) 43.3 kB 🟢 -43.3 kB 🟢 -9.68 kB 🟢 -8.45 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-C2iyHZr9.js (new) 12.9 kB 🔴 +12.9 kB 🔴 +3.37 kB 🔴 +2.96 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-CRngITh1.js (removed) 12.9 kB 🟢 -12.9 kB 🟢 -3.37 kB 🟢 -2.96 kB
assets/ComfyQueueButton-CPzDL0wk.js (new) 8.47 kB 🔴 +8.47 kB 🔴 +2.49 kB 🔴 +2.22 kB
assets/ComfyQueueButton-D1NUtjbp.js (removed) 8.44 kB 🟢 -8.44 kB 🟢 -2.47 kB 🟢 -2.21 kB
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-GHrVSbhe.js (new) 2.16 kB 🔴 +2.16 kB 🔴 +819 B 🔴 +720 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-VhqMWCTd.js (removed) 2.16 kB 🟢 -2.16 kB 🟢 -818 B 🟢 -716 B
assets/WidgetButton-CKS-wciK.js (new) 2.04 kB 🔴 +2.04 kB 🔴 +930 B 🔴 +810 B
assets/WidgetButton-DBkWxjh1.js (removed) 2.04 kB 🟢 -2.04 kB 🟢 -927 B 🟢 -810 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-Bke9skD0.js (new) 1.34 kB 🔴 +1.34 kB 🔴 +688 B 🔴 +595 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-DRxvgpU7.js (removed) 1.34 kB 🟢 -1.34 kB 🟢 -686 B 🟢 -597 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-CKW-vKlr.js (new) 897 B 🔴 +897 B 🔴 +501 B 🔴 +428 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-DgMICJGf.js (removed) 897 B 🟢 -897 B 🟢 -503 B 🟢 -436 B

Status: 9 added / 9 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-BHLXDXJZ.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.58 kB
assets/keybindingService-D3pP8hgC.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.58 kB
assets/serverConfigStore-BIb40oOr.js (removed) 2.83 kB 🟢 -2.83 kB 🟢 -907 B 🟢 -799 B
assets/serverConfigStore-CVJACp5m.js (new) 2.83 kB 🔴 +2.83 kB 🔴 +906 B 🔴 +790 B
assets/audioService-BclnS4ku.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +957 B 🔴 +826 B
assets/audioService-QQdxKfQB.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -960 B 🟢 -823 B

Status: 3 added / 3 removed

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

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-BMIoD1Rd.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -651 B 🟢 -547 B
assets/audioUtils-CYTlmzyp.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +651 B 🔴 +547 B
assets/mathUtil-CTARWQ-l.js 1.07 kB 1.07 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-other-BZzgsWym.js (removed) 3.98 MB 🟢 -3.98 MB 🟢 -843 kB 🟢 -673 kB
assets/vendor-other-DEnQSyXw.js (new) 3.98 MB 🔴 +3.98 MB 🔴 +843 kB 🔴 +673 kB
assets/vendor-primevue-3gHexYD_.js (removed) 1.96 MB 🟢 -1.96 MB 🟢 -336 kB 🟢 -202 kB
assets/vendor-primevue-Dt3mjkJm.js (new) 1.96 MB 🔴 +1.96 MB 🔴 +336 kB 🔴 +202 kB
assets/vendor-chart-2ttetVVw.js (new) 452 kB 🔴 +452 kB 🔴 +99.1 kB 🔴 +81 kB
assets/vendor-chart-DWRkrNy1.js (removed) 452 kB 🟢 -452 kB 🟢 -99.1 kB 🟢 -81 kB
assets/vendor-tiptap-C7B3mFl4.js (new) 232 kB 🔴 +232 kB 🔴 +45.7 kB 🔴 +37.7 kB
assets/vendor-tiptap-Dw558Ulu.js (removed) 232 kB 🟢 -232 kB 🟢 -45.7 kB 🟢 -37.7 kB
assets/vendor-vue-CoO6TOrn.js (removed) 160 kB 🟢 -160 kB 🟢 -37.3 kB 🟢 -31.6 kB
assets/vendor-vue-Dge-H4tk.js (new) 160 kB 🔴 +160 kB 🔴 +37.3 kB 🔴 +31.6 kB
assets/vendor-three-aR6ntw5X.js 1.37 MB 1.37 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BZLod3g9.js 407 kB 407 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 5 added / 5 removed

Other — 3.81 MB (baseline 3.81 MB) • 🔴 +60 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/WidgetRecordAudio-Cgxf5m23.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.23 kB 🔴 +4.64 kB
assets/WidgetRecordAudio-DiNYll9A.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.24 kB 🟢 -4.63 kB
assets/AudioPreviewPlayer-Ch_rNhtG.js (new) 13.5 kB 🔴 +13.5 kB 🔴 +3.4 kB 🔴 +3.05 kB
assets/AudioPreviewPlayer-DVhbDmhK.js (removed) 13.5 kB 🟢 -13.5 kB 🟢 -3.4 kB 🟢 -3.05 kB
assets/WidgetGalleria-BB6rhuh1.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.44 kB 🟢 -1.3 kB
assets/WidgetGalleria-Bh2lyKdc.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.44 kB 🔴 +1.3 kB
assets/WidgetColorPicker-Eel-a338.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetColorPicker-Klu3k_iD.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.23 kB
assets/WidgetMarkdown-BG72AEVD.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.12 kB
assets/WidgetMarkdown-DOK_Jm73.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.12 kB
assets/WidgetAudioUI-DcjSGSbY.js (new) 2.85 kB 🔴 +2.85 kB 🔴 +1.13 kB 🔴 +1.02 kB
assets/WidgetAudioUI-kFBE0tVD.js (removed) 2.82 kB 🟢 -2.82 kB 🟢 -1.12 kB 🟢 -1.02 kB
assets/WidgetTextarea-Ct-aT0Ua.js (removed) 2.79 kB 🟢 -2.79 kB 🟢 -1.1 kB 🟢 -992 B
assets/WidgetTextarea-DFmh2HGJ.js (new) 2.79 kB 🔴 +2.79 kB 🔴 +1.1 kB 🔴 +982 B
assets/MediaVideoTop-BpvqEylZ.js (removed) 2.76 kB 🟢 -2.76 kB 🟢 -1.05 kB 🟢 -900 B
assets/MediaVideoTop-CR7j4Zgh.js (new) 2.76 kB 🔴 +2.76 kB 🔴 +1.05 kB 🔴 +902 B
assets/WidgetChart-D3ACExCI.js (new) 2.48 kB 🔴 +2.48 kB 🔴 +934 B 🔴 +816 B
assets/WidgetChart-DsbKXC7D.js (removed) 2.48 kB 🟢 -2.48 kB 🟢 -933 B 🟢 -816 B
assets/WidgetImageCompare-BwCSEqfZ.js (new) 2.21 kB 🔴 +2.21 kB 🔴 +749 B 🔴 +664 B
assets/WidgetImageCompare-nVNi67CU.js (removed) 2.21 kB 🟢 -2.21 kB 🟢 -749 B 🟢 -662 B
assets/WidgetInputText-BYOQsk-7.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +918 B 🔴 +854 B
assets/WidgetInputText-JtE0-Vm8.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -917 B 🟢 -848 B
assets/MediaImageTop-BN0aEMtg.js (removed) 1.75 kB 🟢 -1.75 kB 🟢 -842 B 🟢 -719 B
assets/MediaImageTop-DXe8zZSB.js (new) 1.75 kB 🔴 +1.75 kB 🔴 +844 B 🔴 +715 B
assets/WidgetToggleSwitch-CkVO1XoL.js (new) 1.58 kB 🔴 +1.58 kB 🔴 +760 B 🔴 +665 B
assets/WidgetToggleSwitch-DkvdXJVp.js (removed) 1.58 kB 🟢 -1.58 kB 🟢 -759 B 🟢 -671 B
assets/MediaImageBottom-D5RdEwiT.js (removed) 1.57 kB 🟢 -1.57 kB 🟢 -744 B 🟢 -649 B
assets/MediaImageBottom-r2HU07Wp.js (new) 1.57 kB 🔴 +1.57 kB 🔴 +741 B 🔴 +646 B
assets/MediaAudioBottom-Clj1E9MY.js (removed) 1.52 kB 🟢 -1.52 kB 🟢 -742 B 🟢 -659 B
assets/MediaAudioBottom-DYE8nL8l.js (new) 1.52 kB 🔴 +1.52 kB 🔴 +742 B 🔴 +653 B
assets/MediaVideoBottom-CigxZi05.js (removed) 1.52 kB 🟢 -1.52 kB 🟢 -739 B 🟢 -659 B
assets/MediaVideoBottom-DTwX7HJi.js (new) 1.52 kB 🔴 +1.52 kB 🔴 +740 B 🔴 +653 B
assets/Media3DBottom-CKeuowDU.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +731 B 🔴 +651 B
assets/Media3DBottom-CSO9wB8R.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -733 B 🟢 -652 B
assets/Media3DTop-BCx3tNEX.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -762 B 🟢 -650 B
assets/Media3DTop-Cmo0VGHO.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +763 B 🔴 +650 B
assets/MediaAudioTop-B5xCMGe7.js (new) 1.46 kB 🔴 +1.46 kB 🔴 +739 B 🔴 +616 B
assets/MediaAudioTop-DX0t5RN3.js (removed) 1.46 kB 🟢 -1.46 kB 🟢 -738 B 🟢 -618 B
assets/WidgetSelect-CjC8x4j-.js (new) 685 B 🔴 +685 B 🔴 +352 B 🔴 +324 B
assets/WidgetSelect-DSCWFXed.js (removed) 655 B 🟢 -655 B 🟢 -342 B 🟢 -290 B
assets/WidgetInputNumber-CqLniKY1.js (removed) 595 B 🟢 -595 B 🟢 -329 B 🟢 -275 B
assets/WidgetInputNumber-D5ylZ3TV.js (new) 595 B 🔴 +595 B 🔴 +328 B 🔴 +273 B
assets/Load3D-bnCojJc6.js (new) 424 B 🔴 +424 B 🔴 +266 B 🔴 +224 B
assets/Load3D-EdGPsx__.js (removed) 424 B 🟢 -424 B 🟢 -265 B 🟢 -226 B
assets/WidgetLegacy--n4iEA8A.js (removed) 364 B 🟢 -364 B 🟢 -236 B 🟢 -194 B
assets/WidgetLegacy-Bvr2uIVs.js (new) 364 B 🔴 +364 B 🔴 +236 B 🔴 +197 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-B1JflQcI.js 72.2 kB 72.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-B2lyXe48.js 114 kB 114 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-B9XEQ-pc.js 94 kB 94 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BErKFzc-.js 73.1 kB 73.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Bf7Tze-u.js 83.4 kB 83.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BhGMcO4Q.js 84.3 kB 84.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CPZUloNQ.js 99 kB 99 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Dva0z-T2.js 86.5 kB 86.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-un0K9wDS.js 81.8 kB 81.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-8e6QYQW0.js 283 kB 283 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-A_9dx4yn.js 304 kB 304 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BbD3HDi7.js 307 kB 307 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BOJhIPft.js 369 kB 369 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-C-Pw33mW.js 317 kB 317 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-ChLyG0UJ.js 285 kB 285 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CUVPxA4l.js 342 kB 342 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Dx5Y4xrW.js 310 kB 310 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-JqO5mNmW.js 306 kB 306 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 23 added / 23 removed

@christian-byrne
Copy link
Contributor Author

I don't love compound logic in names like this.

Why's that?

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 79ddb75 and ee749eb.

📒 Files selected for processing (2)
  • src/composables/useCoreCommands.ts (7 hunks)
  • tests-ui/tests/composables/useCoreCommands.test.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (17)
**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{vue,ts,tsx}: Leverage VueUse functions for performance-enhancing utilities
Use vue-i18n in Composition API for any string literals and place new translation entries in src/locales/en/main.json

Files:

  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/composables/useCoreCommands.ts
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursorrules)

Use es-toolkit for utility functions

Files:

  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/composables/useCoreCommands.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

Use TypeScript for type safety

**/*.{ts,tsx}: Never use any type - use proper TypeScript types
Never use as any type assertions - fix the underlying type issue

Files:

  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/composables/useCoreCommands.ts
**/*.{ts,tsx,js,vue}

📄 CodeRabbit inference engine (.cursorrules)

Implement proper error handling in components and services

**/*.{ts,tsx,js,vue}: Use 2-space indentation, single quotes, no semicolons, and maintain 80-character line width as configured in .prettierrc
Organize imports by sorting and grouping by plugin, and run pnpm format before committing

Files:

  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/composables/useCoreCommands.ts
**/*.{ts,tsx,js,jsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

Use camelCase for variable and setting names in TypeScript/Vue files

Files:

  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/composables/useCoreCommands.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,vue}: Use const settingStore = useSettingStore() and settingStore.get('Comfy.SomeSetting') to retrieve settings in TypeScript/Vue files
Use await settingStore.set('Comfy.SomeSetting', newValue) to update settings in TypeScript/Vue files
Check server capabilities using api.serverSupportsFeature('feature_name') before using enhanced features
Use api.getServerFeature('config_name', defaultValue) to retrieve server feature configuration

Enforce ESLint rules for Vue + TypeScript including: no floating promises, no unused imports, and i18n raw text restrictions in templates

Files:

  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/composables/useCoreCommands.ts
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.ts: Define dynamic setting defaults using runtime context with functions in settings configuration
Use defaultsByInstallVersion property for gradual feature rollout based on version in settings configuration

Files:

  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/composables/useCoreCommands.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/composables/useCoreCommands.test.ts
**/*.{test,spec}.{ts,tsx,js}

📄 CodeRabbit inference engine (AGENTS.md)

Unit and component tests should be located in tests-ui/ or co-located with components as src/components/**/*.{test,spec}.ts; E2E tests should be in browser_tests/

Files:

  • tests-ui/tests/composables/useCoreCommands.test.ts
**/composables/use*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables in the format useXyz.ts

Files:

  • tests-ui/tests/composables/useCoreCommands.test.ts
  • src/composables/useCoreCommands.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/composables/useCoreCommands.ts
src/**/*.ts

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

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

Files:

  • src/composables/useCoreCommands.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/composables/useCoreCommands.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/composables/useCoreCommands.ts
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/composables/useCoreCommands.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/composables/useCoreCommands.ts
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/composables/useCoreCommands.ts
🧠 Learnings (15)
📚 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/composables/useCoreCommands.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/composables/useCoreCommands.test.ts
  • src/composables/useCoreCommands.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/composables/useCoreCommands.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/composables/useCoreCommands.test.ts
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Use ref/reactive for state management in Vue 3 Composition API

Applied to files:

  • src/composables/useCoreCommands.ts
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.vue : Utilize ref and reactive for reactive state in Vue 3

Applied to files:

  • src/composables/useCoreCommands.ts
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Implement computed() for derived state in Vue 3 Composition API

Applied to files:

  • src/composables/useCoreCommands.ts
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Utilize ref and reactive for reactive state

Applied to files:

  • src/composables/useCoreCommands.ts
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Implement computed properties with computed()

Applied to files:

  • src/composables/useCoreCommands.ts
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.vue : Implement computed properties with computed() function

Applied to files:

  • src/composables/useCoreCommands.ts
📚 Learning: 2025-11-24T19:46:52.279Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T19:46:52.279Z
Learning: Applies to **/*.{vue,ts,tsx} : Leverage VueUse functions for performance-enhancing utilities

Applied to files:

  • src/composables/useCoreCommands.ts
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.{vue,ts} : Leverage VueUse functions for performance-enhancing styles

Applied to files:

  • src/composables/useCoreCommands.ts
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Extract complex conditionals to computed properties

Applied to files:

  • src/composables/useCoreCommands.ts
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.{vue,ts,js} : Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners

Applied to files:

  • src/composables/useCoreCommands.ts
📚 Learning: 2025-11-24T19:47:14.779Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:14.779Z
Learning: Applies to **/*.{ts,tsx,vue} : Use `const settingStore = useSettingStore()` and `settingStore.get('Comfy.SomeSetting')` to retrieve settings in TypeScript/Vue files

Applied to files:

  • src/composables/useCoreCommands.ts
🧬 Code graph analysis (1)
src/composables/useCoreCommands.ts (3)
tests-ui/tests/renderer/extensions/vueNodes/widgets/composables/useRemoteWidget.test.ts (1)
  • isCloud (34-36)
tests-ui/tests/renderer/extensions/vueNodes/widgets/composables/useComboWidget.test.ts (1)
  • isCloud (44-46)
src/platform/cloud/subscription/composables/useSubscription.ts (1)
  • useSubscription (244-244)
⏰ 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: lint-and-format
  • GitHub Check: setup
  • GitHub Check: test
  • GitHub Check: collect
🔇 Additional comments (3)
tests-ui/tests/composables/useCoreCommands.test.ts (1)

101-106: LGTM! Mock structure correctly implements ref-like API.

The mock now properly returns isSubscribedOrIsNotCloud as a ref-like object with { value: true }, which matches how the production code accesses subscriptionState.value in the command functions.

src/composables/useCoreCommands.ts (2)

94-97: Excellent: Cloud-aware initialization successfully prevents module loading on local.

The conditional pattern isCloud ? useSubscription() : null ensures the cloud subscription module is only initialized in cloud environments, directly achieving the PR's stated goal. The fallback to defaultSubscriptionState (value: true) and noop correctly bypasses subscription checks on local builds.


489-490: Consistent subscription gating across all queue commands.

All three queue commands (QueuePrompt, QueuePromptFront, QueueSelectedOutputNodes) now uniformly check subscriptionState.value and invoke subscriptionDialog() when gated. This correctly enforces subscription requirements in cloud environments while allowing unrestricted execution locally.

Also applies to: 512-513, 534-535

Comment on lines +69 to +72
const defaultSubscriptionState: Pick<ComputedRef<boolean>, 'value'> = {
value: true
}
const noop = () => {}
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider using computed() for better type safety.

The manual object with Pick<ComputedRef<boolean>, 'value'> type works correctly but is non-idiomatic. Using Vue's computed() would provide stronger type guarantees and consistency with the reactivity system.

Apply this diff for a cleaner implementation:

+import { computed } from 'vue'
+
-const defaultSubscriptionState: Pick<ComputedRef<boolean>, 'value'> = {
-  value: true
-}
+const defaultSubscriptionState = computed(() => true)
 const noop = () => {}

This ensures defaultSubscriptionState has the exact same type as subscription?.isSubscribedOrIsNotCloud from the cloud path.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const defaultSubscriptionState: Pick<ComputedRef<boolean>, 'value'> = {
value: true
}
const noop = () => {}
const defaultSubscriptionState = computed(() => true)
const noop = () => {}
🤖 Prompt for AI Agents
In src/composables/useCoreCommands.ts around lines 69-72, replace the manual
object typed as Pick<ComputedRef<boolean>,'value'> with a proper Vue computed
ref so defaultSubscriptionState is a ComputedRef<boolean> (e.g. const
defaultSubscriptionState = computed(() => true)); also ensure computed is
imported from 'vue' if it's not already; leave noop as-is. This makes
defaultSubscriptionState have the exact same reactive type as
subscription?.isSubscribedOrIsNotCloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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