Skip to content

Conversation

@Myestery
Copy link
Contributor

@Myestery Myestery commented 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:

┆Issue is synchronized with this Notion page by Unito

Replace 'as unknown as' with safer type patterns in 12 files:
- Use 'as Partial<Type> as Type' for mock objects
- Remove unnecessary double casts where direct typing works

Files improved:
- LiteGraph interfaces, subgraph tests, and utilities
- Platform settings, telemetry, and asset services

Part of group 4 cleanup from fix/remove-any-types-part8 branch.
- Replace all 'as unknown as Type' patterns with proper typing
- Use 'as Partial<Type> as Type' for valid mock objects
- Add null/undefined validation in Subgraph.addInput/addOutput
- Update SubgraphEdgeCases tests to expect validation errors
- Use @ts-expect-error for intentionally invalid test values in ComboWidget

Related to ongoing TypeScript cleanup effort
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 26, 2026

📝 Walkthrough

Walkthrough

Adds runtime validation for Subgraph.addInput/addOutput, tightens TypeScript typings across litegraph and platform tests (removing loose any casts), replaces callback type aliases with standard utility types, and introduces a new SurveyResponsesNormalized telemetry interface and updated normalization function signature.

Changes

Cohort / File(s) Summary
Type system refactor
src/lib/litegraph/src/interfaces.ts, src/lib/litegraph/src/subgraph/ExecutableNodeDTO.ts
Removed CallbackParams/CallbackReturn aliases; MethodNames<T> now uses unknown[]/unknown; call sites updated to Parameters<NonNullable<...>> / ReturnType<NonNullable<...>>.
Subgraph runtime validation
src/lib/litegraph/src/LGraph.ts
Added runtime checks in Subgraph.addInput / Subgraph.addOutput to throw on null/undefined name or type.
Litegraph test typing fixes
src/lib/litegraph/src/subgraph/..., src/lib/litegraph/src/utils/textUtils.test.ts, src/lib/litegraph/src/widgets/ComboWidget.test.ts
Replaced any casts with stricter types (Partial<T>, local mock interfaces), introduced test-local interfaces (e.g., InputWithWidget, MockPointerEvent, MockColorContext), and updated expectations where behavior changed (edge-case tests now expect throws).
Platform test typing fixes
src/platform/assets/services/assetService.test.ts, src/platform/settings/composables/useSettingSearch.test.ts, src/platform/settings/settingStore.test.ts
Strengthened mock typings (e.g., unknown[], ReturnType<typeof useSettingStore>, explicit Settings casts); no runtime behavior changes.
Telemetry types & normalization
src/platform/telemetry/types.ts, src/platform/telemetry/utils/surveyNormalization.ts, src/platform/telemetry/utils/__tests__/surveyNormalization.test.ts
Added SurveyResponsesNormalized interface; normalizeSurveyResponses now accepts SurveyResponses and returns SurveyResponsesNormalized; tests simplified input calls (removed casts).

Possibly related PRs

Suggested reviewers

  • jtydhr88
  • christian-byrne
  • DrJKL
  • 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 26, 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 26, 2026

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 01/26/2026, 07:26:10 PM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Jan 26, 2026

Bundle Size Report

Summary

  • Raw size: 22 MB baseline 22 MB — 🔴 +52 B
  • Gzip: 4.57 MB baseline 4.57 MB — 🟢 -65 B
  • Brotli: 3.39 MB baseline 3.39 MB — 🔴 +344 B
  • Bundles: 170 current • 170 baseline • 82 added / 82 removed

Category Glance
Data & Services 🔴 +252 B (3.19 MB) · Other 🟢 -192 B (6.49 MB) · Panels & Settings 🟢 -8 B (466 kB) · Vendor & Third-Party ⚪ 0 B (10.7 MB) · Graph Workspace ⚪ 0 B (958 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-BkrrkIT9.js (new) 22.8 kB 🔴 +22.8 kB 🔴 +6.84 kB 🔴 +6.02 kB
assets/index-BUUX2kYY.js (removed) 22.8 kB 🟢 -22.8 kB 🟢 -6.84 kB 🟢 -6.01 kB

Status: 1 added / 1 removed

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

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-C8tvq49H.js (new) 958 kB 🔴 +958 kB 🔴 +194 kB 🔴 +147 kB
assets/GraphView-hW8AHTtA.js (removed) 958 kB 🟢 -958 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-ClRIHlO7.js (removed) 17.1 kB 🟢 -17.1 kB 🟢 -3.6 kB 🟢 -3.05 kB
assets/CloudSurveyView-DnR_yD2-.js (new) 17.1 kB 🔴 +17.1 kB 🔴 +3.6 kB 🔴 +3.05 kB
assets/CloudLoginView-BCiutVmx.js (new) 11.8 kB 🔴 +11.8 kB 🔴 +3.09 kB 🔴 +2.72 kB
assets/CloudLoginView-BKUIE_8N.js (removed) 11.8 kB 🟢 -11.8 kB 🟢 -3.09 kB 🟢 -2.72 kB
assets/UserCheckView-BwllQYUv.js (new) 10.5 kB 🔴 +10.5 kB 🔴 +2.44 kB 🔴 +2.13 kB
assets/UserCheckView-DXwjZThT.js (removed) 10.5 kB 🟢 -10.5 kB 🟢 -2.45 kB 🟢 -2.13 kB
assets/CloudLayoutView-B6SRC1E5.js (removed) 8.54 kB 🟢 -8.54 kB 🟢 -2.25 kB 🟢 -1.96 kB
assets/CloudLayoutView-BV75yQ2l.js (new) 8.54 kB 🔴 +8.54 kB 🔴 +2.25 kB 🔴 +1.96 kB
assets/CloudSignupView-D48toMiC.js (removed) 8.18 kB 🟢 -8.18 kB 🟢 -2.33 kB 🟢 -2.03 kB
assets/CloudSignupView-VaA8iNHh.js (new) 8.18 kB 🔴 +8.18 kB 🔴 +2.33 kB 🔴 +2.03 kB
assets/CloudForgotPasswordView-DfeHgy-R.js (new) 6.26 kB 🔴 +6.26 kB 🔴 +1.92 kB 🔴 +1.69 kB
assets/CloudForgotPasswordView-DsnYCsbD.js (removed) 6.26 kB 🟢 -6.26 kB 🟢 -1.92 kB 🟢 -1.69 kB
assets/UserSelectView-Cd_D7FIL.js (removed) 5.28 kB 🟢 -5.28 kB 🟢 -1.76 kB 🟢 -1.58 kB
assets/UserSelectView-DIKT3q77.js (new) 5.28 kB 🔴 +5.28 kB 🔴 +1.76 kB 🔴 +1.57 kB
assets/CloudSubscriptionRedirectView-BPEmHbNJ.js (removed) 5.27 kB 🟢 -5.27 kB 🟢 -1.73 kB 🟢 -1.54 kB
assets/CloudSubscriptionRedirectView-DwBxTw6F.js (new) 5.27 kB 🔴 +5.27 kB 🔴 +1.73 kB 🔴 +1.53 kB
assets/CloudAuthTimeoutView-D2_FFCet.js (new) 5.24 kB 🔴 +5.24 kB 🔴 +1.7 kB 🔴 +1.48 kB
assets/CloudAuthTimeoutView-DmMlvDkg.js (removed) 5.24 kB 🟢 -5.24 kB 🟢 -1.7 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-BQ1r6IEU.js (new) 29.8 kB 🔴 +29.8 kB 🔴 +5.89 kB 🔴 +5.14 kB
assets/WorkspacePanel-HoWCK_hP.js (removed) 29.8 kB 🟢 -29.8 kB 🟢 -5.89 kB 🟢 -5.14 kB
assets/LegacyCreditsPanel-DAmgXRnl.js (new) 23.8 kB 🔴 +23.8 kB 🔴 +5.95 kB 🔴 +5.23 kB
assets/LegacyCreditsPanel-DFE4Phyk.js (removed) 23.8 kB 🟢 -23.8 kB 🟢 -5.95 kB 🟢 -5.22 kB
assets/SubscriptionPanel-CrFH0O-n.js (removed) 20.9 kB 🟢 -20.9 kB 🟢 -5.01 kB 🟢 -4.41 kB
assets/SubscriptionPanel-LxLKul9c.js (new) 20.9 kB 🔴 +20.9 kB 🔴 +5.01 kB 🔴 +4.41 kB
assets/KeybindingPanel-BtGHLExD.js (removed) 14.2 kB 🟢 -14.2 kB 🟢 -3.74 kB 🟢 -3.31 kB
assets/KeybindingPanel-Dla1qvSw.js (new) 14.2 kB 🔴 +14.2 kB 🔴 +3.74 kB 🔴 +3.31 kB
assets/AboutPanel-B5SZ1g1C.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.68 kB 🔴 +2.43 kB
assets/AboutPanel-CA6bITNe.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.68 kB 🟢 -2.43 kB
assets/ExtensionPanel-BGXRvATy.js (removed) 10.2 kB 🟢 -10.2 kB 🟢 -2.71 kB 🟢 -2.4 kB
assets/ExtensionPanel-EgWF1zmj.js (new) 10.2 kB 🔴 +10.2 kB 🔴 +2.71 kB 🔴 +2.4 kB
assets/ServerConfigPanel-DeUvjTXF.js (new) 7.23 kB 🔴 +7.23 kB 🔴 +2.17 kB 🔴 +1.94 kB
assets/ServerConfigPanel-DsASSs2S.js (removed) 7.23 kB 🟢 -7.23 kB 🟢 -2.17 kB 🟢 -1.94 kB
assets/UserPanel-BsqGY7wC.js (removed) 6.58 kB 🟢 -6.58 kB 🟢 -1.9 kB 🟢 -1.67 kB
assets/UserPanel-CES2NeSr.js (new) 6.58 kB 🔴 +6.58 kB 🔴 +1.9 kB 🔴 +1.67 kB
assets/config-C_HR6VWU.js (removed) 1.16 kB 🟢 -1.16 kB 🟢 -610 B 🟢 -539 B
assets/config-B5hUrVeB.js (new) 1.15 kB 🔴 +1.15 kB 🔴 +604 B 🔴 +529 B
assets/refreshRemoteConfig-BLIHtsZv.js (new) 1.14 kB 🔴 +1.14 kB 🔴 +523 B 🔴 +488 B
assets/refreshRemoteConfig-DC4HFLdl.js (removed) 1.14 kB 🟢 -1.14 kB 🟢 -522 B 🟢 -488 B
assets/cloudRemoteConfig-BGb3v-jR.js (new) 1.11 kB 🔴 +1.11 kB 🔴 +506 B 🔴 +440 B
assets/cloudRemoteConfig-Bk1GsiOC.js (removed) 1.11 kB 🟢 -1.11 kB 🟢 -509 B 🟢 -438 B
assets/refreshRemoteConfig-BOOaVIDN.js (new) 169 B 🔴 +169 B 🔴 +108 B 🔴 +105 B
assets/refreshRemoteConfig-DyqfGRIM.js (removed) 169 B 🟢 -169 B 🟢 -108 B 🟢 -111 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-Bc52BHhz.js (new) 3.54 kB 🔴 +3.54 kB 🔴 +1.24 kB 🔴 +1.06 kB
assets/auth-C4V5V8iU.js (removed) 3.54 kB 🟢 -3.54 kB 🟢 -1.24 kB 🟢 -1.06 kB
assets/firebaseAuthStore-Jc396jRQ.js (removed) 217 B 🟢 -217 B 🟢 -136 B 🟢 -129 B
assets/firebaseAuthStore-xue98JbD.js (new) 217 B 🔴 +217 B 🔴 +136 B 🔴 +119 B
assets/auth--jk9IV3o.js (new) 178 B 🔴 +178 B 🔴 +142 B 🔴 +130 B
assets/auth-BQYnA-ea.js (removed) 178 B 🟢 -178 B 🟢 -142 B 🟢 -145 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-COQiCOgp.js (removed) 2.65 kB 🟢 -2.65 kB 🟢 -1.25 kB 🟢 -1.11 kB
assets/useSubscriptionDialog-Dpe1qGqK.js (new) 2.65 kB 🔴 +2.65 kB 🔴 +1.25 kB 🔴 +1.11 kB
assets/useSubscriptionDialog-D4Z-us4u.js (new) 179 B 🔴 +179 B 🔴 +110 B 🔴 +96 B
assets/useSubscriptionDialog-vZWinzBJ.js (removed) 179 B 🟢 -179 B 🟢 -110 B 🟢 -100 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-D1BA8jys.js (removed) 9.52 kB 🟢 -9.52 kB 🟢 -2.69 kB 🟢 -2.43 kB
assets/ComfyQueueButton-j1zfQin9.js (new) 9.52 kB 🔴 +9.52 kB 🔴 +2.69 kB 🔴 +2.41 kB
assets/SubscribeButton-BwyWausP.js (removed) 4.63 kB 🟢 -4.63 kB 🟢 -1.57 kB 🟢 -1.39 kB
assets/SubscribeButton-C47bCoze.js (new) 4.63 kB 🔴 +4.63 kB 🔴 +1.57 kB 🔴 +1.39 kB
assets/CloudBadge-C8B5sf65.js (removed) 1.85 kB 🟢 -1.85 kB 🟢 -723 B 🟢 -652 B
assets/CloudBadge-D4ke8mf-.js (new) 1.85 kB 🔴 +1.85 kB 🔴 +722 B 🔴 +644 B
assets/cloudFeedbackTopbarButton-DTbm9f85.js (new) 1.24 kB 🔴 +1.24 kB 🔴 +675 B 🔴 +576 B
assets/cloudFeedbackTopbarButton-SICN8bm7.js (removed) 1.24 kB 🟢 -1.24 kB 🟢 -677 B 🟢 -577 B
assets/ComfyQueueButton-BDzzkuT9.js (new) 181 B 🔴 +181 B 🔴 +118 B 🔴 +126 B
assets/ComfyQueueButton-FyaK2bwF.js (removed) 181 B 🟢 -181 B 🟢 -118 B 🟢 -114 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.19 MB (baseline 3.19 MB) • 🔴 +252 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/dialogService-g-wsmhWh.js (new) 2 MB 🔴 +2 MB 🔴 +423 kB 🔴 +323 kB
assets/dialogService-ECPZn4V3.js (removed) 2 MB 🟢 -2 MB 🟢 -423 kB 🟢 -323 kB
assets/api-je7yFIFC.js (new) 1.16 MB 🔴 +1.16 MB 🔴 +243 kB 🔴 +188 kB
assets/api-DjjIWKsS.js (removed) 1.16 MB 🟢 -1.16 MB 🟢 -243 kB 🟢 -188 kB
assets/releaseStore-7YM24qnt.js (new) 8.91 kB 🔴 +8.91 kB 🔴 +2.4 kB 🔴 +2.12 kB
assets/releaseStore-D1zM4nXy.js (removed) 8.91 kB 🟢 -8.91 kB 🟢 -2.4 kB 🟢 -2.12 kB
assets/keybindingService-CzAhXb-v.js (new) 6.78 kB 🔴 +6.78 kB 🔴 +1.74 kB 🔴 +1.51 kB
assets/keybindingService-DqlWjTG0.js (removed) 6.78 kB 🟢 -6.78 kB 🟢 -1.74 kB 🟢 -1.52 kB
assets/userStore-BUaSEAG9.js (new) 2.16 kB 🔴 +2.16 kB 🔴 +814 B 🔴 +726 B
assets/userStore-DldAcNaL.js (removed) 2.16 kB 🟢 -2.16 kB 🟢 -812 B 🟢 -723 B
assets/audioService-Cdbq61Y1.js (removed) 2.03 kB 🟢 -2.03 kB 🟢 -933 B 🟢 -823 B
assets/audioService-KfKRaj8L.js (new) 2.03 kB 🔴 +2.03 kB 🔴 +932 B 🔴 +820 B
assets/teamWorkspaceStore-DdhhDVq1.js (removed) 165 B 🟢 -165 B 🟢 -123 B 🟢 -110 B
assets/teamWorkspaceStore-DQ7fFCI_.js (new) 165 B 🔴 +165 B 🔴 +123 B 🔴 +105 B
assets/releaseStore-jenyStVO.js (removed) 140 B 🟢 -140 B 🟢 -106 B 🟢 -103 B
assets/releaseStore-xTWygvPJ.js (new) 140 B 🔴 +140 B 🔴 +106 B 🔴 +108 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-BGnm6u4r.js (removed) 5.08 kB 🟢 -5.08 kB 🟢 -1.5 kB 🟢 -1.31 kB
assets/useErrorHandling-tfcuM46a.js (new) 5.08 kB 🔴 +5.08 kB 🔴 +1.5 kB 🔴 +1.31 kB
assets/useWorkspaceUI-8Wrkm_jL.js (new) 3.42 kB 🔴 +3.42 kB 🔴 +973 B 🔴 +840 B
assets/useWorkspaceUI-Xl7do5iO.js (removed) 3.42 kB 🟢 -3.42 kB 🟢 -975 B 🟢 -841 B
assets/useSubscriptionActions-9pCQ1IVq.js (removed) 2.22 kB 🟢 -2.22 kB 🟢 -872 B 🟢 -762 B
assets/useSubscriptionActions-B_UZ7XDT.js (new) 2.22 kB 🔴 +2.22 kB 🔴 +871 B 🔴 +760 B
assets/subscriptionCheckoutUtil-BizdTBNB.js (new) 2 kB 🔴 +2 kB 🔴 +860 B 🔴 +757 B
assets/subscriptionCheckoutUtil-DP9NKoSn.js (removed) 2 kB 🟢 -2 kB 🟢 -865 B 🟢 -758 B
assets/useSubscriptionCredits-DsuwmLdk.js (new) 1.39 kB 🔴 +1.39 kB 🔴 +596 B 🔴 +529 B
assets/useSubscriptionCredits-WCsw5Guh.js (removed) 1.39 kB 🟢 -1.39 kB 🟢 -600 B 🟢 -530 B
assets/audioUtils-CB-nyrD1.js (removed) 970 B 🟢 -970 B 🟢 -548 B 🟢 -459 B
assets/audioUtils-CkQjqoIm.js (new) 970 B 🔴 +970 B 🔴 +546 B 🔴 +487 B
assets/useCurrentUser-Ddra-xct.js (removed) 145 B 🟢 -145 B 🟢 -114 B 🟢 -98 B
assets/useCurrentUser-xc609v5N.js (new) 145 B 🔴 +145 B 🔴 +114 B 🔴 +99 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) • 🟢 -192 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/core-CwNmgG5x.js (removed) 180 kB 🟢 -180 kB 🟢 -43.3 kB 🟢 -36.2 kB
assets/core-DgkmKG1C.js (new) 180 kB 🔴 +180 kB 🔴 +43.3 kB 🔴 +36.1 kB
assets/WidgetSelect-5hqtKs0T.js (removed) 50.7 kB 🟢 -50.7 kB 🟢 -11.2 kB 🟢 -9.76 kB
assets/WidgetSelect-DAjJ2BXo.js (new) 50.7 kB 🔴 +50.7 kB 🔴 +11.2 kB 🔴 +9.74 kB
assets/Load3DControls-BB5W9ZN3.js (removed) 35.9 kB 🟢 -35.9 kB 🟢 -5.87 kB 🟢 -5.08 kB
assets/Load3DControls-BjRL5iGa.js (new) 35.9 kB 🔴 +35.9 kB 🔴 +5.87 kB 🔴 +5.08 kB
assets/SubscriptionRequiredDialogContent-DUUOjop9.js (new) 28.7 kB 🔴 +28.7 kB 🔴 +6.78 kB 🔴 +5.91 kB
assets/SubscriptionRequiredDialogContent-SnC9M-u-.js (removed) 28.7 kB 🟢 -28.7 kB 🟢 -6.78 kB 🟢 -5.92 kB
assets/CurrentUserPopoverWorkspace-DaCJS1ds.js (removed) 22.1 kB 🟢 -22.1 kB 🟢 -4.94 kB 🟢 -4.38 kB
assets/CurrentUserPopoverWorkspace-JyguU3Bu.js (new) 22.1 kB 🔴 +22.1 kB 🔴 +4.94 kB 🔴 +4.38 kB
assets/Load3D-9hoIWiSs.js (new) 20.9 kB 🔴 +20.9 kB 🔴 +4.59 kB 🔴 +4.01 kB
assets/Load3D-Q4_sWiZK.js (removed) 20.9 kB 🟢 -20.9 kB 🟢 -4.59 kB 🟢 -4.02 kB
assets/WidgetInputNumber-CJ3jMmGr.js (removed) 18.3 kB 🟢 -18.3 kB 🟢 -4.51 kB 🟢 -4.02 kB
assets/WidgetInputNumber-Cw305i1b.js (new) 18.3 kB 🔴 +18.3 kB 🔴 +4.51 kB 🔴 +4.02 kB
assets/WidgetRecordAudio-CdkCb9zI.js (new) 18.2 kB 🔴 +18.2 kB 🔴 +4.96 kB 🔴 +4.43 kB
assets/WidgetRecordAudio-Cr8Qlwy1.js (removed) 18.2 kB 🟢 -18.2 kB 🟢 -4.96 kB 🟢 -4.43 kB
assets/SubscriptionPanelContentWorkspace-BJc_Ce0z.js (new) 18.2 kB 🔴 +18.2 kB 🔴 +4.47 kB 🔴 +3.9 kB
assets/SubscriptionPanelContentWorkspace-CwfX9Y1f.js (removed) 18.2 kB 🟢 -18.2 kB 🟢 -4.47 kB 🟢 -3.89 kB
assets/WidgetImageCrop-Czw52UVR.js (removed) 17.1 kB 🟢 -17.1 kB 🟢 -4.14 kB 🟢 -3.63 kB
assets/WidgetImageCrop-D1e5P7mH.js (new) 17.1 kB 🔴 +17.1 kB 🔴 +4.14 kB 🔴 +3.62 kB
assets/PanelTemplate-BXatw-zx.js (removed) 16.2 kB 🟢 -16.2 kB 🟢 -5.45 kB 🟢 -4.79 kB
assets/PanelTemplate-D-VQiVJb.js (new) 16.2 kB 🔴 +16.2 kB 🔴 +5.45 kB 🔴 +4.79 kB
assets/AudioPreviewPlayer-D5Imx3NK.js (new) 10.8 kB 🔴 +10.8 kB 🔴 +2.97 kB 🔴 +2.66 kB
assets/AudioPreviewPlayer-D87TR1jG.js (removed) 10.8 kB 🟢 -10.8 kB 🟢 -2.97 kB 🟢 -2.65 kB
assets/InviteMemberDialogContent-D_-wbl8b.js (new) 8.36 kB 🔴 +8.36 kB 🔴 +2.5 kB 🔴 +2.17 kB
assets/InviteMemberDialogContent-e-D8g2Sx.js (removed) 8.36 kB 🟢 -8.36 kB 🟢 -2.5 kB 🟢 -2.17 kB
assets/WidgetWithControl-CLAghzJX.js (removed) 8.02 kB 🟢 -8.02 kB 🟢 -2.65 kB 🟢 -2.38 kB
assets/WidgetWithControl-CLgzqbWB.js (new) 8.02 kB 🔴 +8.02 kB 🔴 +2.65 kB 🔴 +2.38 kB
assets/CreateWorkspaceDialogContent-0MJQ9vL_.js (new) 5.93 kB 🔴 +5.93 kB 🔴 +1.93 kB 🔴 +1.68 kB
assets/CreateWorkspaceDialogContent-tB50a0vZ.js (removed) 5.93 kB 🟢 -5.93 kB 🟢 -1.93 kB 🟢 -1.68 kB
assets/EditWorkspaceDialogContent-BegLL77v.js (new) 5.7 kB 🔴 +5.7 kB 🔴 +1.88 kB 🔴 +1.64 kB
assets/EditWorkspaceDialogContent-QVaV8FI0.js (removed) 5.7 kB 🟢 -5.7 kB 🟢 -1.88 kB 🟢 -1.64 kB
assets/ValueControlPopover-BzPnaXQK.js (removed) 4.86 kB 🟢 -4.86 kB 🟢 -1.55 kB 🟢 -1.38 kB
assets/ValueControlPopover-Chu3fwj6.js (new) 4.86 kB 🔴 +4.86 kB 🔴 +1.54 kB 🔴 +1.37 kB
assets/DeleteWorkspaceDialogContent-C9caL7DN.js (new) 4.59 kB 🔴 +4.59 kB 🔴 +1.56 kB 🔴 +1.35 kB
assets/DeleteWorkspaceDialogContent-CcHnyQvn.js (removed) 4.59 kB 🟢 -4.59 kB 🟢 -1.56 kB 🟢 -1.35 kB
assets/LeaveWorkspaceDialogContent-B8f4Ccm6.js (removed) 4.41 kB 🟢 -4.41 kB 🟢 -1.51 kB 🟢 -1.31 kB
assets/LeaveWorkspaceDialogContent-BK3pdV0y.js (new) 4.41 kB 🔴 +4.41 kB 🔴 +1.5 kB 🔴 +1.3 kB
assets/RemoveMemberDialogContent-BZL9wMFM.js (removed) 4.38 kB 🟢 -4.38 kB 🟢 -1.46 kB 🟢 -1.27 kB
assets/RemoveMemberDialogContent-CdQRoSSv.js (new) 4.38 kB 🔴 +4.38 kB 🔴 +1.45 kB 🔴 +1.26 kB
assets/RevokeInviteDialogContent-Bb2nCpZ1.js (new) 4.29 kB 🔴 +4.29 kB 🔴 +1.47 kB 🔴 +1.29 kB
assets/RevokeInviteDialogContent-CPRHqB95.js (removed) 4.29 kB 🟢 -4.29 kB 🟢 -1.47 kB 🟢 -1.29 kB
assets/GlobalToast--ou8HQA5.js (removed) 3.05 kB 🟢 -3.05 kB 🟢 -1.1 kB 🟢 -947 B
assets/GlobalToast-CE4vDptm.js (new) 3.05 kB 🔴 +3.05 kB 🔴 +1.1 kB 🔴 +943 B
assets/SubscribeToRun-B1plUmC9.js (removed) 2.96 kB 🟢 -2.96 kB 🟢 -1.15 kB 🟢 -1.01 kB
assets/SubscribeToRun-kk0YQaGl.js (new) 2.96 kB 🔴 +2.96 kB 🔴 +1.16 kB 🔴 +1.03 kB
assets/cloudSessionCookie-CFhh8aV_.js (new) 2.94 kB 🔴 +2.94 kB 🔴 +930 B 🔴 +808 B
assets/cloudSessionCookie-DQfnICNd.js (removed) 2.94 kB 🟢 -2.94 kB 🟢 -935 B 🟢 -804 B
assets/BaseViewTemplate-BTR31kbH.js (removed) 2.42 kB 🟢 -2.42 kB 🟢 -1.05 kB 🟢 -939 B
assets/BaseViewTemplate-Cl0gEqPv.js (new) 2.42 kB 🔴 +2.42 kB 🔴 +1.04 kB 🔴 +939 B
assets/CloudRunButtonWrapper-BBIkoPVx.js (new) 1.79 kB 🔴 +1.79 kB 🔴 +643 B 🔴 +568 B
assets/CloudRunButtonWrapper-D_nIkFA-.js (removed) 1.79 kB 🟢 -1.79 kB 🟢 -645 B 🟢 -562 B
assets/cloudBadges-COFjio-l.js (removed) 1.08 kB 🟢 -1.08 kB 🟢 -540 B 🟢 -489 B
assets/cloudBadges-MLcvqIJH.js (new) 1.08 kB 🔴 +1.08 kB 🔴 +540 B 🔴 +484 B
assets/graphHasMissingNodes-CppRk2NU.js (new) 1.06 kB 🔴 +1.06 kB 🔴 +461 B 🔴 +428 B
assets/graphHasMissingNodes-DpArtpCg.js (removed) 1.06 kB 🟢 -1.06 kB 🟢 -460 B 🟢 -429 B
assets/cloudSubscription-5mJm03ZF.js (removed) 976 B 🟢 -976 B 🟢 -464 B 🟢 -402 B
assets/cloudSubscription-um4Lofzp.js (new) 976 B 🔴 +976 B 🔴 +459 B 🔴 +395 B
assets/nightlyBadges-BLxEMeel.js (removed) 594 B 🟢 -594 B 🟢 -357 B 🟢 -310 B
assets/nightlyBadges-Q5po3Pof.js (new) 594 B 🔴 +594 B 🔴 +356 B 🔴 +311 B
assets/SubscriptionPanelContentWorkspace-C2eE_ORb.js (removed) 266 B 🟢 -266 B 🟢 -136 B 🟢 -114 B
assets/SubscriptionPanelContentWorkspace-Df_Xm-p7.js (new) 266 B 🔴 +266 B 🔴 +136 B 🔴 +120 B
assets/WidgetInputNumber-CryGpwbP.js (new) 186 B 🔴 +186 B 🔴 +119 B 🔴 +118 B
assets/WidgetInputNumber-D6TSfxNk.js (removed) 186 B 🟢 -186 B 🟢 -119 B 🟢 -112 B
assets/WidgetLegacy-CN7uEMIx.js (new) 164 B 🔴 +164 B 🔴 +125 B 🔴 +108 B
assets/WidgetLegacy-DiIcID6o.js (removed) 164 B 🟢 -164 B 🟢 -125 B 🟢 -115 B
assets/Load3D-BcizpGqI.js (removed) 131 B 🟢 -131 B 🟢 -107 B 🟢 -101 B
assets/Load3D-CbW5Bm7A.js (new) 131 B 🔴 +131 B 🔴 +107 B 🔴 +117 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

Replace any type in mockSettings with Record<string, MockSettingParams>. Define MockSettingParams interface to match the test mock structure, improving type safety without coupling to production SettingParams schema.
Replace direct Settings cast with explicit double-cast pattern (Partial<Settings> as Settings) to make it clear the mock is intentionally incomplete.
Remove redundant 'in' checks from type guards. The typeof check already handles missing properties by returning 'undefined', making the 'in' operator check unnecessary.
@Myestery Myestery marked this pull request as ready for review January 26, 2026 17:13
@Myestery Myestery requested a review from a team as a code owner January 26, 2026 17:13
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 26, 2026
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: 5

Caution

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

⚠️ Outside diff range comments (1)
src/platform/telemetry/utils/surveyNormalization.ts (1)

587-603: Prefer immutable construction for normalized.
Avoid mutating after spread; build the final object in one expression.

♻️ Suggested refactor
 export function normalizeSurveyResponses(
   responses: SurveyResponses
 ): SurveyResponsesNormalized {
-  const normalized: SurveyResponsesNormalized = { ...responses }
-
-  // Normalize industry
-  if (typeof responses.industry === 'string') {
-    normalized.industry_normalized = normalizeIndustry(responses.industry)
-    normalized.industry_raw = responses.industry
-  }
-
-  // Normalize use case
-  if (typeof responses.useCase === 'string') {
-    normalized.useCase_normalized = normalizeUseCase(responses.useCase)
-    normalized.useCase_raw = responses.useCase
-  }
+  const normalized: SurveyResponsesNormalized = {
+    ...responses,
+    ...(typeof responses.industry === 'string'
+      ? {
+          industry_normalized: normalizeIndustry(responses.industry),
+          industry_raw: responses.industry
+        }
+      : {}),
+    ...(typeof responses.useCase === 'string'
+      ? {
+          useCase_normalized: normalizeUseCase(responses.useCase),
+          useCase_raw: responses.useCase
+        }
+      : {})
+  }
 
   return normalized
 }

As per coding guidelines, avoid mutable state and prefer assignment at declaration.

🤖 Fix all issues with AI agents
In `@src/lib/litegraph/src/LGraph.ts`:
- Around line 2632-2641: The addOutput method currently checks for name/type
null or undefined like addInput; mirror the addInput refactor by making the
parameters required and removing the explicit null/undefined guards: update the
signature of addOutput to accept (name: string, type: string) and remove the
if-check/throw block, ensuring callers are updated to pass non-null strings;
target the addOutput function to locate the change.
- Around line 2605-2614: The addInput function currently declares parameters as
optional/nullish (addInput(name?: string | null, type?: string | null)) but
immediately throws on null/undefined; update the signature to require
non-nullable strings (addInput(name: string, type: string): SubgraphInput) to
match runtime expectations and improve TS ergonomics, and keep or simplify the
existing runtime guard inside addInput (throwing Error('Name and type are
required for subgraph input')) to preserve JS caller safety; locate this change
in the addInput method in LGraph.ts and ensure any callsites and the
SubgraphInput return contract remain consistent.

In `@src/lib/litegraph/src/subgraph/SubgraphNode.test.ts`:
- Line 535: Replace the inline cast of the test input object with an explicit
partial cast to signal it's an intentionally incomplete mock: change the object
used for the input parameter in SubgraphNode.test.ts from using "as
SubgraphInput" to "as Partial<SubgraphInput> as SubgraphInput" so the mock `{
name: 'test', type: 'number', id: 'test-id' }` clearly indicates it's a partial
implementation of the SubgraphInput interface.
- Line 562: The inline cast "input: { name: 'test', type: 'number', id:
'test-id' } as SubgraphInput" should be made consistent with the earlier pattern
used in this test file—replace the inline literal cast with the shared test
helper/factory or the same construction used elsewhere (e.g., the
createTestSubgraphInput/makeSubgraphInput helper) so all SubgraphInput instances
are created the same way; update the construction referenced in
SubgraphNode.test.ts (the "input" test value) to use that helper or pattern and
remove the ad-hoc "as SubgraphInput" literal.

In `@src/platform/settings/composables/useSettingSearch.test.ts`:
- Around line 82-84: The mockSettingStore object is being cast directly to
ReturnType<typeof useSettingStore> despite only partially implementing the
store; change the cast to the safe pattern by using as Partial<ReturnType<typeof
useSettingStore>> as ReturnType<typeof useSettingStore> so TypeScript knows this
is a partial mock (apply this to the mockSettingStore declaration that
references mockSettings and useSettingStore).

// Now trigger an event - only node1 should respond
subgraph.events.dispatch('input-added', {
input: { name: 'test', type: 'number', id: 'test-id' } as any
input: { name: 'test', type: 'number', id: 'test-id' } as SubgraphInput
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider using as Partial<SubgraphInput> as SubgraphInput for consistency.

The mock object { name: 'test', type: 'number', id: 'test-id' } only implements a subset of the SubgraphInput interface. For consistency with other patterns in this PR (e.g., as Partial<CanvasRenderingContext2D> as CanvasRenderingContext2D in textUtils.test.ts), consider making the partial implementation explicit:

    subgraph.events.dispatch('input-added', {
-      input: { name: 'test', type: 'number', id: 'test-id' } as SubgraphInput
+      input: { name: 'test', type: 'number', id: 'test-id' } as Partial<SubgraphInput> as SubgraphInput
    })

This makes it clear the mock is intentionally incomplete. Based on learnings, this pattern is preferred for test mocks.

📝 Committable suggestion

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

Suggested change
input: { name: 'test', type: 'number', id: 'test-id' } as SubgraphInput
subgraph.events.dispatch('input-added', {
input: { name: 'test', type: 'number', id: 'test-id' } as Partial<SubgraphInput> as SubgraphInput
})
🤖 Prompt for AI Agents
In `@src/lib/litegraph/src/subgraph/SubgraphNode.test.ts` at line 535, Replace the
inline cast of the test input object with an explicit partial cast to signal
it's an intentionally incomplete mock: change the object used for the input
parameter in SubgraphNode.test.ts from using "as SubgraphInput" to "as
Partial<SubgraphInput> as SubgraphInput" so the mock `{ name: 'test', type:
'number', id: 'test-id' }` clearly indicates it's a partial implementation of
the SubgraphInput interface.

Copy link
Collaborator

@AustinMroz AustinMroz left a comment

Choose a reason for hiding this comment

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

I agree that undefined in addInput/addOutput shouldn't be allowed. I think we should

  • Keep the old signature of addInput and addOutput unchanged.
  • Use the new assertion/throw in addInput/addOutput. It shouldn't be needed, but it makes sure we're actually enforcing things
  • Use the new tests, but with something like const nullString: string = null! and const undefinedString: string = undefined! to force for the typechecker to allow the tests.

@AustinMroz AustinMroz assigned Myestery and unassigned AustinMroz Jan 26, 2026
… validation

- Reverted addInput/addOutput signatures to required string parameters
- Kept runtime validation that throws for null/undefined values
- Updated tests to use type assertions (const nullString: string = null!)
  to force the typechecker to allow testing with invalid values
@coderabbitai coderabbitai bot requested a review from jtydhr88 January 26, 2026 19:24
@Myestery Myestery assigned AustinMroz and unassigned Myestery Jan 26, 2026
@Myestery Myestery enabled auto-merge (squash) January 26, 2026 19:26
@coderabbitai coderabbitai bot requested a review from AustinMroz January 26, 2026 19:27
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: 2

🤖 Fix all issues with AI agents
In `@src/lib/litegraph/src/LGraph.ts`:
- Around line 2606-2608: The runtime validation only checks for null and misses
undefined; update the guard around subgraph inputs in LGraph (the block that
currently throws "Name and type are required for subgraph input") to detect both
null and undefined (e.g., use loose equality like name == null || type == null
or explicitly check name === null || name === undefined || type === null || type
=== undefined) so the same error is thrown when name or type is undefined as
expected by SubgraphEdgeCases tests.
- Around line 2628-2630: The current validation only rejects null but allows
undefined for subgraph outputs; update the guard that throws "Name and type are
required for subgraph output" to check for both null and undefined (e.g. use
name == null || type == null or explicit checks name === undefined || name ===
null and same for type) so undefined values are rejected the same way as null;
modify the condition in the same block that currently reads if (name === null ||
type === null) { throw new Error('Name and type are required for subgraph
output') }.

Comment on lines +2606 to +2608
if (name === null || type === null) {
throw new Error('Name and type are required for subgraph input')
}
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 | 🔴 Critical

Runtime validation does not catch undefined values.

The check name === null || type === null only catches null, but the tests expect both null and undefined to throw (see SubgraphEdgeCases.test.ts lines 114-123). Since undefined === null evaluates to false, passing undefined will not trigger the error.

🐛 Proposed fix to also check for undefined
 addInput(name: string, type: string): SubgraphInput {
-  if (name === null || type === null) {
+  if (name == null || type == null) {
     throw new Error('Name and type are required for subgraph input')
   }

Using loose equality (==) catches both null and undefined in a single check.

🤖 Prompt for AI Agents
In `@src/lib/litegraph/src/LGraph.ts` around lines 2606 - 2608, The runtime
validation only checks for null and misses undefined; update the guard around
subgraph inputs in LGraph (the block that currently throws "Name and type are
required for subgraph input") to detect both null and undefined (e.g., use loose
equality like name == null || type == null or explicitly check name === null ||
name === undefined || type === null || type === undefined) so the same error is
thrown when name or type is undefined as expected by SubgraphEdgeCases tests.

Comment on lines +2628 to +2630
if (name === null || type === null) {
throw new Error('Name and type are required for subgraph output')
}
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 | 🔴 Critical

Same issue: undefined values bypass validation.

This check mirrors addInput and has the same problem—undefined will not trigger the error.

🐛 Proposed fix
 addOutput(name: string, type: string): SubgraphOutput {
-  if (name === null || type === null) {
+  if (name == null || type == null) {
     throw new Error('Name and type are required for subgraph output')
   }
📝 Committable suggestion

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

Suggested change
if (name === null || type === null) {
throw new Error('Name and type are required for subgraph output')
}
if (name == null || type == null) {
throw new Error('Name and type are required for subgraph output')
}
🤖 Prompt for AI Agents
In `@src/lib/litegraph/src/LGraph.ts` around lines 2628 - 2630, The current
validation only rejects null but allows undefined for subgraph outputs; update
the guard that throws "Name and type are required for subgraph output" to check
for both null and undefined (e.g. use name == null || type == null or explicit
checks name === undefined || name === null and same for type) so undefined
values are rejected the same way as null; modify the condition in the same block
that currently reads if (name === null || type === null) { throw new Error('Name
and type are required for subgraph output') }.

@Myestery Myestery merged commit b551064 into main Jan 26, 2026
26 checks passed
@Myestery Myestery deleted the refactor/cleanup-any-part8-group4 branch January 26, 2026 19:30
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:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants