fix: remove custom LoRA feature from standard tier#7391
fix: remove custom LoRA feature from standard tier#7391luke-mino-altherr merged 5 commits intomainfrom
Conversation
Standard tier should not display custom LoRA as a benefit. Refactored to use strongly-typed BENEFITS_BY_TIER configuration that explicitly defines which benefits each tier includes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
📝 WalkthroughWalkthroughReplaced inline subscription tier benefits in SubscriptionPanel.vue with a typed, data-driven model: introduced a TierKey type, constrained TIER_TO_I18N_KEY and DEFAULT_TIER_KEY, added BENEFITS_BY_TIER, and refactored tierBenefits to derive localized labels and metric values from that map. Changes
Possibly related PRs
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
🎭 Playwright Test Results⏰ Completed at: 12/11/2025, 10:46:41 PM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 12/11/2025, 10:23:39 PM UTC 🔗 Links🎉 Your Storybook is ready for review! |
tierKey.value is already typed as TierKey from the computed return type, so the explicit type assertion is redundant. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.23 MB (baseline 3.23 MB) • ⚪ 0 BMain entry bundles and manifests
Graph Workspace — 988 kB (baseline 988 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Views & Navigation — 6.54 kB (baseline 6.54 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Panels & Settings — 298 kB (baseline 298 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
UI Components — 178 kB (baseline 178 kB) • ⚪ 0 BReusable component library chunks
Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 BStores, services, APIs, and repositories
Utilities & Hooks — 3.18 kB (baseline 3.18 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Vendor & Third-Party — 8.56 MB (baseline 8.56 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 3.81 MB (baseline 3.81 MB) • ⚪ 0 BBundles that do not match a named category
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
src/platform/cloud/subscription/components/SubscriptionPanel.vue(2 hunks)
🧰 Additional context used
📓 Path-based instructions (9)
src/**/*.vue
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/**/*.vue: Use the Vue 3 Composition API instead of the Options API when writing Vue components (exception: when overriding or extending PrimeVue components for compatibility)
Use setup() function for component logic
Utilize ref and reactive for reactive state
Implement computed properties with computed()
Use watch and watchEffect for side effects
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection
Use vue 3.5 style of default prop declaration
Use Tailwind CSS for styling
Implement proper props and emits definitions
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Follow Vue 3 style guide and naming conventions
Files:
src/platform/cloud/subscription/components/SubscriptionPanel.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/**/*.{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,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/**/*.{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/**/{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
**/*.vue
📄 CodeRabbit inference engine (AGENTS.md)
**/*.vue: Use Vue 3 SFCs (Single File Components) with Composition API only; do not use Options API
Vue components must use<script setup lang="ts">for component logic
Use Vue 3.5 TypeScript style for default prop declaration with reactive props destructuring; do not usewithDefaultsor runtime props declaration
PreferuseModelto separately defining a prop and emit
Use Tailwind 4 utility classes for styling; avoid using<style>blocks in Vue components
Use semantic Tailwind values fromstyle.csstheme instead of thedark:variant; for example, usebg-node-component-surfaceinstead ofdark:prefixes
Always usecn()utility from@/utils/tailwindUtilto merge Tailwind class names; do not use:class="[]"syntax
Usereffor reactive state in Vue Composition API components
Implement computed properties withcomputed()from Vue; avoid using arefwith awatchif acomputedwould work instead
UsewatchandwatchEffectfor side effects in Vue components
Implement lifecycle hooks usingonMounted,onUpdated, and other Vue lifecycle functions
Useprovide/injectfor dependency injection; do not use dependency injection if a Store or shared composable would be simpler
Do not import Vue macros unnecessarily; only use when needed
Be judicious with addition of new refs or other state: prefer props, avoid redundantcomputed, and prefercomputedoverwatch
Use VueUse functions for performance-enhancing styles
In Vue Components, implement proper props and emits definitions
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Implement proper error handling in Vue components
Follow Vue 3 style guide and naming conventions
Use vue-i18n in composition API for any string literals; place new translation entries insrc/locales/en/main.json
Avoid new usage of PrimeVue components; prefer shadcn/vue or Reka UI instead
Files:
src/platform/cloud/subscription/components/SubscriptionPanel.vue
**/*.{ts,tsx,js,jsx,vue,json}
📄 CodeRabbit inference engine (AGENTS.md)
Code style: Use 2-space indentation, single quotes, no trailing semicolons, and 80-character line width (see
.prettierrc)
Files:
src/platform/cloud/subscription/components/SubscriptionPanel.vue
**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,vue}: Imports must be sorted and grouped by plugin; runpnpm formatbefore committing
Use TypeScript for type safety; never useanytype - use proper TypeScript types
Never useas anytype assertions; fix the underlying type issue instead
Use es-toolkit for utility functions
Write code that is expressive and self-documenting; avoid comments unless absolutely necessary; do not add or retain redundant comments
Keep functions short and functional
Minimize nesting in code (e.g., deeply nestediforforstatements); apply the Arrow Anti-Pattern principle
Avoid mutable state; prefer immutability and assignment at point of declaration
Favor pure functions, especially testable ones
Files:
src/platform/cloud/subscription/components/SubscriptionPanel.vue
🧠 Learnings (3)
📚 Learning: 2025-12-09T03:49:52.828Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/platform/updates/components/WhatsNewPopup.vue:5-13
Timestamp: 2025-12-09T03:49:52.828Z
Learning: In Vue files across the ComfyUI_frontend repo, when a button is needed, prefer the repo's common button components from src/components/button/ (IconButton.vue, TextButton.vue, IconTextButton.vue) over plain HTML <button> elements. These components wrap PrimeVue with the project’s design system styling. Use only the common button components for consistency and theming, and import them from src/components/button/ as needed.
Applied to files:
src/platform/cloud/subscription/components/SubscriptionPanel.vue
📚 Learning: 2025-12-09T21:40:12.361Z
Learnt from: benceruleanlu
Repo: Comfy-Org/ComfyUI_frontend PR: 7297
File: src/components/actionbar/ComfyActionbar.vue:33-43
Timestamp: 2025-12-09T21:40:12.361Z
Learning: In Vue single-file components, allow inline Tailwind CSS class strings for static classes and avoid extracting them into computed properties solely for readability. Prefer keeping static class names inline for simplicity and performance. For dynamic or conditional classes, use Vue bindings (e.g., :class) to compose classes.
Applies to all Vue files in the repository (e.g., src/**/*.vue) where Tailwind utilities are used for static styling.
Applied to files:
src/platform/cloud/subscription/components/SubscriptionPanel.vue
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.
Applied to files:
src/platform/cloud/subscription/components/SubscriptionPanel.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: deploy-and-comment
- GitHub Check: setup
- GitHub Check: lint-and-format
- GitHub Check: test
- GitHub Check: collect
🔇 Additional comments (3)
src/platform/cloud/subscription/components/SubscriptionPanel.vue (3)
347-347: LGTM!The TierKey type provides strong typing for subscription tiers and improves type safety throughout the component.
350-357: Strong typing improves maintainability.The updated type constraints on TIER_TO_I18N_KEY and DEFAULT_TIER_KEY ensure compile-time safety and prevent invalid tier keys.
391-422: Revise the review comment to follow proper code review structure and guidelines.The review comment has several structural issues:
Invalid tags: Uses
andwhich are not standard classification tags. These should be replaced with appropriate final classification tags such as,, etc.Unverified assumptions about i18n structure: The proposed shell script assumes a specific translation key hierarchy (
.subscription.tiers.TIER.benefits.KEY) without verifying this matches the actual structure used insrc/locales/en/main.json. The benefit keys used by the component (monthlyCredits,maxDuration,gpu,addCredits,customLoRAs) need to be verified against actual i18n organization.Missing context about changes: The code snippet shows the final state but doesn't clarify what changed or why the customLoRAs exclusion from the standard tier is correct. Provide a brief explanation or link to the PR objective.
Vague verification request: Instead of asking developers to manually verify translation keys, directly check if the translations exist in the repository or provide precise instructions on what needs to be added to the i18n files.
Revised approach: Either verify translation keys directly through a corrected script that matches the actual i18n file structure, or remove the verification request if translations are already confirmed to exist. Conclude with one of the standard classification tags.
Use `as const satisfies` pattern to dynamically derive TierKey type from the mapping object, ensuring type safety while maintaining literal types. This eliminates manual type duplication. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
src/platform/cloud/subscription/components/SubscriptionPanel.vue(2 hunks)
🧰 Additional context used
📓 Path-based instructions (9)
src/**/*.vue
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/**/*.vue: Use the Vue 3 Composition API instead of the Options API when writing Vue components (exception: when overriding or extending PrimeVue components for compatibility)
Use setup() function for component logic
Utilize ref and reactive for reactive state
Implement computed properties with computed()
Use watch and watchEffect for side effects
Implement lifecycle hooks with onMounted, onUpdated, etc.
Utilize provide/inject for dependency injection
Use vue 3.5 style of default prop declaration
Use Tailwind CSS for styling
Implement proper props and emits definitions
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Follow Vue 3 style guide and naming conventions
Files:
src/platform/cloud/subscription/components/SubscriptionPanel.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/**/*.{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,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/**/*.{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/**/{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
**/*.vue
📄 CodeRabbit inference engine (AGENTS.md)
**/*.vue: Use Vue 3 SFCs (Single File Components) with Composition API only; do not use Options API
Vue components must use<script setup lang="ts">for component logic
Use Vue 3.5 TypeScript style for default prop declaration with reactive props destructuring; do not usewithDefaultsor runtime props declaration
PreferuseModelto separately defining a prop and emit
Use Tailwind 4 utility classes for styling; avoid using<style>blocks in Vue components
Use semantic Tailwind values fromstyle.csstheme instead of thedark:variant; for example, usebg-node-component-surfaceinstead ofdark:prefixes
Always usecn()utility from@/utils/tailwindUtilto merge Tailwind class names; do not use:class="[]"syntax
Usereffor reactive state in Vue Composition API components
Implement computed properties withcomputed()from Vue; avoid using arefwith awatchif acomputedwould work instead
UsewatchandwatchEffectfor side effects in Vue components
Implement lifecycle hooks usingonMounted,onUpdated, and other Vue lifecycle functions
Useprovide/injectfor dependency injection; do not use dependency injection if a Store or shared composable would be simpler
Do not import Vue macros unnecessarily; only use when needed
Be judicious with addition of new refs or other state: prefer props, avoid redundantcomputed, and prefercomputedoverwatch
Use VueUse functions for performance-enhancing styles
In Vue Components, implement proper props and emits definitions
Utilize Vue 3's Teleport component when needed
Use Suspense for async components
Implement proper error handling in Vue components
Follow Vue 3 style guide and naming conventions
Use vue-i18n in composition API for any string literals; place new translation entries insrc/locales/en/main.json
Avoid new usage of PrimeVue components; prefer shadcn/vue or Reka UI instead
Files:
src/platform/cloud/subscription/components/SubscriptionPanel.vue
**/*.{ts,tsx,js,jsx,vue,json}
📄 CodeRabbit inference engine (AGENTS.md)
Code style: Use 2-space indentation, single quotes, no trailing semicolons, and 80-character line width (see
.prettierrc)
Files:
src/platform/cloud/subscription/components/SubscriptionPanel.vue
**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,vue}: Imports must be sorted and grouped by plugin; runpnpm formatbefore committing
Use TypeScript for type safety; never useanytype - use proper TypeScript types
Never useas anytype assertions; fix the underlying type issue instead
Use es-toolkit for utility functions
Write code that is expressive and self-documenting; avoid comments unless absolutely necessary; do not add or retain redundant comments
Keep functions short and functional
Minimize nesting in code (e.g., deeply nestediforforstatements); apply the Arrow Anti-Pattern principle
Avoid mutable state; prefer immutability and assignment at point of declaration
Favor pure functions, especially testable ones
Files:
src/platform/cloud/subscription/components/SubscriptionPanel.vue
🧠 Learnings (4)
📚 Learning: 2025-12-09T20:22:23.620Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-09T20:22:23.620Z
Learning: Applies to **/*.{ts,tsx,vue} : Never use `as any` type assertions; fix the underlying type issue instead
Applied to files:
src/platform/cloud/subscription/components/SubscriptionPanel.vue
📚 Learning: 2025-12-09T03:49:52.828Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 6300
File: src/platform/updates/components/WhatsNewPopup.vue:5-13
Timestamp: 2025-12-09T03:49:52.828Z
Learning: In Vue files across the ComfyUI_frontend repo, when a button is needed, prefer the repo's common button components from src/components/button/ (IconButton.vue, TextButton.vue, IconTextButton.vue) over plain HTML <button> elements. These components wrap PrimeVue with the project’s design system styling. Use only the common button components for consistency and theming, and import them from src/components/button/ as needed.
Applied to files:
src/platform/cloud/subscription/components/SubscriptionPanel.vue
📚 Learning: 2025-12-09T21:40:12.361Z
Learnt from: benceruleanlu
Repo: Comfy-Org/ComfyUI_frontend PR: 7297
File: src/components/actionbar/ComfyActionbar.vue:33-43
Timestamp: 2025-12-09T21:40:12.361Z
Learning: In Vue single-file components, allow inline Tailwind CSS class strings for static classes and avoid extracting them into computed properties solely for readability. Prefer keeping static class names inline for simplicity and performance. For dynamic or conditional classes, use Vue bindings (e.g., :class) to compose classes.
Applies to all Vue files in the repository (e.g., src/**/*.vue) where Tailwind utilities are used for static styling.
Applied to files:
src/platform/cloud/subscription/components/SubscriptionPanel.vue
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.
Applied to files:
src/platform/cloud/subscription/components/SubscriptionPanel.vue
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
- GitHub Check: deploy-and-comment
- GitHub Check: setup
- GitHub Check: test
- GitHub Check: lint-and-format
- GitHub Check: collect
🔇 Additional comments (2)
src/platform/cloud/subscription/components/SubscriptionPanel.vue (2)
348-359: Typed mapping from SubscriptionTier to i18n keys is clear and resilientThe
TIER_TO_I18N_KEY+TierKey+DEFAULT_TIER_KEYsetup cleanly constrains valid tiers and guarantees a safe fallback whensubscriptionTieris null/unknown, which should make later config (likeBENEFITS_BY_TIER) easier to keep in sync with API tiers and translations.
392-423: BENEFITS_BY_TIER correctly scopes custom LoRA to non‑standard tiersThe
BENEFITS_BY_TIERmap looks good:standardonly listsmonthlyCredits,maxDuration,gpu, andaddCredits, whilecustomLoRAsis present only forcreator,pro, andfounder. This directly satisfies the PR goal that the standard tier no longer advertises custom LoRAs in the subscription panel.
| const tierBenefits = computed(() => { | ||
| const key = tierKey.value | ||
| const baseBenefits: Benefit[] = [ | ||
| { | ||
| key: 'monthlyCredits', | ||
| type: 'metric', | ||
| value: t(`subscription.tiers.${key}.benefits.monthlyCredits`), | ||
| label: t(`subscription.tiers.${key}.benefits.monthlyCreditsLabel`) | ||
| }, | ||
| { | ||
| key: 'maxDuration', | ||
| type: 'metric', | ||
| value: t(`subscription.tiers.${key}.benefits.maxDuration`), | ||
| label: t(`subscription.tiers.${key}.benefits.maxDurationLabel`) | ||
| }, | ||
| { | ||
| key: 'gpu', | ||
| type: 'feature', | ||
| label: t(`subscription.tiers.${key}.benefits.gpuLabel`) | ||
| }, | ||
| { | ||
| key: 'addCredits', | ||
| type: 'feature', | ||
| label: t(`subscription.tiers.${key}.benefits.addCreditsLabel`) | ||
| }, | ||
| { | ||
| key: 'customLoRAs', | ||
| type: 'feature', | ||
| label: t(`subscription.tiers.${key}.benefits.customLoRAsLabel`) | ||
| } | ||
| ] | ||
| const benefitConfig = BENEFITS_BY_TIER[key] | ||
|
|
||
| return baseBenefits | ||
| return benefitConfig.map((config) => ({ | ||
| ...config, | ||
| ...(config.type === 'metric' && { | ||
| value: t(`subscription.tiers.${key}.benefits.${config.key}`) | ||
| }), | ||
| label: t(`subscription.tiers.${key}.benefits.${config.key}Label`) | ||
| })) |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Avoid boolean spread in tierBenefits for cleaner TypeScript and readability
The logic in tierBenefits is sound, but the pattern ...(config.type === 'metric' && { value: ... }) can trip TypeScript because it spreads a union that includes false. A small refactor keeps the same behavior while being more TS‑friendly and explicit:
-const tierBenefits = computed(() => {
- const key = tierKey.value
- const benefitConfig = BENEFITS_BY_TIER[key]
-
- return benefitConfig.map((config) => ({
- ...config,
- ...(config.type === 'metric' && {
- value: t(`subscription.tiers.${key}.benefits.${config.key}`)
- }),
- label: t(`subscription.tiers.${key}.benefits.${config.key}Label`)
- }))
-})
+const tierBenefits = computed(() => {
+ const key = tierKey.value
+ const benefitConfig = BENEFITS_BY_TIER[key]
+
+ return benefitConfig.map((config) => {
+ const base = {
+ ...config,
+ label: t(`subscription.tiers.${key}.benefits.${config.key}Label`)
+ }
+
+ if (config.type === 'metric') {
+ return {
+ ...base,
+ value: t(`subscription.tiers.${key}.benefits.${config.key}`)
+ }
+ }
+
+ return base
+ })
+})📝 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.
| const tierBenefits = computed(() => { | |
| const key = tierKey.value | |
| const baseBenefits: Benefit[] = [ | |
| { | |
| key: 'monthlyCredits', | |
| type: 'metric', | |
| value: t(`subscription.tiers.${key}.benefits.monthlyCredits`), | |
| label: t(`subscription.tiers.${key}.benefits.monthlyCreditsLabel`) | |
| }, | |
| { | |
| key: 'maxDuration', | |
| type: 'metric', | |
| value: t(`subscription.tiers.${key}.benefits.maxDuration`), | |
| label: t(`subscription.tiers.${key}.benefits.maxDurationLabel`) | |
| }, | |
| { | |
| key: 'gpu', | |
| type: 'feature', | |
| label: t(`subscription.tiers.${key}.benefits.gpuLabel`) | |
| }, | |
| { | |
| key: 'addCredits', | |
| type: 'feature', | |
| label: t(`subscription.tiers.${key}.benefits.addCreditsLabel`) | |
| }, | |
| { | |
| key: 'customLoRAs', | |
| type: 'feature', | |
| label: t(`subscription.tiers.${key}.benefits.customLoRAsLabel`) | |
| } | |
| ] | |
| const benefitConfig = BENEFITS_BY_TIER[key] | |
| return baseBenefits | |
| return benefitConfig.map((config) => ({ | |
| ...config, | |
| ...(config.type === 'metric' && { | |
| value: t(`subscription.tiers.${key}.benefits.${config.key}`) | |
| }), | |
| label: t(`subscription.tiers.${key}.benefits.${config.key}Label`) | |
| })) | |
| const tierBenefits = computed(() => { | |
| const key = tierKey.value | |
| const benefitConfig = BENEFITS_BY_TIER[key] | |
| return benefitConfig.map((config) => { | |
| const base = { | |
| ...config, | |
| label: t(`subscription.tiers.${key}.benefits.${config.key}Label`) | |
| } | |
| if (config.type === 'metric') { | |
| return { | |
| ...base, | |
| value: t(`subscription.tiers.${key}.benefits.${config.key}`) | |
| } | |
| } | |
| return base | |
| }) | |
| }) |
🤖 Prompt for AI Agents
In src/platform/cloud/subscription/components/SubscriptionPanel.vue around lines
425 to 435, the current map uses a boolean spread pattern ...(config.type ===
'metric' && { value: ... }) which can produce false in the spread and confuse
TypeScript; refactor to build the returned object explicitly (create base object
with ...config and label, then if config.type === 'metric' add value = t(...))
so the resulting shape is clear and TypeScript-safe.
## Summary Standard tier was incorrectly displaying custom LoRA as a benefit. Refactored to use strongly-typed benefit configuration. ## Changes - **What**: Created `BENEFITS_BY_TIER` configuration to explicitly define tier benefits - **Type Safety**: Added `TierKey` type and improved type constraints throughout - **Fix**: Excluded `customLoRAs` from standard tier (only creator/pro/founder get this feature) ## Review Focus Verify standard tier no longer shows custom LoRA feature in subscription panel ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7391-fix-remove-custom-LoRA-feature-from-standard-tier-2c66d73d36508149ad6ff7bba6333109) by [Unito](https://www.unito.io) --------- Co-authored-by: Claude <noreply@anthropic.com>
|
@luke-mino-altherr Successfully backported to #7392 |
…ier (#7392) Backport of #7391 to `cloud/1.34` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7392-backport-cloud-1-34-fix-remove-custom-LoRA-feature-from-standard-tier-2c66d73d3650814fb37de338ce016931) by [Unito](https://www.unito.io) Co-authored-by: Luke Mino-Altherr <luke@comfy.org> Co-authored-by: Claude <noreply@anthropic.com>
## Summary Removes custom LoRA feature from subscription benefits display for standard and founder tiers. ## Changes - **What**: Removed `customLoRAs` benefit entry from `BENEFITS_BY_TIER` for standard and founder tiers ## Review Focus - Verify custom LoRA feature is completely removed from subscription UI Related to #7391 Co-authored-by: Claude <noreply@anthropic.com>
## Summary Removes custom LoRA feature from subscription benefits display for standard and founder tiers. ## Changes - **What**: Removed `customLoRAs` benefit entry from `BENEFITS_BY_TIER` for standard and founder tiers ## Review Focus - Verify custom LoRA feature is completely removed from subscription UI Related to #7391 Co-authored-by: Claude <noreply@anthropic.com>
## Summary Standard tier was incorrectly displaying custom LoRA as a benefit. Refactored to use strongly-typed benefit configuration. ## Changes - **What**: Created `BENEFITS_BY_TIER` configuration to explicitly define tier benefits - **Type Safety**: Added `TierKey` type and improved type constraints throughout - **Fix**: Excluded `customLoRAs` from standard tier (only creator/pro/founder get this feature) ## Review Focus Verify standard tier no longer shows custom LoRA feature in subscription panel ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7391-fix-remove-custom-LoRA-feature-from-standard-tier-2c66d73d36508149ad6ff7bba6333109) by [Unito](https://www.unito.io) --------- Co-authored-by: Claude <noreply@anthropic.com>
…#7396) ## Summary Removes custom LoRA feature from subscription benefits display for standard and founder tiers. ## Changes - **What**: Removed `customLoRAs` benefit entry from `BENEFITS_BY_TIER` for standard and founder tiers ## Review Focus - Verify custom LoRA feature is completely removed from subscription UI Related to Comfy-Org#7391 Co-authored-by: Claude <noreply@anthropic.com>
## Summary Standard tier was incorrectly displaying custom LoRA as a benefit. Refactored to use strongly-typed benefit configuration. ## Changes - **What**: Created `BENEFITS_BY_TIER` configuration to explicitly define tier benefits - **Type Safety**: Added `TierKey` type and improved type constraints throughout - **Fix**: Excluded `customLoRAs` from standard tier (only creator/pro/founder get this feature) ## Review Focus Verify standard tier no longer shows custom LoRA feature in subscription panel ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7391-fix-remove-custom-LoRA-feature-from-standard-tier-2c66d73d36508149ad6ff7bba6333109) by [Unito](https://www.unito.io) --------- Co-authored-by: Claude <noreply@anthropic.com>
## Summary Removes custom LoRA feature from subscription benefits display for standard and founder tiers. ## Changes - **What**: Removed `customLoRAs` benefit entry from `BENEFITS_BY_TIER` for standard and founder tiers ## Review Focus - Verify custom LoRA feature is completely removed from subscription UI Related to #7391 Co-authored-by: Claude <noreply@anthropic.com>
Summary
Standard tier was incorrectly displaying custom LoRA as a benefit. Refactored to use strongly-typed benefit configuration.
Changes
BENEFITS_BY_TIERconfiguration to explicitly define tier benefitsTierKeytype and improved type constraints throughoutcustomLoRAsfrom standard tier (only creator/pro/founder get this feature)Review Focus
Verify standard tier no longer shows custom LoRA feature in subscription panel
┆Issue is synchronized with this Notion page by Unito