Skip to content

fix: include items array in purchase dataLayer#8339

Merged
benceruleanlu merged 1 commit intomainfrom
fix/gtm-purchase-items
Jan 27, 2026
Merged

fix: include items array in purchase dataLayer#8339
benceruleanlu merged 1 commit intomainfrom
fix/gtm-purchase-items

Conversation

@benceruleanlu
Copy link
Member

@benceruleanlu benceruleanlu commented Jan 27, 2026

Include GA4-style items payload for subscription purchase events so GTM receives the full item array.

So, to align with GA4's ecommerce standards, we changed it to an items array: https://developers.google.com/analytics/devguides/collection/ga4/item-scoped-ecommerce

@benceruleanlu benceruleanlu requested a review from a team as a code owner January 27, 2026 20:55
Copilot AI review requested due to automatic review settings January 27, 2026 20:55
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 27, 2026
@github-actions
Copy link

github-actions bot commented Jan 27, 2026

🎭 Playwright Tests: ⚠️ Passed with flaky tests

Results: 501 passed, 0 failed, 3 flaky, 8 skipped (Total: 512)

❌ Failed Tests

📊 Browser Reports
  • chromium: View Report (✅ 489 / ❌ 0 / ⚠️ 3 / ⏭️ 8)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 9 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

@github-actions
Copy link

github-actions bot commented Jan 27, 2026

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 01/27/2026, 08:57:07 PM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 27, 2026

📝 Walkthrough

Walkthrough

The PR refactors the dataLayer purchase event payload structure in the subscription composable. Item-related fields (item_id, item_name, item_category, item_variant, price, quantity) are moved from top-level into a nested items array, with both implementation and tests updated accordingly. No control flow changes.

Changes

Cohort / File(s) Summary
Subscription Purchase Event Payload Restructuring
src/platform/cloud/subscription/composables/useSubscription.ts, src/platform/cloud/subscription/composables/useSubscription.test.ts
Refactored dataLayer payload for purchase events from flat item fields to nested items array structure. Item properties (item_id, item_name, item_category, item_variant, price, quantity) now enclosed within an items array containing a single object. Top-level fields (event, transaction_id, value, currency) remain unchanged. Test expectations updated to match new nested structure.

Possibly related PRs

  • feat: add cloud gtm injection #8311: Added GTM integration and purchase-event emission in the same useSubscription composable code paths that this PR modifies, likely establishing the context for this payload structure update.

Suggested reviewers

  • Yorha4D
  • christian-byrne
  • KarryCharon
✨ Finishing touches
  • 📝 Generate docstrings

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

❤️ Share

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates subscription purchase tracking to include GA4-compliant items array format. Previously, item properties were sent as top-level fields in the dataLayer event; now they are properly nested within an items array as required by GA4 purchase event specifications.

Changes:

  • Restructured the purchase dataLayer event to nest item properties (item_id, item_name, item_category, item_variant, price, quantity) within an items array
  • Updated the corresponding unit test to reflect the new items array structure

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/platform/cloud/subscription/composables/useSubscription.ts Refactored purchase event to use GA4-style items array instead of flat item properties
src/platform/cloud/subscription/composables/useSubscription.test.ts Updated test assertions to expect items array structure

Comment on lines +240 to +247
items: [
{
item_id: 'monthly_creator',
item_variant: 'monthly',
item_category: 'subscription',
quantity: 1
}
]
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

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

The test assertion is incomplete. The implementation includes item_name and price fields in the items array (lines 132 and 135 in useSubscription.ts), but the test doesn't verify these fields are present. For a monthly creator subscription, these should be:

  • item_name: The translated plan name (e.g., "Creator")
  • price: 35 (the monthly price for creator tier)

Additionally, the test should verify the top-level value field is set to 35.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

Bundle Size Report

Summary

  • Raw size: 22.1 MB baseline 22.1 MB — 🟢 -183 B
  • Gzip: 4.59 MB baseline 4.59 MB — 🟢 -22 B
  • Brotli: 3.41 MB baseline 3.41 MB — 🔴 +68 B
  • Bundles: 176 current • 176 baseline • 85 added / 85 removed

Category Glance
Other 🟢 -200 B (7.04 MB) · Data & Services 🔴 +25 B (2.7 MB) · Panels & Settings 🟢 -8 B (470 kB) · Vendor & Third-Party ⚪ 0 B (10.7 MB) · Graph Workspace ⚪ 0 B (960 kB) · Views & Navigation ⚪ 0 B (80.7 kB) · + 5 more

Per-category breakdown
App Entry Points — 23.6 kB (baseline 23.6 kB) • ⚪ 0 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-ChsY_lYW.js (removed) 23.6 kB 🟢 -23.6 kB 🟢 -7.1 kB 🟢 -6.22 kB
assets/index-DdMFbDqJ.js (new) 23.6 kB 🔴 +23.6 kB 🔴 +7.09 kB 🔴 +6.22 kB

Status: 1 added / 1 removed

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

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-BYpya8zY.js (removed) 960 kB 🟢 -960 kB 🟢 -194 kB 🟢 -147 kB
assets/GraphView-DFlcpl-w.js (new) 960 kB 🔴 +960 kB 🔴 +194 kB 🔴 +147 kB

Status: 1 added / 1 removed

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

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/CloudSurveyView-B3XXCdVh.js (removed) 17.1 kB 🟢 -17.1 kB 🟢 -3.61 kB 🟢 -3.05 kB
assets/CloudSurveyView-BpOV_Jyz.js (new) 17.1 kB 🔴 +17.1 kB 🔴 +3.6 kB 🔴 +3.06 kB
assets/CloudLoginView-BM9uWLFJ.js (new) 11.8 kB 🔴 +11.8 kB 🔴 +3.09 kB 🔴 +2.72 kB
assets/CloudLoginView-DquqZtCN.js (removed) 11.8 kB 🟢 -11.8 kB 🟢 -3.09 kB 🟢 -2.71 kB
assets/UserCheckView-a0vxYWhh.js (new) 10.5 kB 🔴 +10.5 kB 🔴 +2.44 kB 🔴 +2.13 kB
assets/UserCheckView-D1khaTCA.js (removed) 10.5 kB 🟢 -10.5 kB 🟢 -2.45 kB 🟢 -2.13 kB
assets/CloudLayoutView-Bb6ZHFuI.js (new) 8.54 kB 🔴 +8.54 kB 🔴 +2.24 kB 🔴 +1.96 kB
assets/CloudLayoutView-C9dIITGg.js (removed) 8.54 kB 🟢 -8.54 kB 🟢 -2.25 kB 🟢 -1.95 kB
assets/CloudSignupView-BmvOwVxL.js (removed) 8.22 kB 🟢 -8.22 kB 🟢 -2.34 kB 🟢 -2.04 kB
assets/CloudSignupView-BvWK5hTJ.js (new) 8.22 kB 🔴 +8.22 kB 🔴 +2.34 kB 🔴 +2.04 kB
assets/CloudForgotPasswordView-BnGbGFXK.js (removed) 6.26 kB 🟢 -6.26 kB 🟢 -1.93 kB 🟢 -1.69 kB
assets/CloudForgotPasswordView-qcbySxnj.js (new) 6.26 kB 🔴 +6.26 kB 🔴 +1.93 kB 🔴 +1.69 kB
assets/UserSelectView-Bnb3mbnx.js (new) 5.28 kB 🔴 +5.28 kB 🔴 +1.76 kB 🔴 +1.57 kB
assets/UserSelectView-CPJ6FEsB.js (removed) 5.28 kB 🟢 -5.28 kB 🟢 -1.76 kB 🟢 -1.58 kB
assets/CloudSubscriptionRedirectView-Bc1d4Bvl.js (new) 5.27 kB 🔴 +5.27 kB 🔴 +1.73 kB 🔴 +1.54 kB
assets/CloudSubscriptionRedirectView-DR_JxHnC.js (removed) 5.27 kB 🟢 -5.27 kB 🟢 -1.73 kB 🟢 -1.54 kB
assets/CloudAuthTimeoutView-C54oVmrC.js (new) 5.24 kB 🔴 +5.24 kB 🔴 +1.71 kB 🔴 +1.48 kB
assets/CloudAuthTimeoutView-DwVPX5BA.js (removed) 5.24 kB 🟢 -5.24 kB 🟢 -1.71 kB 🟢 -1.48 kB
assets/CloudSorryContactSupportView-BVJCIN1x.js 1.97 kB 1.97 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/layout-DKV9PQKI.js 500 B 500 B ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 9 added / 9 removed

Panels & Settings — 470 kB (baseline 470 kB) • 🟢 -8 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/WorkspacePanel-C0bYehnj.js (new) 29.8 kB 🔴 +29.8 kB 🔴 +5.89 kB 🔴 +5.14 kB
assets/WorkspacePanel-Ch0EUqdb.js (removed) 29.8 kB 🟢 -29.8 kB 🟢 -5.89 kB 🟢 -5.15 kB
assets/LegacyCreditsPanel-B510Z73n.js (removed) 23.8 kB 🟢 -23.8 kB 🟢 -5.95 kB 🟢 -5.24 kB
assets/LegacyCreditsPanel-DJ7R6YHU.js (new) 23.8 kB 🔴 +23.8 kB 🔴 +5.95 kB 🔴 +5.23 kB
assets/SubscriptionPanel-Bvls1dLl.js (removed) 21 kB 🟢 -21 kB 🟢 -5.05 kB 🟢 -4.45 kB
assets/SubscriptionPanel-vSBLEkbM.js (new) 21 kB 🔴 +21 kB 🔴 +5.05 kB 🔴 +4.46 kB
assets/KeybindingPanel-DHppu3Hz.js (removed) 14.2 kB 🟢 -14.2 kB 🟢 -3.74 kB 🟢 -3.31 kB
assets/KeybindingPanel-nEZNQww6.js (new) 14.2 kB 🔴 +14.2 kB 🔴 +3.74 kB 🔴 +3.31 kB
assets/AboutPanel-CH9HSU3O.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.68 kB 🟢 -2.42 kB
assets/AboutPanel-D9vtwWSW.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.68 kB 🔴 +2.44 kB
assets/ExtensionPanel-BccB2Mqa.js (removed) 10.2 kB 🟢 -10.2 kB 🟢 -2.71 kB 🟢 -2.41 kB
assets/ExtensionPanel-npPNGCA1.js (new) 10.2 kB 🔴 +10.2 kB 🔴 +2.71 kB 🔴 +2.4 kB
assets/ServerConfigPanel-CAQ7eWAC.js (removed) 7.26 kB 🟢 -7.26 kB 🟢 -2.18 kB 🟢 -1.95 kB
assets/ServerConfigPanel-D46wdRY9.js (new) 7.26 kB 🔴 +7.26 kB 🔴 +2.18 kB 🔴 +1.95 kB
assets/UserPanel-CXbUeVtU.js (new) 6.58 kB 🔴 +6.58 kB 🔴 +1.9 kB 🔴 +1.67 kB
assets/UserPanel-uOq_gq1g.js (removed) 6.58 kB 🟢 -6.58 kB 🟢 -1.91 kB 🟢 -1.67 kB
assets/config-7fwyFDVl.js (removed) 1.16 kB 🟢 -1.16 kB 🟢 -604 B 🟢 -531 B
assets/config-B1Y-wvqK.js (new) 1.15 kB 🔴 +1.15 kB 🔴 +600 B 🔴 +526 B
assets/refreshRemoteConfig-C_mGJRee.js (new) 1.14 kB 🔴 +1.14 kB 🔴 +521 B 🔴 +483 B
assets/refreshRemoteConfig-DKVPhWY2.js (removed) 1.14 kB 🟢 -1.14 kB 🟢 -526 B 🟢 -480 B
assets/cloudRemoteConfig-CK9tVoiO.js (new) 1.11 kB 🔴 +1.11 kB 🔴 +508 B 🔴 +437 B
assets/cloudRemoteConfig-cRtbK2vk.js (removed) 1.11 kB 🟢 -1.11 kB 🟢 -510 B 🟢 -448 B
assets/refreshRemoteConfig-3V5tYozh.js (new) 169 B 🔴 +169 B 🔴 +108 B 🔴 +109 B
assets/refreshRemoteConfig-BIdqBOjW.js (removed) 169 B 🟢 -169 B 🟢 -108 B 🟢 -106 B
assets/remoteConfig-BfvcASY0.js 536 B 536 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings--v6Wg3FT.js 29.4 kB 29.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-6AWMdbEo.js 25.8 kB 25.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Bd_PrHyW.js 29.6 kB 29.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BvViWXfv.js 31.2 kB 31.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CBT5fUQX.js 32.9 kB 32.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Cr7txePz.js 30.2 kB 30.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DdPwS08h.js 39.4 kB 39.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DqMxzK_S.js 30.4 kB 30.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Dwt3wMav.js 26.4 kB 26.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-pjwHe3bJ.js 32 kB 32 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-yUgaGSFI.js 35.2 kB 35.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 12 added / 12 removed

User & Accounts — 3.94 kB (baseline 3.94 kB) • ⚪ 0 B

Authentication, profile, and account management bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/auth-CwSwfA_I.js (removed) 3.54 kB 🟢 -3.54 kB 🟢 -1.24 kB 🟢 -1.07 kB
assets/auth-OA2zwr-3.js (new) 3.54 kB 🔴 +3.54 kB 🔴 +1.24 kB 🔴 +1.06 kB
assets/firebaseAuthStore-cHLTyC1J.js (new) 217 B 🔴 +217 B 🔴 +136 B 🔴 +118 B
assets/firebaseAuthStore-DdiG1Xne.js (removed) 217 B 🟢 -217 B 🟢 -136 B 🟢 -117 B
assets/auth-CBabFubs.js (new) 178 B 🔴 +178 B 🔴 +142 B 🔴 +144 B
assets/auth-D6jDn9yp.js (removed) 178 B 🟢 -178 B 🟢 -142 B 🟢 -132 B

Status: 3 added / 3 removed

Editors & Dialogs — 2.9 kB (baseline 2.9 kB) • ⚪ 0 B

Modals, dialogs, drawers, and in-app editors

File Before After Δ Raw Δ Gzip Δ Brotli
assets/useSubscriptionDialog-C7mBE9cw.js (removed) 2.73 kB 🟢 -2.73 kB 🟢 -1.3 kB 🟢 -1.15 kB
assets/useSubscriptionDialog-HsgoaEFr.js (new) 2.73 kB 🔴 +2.73 kB 🔴 +1.3 kB 🔴 +1.16 kB
assets/useSubscriptionDialog-CgXwWTCw.js (new) 179 B 🔴 +179 B 🔴 +110 B 🔴 +97 B
assets/useSubscriptionDialog-CsDVAijV.js (removed) 179 B 🟢 -179 B 🟢 -110 B 🟢 -95 B

Status: 2 added / 2 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/ComfyQueueButton-ClzoO308.js (removed) 9.52 kB 🟢 -9.52 kB 🟢 -2.69 kB 🟢 -2.42 kB
assets/ComfyQueueButton-DNuIThqw.js (new) 9.52 kB 🔴 +9.52 kB 🔴 +2.69 kB 🔴 +2.42 kB
assets/SubscribeButton-D3N_dnCE.js (new) 4.63 kB 🔴 +4.63 kB 🔴 +1.56 kB 🔴 +1.39 kB
assets/SubscribeButton-DRUeT90o.js (removed) 4.63 kB 🟢 -4.63 kB 🟢 -1.56 kB 🟢 -1.39 kB
assets/cloudFeedbackTopbarButton-Cq7lRyE7.js (removed) 1.24 kB 🟢 -1.24 kB 🟢 -675 B 🟢 -575 B
assets/cloudFeedbackTopbarButton-l1xdv5Qm.js (new) 1.24 kB 🔴 +1.24 kB 🔴 +676 B 🔴 +572 B
assets/ComfyQueueButton-0ec8dICV.js (removed) 181 B 🟢 -181 B 🟢 -118 B 🟢 -112 B
assets/ComfyQueueButton-DCRkZ2o_.js (new) 181 B 🔴 +181 B 🔴 +118 B 🔴 +122 B
assets/Button-CVvRRDRm.js 3.82 kB 3.82 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/CloudBadge-8qn1CSZJ.js 1.85 kB 1.85 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/TopbarBadge-CQpfNQiD.js 8.36 kB 8.36 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/UserAvatar-BcT4RJD_.js 1.73 kB 1.73 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-pw5t2dq3.js 2.41 kB 2.41 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 4 added / 4 removed

Data & Services — 2.7 MB (baseline 2.7 MB) • 🔴 +25 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/dialogService-CTfk_JZx.js (new) 2.01 MB 🔴 +2.01 MB 🔴 +425 kB 🔴 +324 kB
assets/dialogService-CkRS9EEH.js (removed) 2.01 MB 🟢 -2.01 MB 🟢 -425 kB 🟢 -324 kB
assets/api-B4fa7Mw3.js (removed) 672 kB 🟢 -672 kB 🟢 -148 kB 🟢 -118 kB
assets/api-CdRjwRmY.js (new) 672 kB 🔴 +672 kB 🔴 +148 kB 🔴 +118 kB
assets/releaseStore-C5ZHrGRf.js (removed) 8.94 kB 🟢 -8.94 kB 🟢 -2.41 kB 🟢 -2.13 kB
assets/releaseStore-CTtPixaL.js (new) 8.94 kB 🔴 +8.94 kB 🔴 +2.41 kB 🔴 +2.13 kB
assets/keybindingService-CSa4puOi.js (new) 6.78 kB 🔴 +6.78 kB 🔴 +1.74 kB 🔴 +1.51 kB
assets/keybindingService-Dx_2RxWt.js (removed) 6.78 kB 🟢 -6.78 kB 🟢 -1.74 kB 🟢 -1.52 kB
assets/bootstrapStore-DGlE28M6.js (removed) 2.52 kB 🟢 -2.52 kB 🟢 -979 B 🟢 -904 B
assets/bootstrapStore-xZFPUNn7.js (new) 2.52 kB 🔴 +2.52 kB 🔴 +979 B 🔴 +905 B
assets/userStore-Bf2jlRbB.js (removed) 2.16 kB 🟢 -2.16 kB 🟢 -812 B 🟢 -723 B
assets/userStore-DxffuJOg.js (new) 2.16 kB 🔴 +2.16 kB 🔴 +811 B 🔴 +726 B
assets/audioService-DjawJACU.js (new) 2.03 kB 🔴 +2.03 kB 🔴 +931 B 🔴 +817 B
assets/audioService-Dt9nFnn6.js (removed) 2.03 kB 🟢 -2.03 kB 🟢 -931 B 🟢 -812 B
assets/teamWorkspaceStore-DBKu_ZBM.js (removed) 165 B 🟢 -165 B 🟢 -123 B 🟢 -108 B
assets/teamWorkspaceStore-DSpsPL3J.js (new) 165 B 🔴 +165 B 🔴 +123 B 🔴 +107 B
assets/releaseStore-llYVbymg.js (new) 140 B 🔴 +140 B 🔴 +106 B 🔴 +107 B
assets/releaseStore-nr6cP5dz.js (removed) 140 B 🟢 -140 B 🟢 -106 B 🟢 -105 B
assets/serverConfigStore-Bx_up0Gg.js 2.64 kB 2.64 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 9 added / 9 removed

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

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/useErrorHandling-DQsMiFUM.js (removed) 5.15 kB 🟢 -5.15 kB 🟢 -1.52 kB 🟢 -1.33 kB
assets/useErrorHandling-tr7tw696.js (new) 5.15 kB 🔴 +5.15 kB 🔴 +1.52 kB 🔴 +1.33 kB
assets/useWorkspaceUI-8rSUwVX0.js (removed) 3.42 kB 🟢 -3.42 kB 🟢 -977 B 🟢 -845 B
assets/useWorkspaceUI-CMRS5NcS.js (new) 3.42 kB 🔴 +3.42 kB 🔴 +976 B 🔴 +839 B
assets/subscriptionCheckoutUtil-DQIpCFZF.js (new) 2.23 kB 🔴 +2.23 kB 🔴 +910 B 🔴 +803 B
assets/subscriptionCheckoutUtil-GsikA76F.js (removed) 2.23 kB 🟢 -2.23 kB 🟢 -908 B 🟢 -799 B
assets/useSubscriptionActions-ChztpEbR.js (removed) 2.22 kB 🟢 -2.22 kB 🟢 -866 B 🟢 -757 B
assets/useSubscriptionActions-DaeaBw-Q.js (new) 2.22 kB 🔴 +2.22 kB 🔴 +866 B 🔴 +755 B
assets/useSubscriptionCredits-H3H2qmAy.js (removed) 1.39 kB 🟢 -1.39 kB 🟢 -602 B 🟢 -531 B
assets/useSubscriptionCredits-RNhbJZef.js (new) 1.39 kB 🔴 +1.39 kB 🔴 +600 B 🔴 +530 B
assets/audioUtils-38WCOpCS.js (new) 970 B 🔴 +970 B 🔴 +549 B 🔴 +486 B
assets/audioUtils-BcqWVSeJ.js (removed) 970 B 🟢 -970 B 🟢 -548 B 🟢 -488 B
assets/useCurrentUser-BCWbqnhd.js (removed) 145 B 🟢 -145 B 🟢 -114 B 🟢 -99 B
assets/useCurrentUser-BQrGr1Va.js (new) 145 B 🔴 +145 B 🔴 +114 B 🔴 +103 B
assets/_plugin-vue_export-helper-D8rH49Eq.js 467 B 467 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/colorUtil-BnkGPxsj.js 7.2 kB 7.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/markdownRendererUtil-ku3y2eO8.js 1.78 kB 1.78 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/tailwindUtil-C2cDRPKn.js 488 B 488 B ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 7 added / 7 removed

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

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-CKfqpTaz.js 408 kB 408 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-ZXGkzPq1.js 4.1 MB 4.1 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-C6oIq5r_.js 3.04 MB 3.04 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-reka-ui-BIaZqDUN.js 256 kB 256 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-DyMKDuqR.js 1.83 MB 1.83 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-TV831oRr.js 650 kB 650 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-DzppPAJv.js 13.6 kB 13.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-B0dJmw9h.js 398 kB 398 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 7.04 MB (baseline 7.04 MB) • 🟢 -200 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/core-BlBpvSPH.js (removed) 180 kB 🟢 -180 kB 🟢 -43.4 kB 🟢 -36.2 kB
assets/core-JhqsrO0V.js (new) 180 kB 🔴 +180 kB 🔴 +43.3 kB 🔴 +36.2 kB
assets/WidgetSelect-hDmFemAm.js (new) 51 kB 🔴 +51 kB 🔴 +11.3 kB 🔴 +9.82 kB
assets/WidgetSelect-VNeL_UAa.js (removed) 51 kB 🟢 -51 kB 🟢 -11.3 kB 🟢 -9.82 kB
assets/Load3DControls-DNlcJg9W.js (removed) 35.9 kB 🟢 -35.9 kB 🟢 -5.87 kB 🟢 -5.07 kB
assets/Load3DControls-DZNVHZ4q.js (new) 35.9 kB 🔴 +35.9 kB 🔴 +5.87 kB 🔴 +5.09 kB
assets/SubscriptionRequiredDialogContent-o6oZva.js (removed) 28.7 kB 🟢 -28.7 kB 🟢 -6.78 kB 🟢 -5.9 kB
assets/SubscriptionRequiredDialogContent-DW3jIPhC.js (new) 28.7 kB 🔴 +28.7 kB 🔴 +6.79 kB 🔴 +5.93 kB
assets/CurrentUserPopoverWorkspace-B4rsuoCj.js (new) 22.2 kB 🔴 +22.2 kB 🔴 +4.99 kB 🔴 +4.43 kB
assets/CurrentUserPopoverWorkspace-CK5-ZNkk.js (removed) 22.2 kB 🟢 -22.2 kB 🟢 -4.99 kB 🟢 -4.43 kB
assets/Load3D-Ba2gQhjh.js (removed) 20.9 kB 🟢 -20.9 kB 🟢 -4.58 kB 🟢 -4.01 kB
assets/Load3D-DQnIhpfA.js (new) 20.9 kB 🔴 +20.9 kB 🔴 +4.58 kB 🔴 +4.02 kB
assets/WidgetRecordAudio-CJhN6CvJ.js (removed) 18.3 kB 🟢 -18.3 kB 🟢 -4.97 kB 🟢 -4.44 kB
assets/WidgetRecordAudio-LykqeA3n.js (new) 18.3 kB 🔴 +18.3 kB 🔴 +4.97 kB 🔴 +4.44 kB
assets/WidgetInputNumber-CkMisaqt.js (removed) 18.3 kB 🟢 -18.3 kB 🟢 -4.51 kB 🟢 -4.01 kB
assets/WidgetInputNumber-Di9Is_Ln.js (new) 18.3 kB 🔴 +18.3 kB 🔴 +4.52 kB 🔴 +4.02 kB
assets/SubscriptionPanelContentWorkspace-B-enOU-X.js (new) 18.2 kB 🔴 +18.2 kB 🔴 +4.47 kB 🔴 +3.89 kB
assets/SubscriptionPanelContentWorkspace-CphSw8rB.js (removed) 18.2 kB 🟢 -18.2 kB 🟢 -4.47 kB 🟢 -3.9 kB
assets/WidgetImageCrop-BdLbBzrU.js (removed) 17.1 kB 🟢 -17.1 kB 🟢 -4.14 kB 🟢 -3.62 kB
assets/WidgetImageCrop-BP2xwgV8.js (new) 17.1 kB 🔴 +17.1 kB 🔴 +4.14 kB 🔴 +3.63 kB
assets/PanelTemplate-BTDW0xg8.js (new) 16.3 kB 🔴 +16.3 kB 🔴 +5.47 kB 🔴 +4.82 kB
assets/PanelTemplate-nKdi-z34.js (removed) 16.3 kB 🟢 -16.3 kB 🟢 -5.47 kB 🟢 -4.82 kB
assets/AudioPreviewPlayer-CqFcM9qb.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.98 kB 🟢 -2.66 kB
assets/AudioPreviewPlayer-DJ6_eWa5.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.97 kB 🔴 +2.65 kB
assets/InviteMemberDialogContent-9v4b1Pm9.js (removed) 8.36 kB 🟢 -8.36 kB 🟢 -2.5 kB 🟢 -2.17 kB
assets/InviteMemberDialogContent-Caz13PwZ.js (new) 8.36 kB 🔴 +8.36 kB 🔴 +2.51 kB 🔴 +2.16 kB
assets/WidgetWithControl-_62tmsoY.js (removed) 8.09 kB 🟢 -8.09 kB 🟢 -2.69 kB 🟢 -2.42 kB
assets/WidgetWithControl-Dyj7kexJ.js (new) 8.09 kB 🔴 +8.09 kB 🔴 +2.7 kB 🔴 +2.42 kB
assets/CreateWorkspaceDialogContent-Bc_08cfT.js (new) 5.93 kB 🔴 +5.93 kB 🔴 +1.93 kB 🔴 +1.68 kB
assets/CreateWorkspaceDialogContent-GgjVWIp_.js (removed) 5.93 kB 🟢 -5.93 kB 🟢 -1.93 kB 🟢 -1.69 kB
assets/EditWorkspaceDialogContent-B9X3LQRv.js (new) 5.7 kB 🔴 +5.7 kB 🔴 +1.88 kB 🔴 +1.65 kB
assets/EditWorkspaceDialogContent-DypHinsm.js (removed) 5.7 kB 🟢 -5.7 kB 🟢 -1.88 kB 🟢 -1.64 kB
assets/ValueControlPopover-9veRmYwT.js (new) 5.17 kB 🔴 +5.17 kB 🔴 +1.69 kB 🔴 +1.5 kB
assets/ValueControlPopover-Bk9t9lVy.js (removed) 5.17 kB 🟢 -5.17 kB 🟢 -1.69 kB 🟢 -1.5 kB
assets/DeleteWorkspaceDialogContent-BLTvsXGR.js (new) 4.59 kB 🔴 +4.59 kB 🔴 +1.57 kB 🔴 +1.35 kB
assets/DeleteWorkspaceDialogContent-DKNI-x-b.js (removed) 4.59 kB 🟢 -4.59 kB 🟢 -1.57 kB 🟢 -1.35 kB
assets/LeaveWorkspaceDialogContent-BIL9MzL3.js (removed) 4.41 kB 🟢 -4.41 kB 🟢 -1.51 kB 🟢 -1.31 kB
assets/LeaveWorkspaceDialogContent-BKcKttG1.js (new) 4.41 kB 🔴 +4.41 kB 🔴 +1.5 kB 🔴 +1.31 kB
assets/RemoveMemberDialogContent-BQ2mZ3ap.js (removed) 4.38 kB 🟢 -4.38 kB 🟢 -1.45 kB 🟢 -1.27 kB
assets/RemoveMemberDialogContent-v-wO_StP.js (new) 4.38 kB 🔴 +4.38 kB 🔴 +1.45 kB 🔴 +1.27 kB
assets/RevokeInviteDialogContent-40HQh9ip.js (removed) 4.29 kB 🟢 -4.29 kB 🟢 -1.47 kB 🟢 -1.29 kB
assets/RevokeInviteDialogContent-CS_k4Sym.js (new) 4.29 kB 🔴 +4.29 kB 🔴 +1.47 kB 🔴 +1.29 kB
assets/GlobalToast-iHSbgQNn.js (new) 3.05 kB 🔴 +3.05 kB 🔴 +1.1 kB 🔴 +939 B
assets/GlobalToast-usRTU5Od.js (removed) 3.05 kB 🟢 -3.05 kB 🟢 -1.1 kB 🟢 -947 B
assets/cloudSessionCookie-Bc-8PsKd.js (removed) 2.97 kB 🟢 -2.97 kB 🟢 -942 B 🟢 -815 B
assets/cloudSessionCookie-CR3ziUL6.js (new) 2.97 kB 🔴 +2.97 kB 🔴 +942 B 🔴 +810 B
assets/SubscribeToRun-BDUk1l5j.js (new) 2.96 kB 🔴 +2.96 kB 🔴 +1.15 kB 🔴 +1.01 kB
assets/SubscribeToRun-DwC8RDFe.js (removed) 2.96 kB 🟢 -2.96 kB 🟢 -1.15 kB 🟢 -1.03 kB
assets/BaseViewTemplate-B2j8OPUA.js (removed) 2.42 kB 🟢 -2.42 kB 🟢 -1.05 kB 🟢 -933 B
assets/BaseViewTemplate-y5IgE3vW.js (new) 2.42 kB 🔴 +2.42 kB 🔴 +1.04 kB 🔴 +935 B
assets/CloudRunButtonWrapper-DxVPvKJp.js (removed) 1.79 kB 🟢 -1.79 kB 🟢 -644 B 🟢 -563 B
assets/CloudRunButtonWrapper-DyvfajeF.js (new) 1.79 kB 🔴 +1.79 kB 🔴 +644 B 🔴 +597 B
assets/gtm-CkX_rs8c.js (removed) 1.3 kB 🟢 -1.3 kB 🟢 -625 B 🟢 -527 B
assets/gtm-DanqTfzl.js (new) 1.3 kB 🔴 +1.3 kB 🔴 +626 B 🔴 +500 B
assets/cloudBadges-CKrTAwGh.js (removed) 1.08 kB 🟢 -1.08 kB 🟢 -538 B 🟢 -479 B
assets/cloudBadges-K19CyNf5.js (new) 1.08 kB 🔴 +1.08 kB 🔴 +538 B 🔴 +478 B
assets/graphHasMissingNodes-BzoGZftM.js (new) 1.06 kB 🔴 +1.06 kB 🔴 +462 B 🔴 +419 B
assets/graphHasMissingNodes-qNwaBaeM.js (removed) 1.06 kB 🟢 -1.06 kB 🟢 -461 B 🟢 -421 B
assets/cloudSubscription-BX4jcSjN.js (new) 976 B 🔴 +976 B 🔴 +462 B 🔴 +398 B
assets/cloudSubscription-D3hCQ36d.js (removed) 976 B 🟢 -976 B 🟢 -460 B 🟢 -399 B
assets/types-9RyZweiA.js (new) 909 B 🔴 +909 B 🔴 +458 B 🔴 +384 B
assets/types-Cm9RavTs.js (removed) 908 B 🟢 -908 B 🟢 -455 B 🟢 -385 B
assets/nightlyBadges-CgFQqQ_H.js (new) 595 B 🔴 +595 B 🔴 +357 B 🔴 +309 B
assets/nightlyBadges-CmahpLU1.js (removed) 595 B 🟢 -595 B 🟢 -354 B 🟢 -309 B
assets/SubscriptionPanelContentWorkspace-CF7sdoyX.js (new) 266 B 🔴 +266 B 🔴 +136 B 🔴 +116 B
assets/SubscriptionPanelContentWorkspace-Di1fWJso.js (removed) 266 B 🟢 -266 B 🟢 -136 B 🟢 -118 B
assets/WidgetInputNumber-f7lpZugz.js (removed) 186 B 🟢 -186 B 🟢 -119 B 🟢 -109 B
assets/WidgetInputNumber-Rn2BJjqQ.js (new) 186 B 🔴 +186 B 🔴 +119 B 🔴 +111 B
assets/WidgetLegacy-BaZOucfq.js (new) 164 B 🔴 +164 B 🔴 +125 B 🔴 +112 B
assets/WidgetLegacy-TERd4fh0.js (removed) 164 B 🟢 -164 B 🟢 -125 B 🟢 -110 B
assets/Load3D-Ch-gtiI0.js (new) 131 B 🔴 +131 B 🔴 +107 B 🔴 +112 B
assets/Load3D-DwR3mIFC.js (removed) 131 B 🟢 -131 B 🟢 -107 B 🟢 -108 B
assets/gtm-dUv7avmH.js (new) 122 B 🔴 +122 B 🔴 +116 B 🔴 +110 B
assets/gtm-jkR_i4KL.js (removed) 122 B 🟢 -122 B 🟢 -116 B 🟢 -109 B
assets/auto-CIz1W2VX.js 1.73 kB 1.73 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-B2kaqXwB.js 19.3 kB 19.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-C4b7jkru.js 18 kB 18 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CfyfvZ26.js 17.9 kB 17.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CVGDesiQ.js 18.8 kB 18.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-D5s7OQ2Y.js 19.3 kB 19.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DIpat94F.js 18.5 kB 18.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DIyyDM8B.js 20.6 kB 20.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DmapSMuR.js 17.8 kB 17.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DVgVR6E3.js 17.2 kB 17.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-rL7INiLx.js 17 kB 17 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-XNemNPrT.js 18 kB 18 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/i18n-Dk7sED4k.js 188 B 188 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/i18n-x1ecoGAi.js 495 kB 495 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/LazyImage-B52CO4wd.js 14.1 kB 14.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BYMeROYU.js 112 kB 112 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CgEoH02C.js 154 kB 154 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CGlcISI9.js 111 kB 111 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CI3jqob9.js 172 kB 172 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CKO629VV.js 150 kB 150 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CL7lQuTU.js 132 kB 132 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cz7KlYu8.js 128 kB 128 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-D1SebohP.js 125 kB 125 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DcZO51UE.js 143 kB 143 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DPjf0Yxm.js 125 kB 125 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-K82I8n9k.js 129 kB 129 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Media3DTop-C2-Fo6sU.js 2.38 kB 2.38 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-Ci-kpVMy.js 2 kB 2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-7wwB8kp9.js 2.34 kB 2.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-CTPTvpaW.js 2.82 kB 2.82 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/mixpanel.module-D-d59EhC.js 143 B 143 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bnfj3jVd.js 412 kB 412 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BOtpSRhY.js 366 kB 366 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CJdnE3iS.js 373 kB 373 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CUtkGNC5.js 369 kB 369 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CvJk0KJv.js 448 kB 448 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DMSL5DLd.js 413 kB 413 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Dun_mUNl.js 369 kB 369 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-eLEyykRM.js 383 kB 383 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-mMDG_apG.js 363 kB 363 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Q0xInTMU.js 342 kB 342 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-wT_xujHW.js 339 kB 339 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/OBJLoader2WorkerModule-DTMpvldF.js 109 kB 109 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/previousFullPath-CATisLRM.js 838 B 838 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/rolldown-runtime-cVp-94Rc.js 1.96 kB 1.96 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Slider-R6kcTWkS.js 4.21 kB 4.21 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widget-BEaQgM5X.js 518 B 518 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetBoundingBox-BdFPwTvH.js 186 B 186 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetBoundingBox-D_TNvFYD.js 4.71 kB 4.71 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-CLCIoBG-.js 2.79 kB 2.79 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetColorPicker-B95EgZ9s.js 3.71 kB 3.71 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetGalleria-Bq63isMV.js 4.57 kB 4.57 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-CfAADsD-.js 3.79 kB 3.79 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetInputText-qw2JhjpM.js 2.58 kB 2.58 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetLayoutField-D45M9V7O.js 2.61 kB 2.61 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetMarkdown-CDoGZEj1.js 3.22 kB 3.22 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BFYO1LwS.js 1.31 kB 1.31 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetTextarea-DMpade_j.js 3.52 kB 3.52 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetToggleSwitch-C6wrHdtT.js 3.08 kB 3.08 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 37 added / 37 removed

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/platform/cloud/subscription/composables/useSubscription.test.ts`:
- Around line 240-247: The test currently asserts the items payload only
contains item_id, item_variant, item_category, and quantity for the item with
item_id 'monthly_creator' but is missing assertions for item_name and price;
update the test in useSubscription.test.ts to also assert that
items[0].item_name and items[0].price are present (e.g.,
expect(payload.items[0].item_name).toBeDefined() or equal the expected string,
and expect(payload.items[0].price).toBeDefined() or equal the expected numeric
value) so the spec catches regressions that remove those fields.

Comment on lines +240 to +247
items: [
{
item_id: 'monthly_creator',
item_variant: 'monthly',
item_category: 'subscription',
quantity: 1
}
]
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Locate and read the test file to see the actual content at lines 240-247
fd -e test.ts -p "useSubscription" | head -5

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 374


🏁 Script executed:

# Search for the useSubscription.test.ts file
find . -name "useSubscription.test.ts" -type f

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 139


🏁 Script executed:

# Try a broader search for subscription test files
fd "useSubscription" -t f

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 728


🏁 Script executed:

# Read the test file, focusing on lines 240-247 and surrounding context
sed -n '230,260p' src/platform/cloud/subscription/composables/useSubscription.test.ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 976


🏁 Script executed:

# Get total line count to understand the file size
wc -l src/platform/cloud/subscription/composables/useSubscription.test.ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 141


🏁 Script executed:

# Search for the test containing the items payload to understand context
rg "item_id.*monthly_creator" src/platform/cloud/subscription/composables/useSubscription.test.ts -A 10 -B 10

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 636


🏁 Script executed:

# Read the useSubscription.ts implementation to see what's being pushed to dataLayer
rg "item_id.*monthly_creator" src/platform/cloud/subscription/composables/useSubscription.ts -A 10 -B 10

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 52


🏁 Script executed:

# Broader search for dataLayer push in the implementation
rg "dataLayer" src/platform/cloud/subscription/composables/useSubscription.ts -A 5 -B 5

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 52


🏁 Script executed:

# Search for item_name or price being set in subscription composables
rg "item_name|item_price|price.*subscription" src/platform/cloud/subscription/ -t ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 163


🏁 Script executed:

# Read the implementation file to see the full dataLayer payload being constructed
cat -n src/platform/cloud/subscription/composables/useSubscription.ts | sed -n '1,100p'

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 4233


🏁 Script executed:

# Search for where the dataLayer event is constructed - look for item_name context
rg "item_name" src/platform/cloud/subscription/composables/useSubscription.ts -B 5 -A 5

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 345


🏁 Script executed:

# Search for price in the subscription context
rg "price" src/platform/cloud/subscription/composables/ -t ts -B 2 -A 2

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 519


🌐 Web query:

GA4 ecommerce purchase event items array required fields documentation

💡 Result:

For GA4 ecommerce (including the purchase event), the items parameter is an array of Item objects. For each object in items, the only required item-level fields are:

  • item_id (string)required if item_name isn’t sent
  • item_name (string)required if item_id isn’t sent

In other words: each item must include at least one of item_id or item_name; everything else in the item object is optional. [1]

Related implementation notes from Google’s docs:

  • purchase should include the event-level items array; if required ecommerce parameters are missing, GA4 may treat it as a custom event rather than an ecommerce event. [3]
  • items can include up to 200 items per event. [2]
  • You can add up to 27 custom item-scoped parameters (in addition to Google’s predefined item parameters). [4]

Sources: Google Analytics developer documentation. [1] [2] [3] [4]


🏁 Script executed:

# Let me get more context around the dataLayer push to understand the full picture
rg "pushDataLayerEvent\|dataLayer.push" src/platform/cloud/subscription/composables/useSubscription.ts -B 10 -A 10

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 52


🏁 Script executed:

# Search for the dataLayer event construction with different pattern
rg "event.*purchase" src/platform/cloud/subscription/composables/useSubscription.ts -B 15 -A 5

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 801


🏁 Script executed:

# Look at the entire section where the items array is built
sed -n '100,250p' src/platform/cloud/subscription/composables/useSubscription.ts

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 4294


Assert item_name and price in the items payload.

The test omits assertions for fields that are being sent in the actual payload. Add assertions to verify item_name and price presence to catch regressions where these fields might be removed.

Suggested test update
        items: [
          {
            item_id: 'monthly_creator',
+           item_name: expect.any(String),
            item_variant: 'monthly',
            item_category: 'subscription',
+           price: expect.any(Number),
            quantity: 1
          }
        ]
📝 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
items: [
{
item_id: 'monthly_creator',
item_variant: 'monthly',
item_category: 'subscription',
quantity: 1
}
]
items: [
{
item_id: 'monthly_creator',
item_name: expect.any(String),
item_variant: 'monthly',
item_category: 'subscription',
price: expect.any(Number),
quantity: 1
}
]
🤖 Prompt for AI Agents
In `@src/platform/cloud/subscription/composables/useSubscription.test.ts` around
lines 240 - 247, The test currently asserts the items payload only contains
item_id, item_variant, item_category, and quantity for the item with item_id
'monthly_creator' but is missing assertions for item_name and price; update the
test in useSubscription.test.ts to also assert that items[0].item_name and
items[0].price are present (e.g.,
expect(payload.items[0].item_name).toBeDefined() or equal the expected string,
and expect(payload.items[0].price).toBeDefined() or equal the expected numeric
value) so the spec catches regressions that remove those fields.

@benceruleanlu benceruleanlu merged commit ef8657b into main Jan 27, 2026
38 checks passed
@benceruleanlu benceruleanlu deleted the fix/gtm-purchase-items branch January 27, 2026 21:04
benceruleanlu added a commit that referenced this pull request Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants