Skip to content

Road to No explicit any Part 8 (Group 3): Improve type safety in Group 3 test mocks#8304

Merged
Myestery merged 7 commits intomainfrom
refactor/cleanup-any-part8-group3
Jan 26, 2026
Merged

Road to No explicit any Part 8 (Group 3): Improve type safety in Group 3 test mocks#8304
Myestery merged 7 commits intomainfrom
refactor/cleanup-any-part8-group3

Conversation

@Myestery
Copy link
Contributor

@Myestery Myestery commented Jan 25, 2026

Summary

  • Eliminated all as unknown as type assertions from Group 3 test files
  • Created reusable factory functions in litegraphTestUtils.ts for better type safety
  • Improved test mock composition using Partial types with single as casts
  • Fixed LGraphNode tests to use proper API methods instead of direct property assignment

Changes by Category

New Factory Functions in litegraphTestUtils.ts

  • createMockLGraphNodeWithArrayBoundingRect() - Creates LGraphNode with proper boundingRect for position tests
  • createMockFileList() - Creates mock FileList with proper structure including item() method

Test File Improvements

Composables:

  • useLoad3dDrag.test.ts - Used createMockFileList factory
  • useLoad3dViewer.test.ts - Created local MockSceneManager interface with proper typing

LiteGraph Tests:

  • LGraphNode.test.ts - Replaced direct boundingRect assignments with updateArea() calls
  • LinkConnector.test.ts - Improved mock composition with proper Partial types
  • ToOutputRenderLink.test.ts - Added MockEvents interface for type-safe event mocking
  • Updated integration and core tests to use new factory functions

Extension Tests:

  • contextMenuFilter.test.ts - Updated menu factories to accept (IContextMenuValue | null)[]

Type Safety Improvements

  • Zero as unknown as instances (was: multiple instances across 17 files)
  • All mocks use proper Partial<T> composition with single as T casts
  • Improved IntelliSense and type checking in test files
  • Centralized mock creation reduces duplication and improves maintainability

Test Plan

  • ✅ All TypeScript type checks pass
  • ✅ ESLint passes with no new errors
  • ✅ Pre-commit hooks (format, lint, typecheck) all pass
  • ✅ Knip unused export check passes
  • ✅ No behavioral changes to actual tests (only type improvements)

┆Issue is synchronized with this Notion page by Unito

- Removed all "as unknown as" type assertions from test files
- Created factory functions in litegraphTestUtils:
  - createMockLGraphNodeWithArrayBoundingRect
  - createMockFileList
  - createMockLinkConnectorEvents
  - createMockRenderLink
- Updated tests to use proper mock composition with Partial types
- Fixed LGraphNode tests to use updateArea() instead of direct boundingRect assignment
- Improved type safety while maintaining test functionality
@Myestery Myestery requested a review from a team as a code owner January 25, 2026 00:24
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jan 25, 2026
@github-actions
Copy link

github-actions bot commented Jan 25, 2026

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 01/25/2026, 01:48:57 PM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Jan 25, 2026

🎭 Playwright Tests: ⚠️ Passed with flaky tests

Results: 503 passed, 0 failed, 2 flaky, 8 skipped (Total: 513)

❌ Failed Tests

📊 Browser Reports
  • chromium: View Report (✅ 493 / ❌ 0 / ⚠️ 1 / ⏭️ 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)

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 25, 2026

📝 Walkthrough

Walkthrough

Refactors tests to remove unsafe any casts and introduce typed mock factories/utilities; updates many tests to use stricter TypeScript typings and safer property access. Also changes two Clipspace methods to return nullable elements and adds a local NodeTemplate type.

Changes

Cohort / File(s) Summary
Test Utilities
src/utils/__tests__/litegraphTestUtils.ts
Added multiple typed mock factories and expanded test type imports (createMockLGraph, createMockCanvasPointerEvent, createMockCanvasRenderingContext2D, createMockLinkNetwork, createMockNodeInputSlot, createMockNodeOutputSlot, createMockLGraphNodeWithArrayBoundingRect, createMockFileList).
Composable Tests
src/composables/*useLoad3d*.test.ts, src/composables/useFeatureFlags.test.ts, src/composables/useLoad3dDrag.test.ts, src/composables/useLoad3dViewer.test.ts
Removed as any casts, introduced explicit type imports, migrated mocks to Partial<T>/ReturnType-based typed mocks, wired DOM/canvas elements in mocks, and updated event/toast mocking to typed helpers.
Litegraph — Canvas & LinkConnector Tests
src/lib/litegraph/src/canvas/*LinkConnector*.test.ts, src/lib/litegraph/src/canvas/LinkConnector.integration.test.ts, src/lib/litegraph/src/canvas/LinkConnector.test.ts, src/lib/litegraph/src/canvas/LinkConnectorSubgraphInputValidation.test.ts, src/lib/litegraph/src/canvas/ToOutputRenderLink.test.ts
Replaced inline event/context/slot mocks with new mock helpers (createMockCanvasPointerEvent, createMockCanvasRenderingContext2D, createMockNodeInputSlot/outputSlot, createMockLinkNetwork); introduced RenderLinkItem type alias and typed mock shapes.
Litegraph — Node & Properties Tests
src/lib/litegraph/src/LGraphNode.test.ts, src/lib/litegraph/src/LGraphNodeProperties.test.ts
Replaced direct LGraphNode/graph mocks with createMockLGraphNodeWithArrayBoundingRect and createMockLGraph; added NodeConstructorWithSlotOffset interface and removed ad-hoc any casts.
Context Menu Tests
src/extensions/core/contextMenuFilter.name.test.ts, src/extensions/core/contextMenuFilter.test.ts, src/lib/litegraph/src/contextMenuCompat.test.ts
Converted prototype monkey-patches to typed signatures using original.call(this, ...); allowed `(IContextMenuValue
Implementation / Minor API
src/extensions/core/clipspace.ts, src/extensions/core/nodeTemplates.ts
ClipspaceDialog.createImgSettings() → `HTMLTableElement

Possibly related PRs

Suggested reviewers

  • DrJKL
  • christian-byrne
  • AustinMroz
✨ 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 25, 2026

Bundle Size Report

Summary

  • Raw size: 22 MB baseline 22 MB — 🟢 -129 B
  • Gzip: 4.57 MB baseline 4.57 MB — 🟢 -72 B
  • Brotli: 3.39 MB baseline 3.39 MB — 🟢 -94 B
  • Bundles: 170 current • 170 baseline • 82 added / 82 removed

Category Glance
Other 🟢 -122 B (6.49 MB) · Panels & Settings 🟢 -8 B (466 kB) · Data & Services 🔴 +1 B (3.18 MB) · Vendor & Third-Party ⚪ 0 B (10.7 MB) · Graph Workspace ⚪ 0 B (957 kB) · Views & Navigation ⚪ 0 B (80.7 kB) · + 5 more

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

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-AJY1qwdD.js (removed) 22.8 kB 🟢 -22.8 kB 🟢 -6.85 kB 🟢 -6.04 kB
assets/index-CuxOV0BS.js (new) 22.8 kB 🔴 +22.8 kB 🔴 +6.85 kB 🔴 +6.04 kB

Status: 1 added / 1 removed

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

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-D78QTAjW.js (removed) 957 kB 🟢 -957 kB 🟢 -194 kB 🟢 -146 kB
assets/GraphView-eLu7GOfR.js (new) 957 kB 🔴 +957 kB 🔴 +194 kB 🔴 +146 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-abeTLyqV.js (new) 17.1 kB 🔴 +17.1 kB 🔴 +3.6 kB 🔴 +3.06 kB
assets/CloudSurveyView-D3bRGB9Q.js (removed) 17.1 kB 🟢 -17.1 kB 🟢 -3.6 kB 🟢 -3.06 kB
assets/CloudLoginView-Br2K9FQM.js (removed) 11.8 kB 🟢 -11.8 kB 🟢 -3.09 kB 🟢 -2.72 kB
assets/CloudLoginView-IzEYha_D.js (new) 11.8 kB 🔴 +11.8 kB 🔴 +3.09 kB 🔴 +2.71 kB
assets/UserCheckView-CLUKdwGi.js (removed) 10.5 kB 🟢 -10.5 kB 🟢 -2.45 kB 🟢 -2.13 kB
assets/UserCheckView-DG3HFlWO.js (new) 10.5 kB 🔴 +10.5 kB 🔴 +2.44 kB 🔴 +2.13 kB
assets/CloudLayoutView-Bu4GirdR.js (new) 8.54 kB 🔴 +8.54 kB 🔴 +2.25 kB 🔴 +1.95 kB
assets/CloudLayoutView-DhWE1cUb.js (removed) 8.54 kB 🟢 -8.54 kB 🟢 -2.25 kB 🟢 -1.95 kB
assets/CloudSignupView-6JW2q6ME.js (removed) 8.18 kB 🟢 -8.18 kB 🟢 -2.33 kB 🟢 -2.02 kB
assets/CloudSignupView-CAipeYeu.js (new) 8.18 kB 🔴 +8.18 kB 🔴 +2.33 kB 🔴 +2.02 kB
assets/CloudForgotPasswordView-D2bJicIp.js (new) 6.26 kB 🔴 +6.26 kB 🔴 +1.93 kB 🔴 +1.69 kB
assets/CloudForgotPasswordView-Dka5vg5q.js (removed) 6.26 kB 🟢 -6.26 kB 🟢 -1.93 kB 🟢 -1.69 kB
assets/UserSelectView-B9RWVL87.js (removed) 5.28 kB 🟢 -5.28 kB 🟢 -1.76 kB 🟢 -1.57 kB
assets/UserSelectView-C9U6OM5b.js (new) 5.28 kB 🔴 +5.28 kB 🔴 +1.76 kB 🔴 +1.57 kB
assets/CloudSubscriptionRedirectView-3fIR3hdT.js (removed) 5.27 kB 🟢 -5.27 kB 🟢 -1.73 kB 🟢 -1.54 kB
assets/CloudSubscriptionRedirectView-KumwrXag.js (new) 5.27 kB 🔴 +5.27 kB 🔴 +1.73 kB 🔴 +1.54 kB
assets/CloudAuthTimeoutView-1VmV-jli.js (new) 5.24 kB 🔴 +5.24 kB 🔴 +1.71 kB 🔴 +1.48 kB
assets/CloudAuthTimeoutView-DWnbjQKS.js (removed) 5.24 kB 🟢 -5.24 kB 🟢 -1.71 kB 🟢 -1.48 kB
assets/CloudSorryContactSupportView-B5gYo5Lv.js 1.97 kB 1.97 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/layout-MvRmLoAK.js 500 B 500 B ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 9 added / 9 removed

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

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/WorkspacePanel-DiLGgp-R.js (new) 29.8 kB 🔴 +29.8 kB 🔴 +5.9 kB 🔴 +5.15 kB
assets/WorkspacePanel-Dw_rhfAX.js (removed) 29.8 kB 🟢 -29.8 kB 🟢 -5.9 kB 🟢 -5.14 kB
assets/LegacyCreditsPanel--WuS1vVc.js (new) 23.8 kB 🔴 +23.8 kB 🔴 +5.95 kB 🔴 +5.22 kB
assets/LegacyCreditsPanel-C0J4KxtR.js (removed) 23.8 kB 🟢 -23.8 kB 🟢 -5.95 kB 🟢 -5.22 kB
assets/SubscriptionPanel-Cz6tAwBq.js (removed) 20.9 kB 🟢 -20.9 kB 🟢 -5.01 kB 🟢 -4.42 kB
assets/SubscriptionPanel-DgsCUkuR.js (new) 20.9 kB 🔴 +20.9 kB 🔴 +5.01 kB 🔴 +4.42 kB
assets/KeybindingPanel-CXXOnpaI.js (new) 14.2 kB 🔴 +14.2 kB 🔴 +3.74 kB 🔴 +3.31 kB
assets/KeybindingPanel-lIW9ITvQ.js (removed) 14.2 kB 🟢 -14.2 kB 🟢 -3.74 kB 🟢 -3.31 kB
assets/AboutPanel-CNX8JhCu.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.68 kB 🔴 +2.42 kB
assets/AboutPanel-dSrYZIxe.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.68 kB 🟢 -2.43 kB
assets/ExtensionPanel-ByCwYiDH.js (new) 10.2 kB 🔴 +10.2 kB 🔴 +2.71 kB 🔴 +2.4 kB
assets/ExtensionPanel-CDkmk7Gg.js (removed) 10.2 kB 🟢 -10.2 kB 🟢 -2.71 kB 🟢 -2.4 kB
assets/ServerConfigPanel-CK-OUb-_.js (removed) 7.23 kB 🟢 -7.23 kB 🟢 -2.17 kB 🟢 -1.94 kB
assets/ServerConfigPanel-DP2QGkci.js (new) 7.23 kB 🔴 +7.23 kB 🔴 +2.17 kB 🔴 +1.94 kB
assets/UserPanel-BNbGrdEo.js (removed) 6.58 kB 🟢 -6.58 kB 🟢 -1.9 kB 🟢 -1.67 kB
assets/UserPanel-D8krRaTQ.js (new) 6.58 kB 🔴 +6.58 kB 🔴 +1.9 kB 🔴 +1.67 kB
assets/config-DNV554LM.js (removed) 1.16 kB 🟢 -1.16 kB 🟢 -610 B 🟢 -531 B
assets/config-Ba-Hey42.js (new) 1.15 kB 🔴 +1.15 kB 🔴 +604 B 🔴 +536 B
assets/refreshRemoteConfig-CYOpPXzC.js (removed) 1.14 kB 🟢 -1.14 kB 🟢 -524 B 🟢 -488 B
assets/refreshRemoteConfig-Djh9WvmR.js (new) 1.14 kB 🔴 +1.14 kB 🔴 +521 B 🔴 +453 B
assets/cloudRemoteConfig-CJK3vHLk.js (new) 1.11 kB 🔴 +1.11 kB 🔴 +511 B 🔴 +459 B
assets/cloudRemoteConfig-CYYfW8_u.js (removed) 1.11 kB 🟢 -1.11 kB 🟢 -509 B 🟢 -449 B
assets/refreshRemoteConfig-Bd_mcbg6.js (new) 169 B 🔴 +169 B 🔴 +108 B 🔴 +103 B
assets/refreshRemoteConfig-BnDWPRqL.js (removed) 169 B 🟢 -169 B 🟢 -108 B 🟢 -106 B
assets/remoteConfig-w1E3DdAQ.js 536 B 536 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-2qMok0ac.js 29 kB 29 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BcDLsbiI.js 29.2 kB 29.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BCMsrMhl.js 29.9 kB 29.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BQM5iiEY.js 25.5 kB 25.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C5JeSK4j.js 26.2 kB 26.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CcVqrXbK.js 38.8 kB 38.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Ckoj43MZ.js 30 kB 30 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DFBj0AYW.js 32.5 kB 32.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Dh5pVx6O.js 34.8 kB 34.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DJRV_PVY.js 30.8 kB 30.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-jbT3QFC8.js 31.6 kB 31.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 12 added / 12 removed

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

Authentication, profile, and account management bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/auth-lwT_m5uS.js (removed) 3.54 kB 🟢 -3.54 kB 🟢 -1.24 kB 🟢 -1.06 kB
assets/auth-W7tCXgvA.js (new) 3.54 kB 🔴 +3.54 kB 🔴 +1.24 kB 🔴 +1.06 kB
assets/firebaseAuthStore-jKt5qvWH.js (new) 217 B 🔴 +217 B 🔴 +138 B 🔴 +119 B
assets/firebaseAuthStore-q8kzsJXb.js (removed) 217 B 🟢 -217 B 🟢 -138 B 🟢 -116 B
assets/auth-DElZLMvn.js (removed) 178 B 🟢 -178 B 🟢 -141 B 🟢 -129 B
assets/auth-GufEKymO.js (new) 178 B 🔴 +178 B 🔴 +142 B 🔴 +133 B

Status: 3 added / 3 removed

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

Modals, dialogs, drawers, and in-app editors

File Before After Δ Raw Δ Gzip Δ Brotli
assets/useSubscriptionDialog-CRBz2MpT.js (removed) 2.65 kB 🟢 -2.65 kB 🟢 -1.25 kB 🟢 -1.12 kB
assets/useSubscriptionDialog-CZLPsBN8.js (new) 2.65 kB 🔴 +2.65 kB 🔴 +1.25 kB 🔴 +1.12 kB
assets/useSubscriptionDialog-C9ty3oS4.js (removed) 179 B 🟢 -179 B 🟢 -110 B 🟢 -95 B
assets/useSubscriptionDialog-CYU8_GGL.js (new) 179 B 🔴 +179 B 🔴 +110 B 🔴 +98 B

Status: 2 added / 2 removed

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

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/ComfyQueueButton-BiMxupud.js (removed) 9.52 kB 🟢 -9.52 kB 🟢 -2.69 kB 🟢 -2.41 kB
assets/ComfyQueueButton-YVfsA35C.js (new) 9.52 kB 🔴 +9.52 kB 🔴 +2.69 kB 🔴 +2.42 kB
assets/SubscribeButton-Dphz-bgp.js (new) 4.63 kB 🔴 +4.63 kB 🔴 +1.57 kB 🔴 +1.39 kB
assets/SubscribeButton-Mlom76NS.js (removed) 4.63 kB 🟢 -4.63 kB 🟢 -1.57 kB 🟢 -1.39 kB
assets/CloudBadge-CD_RW5Ug.js (new) 1.85 kB 🔴 +1.85 kB 🔴 +722 B 🔴 +648 B
assets/CloudBadge-gqk8F8J0.js (removed) 1.85 kB 🟢 -1.85 kB 🟢 -725 B 🟢 -650 B
assets/cloudFeedbackTopbarButton-BYIk9s8D.js (removed) 1.24 kB 🟢 -1.24 kB 🟢 -678 B 🟢 -577 B
assets/cloudFeedbackTopbarButton-CKOTvgEQ.js (new) 1.24 kB 🔴 +1.24 kB 🔴 +677 B 🔴 +577 B
assets/ComfyQueueButton-B80orF-M.js (removed) 181 B 🟢 -181 B 🟢 -118 B 🟢 -106 B
assets/ComfyQueueButton-CRjRep-w.js (new) 181 B 🔴 +181 B 🔴 +118 B 🔴 +117 B
assets/Button-B9mYP1x0.js 3.82 kB 3.82 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/TopbarBadge-DHZYSmi1.js 8.36 kB 8.36 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/UserAvatar-CIuPULbC.js 1.73 kB 1.73 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-BFtcBv-z.js 2.41 kB 2.41 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 5 added / 5 removed

Data & Services — 3.18 MB (baseline 3.18 MB) • 🔴 +1 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/dialogService-Bby0MMs3.js (new) 2 MB 🔴 +2 MB 🔴 +422 kB 🔴 +322 kB
assets/dialogService-Hco2y5H6.js (removed) 2 MB 🟢 -2 MB 🟢 -422 kB 🟢 -322 kB
assets/api-CJPM3mMp.js (new) 1.16 MB 🔴 +1.16 MB 🔴 +243 kB 🔴 +188 kB
assets/api-xjId7H1A.js (removed) 1.16 MB 🟢 -1.16 MB 🟢 -243 kB 🟢 -188 kB
assets/releaseStore-Dx2ZgfQr.js (new) 8.91 kB 🔴 +8.91 kB 🔴 +2.4 kB 🔴 +2.12 kB
assets/releaseStore-LYH25ltb.js (removed) 8.91 kB 🟢 -8.91 kB 🟢 -2.4 kB 🟢 -2.12 kB
assets/keybindingService-BEvpTY2O.js (removed) 6.78 kB 🟢 -6.78 kB 🟢 -1.74 kB 🟢 -1.52 kB
assets/keybindingService-Cp9l1lr8.js (new) 6.78 kB 🔴 +6.78 kB 🔴 +1.75 kB 🔴 +1.52 kB
assets/userStore-07RBe7f_.js (new) 2.16 kB 🔴 +2.16 kB 🔴 +812 B 🔴 +725 B
assets/userStore-DK6BTBdb.js (removed) 2.16 kB 🟢 -2.16 kB 🟢 -814 B 🟢 -723 B
assets/audioService-BsbcpnDC.js (removed) 2.03 kB 🟢 -2.03 kB 🟢 -931 B 🟢 -821 B
assets/audioService-C9gQZg8C.js (new) 2.03 kB 🔴 +2.03 kB 🔴 +932 B 🔴 +823 B
assets/teamWorkspaceStore-BKfGmEE2.js (new) 165 B 🔴 +165 B 🔴 +123 B 🔴 +111 B
assets/teamWorkspaceStore-C9wHalqE.js (removed) 165 B 🟢 -165 B 🟢 -123 B 🟢 -108 B
assets/releaseStore-57i8IV0d.js (new) 140 B 🔴 +140 B 🔴 +106 B 🔴 +108 B
assets/releaseStore-BJAbp1Bj.js (removed) 140 B 🟢 -140 B 🟢 -106 B 🟢 -109 B
assets/serverConfigStore-B2LzN8g1.js 2.64 kB 2.64 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 8 added / 8 removed

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

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/useErrorHandling-Ms2mrhG9.js (new) 5.08 kB 🔴 +5.08 kB 🔴 +1.5 kB 🔴 +1.31 kB
assets/useErrorHandling-N3zSSUgK.js (removed) 5.08 kB 🟢 -5.08 kB 🟢 -1.5 kB 🟢 -1.31 kB
assets/useWorkspaceUI--h75jwvA.js (new) 3.42 kB 🔴 +3.42 kB 🔴 +975 B 🔴 +840 B
assets/useWorkspaceUI-DR3wUL8u.js (removed) 3.42 kB 🟢 -3.42 kB 🟢 -975 B 🟢 -837 B
assets/useSubscriptionActions-BM5QfUyZ.js (removed) 2.22 kB 🟢 -2.22 kB 🟢 -873 B 🟢 -761 B
assets/useSubscriptionActions-YkQcKFKn.js (new) 2.22 kB 🔴 +2.22 kB 🔴 +871 B 🔴 +766 B
assets/subscriptionCheckoutUtil-B9F4YifI.js (removed) 2 kB 🟢 -2 kB 🟢 -864 B 🟢 -749 B
assets/subscriptionCheckoutUtil-D4hDqr6j.js (new) 2 kB 🔴 +2 kB 🔴 +863 B 🔴 +750 B
assets/useSubscriptionCredits-l8vpWN9Q.js (new) 1.39 kB 🔴 +1.39 kB 🔴 +597 B 🔴 +524 B
assets/useSubscriptionCredits-X4C_WPD8.js (removed) 1.39 kB 🟢 -1.39 kB 🟢 -598 B 🟢 -525 B
assets/audioUtils-BfjQPu0p.js (removed) 970 B 🟢 -970 B 🟢 -547 B 🟢 -460 B
assets/audioUtils-CiBP5hIF.js (new) 970 B 🔴 +970 B 🔴 +547 B 🔴 +459 B
assets/useCurrentUser-BlbsVvYX.js (removed) 145 B 🟢 -145 B 🟢 -114 B 🟢 -104 B
assets/useCurrentUser-Co96QmkK.js (new) 145 B 🔴 +145 B 🔴 +114 B 🔴 +102 B
assets/_plugin-vue_export-helper-DLRTaeJK.js 467 B 467 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/colorUtil-8brfHtOx.js 7.2 kB 7.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/markdownRendererUtil-DBMaRy6q.js 1.78 kB 1.78 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/tailwindUtil-Hy0jY5OA.js 488 B 488 B ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 7 added / 7 removed

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

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-DdBDBwvF.js 408 kB 408 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-Dk4vQph5.js 4.1 MB 4.1 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-BK91gQps.js 3.04 MB 3.04 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-reka-ui-Bh_PdEOO.js 256 kB 256 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-BKpliY5_.js 1.83 MB 1.83 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-BFRBT3RT.js 650 kB 650 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-DMjbEcx7.js 13.6 kB 13.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-PDw3y6Aq.js 398 kB 398 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 6.49 MB (baseline 6.49 MB) • 🟢 -122 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/core-DeRaKxpc.js (removed) 178 kB 🟢 -178 kB 🟢 -43 kB 🟢 -36 kB
assets/core-Dfk4WjW4.js (new) 178 kB 🔴 +178 kB 🔴 +43 kB 🔴 +35.9 kB
assets/WidgetSelect-BS_ddL4L.js (removed) 50.7 kB 🟢 -50.7 kB 🟢 -11.2 kB 🟢 -9.76 kB
assets/WidgetSelect-CEpYUwFn.js (new) 50.7 kB 🔴 +50.7 kB 🔴 +11.2 kB 🔴 +9.75 kB
assets/Load3DControls-B3fHfrU7.js (new) 35.9 kB 🔴 +35.9 kB 🔴 +5.87 kB 🔴 +5.07 kB
assets/Load3DControls-C-9n4WmO.js (removed) 35.9 kB 🟢 -35.9 kB 🟢 -5.87 kB 🟢 -5.09 kB
assets/SubscriptionRequiredDialogContent-BqL8dEsX.js (new) 28.7 kB 🔴 +28.7 kB 🔴 +6.78 kB 🔴 +5.91 kB
assets/SubscriptionRequiredDialogContent-Dk0pQwY_.js (removed) 28.7 kB 🟢 -28.7 kB 🟢 -6.78 kB 🟢 -5.9 kB
assets/CurrentUserPopoverWorkspace-Ct7JzDmp.js (removed) 22.1 kB 🟢 -22.1 kB 🟢 -4.95 kB 🟢 -4.39 kB
assets/CurrentUserPopoverWorkspace-CzvA9QD0.js (new) 22.1 kB 🔴 +22.1 kB 🔴 +4.94 kB 🔴 +4.38 kB
assets/Load3D-C6bsRYDY.js (new) 20.9 kB 🔴 +20.9 kB 🔴 +4.59 kB 🔴 +4.02 kB
assets/Load3D-DtCyJHIM.js (removed) 20.9 kB 🟢 -20.9 kB 🟢 -4.59 kB 🟢 -4.02 kB
assets/WidgetInputNumber-_dETxv6U.js (removed) 18.3 kB 🟢 -18.3 kB 🟢 -4.51 kB 🟢 -4.01 kB
assets/WidgetInputNumber-BJPM5tFs.js (new) 18.3 kB 🔴 +18.3 kB 🔴 +4.51 kB 🔴 +4.02 kB
assets/WidgetRecordAudio-CVz7f9PR.js (removed) 18.2 kB 🟢 -18.2 kB 🟢 -4.96 kB 🟢 -4.43 kB
assets/WidgetRecordAudio-DiciTs3X.js (new) 18.2 kB 🔴 +18.2 kB 🔴 +4.96 kB 🔴 +4.43 kB
assets/SubscriptionPanelContentWorkspace-BJx8XwgB.js (new) 18.2 kB 🔴 +18.2 kB 🔴 +4.47 kB 🔴 +3.91 kB
assets/SubscriptionPanelContentWorkspace-BNhX6MG1.js (removed) 18.2 kB 🟢 -18.2 kB 🟢 -4.48 kB 🟢 -3.92 kB
assets/WidgetImageCrop--WXSGHmD.js (new) 17.1 kB 🔴 +17.1 kB 🔴 +4.14 kB 🔴 +3.62 kB
assets/WidgetImageCrop-BXqPd00z.js (removed) 17.1 kB 🟢 -17.1 kB 🟢 -4.14 kB 🟢 -3.63 kB
assets/PanelTemplate-Cb1X1CUk.js (removed) 16.2 kB 🟢 -16.2 kB 🟢 -5.45 kB 🟢 -4.79 kB
assets/PanelTemplate-tdn2oqq0.js (new) 16.2 kB 🔴 +16.2 kB 🔴 +5.45 kB 🔴 +4.79 kB
assets/AudioPreviewPlayer-_p5_nK4c.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.97 kB 🔴 +2.65 kB
assets/AudioPreviewPlayer-BnuFZg0L.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.97 kB 🟢 -2.65 kB
assets/InviteMemberDialogContent-1xpEcPAN.js (new) 8.36 kB 🔴 +8.36 kB 🔴 +2.5 kB 🔴 +2.17 kB
assets/InviteMemberDialogContent-DnpPePXu.js (removed) 8.36 kB 🟢 -8.36 kB 🟢 -2.5 kB 🟢 -2.17 kB
assets/WidgetWithControl-C2VlkIKU.js (new) 8.02 kB 🔴 +8.02 kB 🔴 +2.65 kB 🔴 +2.38 kB
assets/WidgetWithControl-Dyj1Ar_K.js (removed) 8.02 kB 🟢 -8.02 kB 🟢 -2.64 kB 🟢 -2.38 kB
assets/CreateWorkspaceDialogContent-BAUsWHF-.js (removed) 5.93 kB 🟢 -5.93 kB 🟢 -1.93 kB 🟢 -1.68 kB
assets/CreateWorkspaceDialogContent-EYHYyT4K.js (new) 5.93 kB 🔴 +5.93 kB 🔴 +1.93 kB 🔴 +1.68 kB
assets/EditWorkspaceDialogContent-B2IyRzMq.js (new) 5.7 kB 🔴 +5.7 kB 🔴 +1.88 kB 🔴 +1.65 kB
assets/EditWorkspaceDialogContent-DdR-rhRi.js (removed) 5.7 kB 🟢 -5.7 kB 🟢 -1.88 kB 🟢 -1.65 kB
assets/ValueControlPopover-BFrAHo_x.js (removed) 4.86 kB 🟢 -4.86 kB 🟢 -1.55 kB 🟢 -1.37 kB
assets/ValueControlPopover-CX9V4IYU.js (new) 4.86 kB 🔴 +4.86 kB 🔴 +1.55 kB 🔴 +1.37 kB
assets/DeleteWorkspaceDialogContent-BjlVxRz6.js (removed) 4.59 kB 🟢 -4.59 kB 🟢 -1.56 kB 🟢 -1.35 kB
assets/DeleteWorkspaceDialogContent-DyPKG3b9.js (new) 4.59 kB 🔴 +4.59 kB 🔴 +1.57 kB 🔴 +1.35 kB
assets/LeaveWorkspaceDialogContent-BuW3HDA5.js (removed) 4.41 kB 🟢 -4.41 kB 🟢 -1.5 kB 🟢 -1.31 kB
assets/LeaveWorkspaceDialogContent-CMMiupnv.js (new) 4.41 kB 🔴 +4.41 kB 🔴 +1.5 kB 🔴 +1.31 kB
assets/RemoveMemberDialogContent-BnIK7Zzb.js (removed) 4.38 kB 🟢 -4.38 kB 🟢 -1.45 kB 🟢 -1.27 kB
assets/RemoveMemberDialogContent-BwWESN7W.js (new) 4.38 kB 🔴 +4.38 kB 🔴 +1.45 kB 🔴 +1.27 kB
assets/RevokeInviteDialogContent-BcWIm0QQ.js (new) 4.29 kB 🔴 +4.29 kB 🔴 +1.47 kB 🔴 +1.29 kB
assets/RevokeInviteDialogContent-CV9F7dwx.js (removed) 4.29 kB 🟢 -4.29 kB 🟢 -1.47 kB 🟢 -1.29 kB
assets/GlobalToast-BjXpCNg4.js (removed) 3.05 kB 🟢 -3.05 kB 🟢 -1.1 kB 🟢 -946 B
assets/GlobalToast-yoQU8J5e.js (new) 3.05 kB 🔴 +3.05 kB 🔴 +1.1 kB 🔴 +942 B
assets/SubscribeToRun-ChbJfmiT.js (new) 2.96 kB 🔴 +2.96 kB 🔴 +1.16 kB 🔴 +1.01 kB
assets/SubscribeToRun-DPT6snZA.js (removed) 2.96 kB 🟢 -2.96 kB 🟢 -1.16 kB 🟢 -1.01 kB
assets/cloudSessionCookie-C4aqRCE-.js (removed) 2.94 kB 🟢 -2.94 kB 🟢 -935 B 🟢 -804 B
assets/cloudSessionCookie-DXDz6sgg.js (new) 2.94 kB 🔴 +2.94 kB 🔴 +935 B 🔴 +803 B
assets/BaseViewTemplate-DhUBBX5p.js (new) 2.42 kB 🔴 +2.42 kB 🔴 +1.04 kB 🔴 +940 B
assets/BaseViewTemplate-DIhbg0X6.js (removed) 2.42 kB 🟢 -2.42 kB 🟢 -1.05 kB 🟢 -937 B
assets/CloudRunButtonWrapper-a_gwoHPA.js (removed) 1.79 kB 🟢 -1.79 kB 🟢 -641 B 🟢 -561 B
assets/CloudRunButtonWrapper-Cfa3t99V.js (new) 1.79 kB 🔴 +1.79 kB 🔴 +643 B 🔴 +565 B
assets/cloudBadges-BuL_BdBD.js (new) 1.08 kB 🔴 +1.08 kB 🔴 +540 B 🔴 +484 B
assets/cloudBadges-CCDpB7kC.js (removed) 1.08 kB 🟢 -1.08 kB 🟢 -541 B 🟢 -488 B
assets/graphHasMissingNodes-8tV6mES3.js (removed) 1.06 kB 🟢 -1.06 kB 🟢 -462 B 🟢 -414 B
assets/graphHasMissingNodes-BovbrdbJ.js (new) 1.06 kB 🔴 +1.06 kB 🔴 +459 B 🔴 +420 B
assets/cloudSubscription-CZT0Hwxm.js (new) 976 B 🔴 +976 B 🔴 +465 B 🔴 +402 B
assets/cloudSubscription-Dt_yhQgY.js (removed) 976 B 🟢 -976 B 🟢 -466 B 🟢 -400 B
assets/nightlyBadges-CI7Ochnl.js (removed) 594 B 🟢 -594 B 🟢 -357 B 🟢 -312 B
assets/nightlyBadges-Lb4deibz.js (new) 594 B 🔴 +594 B 🔴 +356 B 🔴 +311 B
assets/SubscriptionPanelContentWorkspace-B-qYS0bS.js (new) 266 B 🔴 +266 B 🔴 +136 B 🔴 +112 B
assets/SubscriptionPanelContentWorkspace-BDIskf-E.js (removed) 266 B 🟢 -266 B 🟢 -136 B 🟢 -117 B
assets/WidgetInputNumber-AN_LJRt7.js (removed) 186 B 🟢 -186 B 🟢 -119 B 🟢 -122 B
assets/WidgetInputNumber-BvXfnHk0.js (new) 186 B 🔴 +186 B 🔴 +119 B 🔴 +114 B
assets/WidgetLegacy-BC7ArsN_.js (removed) 164 B 🟢 -164 B 🟢 -125 B 🟢 -113 B
assets/WidgetLegacy-CQrq6FAh.js (new) 164 B 🔴 +164 B 🔴 +125 B 🔴 +104 B
assets/Load3D-BrUjFsFJ.js (removed) 131 B 🟢 -131 B 🟢 -107 B 🟢 -107 B
assets/Load3D-C6Zb2pEO.js (new) 131 B 🔴 +131 B 🔴 +107 B 🔴 +116 B
assets/auto-BmypP-XQ.js 1.73 kB 1.73 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-27PChCGl.js 17 kB 17 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-B52_zgXW.js 18.8 kB 18.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BC_Q8we6.js 19.3 kB 19.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BZlNQPg2.js 17.8 kB 17.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CgVf6wUK.js 17.9 kB 17.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CuidUnsD.js 19.3 kB 19.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-D5OfZ3bv.js 18.5 kB 18.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-Dmj47WTl.js 20.6 kB 20.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DUK2nLuH.js 17.2 kB 17.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-K3soE7da.js 18 kB 18 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-MVcGSIbM.js 18 kB 18 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/LazyImage-rWQpxwnM.js 14.1 kB 14.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-3-ad-MUk.js 127 kB 127 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BBLNw8xJ.js 129 kB 129 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BHVFfeo5.js 125 kB 125 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BICThk_R.js 132 kB 132 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C0B5rjtK.js 112 kB 112 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CBm-XJ4H.js 172 kB 172 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CiYkb6QV.js 111 kB 111 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DNur9seF.js 154 kB 154 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DtCmAq24.js 150 kB 150 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-kSNuyyLo.js 143 kB 143 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-WfrQSHBO.js 125 kB 125 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Media3DTop-8_T22Isd.js 2.38 kB 2.38 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-CBP8th-j.js 2 kB 2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-1THG_DJM.js 2.34 kB 2.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-bsLx-Wg6.js 2.84 kB 2.84 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/mixpanel.module-BiPjOPVW.js 143 B 143 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-AWEAv70v.js 442 kB 442 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BbERBXTz.js 335 kB 335 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bg0VvRsL.js 338 kB 338 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bou_oU4e.js 364 kB 364 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BwPth-go.js 407 kB 407 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BWX3iBBy.js 407 kB 407 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Dfh39t4u.js 361 kB 361 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DqfOW2sF.js 378 kB 378 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DyDPn66V.js 364 kB 364 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-MJExKdEs.js 368 kB 368 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-x4cF477r.js 358 kB 358 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/OBJLoader2WorkerModule-DTMpvldF.js 109 kB 109 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/previousFullPath-B-XG7lU7.js 838 B 838 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/rolldown-runtime-cVp-94Rc.js 1.96 kB 1.96 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Slider-BAEfKuro.js 4.21 kB 4.21 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widget-CD3JnB1i.js 518 B 518 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetBoundingBox-Bp7B7z1s.js 186 B 186 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetBoundingBox-CgNPbPqq.js 4.71 kB 4.71 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-3mC7A_va.js 2.79 kB 2.79 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetColorPicker-x8L_rIAb.js 3.71 kB 3.71 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetGalleria-f72WaoQY.js 4.57 kB 4.57 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-Dd0p7l7V.js 3.79 kB 3.79 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetInputText-DOFSeOZG.js 2.58 kB 2.58 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetLayoutField-CZXFB71F.js 2.61 kB 2.61 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetMarkdown-bP5F2-qx.js 3.22 kB 3.22 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-DOe9Bb1I.js 1.31 kB 1.31 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetTextarea-DwdEJ3mA.js 3.52 kB 3.52 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetToggleSwitch-BIK7gguT.js 3.08 kB 3.08 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

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

🤖 Fix all issues with AI agents
In `@src/composables/useLoad3d.test.ts`:
- Around line 45-56: The test defines a local helper createMockPointerEvent that
duplicates the shared test utility createMockCanvasPointerEvent; remove the
local createMockPointerEvent and import/use createMockCanvasPointerEvent from
litegraphTestUtils instead (update the test's imports and replace calls to
createMockPointerEvent with createMockCanvasPointerEvent), ensuring the returned
shape matches CanvasPointerEvent expected by the tests.

In `@src/extensions/core/clipspace.ts`:
- Around line 175-179: The method createImgPreview on the ClipspaceDialog class
is unused and should be removed to reduce surface area; delete the entire
createImgPreview() implementation (the function that returns an HTMLImageElement
or null and references ComfyApp.clipspace?.imgs and $el with id
'clipspace_preview') from the ClipspaceDialog class so the class no longer
exports this dead method and update any class references if they relied on it
(none do).

In `@src/lib/litegraph/src/canvas/LinkConnector.integration.test.ts`:
- Around line 189-194: The test file defines a local helper mockedPointerEvent
that duplicates the existing shared factory createMockCanvasPointerEvent;
replace all usages of mockedPointerEvent with createMockCanvasPointerEvent and
remove the local mockedPointerEvent function to avoid duplication (check
occurrences around lines where mockedPointerEvent is declared and at the other
listed call sites). Ensure the signature/arguments you pass match
createMockCanvasPointerEvent (canvasX, canvasY) and run the tests to verify no
behavioral changes.

In `@src/lib/litegraph/src/canvas/LinkConnectorSubgraphInputValidation.test.ts`:
- Around line 16-25: Replace the local MockPointerEvent and MockRenderLink
interfaces with type aliases to the existing library types (e.g., alias
MockPointerEvent to CanvasPointerEvent and MockRenderLink to ToOutputRenderLink
or the appropriate render-link type) so tests use the real shapes; update the
import list to pull those types from their module and adjust any usages (e.g.,
in createMockCanvasPointerEvent calls and test variables) to the aliased names
to avoid duplicate definitions and drift.

In `@src/lib/litegraph/src/canvas/ToOutputRenderLink.test.ts`:
- Around line 7-21: Replace the bespoke MockEvents interface with a typed
Partial of the real event contract: use
Partial<CustomEventTarget<LinkConnectorEventMap>> for mocks (so
addEventListener/removeEventListener/dispatchEvent/dispatch stay aligned with
the real type), update the variable declarations that currently use MockEvents
to that Partial type, and remove the duplicated interface declaration; repeat
the same replacement for the other mock-event declarations in this test file
that mirror lines 50-62 and 90-102.

In `@src/utils/__tests__/litegraphTestUtils.ts`:
- Around line 165-174: Update the JSDoc for
createMockLGraphNodeWithArrayBoundingRect to explicitly state that this returns
a real LGraphNode (not a lightweight mock) with its boundingRect property
represented as a Float64Array for testing position methods, and clarify when to
prefer this helper versus createMockLGraphNode (e.g., use this when tests rely
on a Float64Array boundingRect; use createMockLGraphNode for simple/mock-only
behavior). Mention the function name createMockLGraphNodeWithArrayBoundingRect
and the alternative helper createMockLGraphNode so future readers can find and
choose the correct utility.
- Around line 176-185: The FileList mock returned by createMockFileList lacks
iteration support so code using for...of or spread will break; update
createMockFileList to include a Symbol.iterator implementation that yields the
files array (e.g., add a [Symbol.iterator] method that returns an iterator over
files or a generator delegating to files) while keeping length and item behavior
intact so the returned object correctly implements the iterable FileList
interface.

Comment on lines +175 to 179
createImgPreview(): HTMLImageElement | null {
if (ComfyApp.clipspace?.imgs) {
return $el('img', { id: 'clipspace_preview', ondragstart: () => false })
} else return []
} else return null
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Search for usages of createImgPreview method across the codebase

# Search for method calls
rg -n 'createImgPreview' --type ts --type vue

# Also check for any dynamic access patterns
rg -n "['\"](createImgPreview)['\"]" --type ts --type vue

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 125


🏁 Script executed:

#!/bin/bash
# Search for usages of createImgPreview method across the codebase
# Using glob patterns to include both .ts and .vue files

rg -n 'createImgPreview' -g '*.ts' -g '*.vue' -g '*.js'

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 154


🏁 Script executed:

#!/bin/bash
# Check the class definition and exports around the method
sed -n '1,180p' src/extensions/core/clipspace.ts | tail -20

# Check if the file exports this class or method
rg -n 'export' src/extensions/core/clipspace.ts | head -10

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 646


Remove the unused createImgPreview() method.

This method is never called anywhere in the codebase and only adds unnecessary surface area to the exported ClipspaceDialog class. Removing it will improve code cleanliness.

🤖 Prompt for AI Agents
In `@src/extensions/core/clipspace.ts` around lines 175 - 179, The method
createImgPreview on the ClipspaceDialog class is unused and should be removed to
reduce surface area; delete the entire createImgPreview() implementation (the
function that returns an HTMLImageElement or null and references
ComfyApp.clipspace?.imgs and $el with id 'clipspace_preview') from the
ClipspaceDialog class so the class no longer exports this dead method and update
any class references if they relied on it (none do).

…t.ts

- Removed local createMockPointerEvent helper that duplicated createMockCanvasPointerEvent
- Updated imports to use shared createMockCanvasPointerEvent from litegraphTestUtils
- Replaced calls to createMockPointerEvent() with createMockCanvasPointerEvent(0, 0)
- Removed unused CanvasPointerEvent type import
…egration.test.ts

Replace all usages of the local mockedPointerEvent helper with the shared
createMockCanvasPointerEvent factory from litegraphTestUtils to avoid
duplication and improve consistency across test files.
…enderLink.test.ts

Remove the bespoke MockEvents interface and use typed Partial of the real
CustomEventTarget<LinkConnectorEventMap> for event mocks to ensure alignment
with the actual type contract.
Add iterator implementation to createMockFileList so the mock FileList can be
used with for...of loops and spread operations, ensuring full compatibility
with the iterable FileList interface.
Expand JSDoc to explain when to use createMockLGraphNodeWithArrayBoundingRect
vs createMockLGraphNode, emphasizing that this creates a real LGraphNode instance
with Float64Array boundingRect for position method testing.
Replace MockPointerEvent and MockRenderLink interfaces with type aliases
to CanvasPointerEvent and ToOutputRenderLink respectively. Update test
code to use createMockCanvasPointerEvent and createMockNodeInputSlot
factory functions to avoid duplicate type definitions and prevent drift
from library types.
@Myestery Myestery changed the title Road to No explicit any: Improve type safety in Group 3 test mocks Road to No explicit any Part 8 (Group 3): Improve type safety in Group 3 test mocks Jan 25, 2026
@coderabbitai coderabbitai bot requested a review from jtydhr88 January 25, 2026 13:48
@Myestery Myestery merged commit 29220f6 into main Jan 26, 2026
27 checks passed
@Myestery Myestery deleted the refactor/cleanup-any-part8-group3 branch January 26, 2026 17:13
Myestery added a commit that referenced this pull request Jan 26, 2026
## Summary

Removes all `as unknown as Type` double-cast patterns from group 4 files
as part of the ongoing TypeScript cleanup effort.

## Changes

### Type Safety Improvements
- Replaced `as unknown as Type` with `as Partial<Type> as Type` for
valid mock objects
- Added proper null/undefined validation in `Subgraph.addInput()` and
`Subgraph.addOutput()`
- Updated test expectations to match new validation behavior

### Files Modified (17 files)
**Core Implementation:**
- `src/lib/litegraph/src/LGraph.ts` - Added input validation for
subgraph add methods
- `src/lib/litegraph/src/interfaces.ts` - Cleaned up type definitions
- `src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts` - Improved type
safety
- `src/platform/telemetry/types.ts` - Better type definitions
- `src/platform/telemetry/utils/surveyNormalization.ts` - Type cleanup

**Test Files:**
- `src/lib/litegraph/src/subgraph/SubgraphEdgeCases.test.ts` - Updated
to expect validation errors
- `src/lib/litegraph/src/subgraph/SubgraphMemory.test.ts` - Proper mock
typing
- `src/lib/litegraph/src/subgraph/SubgraphNode.test.ts` - Type
improvements
- `src/lib/litegraph/src/subgraph/SubgraphNode.titleButton.test.ts` -
Mock type fixes
- `src/lib/litegraph/src/subgraph/SubgraphSlotVisualFeedback.test.ts` -
Proper typing
- `src/lib/litegraph/src/subgraph/SubgraphWidgetPromotion.test.ts` -
Type cleanup
- `src/lib/litegraph/src/utils/textUtils.test.ts` - Mock improvements
- `src/lib/litegraph/src/widgets/ComboWidget.test.ts` - Type safety
updates
- `src/platform/assets/services/assetService.test.ts` - Type
improvements
- `src/platform/settings/composables/useSettingSearch.test.ts` - Mock
type fixes
- `src/platform/settings/settingStore.test.ts` - Type cleanup
- `src/platform/telemetry/utils/__tests__/surveyNormalization.test.ts` -
Type improvements

## Testing
- ✅ All modified test files pass
- ✅ TypeScript compilation passes
- ✅ Linting passes

## Related
Part of the TypeScript cleanup effort. Follows patterns from groups 1-3.

Previous PRs:
- Group 1: (merged)
- Group 2: (merged)
- Group 3: #8304

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8314-Road-to-No-Explicit-Any-Part-8-Group4-2f46d73d36508172a9d4e53b2c5cbadd)
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>
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.

2 participants