Skip to content

Road to No Explicit Any Part 7: Scripts and Dialog Cleanup#8092

Merged
Myestery merged 8 commits intomainfrom
fix/remove-any-types-part7
Jan 20, 2026
Merged

Road to No Explicit Any Part 7: Scripts and Dialog Cleanup#8092
Myestery merged 8 commits intomainfrom
fix/remove-any-types-part7

Conversation

@Myestery
Copy link
Contributor

@Myestery Myestery commented Jan 16, 2026

Summary

Continues the TypeScript strict typing improvements by removing any types from core scripts and dialog components.

Changes

api.ts (6 instances)

  • Define V1RawPrompt and CloudRawPrompt tuple types for queue prompt formats
  • Export QueueIndex, PromptInputs, ExtraData, OutputsToExecute from apiSchema
  • Type #postItem body, storeUserData data, and getCustomNodesI18n return

groupNodeManage.ts (all @ts-expect-error removed)

  • Add GroupNodeConfigEntry interface to LGraph.ts
  • Extend GroupNodeWorkflowData with title, widgets_values, and typed config
  • Type all class properties with definite assignment assertions
  • Type all method parameters and event handlers
  • Fix save button callback with proper generic types for node ordering

changeTracker.ts (4 instances)

  • Type nodeOutputs as Record<string, ExecutedWsMessage['output']>
  • Type prompt callback with CanvasPointerEvent and proper value types

asyncDialog.ts and dialog.ts

  • Make ComfyAsyncDialog generic with DialogAction<T> type
  • Type ComfyDialog constructor and show method parameters
  • Update ManageGroupDialog.show signature to match base class

Test plan

  • pnpm typecheck passes
  • pnpm lint passes
  • Sourcegraph checks for external usage

Related: Continues from #8083

┆Issue is synchronized with this Notion page by Unito

- Define V1RawPrompt and CloudRawPrompt tuple types for queue responses
- Export QueueIndex, PromptInputs, ExtraData, OutputsToExecute from apiSchema
- Type normalizeQueuePrompt with proper discriminated union
- Type #postItem body as Record<string, unknown>
- Type storeUserData data as BodyInit | Record<string, unknown> | null
- Type getCustomNodesI18n return as Record<string, unknown>
- Add GroupNodeConfigEntry interface to LGraph.ts for config typing
- Extend GroupNodeWorkflowData with title and widgets_values node props
- Type config as Record<number, GroupNodeConfigEntry> instead of unknown
- Export new types from litegraph barrel file
- Fix all class properties with definite assignment assertions
- Type all method parameters (changeTab, changeNode, changeGroup, etc.)
- Fix event handlers with proper Event and CustomEvent types
- Type storeModification, getEditElement, and build*Page methods
- Fix save button callback with proper generic types for node ordering
- Add override modifier to show method
- Use optional chaining for node.recreate() call
…types

- Type nodeOutputs as Record<string, ExecutedWsMessage['output']>
- Import CanvasPointerEvent from litegraph
- Type prompt callback value as string | number
- Type prompt callback function as (v: string) => void
- Type event parameter as CanvasPointerEvent
ComfyDialog:
- Type constructor buttons parameter as HTMLButtonElement[] | null
- Type show method parameter as string | HTMLElement | HTMLElement[]
- Use definite assignment for textElement

ComfyAsyncDialog:
- Make class generic with DialogAction<T> type
- Type resolve function, show/showModal return types
- Fix button creation with proper HTMLButtonElement cast
- Add generic static prompt method

ManageGroupDialog:
- Update show method signature to match base class
- Extract nodeType from parameter for string comparisons
@Myestery Myestery requested a review from a team as a code owner January 16, 2026 02:39
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jan 16, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 16, 2026

📝 Walkthrough

Walkthrough

Type and null-safety refinements across group-node, LiteGraph types, API, change-tracking, and dialog UI. Signatures and exported types updated (notably GroupNodeConfig.getNodeDef, GroupNodeConfigEntry, ComfyAsyncDialog generics), and several internal fields/methods strengthened with stricter typings.

Changes

Cohort / File(s) Summary
LiteGraph types
src/lib/litegraph/src/LGraph.ts, src/lib/litegraph/src/litegraph.ts
Add GroupNodeConfigEntry interface; extend GroupNodeWorkflowData nodes with title? and widgets_values?; change config to Record<number, GroupNodeConfigEntry> and re-export types.
Group node core
src/extensions/core/groupNode.ts
Change GroupNodeConfig.getNodeDef signature to accept `GroupNodeData
Group node UI/manage
src/extensions/core/groupNodeManage.ts
Strongly typed ManageGroupDialog public API and fields (definite assignments, typed elements); merge typed as Record<string, unknown>; many methods/props tightened and non-null guards added; drag/drop and modification storage typed.
API & data handling
src/scripts/api.ts, src/scripts/changeTracker.ts
#postItem body now `Record<string, unknown>
Dialog components
src/scripts/ui/dialog.ts, src/scripts/ui/components/asyncDialog.ts
ComfyDialog.textElement made definite-assigned; ComfyAsyncDialog converted to generic `ComfyAsyncDialog<T = string
Schemas
src/schemas/apiSchema.ts
Add private zCustomNodesI18n schema and exported type CustomNodesI18n (type-only addition).

Sequence Diagram(s)

(omitted)

Possibly related PRs

Suggested reviewers

  • DrJKL
  • simula-r
  • jtydhr88
  • christian-byrne
✨ 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.

@github-actions
Copy link

github-actions bot commented Jan 16, 2026

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 01/20/2026, 12:37:41 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Jan 16, 2026

🎭 Playwright Tests: ⚠️ Passed with flaky tests

Results: 505 passed, 0 failed, 1 flaky, 8 skipped (Total: 514)

❌ Failed Tests

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

@github-actions
Copy link

github-actions bot commented Jan 16, 2026

Bundle Size Report

Summary

  • Raw size: 21.3 MB baseline 21.3 MB — 🔴 +883 B
  • Gzip: 4.43 MB baseline 4.43 MB — 🔴 +260 B
  • Brotli: 3.28 MB baseline 3.28 MB — 🔴 +173 B
  • Bundles: 155 current • 155 baseline • 65 added / 65 removed

Category Glance
Other 🔴 +815 B (6.24 MB) · Data & Services 🔴 +68 B (3.04 MB) · Vendor & Third-Party ⚪ 0 B (10.4 MB) · Graph Workspace ⚪ 0 B (1.02 MB) · Panels & Settings ⚪ 0 B (430 kB) · Views & Navigation ⚪ 0 B (80.7 kB) · + 5 more

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

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-9bYpSc_m.js (new) 22.4 kB 🔴 +22.4 kB 🔴 +6.74 kB 🔴 +5.92 kB
assets/index-CujehPrS.js (removed) 22.4 kB 🟢 -22.4 kB 🟢 -6.74 kB 🟢 -5.92 kB

Status: 1 added / 1 removed

Graph Workspace — 1.02 MB (baseline 1.02 MB) • ⚪ 0 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-CpSro7o8.js (removed) 1.02 MB 🟢 -1.02 MB 🟢 -201 kB 🟢 -153 kB
assets/GraphView-FiToG560.js (new) 1.02 MB 🔴 +1.02 MB 🔴 +201 kB 🔴 +153 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-DNiCz5cA.js (removed) 17.1 kB 🟢 -17.1 kB 🟢 -3.6 kB 🟢 -3.06 kB
assets/CloudSurveyView-WhpzDgnb.js (new) 17.1 kB 🔴 +17.1 kB 🔴 +3.61 kB 🔴 +3.06 kB
assets/CloudLoginView-BgzlUXly.js (new) 11.8 kB 🔴 +11.8 kB 🔴 +3.1 kB 🔴 +2.71 kB
assets/CloudLoginView-CmbhqEXd.js (removed) 11.8 kB 🟢 -11.8 kB 🟢 -3.09 kB 🟢 -2.71 kB
assets/UserCheckView-B7r02UCm.js (removed) 10.5 kB 🟢 -10.5 kB 🟢 -2.45 kB 🟢 -2.13 kB
assets/UserCheckView-DNYqiRjI.js (new) 10.5 kB 🔴 +10.5 kB 🔴 +2.45 kB 🔴 +2.13 kB
assets/CloudLayoutView-CqtyGQGp.js (new) 8.54 kB 🔴 +8.54 kB 🔴 +2.25 kB 🔴 +1.97 kB
assets/CloudLayoutView-D8mwY-FD.js (removed) 8.54 kB 🟢 -8.54 kB 🟢 -2.25 kB 🟢 -1.95 kB
assets/CloudSignupView-BDCC22Bp.js (new) 8.18 kB 🔴 +8.18 kB 🔴 +2.33 kB 🔴 +2.03 kB
assets/CloudSignupView-D1L1OXp9.js (removed) 8.18 kB 🟢 -8.18 kB 🟢 -2.33 kB 🟢 -2.03 kB
assets/CloudForgotPasswordView-4M2evFjq.js (removed) 6.26 kB 🟢 -6.26 kB 🟢 -1.93 kB 🟢 -1.68 kB
assets/CloudForgotPasswordView-BKukUrPo.js (new) 6.26 kB 🔴 +6.26 kB 🔴 +1.93 kB 🔴 +1.69 kB
assets/UserSelectView-BwkAFUpC.js (removed) 5.28 kB 🟢 -5.28 kB 🟢 -1.76 kB 🟢 -1.56 kB
assets/UserSelectView-DbsuBPJg.js (new) 5.28 kB 🔴 +5.28 kB 🔴 +1.76 kB 🔴 +1.56 kB
assets/CloudSubscriptionRedirectView-ByPzB0Rd.js (removed) 5.27 kB 🟢 -5.27 kB 🟢 -1.73 kB 🟢 -1.54 kB
assets/CloudSubscriptionRedirectView-gCufC2vT.js (new) 5.27 kB 🔴 +5.27 kB 🔴 +1.73 kB 🔴 +1.54 kB
assets/CloudAuthTimeoutView-DrkCU5eV.js (removed) 5.24 kB 🟢 -5.24 kB 🟢 -1.71 kB 🟢 -1.49 kB
assets/CloudAuthTimeoutView-xeNW7eWU.js (new) 5.24 kB 🔴 +5.24 kB 🔴 +1.71 kB 🔴 +1.49 kB
assets/CloudSorryContactSupportView-QtHXqQri.js 1.97 kB 1.97 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/layout-Bf1taiS0.js 500 B 500 B ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 9 added / 9 removed

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

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-Bh5jNfg-.js (new) 23.8 kB 🔴 +23.8 kB 🔴 +5.95 kB 🔴 +5.23 kB
assets/LegacyCreditsPanel-Da9rZ_D0.js (removed) 23.8 kB 🟢 -23.8 kB 🟢 -5.95 kB 🟢 -5.23 kB
assets/SubscriptionPanel-B1IXl1oh.js (new) 20.6 kB 🔴 +20.6 kB 🔴 +5 kB 🔴 +4.39 kB
assets/SubscriptionPanel-BrxJ8M7E.js (removed) 20.6 kB 🟢 -20.6 kB 🟢 -5 kB 🟢 -4.39 kB
assets/KeybindingPanel-B9E-F-be.js (new) 14.2 kB 🔴 +14.2 kB 🔴 +3.75 kB 🔴 +3.31 kB
assets/KeybindingPanel-BIrV78jg.js (removed) 14.2 kB 🟢 -14.2 kB 🟢 -3.74 kB 🟢 -3.31 kB
assets/AboutPanel-DM6ujXvp.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.68 kB 🔴 +2.43 kB
assets/AboutPanel-DrnXAWGl.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.68 kB 🟢 -2.43 kB
assets/ExtensionPanel-BMolYkLZ.js (removed) 10.2 kB 🟢 -10.2 kB 🟢 -2.71 kB 🟢 -2.4 kB
assets/ExtensionPanel-CwG_zVTx.js (new) 10.2 kB 🔴 +10.2 kB 🔴 +2.71 kB 🔴 +2.4 kB
assets/ServerConfigPanel-BPEr6dSG.js (removed) 7.23 kB 🟢 -7.23 kB 🟢 -2.17 kB 🟢 -1.94 kB
assets/ServerConfigPanel-CyhorZsf.js (new) 7.23 kB 🔴 +7.23 kB 🔴 +2.17 kB 🔴 +1.94 kB
assets/UserPanel-Bvh6SIjn.js (removed) 6.58 kB 🟢 -6.58 kB 🟢 -1.91 kB 🟢 -1.67 kB
assets/UserPanel-CmeziZp3.js (new) 6.58 kB 🔴 +6.58 kB 🔴 +1.91 kB 🔴 +1.67 kB
assets/cloudRemoteConfig-BRRnymM_.js (new) 1.82 kB 🔴 +1.82 kB 🔴 +768 B 🔴 +654 B
assets/cloudRemoteConfig-NbJtV4Vh.js (removed) 1.82 kB 🟢 -1.82 kB 🟢 -772 B 🟢 -654 B
assets/remoteConfig-B0rgMcLx.js 1.07 kB 1.07 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/remoteConfig-CW7J8vSK.js 188 B 188 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-6DVADt2n.js 34.3 kB 34.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-B0j03ezr.js 38.3 kB 38.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BHe-AJJN.js 29.6 kB 29.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BT2lfy0S.js 29.5 kB 29.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Cp0lF2Mp.js 31.2 kB 31.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CwdesOpm.js 32.1 kB 32.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-D3SeHgho.js 28.6 kB 28.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-D42m_JEJ.js 25.9 kB 25.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-FF_vLB0C.js 25.2 kB 25.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-reUMVWRn.js 30.4 kB 30.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-s7kHNBdQ.js 28.9 kB 28.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 8 added / 8 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-51T8kDGb.js (removed) 3.54 kB 🟢 -3.54 kB 🟢 -1.24 kB 🟢 -1.07 kB
assets/auth-BsbD1BfM.js (new) 3.54 kB 🔴 +3.54 kB 🔴 +1.24 kB 🔴 +1.06 kB
assets/firebaseAuthStore-CHG6YvBS.js (new) 217 B 🔴 +217 B 🔴 +138 B 🔴 +123 B
assets/firebaseAuthStore-EWUlnJDQ.js (removed) 217 B 🟢 -217 B 🟢 -138 B 🟢 -122 B
assets/auth-3FYk3g1j.js (removed) 178 B 🟢 -178 B 🟢 -142 B 🟢 -140 B
assets/auth-ee_67LPj.js (new) 178 B 🔴 +178 B 🔴 +142 B 🔴 +129 B

Status: 3 added / 3 removed

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

Modals, dialogs, drawers, and in-app editors

File Before After Δ Raw Δ Gzip Δ Brotli
assets/useSubscriptionDialog-DE5cODEk.js (removed) 2.62 kB 🟢 -2.62 kB 🟢 -1.24 kB 🟢 -1.09 kB
assets/useSubscriptionDialog-DggcEiMn.js (new) 2.62 kB 🔴 +2.62 kB 🔴 +1.24 kB 🔴 +1.1 kB
assets/useSubscriptionDialog-BJ0uucTk.js (new) 179 B 🔴 +179 B 🔴 +110 B 🔴 +97 B
assets/useSubscriptionDialog-Dam3SopR.js (removed) 179 B 🟢 -179 B 🟢 -110 B 🟢 -102 B

Status: 2 added / 2 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/SubscribeButton-CmIBFrwJ.js (new) 12.5 kB 🔴 +12.5 kB 🔴 +3.01 kB 🔴 +2.7 kB
assets/SubscribeButton-D2y6ioqF.js (removed) 12.5 kB 🟢 -12.5 kB 🟢 -3 kB 🟢 -2.71 kB
assets/ComfyQueueButton-BUvclLK6.js (removed) 9.52 kB 🟢 -9.52 kB 🟢 -2.69 kB 🟢 -2.41 kB
assets/ComfyQueueButton-Catep2vu.js (new) 9.52 kB 🔴 +9.52 kB 🔴 +2.69 kB 🔴 +2.42 kB
assets/CloudBadge-DV1U4Tf3.js (removed) 1.85 kB 🟢 -1.85 kB 🟢 -732 B 🟢 -652 B
assets/CloudBadge-E6yU8dfz.js (new) 1.85 kB 🔴 +1.85 kB 🔴 +731 B 🔴 +653 B
assets/cloudFeedbackTopbarButton-4CwXeX0i.js (new) 866 B 🔴 +866 B 🔴 +525 B 🔴 +440 B
assets/cloudFeedbackTopbarButton-D2QUjEvp.js (removed) 866 B 🟢 -866 B 🟢 -525 B 🟢 -439 B
assets/ComfyQueueButton-DOftUUsC.js (removed) 181 B 🟢 -181 B 🟢 -118 B 🟢 -121 B
assets/ComfyQueueButton-DOPe63ve.js (new) 181 B 🔴 +181 B 🔴 +118 B 🔴 +109 B
assets/Button-BFptkwN0.js 3.75 kB 3.75 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/UserAvatar-CkcXZWJQ.js 1.73 kB 1.73 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-_hGIrcI2.js 2.41 kB 2.41 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 5 added / 5 removed

Data & Services — 3.04 MB (baseline 3.04 MB) • 🔴 +68 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/dialogService-BeseOjPG.js (new) 1.87 MB 🔴 +1.87 MB 🔴 +397 kB 🔴 +303 kB
assets/dialogService-CqAcr2F7.js (removed) 1.87 MB 🟢 -1.87 MB 🟢 -397 kB 🟢 -304 kB
assets/api-BzgAgbkp.js (new) 1.15 MB 🔴 +1.15 MB 🔴 +239 kB 🔴 +185 kB
assets/api-CQ2Xm9to.js (removed) 1.15 MB 🟢 -1.15 MB 🟢 -239 kB 🟢 -185 kB
assets/releaseStore-CbjJpCNJ.js (new) 8.91 kB 🔴 +8.91 kB 🔴 +2.41 kB 🔴 +2.13 kB
assets/releaseStore-DdlEPYlj.js (removed) 8.91 kB 🟢 -8.91 kB 🟢 -2.41 kB 🟢 -2.13 kB
assets/keybindingService-BjVmdWbt.js (new) 6.78 kB 🔴 +6.78 kB 🔴 +1.74 kB 🔴 +1.51 kB
assets/keybindingService-Ckdd_9yi.js (removed) 6.78 kB 🟢 -6.78 kB 🟢 -1.74 kB 🟢 -1.51 kB
assets/userStore-B_xKepez.js (new) 2.16 kB 🔴 +2.16 kB 🔴 +811 B 🔴 +725 B
assets/userStore-CS6wc6ce.js (removed) 2.16 kB 🟢 -2.16 kB 🟢 -812 B 🟢 -725 B
assets/audioService-B-TC_VCs.js (removed) 2.03 kB 🟢 -2.03 kB 🟢 -931 B 🟢 -825 B
assets/audioService-DLRyZ9q6.js (new) 2.03 kB 🔴 +2.03 kB 🔴 +930 B 🔴 +821 B
assets/releaseStore-C9GVjYlK.js (new) 140 B 🔴 +140 B 🔴 +106 B 🔴 +107 B
assets/releaseStore-CknC0UfL.js (removed) 140 B 🟢 -140 B 🟢 -106 B 🟢 -107 B
assets/serverConfigStore-CDOQj4Ec.js 2.64 kB 2.64 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 7 added / 7 removed

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

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/useErrorHandling-0CZq1_8X.js (new) 5 kB 🔴 +5 kB 🔴 +1.47 kB 🔴 +1.28 kB
assets/useErrorHandling-B2-UTIsy.js (removed) 5 kB 🟢 -5 kB 🟢 -1.47 kB 🟢 -1.28 kB
assets/subscriptionCheckoutUtil-7c8MQZgl.js (new) 1.98 kB 🔴 +1.98 kB 🔴 +860 B 🔴 +749 B
assets/subscriptionCheckoutUtil-COdqy-Ex.js (removed) 1.98 kB 🟢 -1.98 kB 🟢 -859 B 🟢 -750 B
assets/audioUtils-BhRhiziP.js (removed) 1.24 kB 🟢 -1.24 kB 🟢 -617 B 🟢 -523 B
assets/audioUtils-Dm2wu6Qa.js (new) 1.24 kB 🔴 +1.24 kB 🔴 +618 B 🔴 +523 B
assets/useCurrentUser-CVhUsKZv.js (removed) 145 B 🟢 -145 B 🟢 -114 B 🟢 -97 B
assets/useCurrentUser-DdJ9SPRT.js (new) 145 B 🔴 +145 B 🔴 +114 B 🔴 +103 B
assets/_plugin-vue_export-helper-xVPqUhAl.js 467 B 467 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/colorUtil-De0C_hc6.js 7.2 kB 7.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/markdownRendererUtil-0PqWmn-8.js 1.78 kB 1.78 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeFilterUtil-BUCOyXf2.js 421 B 421 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/tailwindUtil-Chuu3TbR.js 487 B 487 B ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 4 added / 4 removed

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

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-Dr8GmMlH.js 408 kB 408 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-DqqTGPL6.js 3.92 MB 3.92 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-EBXVECvF.js 3.04 MB 3.04 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-reka-ui-ViWrLgbb.js 172 kB 172 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-Dqb1VEds.js 1.83 MB 1.83 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-BxNhpyUI.js 650 kB 650 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-VHAq3Lid.js 13.6 kB 13.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-CArXWFIl.js 398 kB 398 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 6.24 MB (baseline 6.24 MB) • 🔴 +815 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/core-D1V44xew.js (new) 177 kB 🔴 +177 kB 🔴 +42.8 kB 🔴 +35.7 kB
assets/core-x5_wv1w1.js (removed) 177 kB 🟢 -177 kB 🟢 -42.5 kB 🟢 -35.6 kB
assets/Load3D-C6PgpCIZ.js (new) 55.7 kB 🔴 +55.7 kB 🔴 +9.18 kB 🔴 +7.92 kB
assets/Load3D-CTNE0Y5q.js (removed) 55.7 kB 🟢 -55.7 kB 🟢 -9.18 kB 🟢 -7.92 kB
assets/WidgetSelect-Bw-ThOki.js (new) 50.5 kB 🔴 +50.5 kB 🔴 +11.1 kB 🔴 +9.67 kB
assets/WidgetSelect-DNDqwaww.js (removed) 50.5 kB 🟢 -50.5 kB 🟢 -11.1 kB 🟢 -9.67 kB
assets/SubscriptionRequiredDialogContent-BHele8lv.js (removed) 28.7 kB 🟢 -28.7 kB 🟢 -6.78 kB 🟢 -5.9 kB
assets/SubscriptionRequiredDialogContent-CaRUfJ13.js (new) 28.7 kB 🔴 +28.7 kB 🔴 +6.78 kB 🔴 +5.91 kB
assets/WidgetRecordAudio-67X7mpa3.js (removed) 18.2 kB 🟢 -18.2 kB 🟢 -4.96 kB 🟢 -4.43 kB
assets/WidgetRecordAudio-CM2WVovI.js (new) 18.2 kB 🔴 +18.2 kB 🔴 +4.96 kB 🔴 +4.45 kB
assets/WidgetInputNumber-CJr1ElDA.js (removed) 18 kB 🟢 -18 kB 🟢 -4.45 kB 🟢 -3.96 kB
assets/WidgetInputNumber-Dt3oaC8p.js (new) 18 kB 🔴 +18 kB 🔴 +4.45 kB 🔴 +3.96 kB
assets/WidgetImageCrop-CTOdjOF3.js (new) 17.1 kB 🔴 +17.1 kB 🔴 +4.14 kB 🔴 +3.62 kB
assets/WidgetImageCrop-DfYADyfT.js (removed) 17.1 kB 🟢 -17.1 kB 🟢 -4.14 kB 🟢 -3.61 kB
assets/PanelTemplate-Dn48L5jf.js (new) 16.2 kB 🔴 +16.2 kB 🔴 +5.45 kB 🔴 +4.8 kB
assets/PanelTemplate-DnJCu2o1.js (removed) 16.2 kB 🟢 -16.2 kB 🟢 -5.45 kB 🟢 -4.8 kB
assets/AudioPreviewPlayer-DFM42o9C.js (new) 12.7 kB 🔴 +12.7 kB 🔴 +3.48 kB 🔴 +3.12 kB
assets/AudioPreviewPlayer-HeqGyVNp.js (removed) 12.7 kB 🟢 -12.7 kB 🟢 -3.48 kB 🟢 -3.11 kB
assets/ValueControlPopover-BvcNSDl4.js (removed) 5.34 kB 🟢 -5.34 kB 🟢 -1.72 kB 🟢 -1.53 kB
assets/ValueControlPopover-Dp9Ar9BU.js (new) 5.34 kB 🔴 +5.34 kB 🔴 +1.72 kB 🔴 +1.53 kB
assets/WidgetWithControl-CgNCEuab.js (removed) 4.39 kB 🟢 -4.39 kB 🟢 -1.75 kB 🟢 -1.58 kB
assets/WidgetWithControl-Dsjj0pkp.js (new) 4.39 kB 🔴 +4.39 kB 🔴 +1.75 kB 🔴 +1.59 kB
assets/WidgetAudioUI-CSMu7NLO.js (removed) 3.22 kB 🟢 -3.22 kB 🟢 -1.19 kB 🟢 -1.07 kB
assets/WidgetAudioUI-DyhItoBx.js (new) 3.22 kB 🔴 +3.22 kB 🔴 +1.19 kB 🔴 +1.07 kB
assets/GlobalToast-awaGJHc0.js (removed) 3.05 kB 🟢 -3.05 kB 🟢 -1.1 kB 🟢 -939 B
assets/GlobalToast-BZf3uig5.js (new) 3.05 kB 🔴 +3.05 kB 🔴 +1.1 kB 🔴 +940 B
assets/SubscribeToRun-BHGsDKEP.js (new) 2.96 kB 🔴 +2.96 kB 🔴 +1.15 kB 🔴 +1.02 kB
assets/SubscribeToRun-DqS-hptg.js (removed) 2.96 kB 🟢 -2.96 kB 🟢 -1.16 kB 🟢 -1.01 kB
assets/cloudSessionCookie-DmbRdOcg.js (removed) 2.9 kB 🟢 -2.9 kB 🟢 -918 B 🟢 -795 B
assets/cloudSessionCookie-DNhwhseq.js (new) 2.9 kB 🔴 +2.9 kB 🔴 +912 B 🔴 +792 B
assets/BaseViewTemplate-BY-8kz4P.js (new) 2.42 kB 🔴 +2.42 kB 🔴 +1.05 kB 🔴 +944 B
assets/BaseViewTemplate-Dx0f7ofQ.js (removed) 2.42 kB 🟢 -2.42 kB 🟢 -1.04 kB 🟢 -948 B
assets/CloudRunButtonWrapper-gQY_w8fV.js (removed) 1.79 kB 🟢 -1.79 kB 🟢 -642 B 🟢 -569 B
assets/CloudRunButtonWrapper-rVSBW7hj.js (new) 1.79 kB 🔴 +1.79 kB 🔴 +641 B 🔴 +573 B
assets/cloudBadges-4X5kg0Yl.js (removed) 1.08 kB 🟢 -1.08 kB 🟢 -537 B 🟢 -480 B
assets/cloudBadges-BZsbl72r.js (new) 1.08 kB 🔴 +1.08 kB 🔴 +535 B 🔴 +499 B
assets/graphHasMissingNodes-BVv_E8rm.js (removed) 1.06 kB 🟢 -1.06 kB 🟢 -461 B 🟢 -428 B
assets/graphHasMissingNodes-DMdM8kVY.js (new) 1.06 kB 🔴 +1.06 kB 🔴 +461 B 🔴 +422 B
assets/cloudSubscription-Bkfl1NBR.js (new) 976 B 🔴 +976 B 🔴 +457 B 🔴 +397 B
assets/cloudSubscription-jgmYVGJZ.js (removed) 976 B 🟢 -976 B 🟢 -461 B 🟢 -392 B
assets/AudioPreviewPlayer-BJAeYHSH.js (removed) 191 B 🟢 -191 B 🟢 -120 B 🟢 -118 B
assets/AudioPreviewPlayer-D5kTCCnh.js (new) 191 B 🔴 +191 B 🔴 +120 B 🔴 +119 B
assets/WidgetInputNumber-CDDb-EBk.js (new) 186 B 🔴 +186 B 🔴 +119 B 🔴 +122 B
assets/WidgetInputNumber-Dqzuas2e.js (removed) 186 B 🟢 -186 B 🟢 -119 B 🟢 -121 B
assets/WidgetLegacy-BcDTBMiA.js (removed) 164 B 🟢 -164 B 🟢 -125 B 🟢 -113 B
assets/WidgetLegacy-BcurUeRO.js (new) 164 B 🔴 +164 B 🔴 +125 B 🔴 +114 B
assets/WidgetSelect-CdqC9Fpe.js (removed) 161 B 🟢 -161 B 🟢 -113 B 🟢 -104 B
assets/WidgetSelect-D1LJk3l4.js (new) 161 B 🔴 +161 B 🔴 +113 B 🔴 +107 B
assets/Load3D-Bfy5oP0W.js (new) 131 B 🔴 +131 B 🔴 +107 B 🔴 +106 B
assets/Load3D-CooGiv0A.js (removed) 131 B 🟢 -131 B 🟢 -107 B 🟢 -109 B
assets/auto-Bv9cmrEd.js 1.73 kB 1.73 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-6dIwsSNi.js 17.2 kB 17.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BahwM9ZP.js 19.3 kB 19.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BoJZgy7S.js 17 kB 17 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BQtdp20P.js 20.6 kB 20.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CEMgeOuO.js 18.5 kB 18.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CnxND6sZ.js 18 kB 18 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-coXkrooi.js 18 kB 18 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CZcHDaAg.js 18.8 kB 18.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DDPGTXy9.js 17.9 kB 17.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DsGC6118.js 17.8 kB 17.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-yZ2AjT4s.js 19.3 kB 19.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/LazyImage-B2qJgYQV.js 14.1 kB 14.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BH76kbq7.js 104 kB 104 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C-gNarDo.js 105 kB 105 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CA0dzqpC.js 124 kB 124 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CbaIObx3.js 121 kB 121 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CKH_pYcz.js 161 kB 161 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CotnVZA-.js 134 kB 134 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-D-IO_jVl.js 119 kB 119 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DLii8dI6.js 117 kB 117 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-i8aQGyai.js 145 kB 145 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Uwzs8jut.js 141 kB 141 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-vWcCEZeZ.js 117 kB 117 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Media3DTop-Bj6UL3Mt.js 2.38 kB 2.38 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-D8pQnmES.js 2 kB 2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-D0aiBzXG.js 2.34 kB 2.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-BCNtw1s2.js 2.84 kB 2.84 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/mixpanel.module-FcNs04XW.js 143 B 143 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-6qSb98D5.js 329 kB 329 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-B4G_Dl5E.js 361 kB 361 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BhmSU7DZ.js 371 kB 371 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bxky0ZDY.js 332 kB 332 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CCSKuw9P.js 400 kB 400 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Cd4f2ERd.js 358 kB 358 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CLdE8MPH.js 355 kB 355 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CqDWLi76.js 399 kB 399 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CqyprhWq.js 433 kB 433 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-D4Fo85EU.js 358 kB 358 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DF-ErmAt.js 351 kB 351 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/OBJLoader2WorkerModule-DTMpvldF.js 109 kB 109 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/preservedQueryNamespaces-BsMrb3S_.js 3.23 kB 3.23 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/previousFullPath-DZ1Jt5wB.js 838 B 838 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/rolldown-runtime-CqTjxoQm.js 1.53 kB 1.53 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Slider-BIIoltvA.js 4.21 kB 4.21 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widget-Dneex3J5.js 518 B 518 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetBoundingBox-CUDq_bgN.js 4.71 kB 4.71 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetBoundingBox-T8Ljl7oe.js 186 B 186 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-1bZGfe6O.js 2.79 kB 2.79 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetColorPicker-CE6qc5iJ.js 3.71 kB 3.71 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetGalleria-Bjqrk0m2.js 4.57 kB 4.57 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-CrN6SGuP.js 3.79 kB 3.79 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetInputText-CtnWVTX2.js 2.58 kB 2.58 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetLayoutField-zNq5xTi-.js 2.61 kB 2.61 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetMarkdown-D4Dx6Rvq.js 3.22 kB 3.22 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-DfR_ZXyS.js 1.31 kB 1.31 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetTextarea-CDG12iu3.js 3.52 kB 3.52 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetToggleSwitch-VNa5cXfN.js 3.08 kB 3.08 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 25 added / 25 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: 6

Caution

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

⚠️ Outside diff range comments (1)
src/extensions/core/groupNodeManage.ts (1)

239-256: Casting section to symbol is incorrect and type-unsafe.

The section parameter is typed as string, but lines 241 and 254 cast it to symbol via as unknown as symbol. This bypasses TypeScript's type system and is misleading since storeModification expects section: symbol but receives a string at runtime.

Either:

  1. Change storeModification to accept string | symbol for the section parameter, or
  2. Pass the actual symbol (e.g., ORDER) where appropriate and keep strings for other cases.
🤖 Fix all issues with AI agents
In `@src/extensions/core/groupNode.ts`:
- Around line 389-390: The code currently casts node.outputs?.[0] to
GroupNodeOutput | undefined because
GroupNodeWorkflowData['nodes'][number]['outputs'] is typed as unknown[]; keep
this explicit cast (const output = node.outputs?.[0] as GroupNodeOutput |
undefined) and the guarded access (const source = output?.widget?.name) to avoid
runtime errors when accessing widget, and if feasible consider narrowing the
outputs type in GroupNodeWorkflowData to GroupNodeOutput[] across the workflow
typings to remove the need for the cast.

In `@src/extensions/core/groupNodeManage.ts`:
- Around line 343-346: The override show method currently declared as
show(groupNodeType?: string | HTMLElement | HTMLElement[]) only uses the string
case (variable nodeType) which mismatches the base signature and silently
ignores DOM inputs; either narrow the signature to show(groupNodeType?: string |
undefined) to match actual usage (update the override declaration and any
dependent call sites) or add clear JSDoc on the override explaining that only
string values are supported and DOM arguments will be ignored/unsupported;
locate the override show implementation in GroupNodeManage (the show method that
defines nodeType) and apply the chosen change consistently across the class and
any interfaces/overrides.
- Around line 69-71: The getter selectedNodeInnerIndex uses three chained
non-null assertions
(this.nodeItems[this.selectedNodeIndex!]!.dataset.nodeindex!) which is fragile;
replace them with runtime guards: first verify this.nodeItems and
this.selectedNodeIndex are defined, then get const item =
this.nodeItems[this.selectedNodeIndex] and ensure item and
item.dataset.nodeindex exist before converting to number; if any check fails
either return a safe default (e.g., -1 or NaN) or throw a clear error message
indicating which value was missing so callers can handle it.
- Around line 480-494: The loops that rewrite link and external node indices
access groupNodeData.nodes[...] without bounds checks; update the link loop
(iterating over groupNodeData.links) and the external loop (iterating over
groupNodeData.external) to verify the numeric index is within 0 <= idx <
groupNodeData.nodes.length before reading groupNodeData.nodes[idx].index, and
skip or leave the value unchanged when the check fails so you don't dereference
undefined; specifically add bounds checks around the accesses to
groupNodeData.nodes[l[0] as number].index, groupNodeData.nodes[l[2] as
number].index, and groupNodeData.nodes[ext[0] as number].index.

In `@src/scripts/api.ts`:
- Around line 908-944: The current defensive check in normalizeQueuePrompt ("if
(!Array.isArray(prompt))") can hide corrupted non-array inputs; replace this
silent guard with explicit validation that surfaces the problem: inside
normalizeQueuePrompt, if prompt is not an array, throw a descriptive Error (or
at minimum log the unexpected value and throw) including the prompt's runtime
value and type so callers see the failure; keep the subsequent discriminant
logic for V1RawPrompt/CloudRawPrompt and return TaskPrompt as before.

In `@src/scripts/ui/components/asyncDialog.ts`:
- Around line 6-9: ComfyAsyncDialog's private field `#resolve` is declared with a
definite assignment assertion but can be called in close() before
show()/showModal() initializes it; initialize `#resolve` defensively (e.g., set a
no-op resolver in the field or constructor) and/or guard its invocation in
close() (check existence or use optional call) so calling close() without prior
show()/showModal() won't throw; update the ComfyAsyncDialog class (the `#resolve`
declaration, the constructor, and the close() method) to implement this
defensive initialization/guard.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0892956 and 7321c6e.

📒 Files selected for processing (9)
  • src/extensions/core/groupNode.ts
  • src/extensions/core/groupNodeManage.ts
  • src/lib/litegraph/src/LGraph.ts
  • src/lib/litegraph/src/litegraph.ts
  • src/schemas/apiSchema.ts
  • src/scripts/api.ts
  • src/scripts/changeTracker.ts
  • src/scripts/ui/components/asyncDialog.ts
  • src/scripts/ui/dialog.ts
🧰 Additional context used
📓 Path-based instructions (10)
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/lib/litegraph/src/litegraph.ts
  • src/lib/litegraph/src/LGraph.ts
  • src/schemas/apiSchema.ts
  • src/extensions/core/groupNode.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.ts
  • src/scripts/ui/dialog.ts
  • src/scripts/changeTracker.ts
  • src/scripts/ui/components/asyncDialog.ts
src/**/*.ts

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

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

src/**/*.ts: Derive component types using vue-component-type-helpers (ComponentProps, ComponentSlots) instead of separate type files
Use es-toolkit for utility functions
Minimize the surface area (exported values) of each module and composable
Favor pure functions, especially testable ones

Files:

  • src/lib/litegraph/src/litegraph.ts
  • src/lib/litegraph/src/LGraph.ts
  • src/schemas/apiSchema.ts
  • src/extensions/core/groupNode.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.ts
  • src/scripts/ui/dialog.ts
  • src/scripts/changeTracker.ts
  • src/scripts/ui/components/asyncDialog.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

src/**/*.{ts,tsx,vue}: Use separate import type statements instead of inline type in mixed imports
Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, 80-character width
Sort and group imports by plugin, run pnpm format before committing
Never use any type - use proper TypeScript types
Never use as any type assertions - fix the underlying type issue
Write code that is expressive and self-documenting - avoid unnecessary comments
Do not add or retain redundant comments - clean as you go
Avoid mutable state - prefer immutability and assignment at point of declaration
Watch out for Code Smells and refactor to avoid them

Files:

  • src/lib/litegraph/src/litegraph.ts
  • src/lib/litegraph/src/LGraph.ts
  • src/schemas/apiSchema.ts
  • src/extensions/core/groupNode.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.ts
  • src/scripts/ui/dialog.ts
  • src/scripts/changeTracker.ts
  • src/scripts/ui/components/asyncDialog.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/lib/litegraph/src/litegraph.ts
  • src/lib/litegraph/src/LGraph.ts
  • src/schemas/apiSchema.ts
  • src/extensions/core/groupNode.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.ts
  • src/scripts/ui/dialog.ts
  • src/scripts/changeTracker.ts
  • src/scripts/ui/components/asyncDialog.ts
src/lib/litegraph/**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (src/lib/litegraph/CLAUDE.md)

src/lib/litegraph/**/*.{js,ts,jsx,tsx}: Run ESLint instead of manually figuring out whitespace fixes or other trivial style concerns using the pnpm lint:fix command
Take advantage of TypedArray subarray when appropriate
The size and pos properties of Rectangle share the same array buffer (subarray); they may be used to set the rectangle's size and position
Prefer single line if syntax over adding curly braces, when the statement has a very concise expression and concise, single line statement
Do not replace &&= or ||= with = when there is no reason to do so. If you do find a reason to remove either &&= or ||=, leave a comment explaining why the removal occurred
When writing methods, prefer returning idiomatic JavaScript undefined over null

Files:

  • src/lib/litegraph/src/litegraph.ts
  • src/lib/litegraph/src/LGraph.ts
src/lib/litegraph/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/lib/litegraph/CLAUDE.md)

Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code

Files:

  • src/lib/litegraph/src/litegraph.ts
  • src/lib/litegraph/src/LGraph.ts
src/**/*.{ts,vue}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,vue}: Use ref for reactive state, computed() for derived values, and watch/watchEffect for side effects in Composition API
Avoid using ref with watch if a computed would suffice - minimize refs and derived state
Use provide/inject for dependency injection only when simpler alternatives (Store or shared composable) won't work
Leverage VueUse functions for performance-enhancing composables
Use VueUse function for useI18n in composition API for string literals

Files:

  • src/lib/litegraph/src/litegraph.ts
  • src/lib/litegraph/src/LGraph.ts
  • src/schemas/apiSchema.ts
  • src/extensions/core/groupNode.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.ts
  • src/scripts/ui/dialog.ts
  • src/scripts/changeTracker.ts
  • src/scripts/ui/components/asyncDialog.ts
src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,tsx}: Keep functions short and functional
Minimize nesting (if statements, for loops, etc.)
Use function declarations instead of function expressions when possible

Files:

  • src/lib/litegraph/src/litegraph.ts
  • src/lib/litegraph/src/LGraph.ts
  • src/schemas/apiSchema.ts
  • src/extensions/core/groupNode.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.ts
  • src/scripts/ui/dialog.ts
  • src/scripts/changeTracker.ts
  • src/scripts/ui/components/asyncDialog.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/scripts/ui/components/asyncDialog.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/scripts/ui/components/asyncDialog.ts
🧠 Learnings (14)
📓 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/**/*.{ts,tsx,vue} : Implement proper TypeScript types throughout the codebase
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Never use `as any` type assertions - fix the underlying type issue
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7894
File: src/renderer/extensions/vueNodes/widgets/components/WidgetToggleSwitch.test.ts:11-14
Timestamp: 2026-01-08T02:40:22.621Z
Learning: In the Comfy-Org/ComfyUI_frontend repository test files: When testing components, import the real type definitions from the component files instead of duplicating interface definitions in the test files. This prevents type drift and maintains consistency.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7898
File: src/composables/usePaste.test.ts:248-248
Timestamp: 2026-01-09T02:07:59.035Z
Learning: In test files at src/**/*.test.ts, when creating mock objects that partially implement an interface (e.g., LGraphNode), use `as Partial<InterfaceType> as InterfaceType` instead of `as any` or `as unknown as InterfaceType` to explicitly acknowledge the incomplete implementation while maintaining type safety.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Use separate `import type` statements instead of inline `type` in mixed imports
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/**/*.ts : Use TypeScript for type safety
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : When writing methods, prefer returning idiomatic JavaScript `undefined` over `null`
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{ts,tsx} : Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code
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/**/stores/**/*.{ts,tsx} : Use TypeScript for type safety in state management stores
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup

Applied to files:

  • src/lib/litegraph/src/litegraph.ts
  • src/lib/litegraph/src/LGraph.ts
  • src/extensions/core/groupNodeManage.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : When writing tests for subgraph-related code, always import from the barrel export at `@/lib/litegraph/src/litegraph` to avoid circular dependency issues

Applied to files:

  • src/lib/litegraph/src/litegraph.ts
  • src/extensions/core/groupNodeManage.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{ts,tsx} : Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code

Applied to files:

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

Applied to files:

  • src/lib/litegraph/src/litegraph.ts
  • src/lib/litegraph/src/LGraph.ts
  • src/schemas/apiSchema.ts
  • src/extensions/core/groupNode.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.ts
  • src/scripts/ui/dialog.ts
  • src/scripts/changeTracker.ts
  • src/scripts/ui/components/asyncDialog.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.

Applied to files:

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

Applied to files:

  • src/lib/litegraph/src/litegraph.ts
  • src/lib/litegraph/src/LGraph.ts
  • src/schemas/apiSchema.ts
  • src/extensions/core/groupNode.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.ts
  • src/scripts/ui/dialog.ts
  • src/scripts/changeTracker.ts
  • src/scripts/ui/components/asyncDialog.ts
📚 Learning: 2025-12-30T22:22:33.836Z
Learnt from: kaili-yang
Repo: Comfy-Org/ComfyUI_frontend PR: 7805
File: src/composables/useCoreCommands.ts:439-439
Timestamp: 2025-12-30T22:22:33.836Z
Learning: When accessing reactive properties from Pinia stores in TypeScript files, avoid using .value on direct property access (e.g., useStore().isOverlayExpanded). Pinia auto-wraps refs when accessed directly, returning the primitive value. The .value accessor is only needed when destructuring store properties or when using storeToRefs().

Applied to files:

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

Applied to files:

  • src/lib/litegraph/src/litegraph.ts
  • src/lib/litegraph/src/LGraph.ts
  • src/schemas/apiSchema.ts
  • src/extensions/core/groupNode.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.ts
  • src/scripts/ui/dialog.ts
  • src/scripts/changeTracker.ts
  • src/scripts/ui/components/asyncDialog.ts
📚 Learning: 2026-01-12T17:39:27.738Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7906
File: src/components/sidebar/tabs/AssetsSidebarTab.vue:545-552
Timestamp: 2026-01-12T17:39:27.738Z
Learning: In Vue/TypeScript files (src/**/*.{ts,tsx,vue}), prefer if/else statements over ternary operators when performing side effects or actions (e.g., mutating state, calling methods with side effects). Ternaries should be reserved for computing and returning values.

Applied to files:

  • src/lib/litegraph/src/litegraph.ts
  • src/lib/litegraph/src/LGraph.ts
  • src/schemas/apiSchema.ts
  • src/extensions/core/groupNode.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.ts
  • src/scripts/ui/dialog.ts
  • src/scripts/changeTracker.ts
  • src/scripts/ui/components/asyncDialog.ts
📚 Learning: 2025-12-08T01:21:41.368Z
Learnt from: jtydhr88
Repo: Comfy-Org/ComfyUI_frontend PR: 7214
File: src/i18n.ts:97-98
Timestamp: 2025-12-08T01:21:41.368Z
Learning: In src/i18n.ts and related i18n code, use `Record<string, unknown>` for locale data structures (including custom nodes i18n data) to maintain consistency with existing patterns used in localeLoaders, nodeDefsLoaders, commandsLoaders, and settingsLoaders.

Applied to files:

  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.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/**/*.{ts,tsx,vue} : Implement proper TypeScript types throughout the codebase

Applied to files:

  • src/extensions/core/groupNodeManage.ts
📚 Learning: 2026-01-09T07:29:32.501Z
Learnt from: LittleSound
Repo: Comfy-Org/ComfyUI_frontend PR: 7812
File: src/components/rightSidePanel/RightSidePanel.vue:100-132
Timestamp: 2026-01-09T07:29:32.501Z
Learning: The `findParentGroupInGraph` function in `src/components/rightSidePanel/RightSidePanel.vue` is a temporary workaround for a bug where group sub-items were not updating correctly after a page refresh. It can be removed once that underlying bug is fixed.

Applied to files:

  • src/extensions/core/groupNodeManage.ts
📚 Learning: 2026-01-08T02:40:22.621Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7894
File: src/renderer/extensions/vueNodes/widgets/components/WidgetToggleSwitch.test.ts:11-14
Timestamp: 2026-01-08T02:40:22.621Z
Learning: In the Comfy-Org/ComfyUI_frontend repository test files: When testing components, import the real type definitions from the component files instead of duplicating interface definitions in the test files. This prevents type drift and maintains consistency.

Applied to files:

  • src/scripts/ui/components/asyncDialog.ts
🧬 Code graph analysis (4)
src/extensions/core/groupNode.ts (2)
src/lib/litegraph/src/LGraph.ts (1)
  • GroupNodeWorkflowData (110-122)
src/lib/litegraph/src/litegraph.ts (1)
  • GroupNodeWorkflowData (108-108)
src/scripts/api.ts (2)
src/schemas/apiSchema.ts (6)
  • QueueIndex (300-300)
  • PromptId (16-16)
  • PromptInputs (301-301)
  • ExtraData (302-302)
  • OutputsToExecute (303-303)
  • TaskPrompt (295-295)
src/stores/queueStore.ts (1)
  • extraData (299-301)
src/extensions/core/groupNodeManage.ts (3)
src/lib/litegraph/src/litegraph.ts (4)
  • LGraphNodeConstructor (57-76)
  • LGraphNode (116-116)
  • GroupNodeWorkflowData (108-108)
  • GroupNodeConfigEntry (107-107)
src/lib/litegraph/src/LGraphNode.ts (10)
  • LGraphNode (213-215)
  • LGraphNode (225-4196)
  • LGraphNode (746-754)
  • LGraphNode (756-762)
  • widgets (4118-4154)
  • inputs (3310-3314)
  • outputs (3319-3321)
  • slot (3920-3935)
  • slot (3957-3964)
  • slot (3966-3968)
src/constants/groupNodeConstants.ts (2)
  • PREFIX (7-7)
  • SEPARATOR (8-8)
src/scripts/changeTracker.ts (1)
src/schemas/apiSchema.ts (1)
  • ExecutedWsMessage (156-156)
⏰ 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). (12)
  • GitHub Check: playwright-tests-chromium-sharded (5, 8)
  • GitHub Check: playwright-tests-chromium-sharded (4, 8)
  • GitHub Check: playwright-tests-chromium-sharded (2, 8)
  • GitHub Check: playwright-tests-chromium-sharded (8, 8)
  • GitHub Check: playwright-tests (mobile-chrome)
  • GitHub Check: playwright-tests-chromium-sharded (1, 8)
  • GitHub Check: playwright-tests (chromium-0.5x)
  • GitHub Check: playwright-tests (chromium-2x)
  • GitHub Check: deploy-and-comment
  • GitHub Check: collect
  • GitHub Check: test
  • GitHub Check: lint-and-format
🔇 Additional comments (16)
src/lib/litegraph/src/litegraph.ts (1)

107-108: Type exports align with PR goals.

Clean addition of GroupNodeConfigEntry and GroupNodeWorkflowData to the public API surface. This follows the existing pattern of type re-exports from LGraph and supports the broader typing improvements in groupNode.ts and groupNodeManage.ts.

src/lib/litegraph/src/LGraph.ts (1)

105-122: Well-structured type definitions for group node configuration.

The GroupNodeConfigEntry interface and extended GroupNodeWorkflowData provide proper typing that replaces the previous Record<number, unknown>. The structure aligns well with the NodeConfigEntry interface in groupNode.ts and supports the type narrowing needed throughout the group node feature.

src/scripts/ui/dialog.ts (3)

7-7: Definite assignment assertion is appropriate here.

The textElement is assigned synchronously via the $el callback at line 15: $el('p', { $: (p) => (this.textElement = p) }). Since $el executes the callback during element creation before the constructor returns, the assignment is guaranteed.


10-10: Explicit button type parameter improves type safety.

The HTMLButtonElement[] | null type properly constrains the buttons parameter and aligns with the expected usage in createButtons().


37-46: Method signature and implementation correctly handle all input types.

The union type string | HTMLElement | HTMLElement[] properly covers all usage patterns, and the implementation correctly differentiates between string (using innerHTML) and element inputs (using replaceChildren).

src/extensions/core/groupNode.ts (1)

370-372: Union type signature enables broader input compatibility.

The updated signature GroupNodeData | GroupNodeWorkflowData['nodes'][number] allows this method to accept nodes from both the internal representation and the serialized workflow data format.

src/scripts/ui/components/asyncDialog.ts (3)

4-4: Clean generic action type definition.

The DialogAction<T> type elegantly supports both simple string actions and typed value objects, enabling type-safe dialog results.


11-23: Constructor correctly normalizes actions to typed objects.

The normalization of string actions to { text: opt } objects and the resolution with (action.value ?? action.text) as T properly handles both action formats.


56-73: Well-typed static prompt factory method.

The generic static prompt<U> method correctly instantiates ComfyAsyncDialog<U> with the provided actions, maintaining type safety throughout the dialog lifecycle.

src/extensions/core/groupNodeManage.ts (1)

536-538: Safe optional chaining for recreate method.

Good use of optional chaining (node.recreate?.()) to safely call the method only if it exists.

src/schemas/apiSchema.ts (1)

299-304: Clean type exports for queue response handling.

The new exports (QueueIndex, PromptInputs, ExtraData, OutputsToExecute) are properly inferred from existing Zod schemas and follow the established pattern in this file. This enables type-safe handling of raw queue responses in api.ts.

src/scripts/changeTracker.ts (2)

44-44: Good use of indexed access type for nodeOutputs.

Using ExecutedWsMessage['output'] ensures the type stays in sync with the schema definition. This is preferable to duplicating the type structure.


305-316: No action needed—callback signature is correct.

The callback type (v: string) => void is correct and matches the original LGraphCanvas.prompt implementation in src/lib/litegraph/src/LGraphCanvas.ts. HTML dialog inputs always return strings, and the codebase pattern (as seen in pnginfo.ts) is to convert strings to numbers at the call site using +v or Number(v) when needed. The value: string | number parameter represents the initial display value, not the callback return type.

src/scripts/api.ts (3)

1001-1012: Improved typing for #postItem body parameter.

Using Record<string, unknown> instead of any for the optional body parameter maintains flexibility while providing basic type safety.


1122-1141: Flexible data parameter typing for storeUserData.

The union type BodyInit | Record<string, unknown> | null correctly handles both raw body data and objects that need serialization. The conditional serialization on line 1141 properly handles the stringify option.


1324-1326: Correct return type for i18n data.

Using Record<string, unknown> aligns with the established pattern for locale data structures in this codebase. Based on learnings, this is the preferred type for custom nodes i18n data.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines +389 to +390
const output = node.outputs?.[0] as GroupNodeOutput | undefined
const source = output?.widget?.name
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

Type assertion is necessary due to unknown[] in workflow data.

Since GroupNodeWorkflowData['nodes'][number]['outputs'] is typed as unknown[], the cast to GroupNodeOutput | undefined is needed to access the widget property. The guarded access pattern (output?.widget?.name) is safer than the previous direct chain access.

Consider whether the outputs type in GroupNodeWorkflowData could be narrowed to GroupNodeOutput[] to eliminate this cast, though that may require broader changes.

🤖 Prompt for AI Agents
In `@src/extensions/core/groupNode.ts` around lines 389 - 390, The code currently
casts node.outputs?.[0] to GroupNodeOutput | undefined because
GroupNodeWorkflowData['nodes'][number]['outputs'] is typed as unknown[]; keep
this explicit cast (const output = node.outputs?.[0] as GroupNodeOutput |
undefined) and the guarded access (const source = output?.widget?.name) to avoid
runtime errors when accessing widget, and if feasible consider narrowing the
outputs type in GroupNodeWorkflowData to GroupNodeOutput[] across the workflow
typings to remove the need for the cast.

groupNodeManage.ts:
- Add bounds checking before accessing node indices in link/external loops
- Fix selectedNodeInnerIndex getter with proper runtime guards
- Change storeModification section param to string | symbol, removing casts

asyncDialog.ts:
- Initialize #resolve with no-op function for defensive safety

api.ts:
- Add warning log for unexpected non-array queue prompts
@coderabbitai coderabbitai bot requested a review from jtydhr88 January 16, 2026 02:56
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

Caution

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

⚠️ Outside diff range comments (3)
src/scripts/ui/components/asyncDialog.ts (1)

25-48: Consider using { once: true } to avoid redundant close calls.

The event listener setup can cause close() to be invoked twice: once explicitly (with the result) and once from the 'close' event (with null). While Promise resolution is idempotent making this benign, using { once: true } would be cleaner and prevent listener accumulation if the same dialog instance is reused.

♻️ Optional: Add once option to event listeners
   override show(html: string | HTMLElement | HTMLElement[]): Promise<T | null> {
-    this.element.addEventListener('close', () => {
+    this.element.addEventListener('close', () => {
       this.close()
-    })
+    }, { once: true })

     super.show(html)
     ...
   }

   showModal(html: string | HTMLElement | HTMLElement[]): Promise<T | null> {
-    this.element.addEventListener('close', () => {
+    this.element.addEventListener('close', () => {
       this.close()
-    })
+    }, { once: true })
src/extensions/core/groupNodeManage.ts (1)

158-167: Guard empty group nodes before calling changeNode(0).

If a group has zero nodes, changeNode(0) will dereference this.nodeItems[0] and throw. Short-circuit the reset path to avoid a hard crash and clear the pages instead.

🐛 Proposed fix
     if (reset) {
       this.selectedNodeIndex = null
+      if (nodes.length === 0) {
+        this.widgetsPage.replaceChildren()
+        this.inputsPage.replaceChildren()
+        this.outputsPage.replaceChildren()
+        return
+      }
       this.changeNode(0)
     } else {
src/scripts/api.ts (1)

1125-1145: Auto-detect non-stringifiable BodyInit types to prevent silent data corruption.

Passing FormData, Blob, or URLSearchParams with the default stringify: true silently corrupts them into empty objects {}. The suggested fix auto-detects these types and only stringifies plain objects/arrays, while still allowing explicit override via the stringify option.

🧩 Suggested hardening
-    const resp = await this.fetchApi(
+    const shouldStringify =
+      options?.stringify ??
+      !(
+        data instanceof FormData ||
+        data instanceof Blob ||
+        data instanceof URLSearchParams
+      )
+    const resp = await this.fetchApi(
       `/userdata/${encodeURIComponent(file)}?overwrite=${options.overwrite}&full_info=${options.full_info}`,
       {
         method: 'POST',
-        body: options?.stringify ? JSON.stringify(data) : (data as BodyInit),
+        body: shouldStringify ? JSON.stringify(data) : (data as BodyInit),
         ...options
       }
     )
🤖 Fix all issues with AI agents
In `@src/extensions/core/groupNodeManage.ts`:
- Around line 293-310: The method currently maps `items` to `elements` (using
`this.getEditElement`) and filters out nulls, but then returns `!!items.length`,
which can be true even if all entries were filtered out; change the return to
reflect the filtered `elements` array instead (e.g., return whether
`elements.length` is non-zero) so the Inputs tab only stays active when there
are rendered elements; keep the existing
`this.inputsPage.replaceChildren(...elements)` and the `filter((el): el is
HTMLDivElement => el !== null)` safeguard.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7321c6e and c1d763a.

📒 Files selected for processing (3)
  • src/extensions/core/groupNodeManage.ts
  • src/scripts/api.ts
  • src/scripts/ui/components/asyncDialog.ts
🧰 Additional context used
📓 Path-based instructions (8)
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/scripts/ui/components/asyncDialog.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.ts
src/**/*.ts

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

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

src/**/*.ts: Derive component types using vue-component-type-helpers (ComponentProps, ComponentSlots) instead of separate type files
Use es-toolkit for utility functions
Minimize the surface area (exported values) of each module and composable
Favor pure functions, especially testable ones

Files:

  • src/scripts/ui/components/asyncDialog.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.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

src/**/*.{ts,tsx,vue}: Use separate import type statements instead of inline type in mixed imports
Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, 80-character width
Sort and group imports by plugin, run pnpm format before committing
Never use any type - use proper TypeScript types
Never use as any type assertions - fix the underlying type issue
Write code that is expressive and self-documenting - avoid unnecessary comments
Do not add or retain redundant comments - clean as you go
Avoid mutable state - prefer immutability and assignment at point of declaration
Watch out for Code Smells and refactor to avoid them

Files:

  • src/scripts/ui/components/asyncDialog.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.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/scripts/ui/components/asyncDialog.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/scripts/ui/components/asyncDialog.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.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/scripts/ui/components/asyncDialog.ts
src/**/*.{ts,vue}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,vue}: Use ref for reactive state, computed() for derived values, and watch/watchEffect for side effects in Composition API
Avoid using ref with watch if a computed would suffice - minimize refs and derived state
Use provide/inject for dependency injection only when simpler alternatives (Store or shared composable) won't work
Leverage VueUse functions for performance-enhancing composables
Use VueUse function for useI18n in composition API for string literals

Files:

  • src/scripts/ui/components/asyncDialog.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.ts
src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,tsx}: Keep functions short and functional
Minimize nesting (if statements, for loops, etc.)
Use function declarations instead of function expressions when possible

Files:

  • src/scripts/ui/components/asyncDialog.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.ts
🧠 Learnings (13)
📓 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/**/*.{ts,tsx,vue} : Implement proper TypeScript types throughout the codebase
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Never use `as any` type assertions - fix the underlying type issue
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7898
File: src/composables/usePaste.test.ts:248-248
Timestamp: 2026-01-09T02:07:59.035Z
Learning: In test files at src/**/*.test.ts, when creating mock objects that partially implement an interface (e.g., LGraphNode), use `as Partial<InterfaceType> as InterfaceType` instead of `as any` or `as unknown as InterfaceType` to explicitly acknowledge the incomplete implementation while maintaining type safety.
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/**/*.ts : Use TypeScript for type safety
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{ts,tsx} : Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7894
File: src/renderer/extensions/vueNodes/widgets/components/WidgetToggleSwitch.test.ts:11-14
Timestamp: 2026-01-08T02:40:22.621Z
Learning: In the Comfy-Org/ComfyUI_frontend repository test files: When testing components, import the real type definitions from the component files instead of duplicating interface definitions in the test files. This prevents type drift and maintains consistency.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Use separate `import type` statements instead of inline `type` in mixed imports
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.

Applied to files:

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

Applied to files:

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

Applied to files:

  • src/scripts/ui/components/asyncDialog.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.ts
📚 Learning: 2025-12-30T22:22:33.836Z
Learnt from: kaili-yang
Repo: Comfy-Org/ComfyUI_frontend PR: 7805
File: src/composables/useCoreCommands.ts:439-439
Timestamp: 2025-12-30T22:22:33.836Z
Learning: When accessing reactive properties from Pinia stores in TypeScript files, avoid using .value on direct property access (e.g., useStore().isOverlayExpanded). Pinia auto-wraps refs when accessed directly, returning the primitive value. The .value accessor is only needed when destructuring store properties or when using storeToRefs().

Applied to files:

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

Applied to files:

  • src/scripts/ui/components/asyncDialog.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.ts
📚 Learning: 2026-01-12T17:39:27.738Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7906
File: src/components/sidebar/tabs/AssetsSidebarTab.vue:545-552
Timestamp: 2026-01-12T17:39:27.738Z
Learning: In Vue/TypeScript files (src/**/*.{ts,tsx,vue}), prefer if/else statements over ternary operators when performing side effects or actions (e.g., mutating state, calling methods with side effects). Ternaries should be reserved for computing and returning values.

Applied to files:

  • src/scripts/ui/components/asyncDialog.ts
  • src/scripts/api.ts
  • src/extensions/core/groupNodeManage.ts
📚 Learning: 2025-12-08T01:21:41.368Z
Learnt from: jtydhr88
Repo: Comfy-Org/ComfyUI_frontend PR: 7214
File: src/i18n.ts:97-98
Timestamp: 2025-12-08T01:21:41.368Z
Learning: In src/i18n.ts and related i18n code, use `Record<string, unknown>` for locale data structures (including custom nodes i18n data) to maintain consistency with existing patterns used in localeLoaders, nodeDefsLoaders, commandsLoaders, and settingsLoaders.

Applied to files:

  • src/scripts/api.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{ts,tsx} : Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code

Applied to files:

  • src/extensions/core/groupNodeManage.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Do not replace `&&=` or `||=` with `=` when there is no reason to do so. If you do find a reason to remove either `&&=` or `||=`, leave a comment explaining why the removal occurred

Applied to files:

  • src/extensions/core/groupNodeManage.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup

Applied to files:

  • src/extensions/core/groupNodeManage.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : When writing tests for subgraph-related code, always import from the barrel export at `@/lib/litegraph/src/litegraph` to avoid circular dependency issues

Applied to files:

  • src/extensions/core/groupNodeManage.ts
📚 Learning: 2026-01-09T07:29:32.501Z
Learnt from: LittleSound
Repo: Comfy-Org/ComfyUI_frontend PR: 7812
File: src/components/rightSidePanel/RightSidePanel.vue:100-132
Timestamp: 2026-01-09T07:29:32.501Z
Learning: The `findParentGroupInGraph` function in `src/components/rightSidePanel/RightSidePanel.vue` is a temporary workaround for a bug where group sub-items were not updating correctly after a page refresh. It can be removed once that underlying bug is fixed.

Applied to files:

  • src/extensions/core/groupNodeManage.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: test
  • GitHub Check: setup
  • GitHub Check: lint-and-format
  • GitHub Check: collect
🔇 Additional comments (8)
src/scripts/ui/components/asyncDialog.ts (4)

4-9: Well-implemented generic dialog with defensive initialization.

The DialogAction<T> type alias provides good flexibility, and the defensive initialization of #resolve with a no-op function addresses the edge case where close() could be called before show()/showModal().


11-23: Constructor correctly normalizes actions with appropriate type handling.

The normalization of string actions to objects on line 15 is clean. The type assertion on line 19 is necessary because TypeScript cannot infer that the fallback to action.text is compatible with T when value is undefined—this is a reasonable trade-off for the flexible API design.


50-54: Properly typed close method with safe default.

The result: T | null = null parameter maintains type safety while providing a sensible default. The method correctly propagates the result through the resolver.


56-73: Clean static factory with proper generics and cleanup.

The static prompt method correctly uses a separate generic parameter U for flexibility, creates a properly typed dialog instance, and ensures cleanup by removing the element after resolution.

src/extensions/core/groupNodeManage.ts (2)

20-37: Typed merge helper looks good.

The stricter Record-based typing improves safety without changing behavior.


69-74: Good defensive guards for selected node access.

Clear runtime checks replace fragile non-null assertions.

src/scripts/api.ts (2)

908-947: Queue prompt normalization is clear and resilient.

The tuple union plus warning for unexpected shapes makes the mapping easier to reason about.


1327-1328: Return type for custom nodes i18n is consistent.

Using Record<string, unknown> keeps the locale payload flexible.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link
Contributor

@christian-byrne christian-byrne left a comment

Choose a reason for hiding this comment

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

Can we pause on this one until #7171 is in? Major refactor to related code I believe

* @returns The custom nodes i18n data
*/
async getCustomNodesI18n(): Promise<Record<string, any>> {
async getCustomNodesI18n(): Promise<Record<string, unknown>> {
Copy link
Contributor

Choose a reason for hiding this comment

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

We should have a schema for this, or define one otherwise

async storeUserData(
file: string,
data: any,
data: BodyInit | Record<string, unknown> | null,
Copy link
Contributor

Choose a reason for hiding this comment

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

May as well use unknown here?

- Add zCustomNodesI18n schema and CustomNodesI18n type to apiSchema.ts
- Update getCustomNodesI18n to use new CustomNodesI18n type
- Simplify storeUserData data parameter from BodyInit | Record<string, unknown> | null to unknown
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

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

⚠️ Outside diff range comments (1)
src/scripts/api.ts (1)

1076-1096: Guard non-stringify payloads to avoid invalid BodyInit.
The unknownBodyInit cast can mask invalid payloads when stringify is false; consider validating before request to fail fast and improve error clarity.

♻️ Proposed refactor
   async storeUserData(
     file: string,
     data: unknown,
     options: RequestInit & {
       overwrite?: boolean
       stringify?: boolean
       throwOnError?: boolean
       full_info?: boolean
     } = {
       overwrite: true,
       stringify: true,
       throwOnError: true,
       full_info: false
     }
   ): Promise<Response> {
+    const isBodyInit = (value: unknown): value is BodyInit =>
+      typeof value === 'string' ||
+      value instanceof Blob ||
+      value instanceof ArrayBuffer ||
+      ArrayBuffer.isView(value) ||
+      value instanceof FormData ||
+      value instanceof URLSearchParams
+
+    let body: BodyInit | undefined
+    if (options?.stringify === false) {
+      if (data != null && !isBodyInit(data)) {
+        throw new Error(
+          'storeUserData: non-stringify payload must be a valid BodyInit'
+        )
+      }
+      body = data ?? undefined
+    } else {
+      body = JSON.stringify(data)
+    }
+
     const resp = await this.fetchApi(
       `/userdata/${encodeURIComponent(file)}?overwrite=${options.overwrite}&full_info=${options.full_info}`,
       {
         method: 'POST',
-        body: options?.stringify ? JSON.stringify(data) : (data as BodyInit),
+        body,
         ...options
       }
     )

if (type === 'COMBO') {
// Use the array items
const source = node.outputs?.[0]?.widget?.name
const output = node.outputs?.[0] as GroupNodeOutput | undefined
Copy link
Contributor

Choose a reason for hiding this comment

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

Using type assertions isn't much safer than any

Myestery added a commit that referenced this pull request Jan 21, 2026
Removed all 5 any types and replaced with proper TypeScript types.

Changes:
- Replaced any with Partial<Load3d> for mock objects
- Used ReturnType<typeof useLoad3dService> for service mocks
- Used ReturnType<typeof useToastStore> for store mocks
- Used Load3d['sceneManager'] etc. for nested manager types
- Minimized type assertions to 2 necessary as unknown casts

Remaining type assertions:
- mockNode: Partial LGraphNode mock (constructor incompatible)
- sceneManager: Simplified gridHelper mock (vs 82+ Three.js properties)

Both mocks accurately reflect implementation usage patterns.

All tests passing (33/33), 0 typecheck errors.

Part of #8092
Myestery added a commit that referenced this pull request Jan 21, 2026
Replaced any with ReturnType<typeof useToastStore> for mockToastStore.

All tests passing (13/13), 0 typecheck errors.

Part of #8092
Myestery added a commit that referenced this pull request Jan 21, 2026
Replaced all 3 any types with unknown for generic request parameters.

All tests passing (11/11), 0 typecheck errors.

Part of #8092
Myestery added a commit that referenced this pull request Jan 21, 2026
Removed all 11 any types and replaced with proper TypeScript types.

Changes:
- Typed executionStore mock with proper structure
- Typed workflowStore.activeWorkflow based on actual usage
- Replaced (settingStore.get as any) with vi.mocked(settingStore.get)
- Fixed vi.fn() signature to accept key parameter

All tests passing (8/9, 1 skipped), 0 typecheck errors.

Part of #8092
Myestery added a commit that referenced this pull request Jan 21, 2026
Removed all 3 any types and replaced with proper TypeScript types.

Changes:
- Replaced as any with Partial<ReturnType<typeof useSettingStore>>
- Used as unknown as for partial mock subgraph (114+ missing properties)

All tests passing (3/3), 0 typecheck errors.

Part of #8092
Myestery added a commit that referenced this pull request Jan 21, 2026
Removed all 7 any types by removing unnecessary type assertions.

TypeScript can infer return types correctly for mockImplementation
callbacks returning literal values.

All tests passing (8/8), 0 typecheck errors.

Part of #8092
Myestery added a commit that referenced this pull request Jan 21, 2026
Removed all 3 any types and replaced with proper TypeScript types.

Changes:
- Replaced as any with as unknown as for partial mockCanvasStore
- Removed as any from null assignments (TypeScript infers correctly)

All tests passing (7/7), 0 typecheck errors.

Part of #8092
Myestery added a commit that referenced this pull request Jan 21, 2026
Replaced any with proper type for mockCanvas.

Changes:
- Typed mockCanvas as { selectedItems: Set<Positionable> }
- Added as unknown as Positionable casts for MockNode instances
- Added as unknown as cast for getCanvas mock return value

All tests passing (18/18), 0 typecheck errors.

Part of #8092
Myestery added a commit that referenced this pull request Jan 21, 2026
Removed all 14 any types from Pinia store mocks.

Changes:
- Replaced as any with as unknown as ReturnType<typeof store> pattern
- Removed as any from $state and _p properties (empty objects)

All tests passing (6/6), 0 typecheck errors.

Part of #8092
Myestery added a commit that referenced this pull request Jan 21, 2026
Replaced any with Record<string, unknown> for mountComponent props parameter.
Uses as unknown as cast to allow testing edge cases with invalid prop types.

All tests passing (11/11), 0 typecheck errors.

Part of #8092
godwiniheuwa pushed a commit to godwiniheuwa/ComfyUI_frontend that referenced this pull request Jan 22, 2026
…#8092)

## Summary

Continues the TypeScript strict typing improvements by removing `any`
types from core scripts and dialog components.

### Changes

**api.ts (6 instances)**
- Define `V1RawPrompt` and `CloudRawPrompt` tuple types for queue prompt
formats
- Export `QueueIndex`, `PromptInputs`, `ExtraData`, `OutputsToExecute`
from apiSchema
- Type `#postItem` body, `storeUserData` data, and `getCustomNodesI18n`
return

**groupNodeManage.ts (all @ts-expect-error removed)**
- Add `GroupNodeConfigEntry` interface to LGraph.ts
- Extend `GroupNodeWorkflowData` with `title`, `widgets_values`, and
typed `config`
- Type all class properties with definite assignment assertions
- Type all method parameters and event handlers
- Fix save button callback with proper generic types for node ordering

**changeTracker.ts (4 instances)**
- Type `nodeOutputs` as `Record<string, ExecutedWsMessage['output']>`
- Type prompt callback with `CanvasPointerEvent` and proper value types

**asyncDialog.ts and dialog.ts**
- Make `ComfyAsyncDialog` generic with `DialogAction<T>` type
- Type `ComfyDialog` constructor and show method parameters
- Update `ManageGroupDialog.show` signature to match base class

## Test plan
- [x] `pnpm typecheck` passes
- [x] `pnpm lint` passes
- [x] Sourcegraph checks for external usage

---
Related: Continues from Comfy-Org#8083

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8092-Road-to-No-Explicit-Any-Part-7-Scripts-and-Dialog-Cleanup-2ea6d73d365081fbb890e73646a6ad16)
by [Unito](https://www.unito.io)
Myestery added a commit that referenced this pull request Jan 29, 2026
## Summary

This PR removes unsafe type assertions ("as unknown as Type") from test
files and improves type safety across the codebase.

### Key Changes

#### Type Safety Improvements
- Removed all instances of "as unknown as" patterns from test files
- Used proper factory functions from litegraphTestUtils instead of
custom mocks
- Made incomplete mocks explicit using Partial<T> types
- Fixed DialogStore mocking with proper interface exports
- Improved type safety with satisfies operator where applicable

#### App Parameter Removal
- **Removed the unused `app` parameter from all ComfyExtension interface
methods**
- The app parameter was always undefined at runtime as it was never
passed from invokeExtensions
- Affected methods: init, setup, addCustomNodeDefs,
beforeRegisterNodeDef, beforeRegisterVueAppNodeDefs,
registerCustomNodes, loadedGraphNode, nodeCreated, beforeConfigureGraph,
afterConfigureGraph

##### Breaking Change Analysis
Verified via Sourcegraph that this is NOT a breaking change:
- Searched all 10 affected methods across GitHub repositories
- Only one external repository
([drawthingsai/draw-things-comfyui](https://github.com/drawthingsai/draw-things-comfyui))
declares the app parameter in their extension methods
- That repository never actually uses the app parameter (just declares
it in the function signature)
- All other repositories already omit the app parameter
- Search queries used:
- [init method
search](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/.*+lang:typescript+%22init%28app%22+-repo:Comfy-Org/ComfyUI_frontend&patternType=standard)
- [setup method
search](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/.*+lang:typescript+%22setup%28app%22+-repo:Comfy-Org/ComfyUI_frontend&patternType=standard)
  - Similar searches for all 10 methods confirmed no usage

### Files Changed

Test files:
-
src/components/settings/widgets/__tests__/WidgetInputNumberInput.test.ts
- src/services/keybindingService.escape.test.ts  
- src/services/keybindingService.forwarding.test.ts
- src/utils/__tests__/newUserService.test.ts →
src/utils/__tests__/useNewUserService.test.ts
- src/services/jobOutputCache.test.ts
-
src/renderer/extensions/vueNodes/widgets/composables/useRemoteWidget.test.ts
-
src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.test.ts
-
src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.test.ts

Source files:
- src/types/comfy.ts - Removed app parameter from ComfyExtension
interface
- src/services/extensionService.ts - Improved type safety with
FunctionPropertyNames helper
- src/scripts/metadata/isobmff.ts - Fixed extractJson return type per
review
- src/extensions/core/*.ts - Updated extension implementations
- src/scripts/app.ts - Updated app initialization

### Testing
- All existing tests pass
- Type checking passes  
- ESLint/oxlint checks pass
- No breaking changes for external repositories

Part of the "Road to No Explicit Any" initiative.

### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344 (this PR)
christian-byrne pushed a commit that referenced this pull request Jan 30, 2026
## Summary

This PR removes unsafe type assertions ("as unknown as Type") from test
files and improves type safety across the codebase.

### Key Changes

#### Type Safety Improvements
- Removed all instances of "as unknown as" patterns from test files
- Used proper factory functions from litegraphTestUtils instead of
custom mocks
- Made incomplete mocks explicit using Partial<T> types
- Fixed DialogStore mocking with proper interface exports
- Improved type safety with satisfies operator where applicable

#### App Parameter Removal
- **Removed the unused `app` parameter from all ComfyExtension interface
methods**
- The app parameter was always undefined at runtime as it was never
passed from invokeExtensions
- Affected methods: init, setup, addCustomNodeDefs,
beforeRegisterNodeDef, beforeRegisterVueAppNodeDefs,
registerCustomNodes, loadedGraphNode, nodeCreated, beforeConfigureGraph,
afterConfigureGraph

##### Breaking Change Analysis
Verified via Sourcegraph that this is NOT a breaking change:
- Searched all 10 affected methods across GitHub repositories
- Only one external repository
([drawthingsai/draw-things-comfyui](https://github.com/drawthingsai/draw-things-comfyui))
declares the app parameter in their extension methods
- That repository never actually uses the app parameter (just declares
it in the function signature)
- All other repositories already omit the app parameter
- Search queries used:
- [init method
search](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/.*+lang:typescript+%22init%28app%22+-repo:Comfy-Org/ComfyUI_frontend&patternType=standard)
- [setup method
search](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/.*+lang:typescript+%22setup%28app%22+-repo:Comfy-Org/ComfyUI_frontend&patternType=standard)
  - Similar searches for all 10 methods confirmed no usage

### Files Changed

Test files:
-
src/components/settings/widgets/__tests__/WidgetInputNumberInput.test.ts
- src/services/keybindingService.escape.test.ts  
- src/services/keybindingService.forwarding.test.ts
- src/utils/__tests__/newUserService.test.ts →
src/utils/__tests__/useNewUserService.test.ts
- src/services/jobOutputCache.test.ts
-
src/renderer/extensions/vueNodes/widgets/composables/useRemoteWidget.test.ts
-
src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.test.ts
-
src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.test.ts

Source files:
- src/types/comfy.ts - Removed app parameter from ComfyExtension
interface
- src/services/extensionService.ts - Improved type safety with
FunctionPropertyNames helper
- src/scripts/metadata/isobmff.ts - Fixed extractJson return type per
review
- src/extensions/core/*.ts - Updated extension implementations
- src/scripts/app.ts - Updated app initialization

### Testing
- All existing tests pass
- Type checking passes  
- ESLint/oxlint checks pass
- No breaking changes for external repositories

Part of the "Road to No Explicit Any" initiative.

### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344 (this PR)
Myestery added a commit that referenced this pull request Jan 30, 2026
## Summary

This PR removes unsafe type assertions ("as unknown as Type") from test
files and improves type safety across the codebase.

### Key Changes

#### Type Safety Improvements
- Removed improper `as unknown as Type` patterns from 17 test files in
Group 8 part 7
- Replaced with proper TypeScript patterns using factory functions and
Mock types
- Fixed createTestingPinia usage in test files (was incorrectly using
createPinia)
- Fixed vi.hoisted pattern for mockSetDirty in viewport tests  
- Fixed vi.doMock lint issues with vi.mock and vi.hoisted pattern
- Retained necessary `as unknown as` casts only for complex mock objects
where direct type assertions would fail

### Files Changed

Test files (Group 8 part 7 - services, stores, utils):
- src/services/nodeOrganizationService.test.ts
- src/services/providers/algoliaSearchProvider.test.ts
- src/services/providers/registrySearchProvider.test.ts
- src/stores/comfyRegistryStore.test.ts
- src/stores/domWidgetStore.test.ts
- src/stores/executionStore.test.ts
- src/stores/firebaseAuthStore.test.ts
- src/stores/modelToNodeStore.test.ts
- src/stores/queueStore.test.ts
- src/stores/subgraphNavigationStore.test.ts
- src/stores/subgraphNavigationStore.viewport.test.ts
- src/stores/subgraphStore.test.ts
- src/stores/systemStatsStore.test.ts
- src/stores/workspace/nodeHelpStore.test.ts
- src/utils/colorUtil.test.ts
- src/utils/executableGroupNodeChildDTO.test.ts

Source files:
- src/stores/modelStore.ts - Improved type handling

### Testing
- All TypeScript type checking passes (`pnpm typecheck`)
- All affected test files pass (`pnpm test:unit`)
- Linting passes without errors (`pnpm lint`)
- Code formatting applied (`pnpm format`)

Part of the "Road to No Explicit Any" initiative, cleaning up type
casting issues from branch `fix/remove-any-types-part8`.

### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459 (this PR)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8459-Road-to-No-explicit-any-Group-8-part-7-test-files-2f86d73d36508114ad28d82e72a3a5e9)
by [Unito](https://www.unito.io)
snomiao pushed a commit that referenced this pull request Jan 30, 2026
## Summary

This PR removes unsafe type assertions ("as unknown as Type") from test
files and improves type safety across the codebase.

### Key Changes

#### Type Safety Improvements
- Removed improper `as unknown as Type` patterns from 17 test files in
Group 8 part 7
- Replaced with proper TypeScript patterns using factory functions and
Mock types
- Fixed createTestingPinia usage in test files (was incorrectly using
createPinia)
- Fixed vi.hoisted pattern for mockSetDirty in viewport tests  
- Fixed vi.doMock lint issues with vi.mock and vi.hoisted pattern
- Retained necessary `as unknown as` casts only for complex mock objects
where direct type assertions would fail

### Files Changed

Test files (Group 8 part 7 - services, stores, utils):
- src/services/nodeOrganizationService.test.ts
- src/services/providers/algoliaSearchProvider.test.ts
- src/services/providers/registrySearchProvider.test.ts
- src/stores/comfyRegistryStore.test.ts
- src/stores/domWidgetStore.test.ts
- src/stores/executionStore.test.ts
- src/stores/firebaseAuthStore.test.ts
- src/stores/modelToNodeStore.test.ts
- src/stores/queueStore.test.ts
- src/stores/subgraphNavigationStore.test.ts
- src/stores/subgraphNavigationStore.viewport.test.ts
- src/stores/subgraphStore.test.ts
- src/stores/systemStatsStore.test.ts
- src/stores/workspace/nodeHelpStore.test.ts
- src/utils/colorUtil.test.ts
- src/utils/executableGroupNodeChildDTO.test.ts

Source files:
- src/stores/modelStore.ts - Improved type handling

### Testing
- All TypeScript type checking passes (`pnpm typecheck`)
- All affected test files pass (`pnpm test:unit`)
- Linting passes without errors (`pnpm lint`)
- Code formatting applied (`pnpm format`)

Part of the "Road to No Explicit Any" initiative, cleaning up type
casting issues from branch `fix/remove-any-types-part8`.

### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459 (this PR)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8459-Road-to-No-explicit-any-Group-8-part-7-test-files-2f86d73d36508114ad28d82e72a3a5e9)
by [Unito](https://www.unito.io)
Myestery added a commit that referenced this pull request Jan 30, 2026
## Summary

This PR removes unsafe type assertions ("as unknown as Type") from test
files and improves type safety across the codebase.

### Key Changes

#### Type Safety Improvements
- Removed improper `as unknown as Type` patterns from test files in
Group 8 part 8
- Replaced with proper TypeScript patterns using Pinia store testing
patterns
- Fixed parameter shadowing issue in typeGuardUtil.test.ts (constructor
→ nodeConstructor)
- Fixed stale mock values in useConflictDetection.test.ts using getter
functions
- Refactored useManagerState tests to follow proper Pinia store testing
patterns with createTestingPinia

### Files Changed

Test files (Group 8 part 8 - utils and manager composables):
- src/utils/typeGuardUtil.test.ts - Fixed parameter shadowing
- src/utils/graphTraversalUtil.test.ts - Removed unsafe type assertions
- src/utils/litegraphUtil.test.ts - Improved type handling
- src/workbench/extensions/manager/composables/useManagerState.test.ts -
Complete rewrite using Pinia testing patterns
-
src/workbench/extensions/manager/composables/useConflictDetection.test.ts
- Fixed stale mock values with getters
- src/workbench/extensions/manager/composables/useManagerQueue.test.ts -
Type safety improvements
-
src/workbench/extensions/manager/composables/nodePack/useMissingNodes.test.ts
- Removed unsafe casts
-
src/workbench/extensions/manager/composables/nodePack/usePacksSelection.test.ts
- Type improvements
-
src/workbench/extensions/manager/composables/nodePack/usePacksStatus.test.ts
- Type improvements
- src/workbench/extensions/manager/utils/versionUtil.test.ts - Type
safety fixes

Source files (minor type fixes):
- src/utils/fuseUtil.ts - Type improvements
- src/utils/linkFixer.ts - Type safety fixes
- src/utils/syncUtil.ts - Type improvements
-
src/workbench/extensions/manager/composables/nodePack/useWorkflowPacks.ts
- Type fix
-
src/workbench/extensions/manager/composables/useConflictAcknowledgment.ts
- Type fix

### Testing
- All TypeScript type checking passes (`pnpm typecheck`)
- All affected test files pass (`pnpm test:unit`)
- Linting passes without errors (`pnpm lint`)
- Code formatting applied (`pnpm format`)

Part of the "Road to No Explicit Any" initiative, cleaning up type
casting issues from branch `fix/remove-any-types-part8`.

### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459
- Part 8 Group 8: #8496 (this PR)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8496-Road-to-No-explicit-any-Group-8-part-8-test-files-2f86d73d365081f3afdcf8d01fba81e1)
by [Unito](https://www.unito.io)

---------

Co-authored-by: GitHub Action <action@github.com>
DrJKL pushed a commit that referenced this pull request Jan 31, 2026
## Summary

This PR removes unsafe type assertions ("as unknown as Type") from test
files and improves type safety across the codebase.

### Key Changes

#### Type Safety Improvements
- Removed improper `as unknown as Type` patterns from 17 test files in
Group 8 part 7
- Replaced with proper TypeScript patterns using factory functions and
Mock types
- Fixed createTestingPinia usage in test files (was incorrectly using
createPinia)
- Fixed vi.hoisted pattern for mockSetDirty in viewport tests  
- Fixed vi.doMock lint issues with vi.mock and vi.hoisted pattern
- Retained necessary `as unknown as` casts only for complex mock objects
where direct type assertions would fail

### Files Changed

Test files (Group 8 part 7 - services, stores, utils):
- src/services/nodeOrganizationService.test.ts
- src/services/providers/algoliaSearchProvider.test.ts
- src/services/providers/registrySearchProvider.test.ts
- src/stores/comfyRegistryStore.test.ts
- src/stores/domWidgetStore.test.ts
- src/stores/executionStore.test.ts
- src/stores/firebaseAuthStore.test.ts
- src/stores/modelToNodeStore.test.ts
- src/stores/queueStore.test.ts
- src/stores/subgraphNavigationStore.test.ts
- src/stores/subgraphNavigationStore.viewport.test.ts
- src/stores/subgraphStore.test.ts
- src/stores/systemStatsStore.test.ts
- src/stores/workspace/nodeHelpStore.test.ts
- src/utils/colorUtil.test.ts
- src/utils/executableGroupNodeChildDTO.test.ts

Source files:
- src/stores/modelStore.ts - Improved type handling

### Testing
- All TypeScript type checking passes (`pnpm typecheck`)
- All affected test files pass (`pnpm test:unit`)
- Linting passes without errors (`pnpm lint`)
- Code formatting applied (`pnpm format`)

Part of the "Road to No Explicit Any" initiative, cleaning up type
casting issues from branch `fix/remove-any-types-part8`.

### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459 (this PR)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8459-Road-to-No-explicit-any-Group-8-part-7-test-files-2f86d73d36508114ad28d82e72a3a5e9)
by [Unito](https://www.unito.io)
DrJKL pushed a commit that referenced this pull request Jan 31, 2026
## Summary

This PR removes unsafe type assertions ("as unknown as Type") from test
files and improves type safety across the codebase.

### Key Changes

#### Type Safety Improvements
- Removed improper `as unknown as Type` patterns from test files in
Group 8 part 8
- Replaced with proper TypeScript patterns using Pinia store testing
patterns
- Fixed parameter shadowing issue in typeGuardUtil.test.ts (constructor
→ nodeConstructor)
- Fixed stale mock values in useConflictDetection.test.ts using getter
functions
- Refactored useManagerState tests to follow proper Pinia store testing
patterns with createTestingPinia

### Files Changed

Test files (Group 8 part 8 - utils and manager composables):
- src/utils/typeGuardUtil.test.ts - Fixed parameter shadowing
- src/utils/graphTraversalUtil.test.ts - Removed unsafe type assertions
- src/utils/litegraphUtil.test.ts - Improved type handling
- src/workbench/extensions/manager/composables/useManagerState.test.ts -
Complete rewrite using Pinia testing patterns
-
src/workbench/extensions/manager/composables/useConflictDetection.test.ts
- Fixed stale mock values with getters
- src/workbench/extensions/manager/composables/useManagerQueue.test.ts -
Type safety improvements
-
src/workbench/extensions/manager/composables/nodePack/useMissingNodes.test.ts
- Removed unsafe casts
-
src/workbench/extensions/manager/composables/nodePack/usePacksSelection.test.ts
- Type improvements
-
src/workbench/extensions/manager/composables/nodePack/usePacksStatus.test.ts
- Type improvements
- src/workbench/extensions/manager/utils/versionUtil.test.ts - Type
safety fixes

Source files (minor type fixes):
- src/utils/fuseUtil.ts - Type improvements
- src/utils/linkFixer.ts - Type safety fixes
- src/utils/syncUtil.ts - Type improvements
-
src/workbench/extensions/manager/composables/nodePack/useWorkflowPacks.ts
- Type fix
-
src/workbench/extensions/manager/composables/useConflictAcknowledgment.ts
- Type fix

### Testing
- All TypeScript type checking passes (`pnpm typecheck`)
- All affected test files pass (`pnpm test:unit`)
- Linting passes without errors (`pnpm lint`)
- Code formatting applied (`pnpm format`)

Part of the "Road to No Explicit Any" initiative, cleaning up type
casting issues from branch `fix/remove-any-types-part8`.

### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459
- Part 8 Group 8: #8496 (this PR)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8496-Road-to-No-explicit-any-Group-8-part-8-test-files-2f86d73d365081f3afdcf8d01fba81e1)
by [Unito](https://www.unito.io)

---------

Co-authored-by: GitHub Action <action@github.com>
Myestery added a commit that referenced this pull request Feb 2, 2026
## Summary

This PR removes `any` types from UI component files and replaces them
with proper TypeScript types.

### Key Changes

#### Type Safety Improvements
- Replaced `any` with `unknown`, explicit types, or proper interfaces
across UI components
- Used `ComponentPublicInstance` with explicit method signatures for
component refs
- Used `Record<string, unknown>` for dynamic property access
- Added generics for form components with flexible value types
- Used `CSSProperties` for style objects

### Files Changed

UI Components:
- src/components/common/ComfyImage.vue - Used proper class prop type
- src/components/common/DeviceInfo.vue - Used `string | number` for
formatValue
- src/components/common/FormItem.vue - Used `unknown` for model value
- src/components/common/FormRadioGroup.vue - Added generic type
parameter
- src/components/common/TreeExplorer.vue - Used proper async function
signature
- src/components/custom/widget/WorkflowTemplateSelectorDialog.vue -
Fixed duplicate import
- src/components/graph/CanvasModeSelector.vue - Used
`ComponentPublicInstance` for ref
- src/components/node/NodePreview.vue - Changed `any` to `unknown`
- src/components/queue/job/JobDetailsPopover.vue - Removed unnecessary
casts
- src/components/queue/job/JobFiltersBar.vue - Removed `as any` casts
- src/platform/assets/components/MediaAssetContextMenu.vue - Added
`ContextMenuInstance` type
- src/renderer/extensions/minimap/MiniMapPanel.vue - Used
`CSSProperties`
- src/renderer/extensions/vueNodes/composables/useNodeTooltips.ts -
Added `PrimeVueTooltipElement` interface
-
src/renderer/extensions/vueNodes/widgets/components/form/FormSelectButton.vue
- Used `Record<string, unknown>`
-
src/workbench/extensions/manager/components/manager/infoPanel/tabs/DescriptionTabPanel.vue
- Added `LicenseObject` interface

### Testing
- All TypeScript type checking passes (`pnpm typecheck`)
- Linting passes without errors (`pnpm lint`)

Part of the "Road to No Explicit Any" initiative.

### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459
- Part 8 Group 8: #8496
- Part 9: #8498
- Part 10: #8499

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8499-Road-to-No-Explicit-Any-Part-10-2f86d73d365081aab129f165c7d02434)
by [Unito](https://www.unito.io)
Myestery added a commit that referenced this pull request Feb 2, 2026
## Summary

This PR removes `any` types from core source files and replaces them
with proper TypeScript types.

### Key Changes

#### Type Safety Improvements
- Replaced `any` with `unknown`, explicit types, or proper interfaces
across core files
- Introduced new type definitions: `SceneConfig`, `Load3DNode`,
`ElectronWindow`
- Used `Object.assign` instead of `as any` for dynamic property
assignment
- Replaced `as any` casts with proper type assertions

### Files Changed

Source files:
- src/extensions/core/widgetInputs.ts - Removed unnecessary `as any`
cast
- src/platform/cloud/onboarding/auth.ts - Used `Record<string, unknown>`
and Sentry types
- src/platform/telemetry/providers/cloud/MixpanelTelemetryProvider.ts -
Used `AuditLog[]` type
- src/platform/workflow/management/stores/workflowStore.ts - Used
`typeof ComfyWorkflow` constructor type
- src/scripts/app.ts - Used `ResultItem[]` for Clipspace images
- src/services/colorPaletteService.ts - Used `Object.assign` instead of
`as any`
- src/services/customerEventsService.ts - Used `unknown` instead of
`any`
- src/services/load3dService.ts - Added proper interface types for
Load3D nodes
- src/types/litegraph-augmentation.d.ts - Used `TWidgetValue[]` type
- src/utils/envUtil.ts - Added ElectronWindow interface
- src/workbench/extensions/manager/stores/comfyManagerStore.ts - Typed
event as `CustomEvent<{ ui_id?: string }>`

### Testing
- All TypeScript type checking passes (`pnpm typecheck`)
- Linting passes without errors (`pnpm lint`)
- Code formatting applied (`pnpm format`)

Part of the "Road to No Explicit Any" initiative.

### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459
- Part 8 Group 8: #8496
- Part 9: #8498 (this PR)
@Myestery Myestery mentioned this pull request Feb 3, 2026
5 tasks
AustinMroz pushed a commit that referenced this pull request Feb 6, 2026
## Summary

This PR removes `any` types from widgets, services, stores, and test
files, replacing them with proper TypeScript types.

### Key Changes

#### Type Safety Improvements
- Replaced `any` with `unknown`, explicit types, or proper interfaces
across widgets and services
- Added proper type imports (TgpuRoot, Point, StyleValue, etc.)
- Created typed interfaces (NumericWidgetOptions, TestWindow,
ImportFailureDetail, etc.)
- Fixed function return types to be non-nullable where appropriate
- Added type guards and null checks instead of non-null assertions
- Used `ComponentProps` from vue-component-type-helpers for component
testing

#### Widget System
- Added index signature to IWidgetOptions for Record compatibility
- Centralized disabled logic in WidgetInputNumberInput
- Moved template type assertions to computed properties
- Fixed ComboWidget getOptionLabel type assertions
- Improved remote widget type handling with runtime checks

#### Services & Stores
- Fixed getOrCreateViewer to return non-nullable values
- Updated addNodeOnGraph to use specific options type `{ pos?: Point }`
- Added proper type assertions for settings store retrieval
- Fixed executionIdToCurrentId return type (string | undefined)

#### Test Infrastructure
- Exported GraphOrSubgraph from litegraph barrel to avoid circular
dependencies
- Updated test fixtures with proper TypeScript types (TestInfo,
LGraphNode)
- Replaced loose Record types with ComponentProps in tests
- Added proper error handling in WebSocket fixture

#### Code Organization
- Created shared i18n-types module for locale data types
- Made ImportFailureDetail non-exported (internal use only)
- Added @public JSDoc tag to ElectronWindow type
- Fixed console.log usage in scripts to use allowed methods

### Files Changed

**Widgets & Components:**
-
src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumberInput.vue
-
src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
-
src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue
- src/renderer/extensions/vueNodes/widgets/components/WidgetTextarea.vue
-
src/renderer/extensions/vueNodes/widgets/composables/useRemoteWidget.ts
- src/lib/litegraph/src/widgets/ComboWidget.ts
- src/lib/litegraph/src/types/widgets.ts
- src/components/common/LazyImage.vue
- src/components/load3d/Load3dViewerContent.vue

**Services & Stores:**
- src/services/litegraphService.ts
- src/services/load3dService.ts
- src/services/colorPaletteService.ts
- src/stores/maskEditorStore.ts
- src/stores/nodeDefStore.ts
- src/platform/settings/settingStore.ts
- src/platform/workflow/management/stores/workflowStore.ts

**Composables & Utils:**
- src/composables/node/useWatchWidget.ts
- src/composables/useCanvasDrop.ts
- src/utils/widgetPropFilter.ts
- src/utils/queueDisplay.ts
- src/utils/envUtil.ts

**Test Files:**
- browser_tests/fixtures/ComfyPage.ts
- browser_tests/fixtures/ws.ts
- browser_tests/tests/actionbar.spec.ts
-
src/workbench/extensions/manager/components/manager/skeleton/PackCardGridSkeleton.test.ts
- src/lib/litegraph/src/subgraph/subgraphUtils.test.ts
- src/components/rightSidePanel/shared.test.ts
- src/platform/cloud/subscription/composables/useSubscription.test.ts
-
src/platform/workflow/persistence/composables/useWorkflowPersistence.test.ts

**Scripts & Types:**
- scripts/i18n-types.ts (new shared module)
- scripts/diff-i18n.ts
- scripts/check-unused-i18n-keys.ts
- src/workbench/extensions/manager/types/conflictDetectionTypes.ts
- src/types/algoliaTypes.ts
- src/types/simplifiedWidget.ts

**Infrastructure:**
- src/lib/litegraph/src/litegraph.ts (added GraphOrSubgraph export)
- src/lib/litegraph/src/infrastructure/CustomEventTarget.ts
- src/platform/assets/services/assetService.ts

**Stories:**
- apps/desktop-ui/src/views/InstallView.stories.ts
- src/components/queue/job/JobDetailsPopover.stories.ts

**Extension Manager:**
- src/workbench/extensions/manager/composables/useConflictDetection.ts
- src/workbench/extensions/manager/composables/useManagerQueue.ts
- src/workbench/extensions/manager/services/comfyManagerService.ts
- src/workbench/extensions/manager/utils/conflictMessageUtil.ts

### Testing

- [x] All TypeScript type checking passes (`pnpm typecheck`)
- [x] ESLint passes without errors (`pnpm lint`)
- [x] Format checks pass (`pnpm format:check`)
- [x] Knip (unused exports) passes (`pnpm knip`)
- [x] Pre-commit and pre-push hooks pass

Part of the "Road to No Explicit Any" initiative.

### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459
- Part 8 Group 8: #8496
- Part 9: #8498
- Part 10: #8499

---------

Co-authored-by: Comfy Org PR Bot <snomiao+comfy-pr@gmail.com>
Co-authored-by: christian-byrne <72887196+christian-byrne@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
snomiao pushed a commit that referenced this pull request Feb 6, 2026
## Summary

This PR removes `any` types from widgets, services, stores, and test
files, replacing them with proper TypeScript types.

### Key Changes

#### Type Safety Improvements
- Replaced `any` with `unknown`, explicit types, or proper interfaces
across widgets and services
- Added proper type imports (TgpuRoot, Point, StyleValue, etc.)
- Created typed interfaces (NumericWidgetOptions, TestWindow,
ImportFailureDetail, etc.)
- Fixed function return types to be non-nullable where appropriate
- Added type guards and null checks instead of non-null assertions
- Used `ComponentProps` from vue-component-type-helpers for component
testing

#### Widget System
- Added index signature to IWidgetOptions for Record compatibility
- Centralized disabled logic in WidgetInputNumberInput
- Moved template type assertions to computed properties
- Fixed ComboWidget getOptionLabel type assertions
- Improved remote widget type handling with runtime checks

#### Services & Stores
- Fixed getOrCreateViewer to return non-nullable values
- Updated addNodeOnGraph to use specific options type `{ pos?: Point }`
- Added proper type assertions for settings store retrieval
- Fixed executionIdToCurrentId return type (string | undefined)

#### Test Infrastructure
- Exported GraphOrSubgraph from litegraph barrel to avoid circular
dependencies
- Updated test fixtures with proper TypeScript types (TestInfo,
LGraphNode)
- Replaced loose Record types with ComponentProps in tests
- Added proper error handling in WebSocket fixture

#### Code Organization
- Created shared i18n-types module for locale data types
- Made ImportFailureDetail non-exported (internal use only)
- Added @public JSDoc tag to ElectronWindow type
- Fixed console.log usage in scripts to use allowed methods

### Files Changed

**Widgets & Components:**
-
src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumberInput.vue
-
src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
-
src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue
- src/renderer/extensions/vueNodes/widgets/components/WidgetTextarea.vue
-
src/renderer/extensions/vueNodes/widgets/composables/useRemoteWidget.ts
- src/lib/litegraph/src/widgets/ComboWidget.ts
- src/lib/litegraph/src/types/widgets.ts
- src/components/common/LazyImage.vue
- src/components/load3d/Load3dViewerContent.vue

**Services & Stores:**
- src/services/litegraphService.ts
- src/services/load3dService.ts
- src/services/colorPaletteService.ts
- src/stores/maskEditorStore.ts
- src/stores/nodeDefStore.ts
- src/platform/settings/settingStore.ts
- src/platform/workflow/management/stores/workflowStore.ts

**Composables & Utils:**
- src/composables/node/useWatchWidget.ts
- src/composables/useCanvasDrop.ts
- src/utils/widgetPropFilter.ts
- src/utils/queueDisplay.ts
- src/utils/envUtil.ts

**Test Files:**
- browser_tests/fixtures/ComfyPage.ts
- browser_tests/fixtures/ws.ts
- browser_tests/tests/actionbar.spec.ts
-
src/workbench/extensions/manager/components/manager/skeleton/PackCardGridSkeleton.test.ts
- src/lib/litegraph/src/subgraph/subgraphUtils.test.ts
- src/components/rightSidePanel/shared.test.ts
- src/platform/cloud/subscription/composables/useSubscription.test.ts
-
src/platform/workflow/persistence/composables/useWorkflowPersistence.test.ts

**Scripts & Types:**
- scripts/i18n-types.ts (new shared module)
- scripts/diff-i18n.ts
- scripts/check-unused-i18n-keys.ts
- src/workbench/extensions/manager/types/conflictDetectionTypes.ts
- src/types/algoliaTypes.ts
- src/types/simplifiedWidget.ts

**Infrastructure:**
- src/lib/litegraph/src/litegraph.ts (added GraphOrSubgraph export)
- src/lib/litegraph/src/infrastructure/CustomEventTarget.ts
- src/platform/assets/services/assetService.ts

**Stories:**
- apps/desktop-ui/src/views/InstallView.stories.ts
- src/components/queue/job/JobDetailsPopover.stories.ts

**Extension Manager:**
- src/workbench/extensions/manager/composables/useConflictDetection.ts
- src/workbench/extensions/manager/composables/useManagerQueue.ts
- src/workbench/extensions/manager/services/comfyManagerService.ts
- src/workbench/extensions/manager/utils/conflictMessageUtil.ts

### Testing

- [x] All TypeScript type checking passes (`pnpm typecheck`)
- [x] ESLint passes without errors (`pnpm lint`)
- [x] Format checks pass (`pnpm format:check`)
- [x] Knip (unused exports) passes (`pnpm knip`)
- [x] Pre-commit and pre-push hooks pass

Part of the "Road to No Explicit Any" initiative.

### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459
- Part 8 Group 8: #8496
- Part 9: #8498
- Part 10: #8499

---------

Co-authored-by: Comfy Org PR Bot <snomiao+comfy-pr@gmail.com>
Co-authored-by: christian-byrne <72887196+christian-byrne@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants