Fixed all 'as any' and ': any' instances in E2E tests:
- featureFlags.spec.ts: Used Record<string, unknown> for window properties (5 instances)
- linkInteraction.spec.ts: Used Record<string, unknown> for window.app access (2 instances)
- nodeHelp.spec.ts: Added proper ComfyPage and NodeReference types (2 instances)
- selectionToolboxSubmenus.spec.ts: Added ComfyPage type for function parameter (1 instance)
All test files (unit, component, and E2E) are now completely free of 'any' types.
Fixed final 2 'as any' instances:
- formatUtil.test.ts: Used proper type casts for null/undefined test parameters
This completes the removal of all 'as any' type assertions from test files.
The only remaining match is a false positive in a comment.
Total fixed across all batches (13-18): 54 instances
Fixed 10 'as any' instances across 3 files:
- ReleaseNotificationToast.test.ts: Used Record<string, unknown> for window electronAPI property
- versionUtil.test.ts: Used proper type casts for null test parameters
- PackVersionSelectorPopover.test.ts: Used Record<string, unknown> for component VM access
Fixed 6 'as any' instances across 2 files:
- subgraphStore.test.ts: Used ReturnType for getUserData mock and ExportedSubgraph for subgraph serialization
- modelToNodeStore.test.ts: Used proper type casts for invalid input test cases
Fixed 10 'as any' instances across 5 files:
- keybindingService.escape.test.ts: Used ReturnType for dialog store mock
- nodeHelpStore.test.ts: Used ComfyNodeDefImpl type for node parameter
- comfyRegistryStore.test.ts: Used ReturnType for registry service mock
- domWidgetStore.test.ts: Used LGraphNode for mock node property
- executionStore.test.ts: Used LGraphNode for mock subgraph nodes
Fixed 6 'as any' instances across 3 files:
- LinkConnector.core.test.ts: Used Parameters utility type for method parameters
- useSelectionState.test.ts: Used ReturnType for composable and filter returns
- SubgraphNode.test.ts: Used SubgraphEventMap for event dispatch typing
Fixed 20 instances across:
- useWatchWidget.test.ts (5): Remove callback casts, call with proper args
- BypassButton.test.ts (5): Cast mock nodes as unknown as LGraphNode
- LinkConnector.test.ts (5): Use CanvasPointerEvent instead of Event, type render links properly
- executableGroupNodeChildDTO.test.ts (5): Cast to unknown as LGraphNode, use vi.mocked()
Key patterns:
- Widget callbacks now called with value argument
- Partial mock objects use as unknown as TargetType
- vi.mocked() wrapper for accessing mock methods after type casting
Fixed 31 instances across:
- typeGuardUtil.test.ts: Use Parameters utility type for partial mocks
- graphTraversalUtil.test.ts: Use proper type assertions for property mutations and invalid input testing
- subgraphNavigationStore.viewport.test.ts: Import Subgraph type, fix mock canvas typing
- useCanvasManager.test.ts: Use as unknown as Type for mutable mock store properties
- useCanvasTools.test.ts: Use as unknown as Type for mutable mock store properties
The canvas mock store pattern now uses as unknown as HTMLCanvasElement/CanvasRenderingContext2D
at both declaration and assignment points to allow partial mocks while maintaining type safety.
- Fixed 15 as any type assertions across 16 test files
- Used proper TypeScript types: unknown, Settings, ComfyWorkflowJSON, etc.
- Added missing type imports where needed
- Replaced as any with proper type intersections for Vue component testing
Files modified:
- ComboWidget.test.ts: Use explicit Values union type
- settingStore.test.ts: Import and use Settings type
- WhatsNewPopup.test.ts: Type assertion with component interface
- useMinimap.test.ts: Remove unnecessary cast (renderMinimap is public)
- LGraphNode.test.ts: Remove unnecessary any cast from undefined
- WidgetGalleria.test.ts: Type intersection for vm access
- WidgetInputNumberInput.test.ts: Use unknown to number cast
- jobOutputCache.test.ts: Import ComfyWorkflowJSON type
- mediaCacheService.test.ts: Use Partial<typeof URL> cast
- registrySearchProvider.test.ts: Use ReturnType<typeof store>
- firebaseAuthStore.test.ts: Cast to UserCredential
- queueStore.test.ts: Use Record<string, unknown> for delete
- usePacksSelection.test.ts: Cast undefined to unknown to string
- usePacksStatus.test.ts: Cast undefined to unknown to string
- useConflictDetection.test.ts: Use inline type for ImportFailInfo
Reduced as any count from 326 to 311 instances.
- modelStore.ts: Changed _findInMetadata metadata parameter from any to Record<string, unknown> with type guards
- surveyNormalization.ts: Changed normalizeSurveyResponses to use generic Record<string, unknown> constraint with proper type guards
- types.ts: Added index signature to SurveyResponses to allow normalized properties
- fuseUtil.ts: Changed isFuseSearchable type guard from any to unknown with proper null checks
- ui.ts: Changed Props index signature from any to unknown
- isobmff.ts: Changed extractJson return type from any to unknown with type assertion at call site
- clipspace.ts: Fixed pre-existing typecheck error by changing createImgSettings and createImgPreview to return null instead of empty array
## Summary
Backend part: https://github.com/Comfy-Org/ComfyUI/pull/11582
- Move API node pricing definitions from hardcoded frontend functions to
backend-defined JSONata expressions
- Add `price_badge` field to node definition schema containing JSONata
expression and dependency declarations
- Implement async JSONata evaluation with signature-based caching for
efficient reactive updates
- Show one decimal in credit badges when meaningful (e.g., 1.5 credits
instead of 2 credits)
## Screenshots (if applicable)
<!-- Add screenshots or video recording to help explain your changes -->
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7816-Move-price-badges-to-python-nodes-2da6d73d365081ec815ef61f7e3c65f7)
by [Unito](https://www.unito.io)
- Fix deserialization of matchtype inputs spawned by autogrow.
- Rotate multitype slot indicators to align with design changes.
- Fix several instance of incorrect group matching
- MatchType reactively updates input type in vue
- Support the "hollow circle" optional input indicator in vue
- Custom combo sends index of selection to backend
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8026-Further-dynamic-input-fixes-2e76d73d3650819680fef327a94f4294)
by [Unito](https://www.unito.io)
Use es-toolkit orderBy for queue list sorting.
The queue overlay list already sorts by create time, but the
implementation used Array.sort with a custom comparator and mutated the
array in place. Switch to es-toolkit's orderBy to make the sort intent
explicit, avoid mutation, and align with the utility set we already
depend on. Sorting keys and direction remain the same, so behavior is
unchanged.
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8228-fix-use-orderBy-for-queue-list-sorting-2f06d73d365081e791fff7d2212537f8)
by [Unito](https://www.unito.io)
Co-authored-by: Alexander Brown <drjkl@comfy.org>
## Summary
Adds an editable Model Info Panel to show and modify asset details in
the asset browser.
## Changes
- Add `ModelInfoPanel` component with editable display name,
description, model type, base models, and tags
- Add `updateAssetMetadata` action in `assetsStore` with optimistic
cache updates
- Add shadcn-vue `Select` components with design system styling
- Add utility functions in `assetMetadataUtils` for extracting model
metadata
- Convert `BaseModalLayout` right panel state to `defineModel` pattern
- Add slide-in animation and collapse button for right panel
- Add `class` prop to `PropertiesAccordionItem` for custom styling
- Fix keyboard handling: Escape in TagsInput/TextArea doesn't close
parent modal
## Testing
- Unit tests for `ModelInfoPanel` component
- Unit tests for `assetMetadataUtils` functions
---------
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
- syncUtil: use UserDataFullInfo type from apiSchema for file parameters
- linkFixer: change logger parameters from any[] to unknown[]
- useChainCallback: use NonNullable and conditional types instead of any constraint
- FormRadioGroup: type modelValue as string | number | undefined
- async.ts: define GlobalWindow as typeof globalThis
- widgetInputs: use Parameters<NonNullable<T>> for callback parameters
- useWorkflowValidation: update logger to accept unknown[] parameters
- Use Parameters<NonNullable<T>> and ReturnType<NonNullable<T>> instead of custom CallbackParams/CallbackReturn types
- Change any[] to unknown[] in extensionService invokeExtensions methods
- Update contextMenuFilter.test.ts with type assertions for extension results
## Summary
Adds a "Preview Version" badge to the topbar on nightly builds to help
users identify when they're using an unreleased version and encourage
feedback.
## Changes
- Add `nightly.badge` i18n translations (label and tooltip)
- Create `nightlyBadges.ts` extension with info variant badge
- Load nightly badges extension when `isNightly` is true
- Badge tooltip encourages users to provide feedback via the feedback
button
## Test plan
- [ ] Build and run nightly version, verify "NIGHTLY | Preview Version"
badge appears in topbar
- [ ] Hover over badge, verify tooltip shows: "You are using a nightly
version of ComfyUI. Please use the feedback button to share your
thoughts about these features."
- [ ] Verify stable OSS builds don't show the badge
- [ ] Verify cloud builds don't show the nightly badge
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8222-feat-add-preview-version-badge-for-nightly-builds-2ef6d73d36508102aa0dfc22ef14c9c1)
by [Unito](https://www.unito.io)
## Summary
Show active jobs in grid view matching the list view behavior, with
refactored component structure.
## Changes
- **ActiveJobCard**: New component for grid view job display with
progress bar
- **AssetsSidebarGridView**: Extracted grid view logic from
AssetsSidebarTab (matching ListView pattern)
- **Progress styling**: Use `useProgressBarBackground` composable for
consistent progress bar styling
- **Assets header**: Add "Generated/Imported assets" header in grid view
## Summary
Implements progressive pagination for model assets - returns the first
batch immediately while loading remaining batches in the background.
## Changes
### Store (`assetsStore.ts`)
- Adds `ModelPaginationState` tracking (assets Map, offset, hasMore,
loading, error)
- `updateModelsForKey()` returns first batch, then calls
`loadRemainingBatches()` to fetch the rest
- Accessor functions `getAssets(key)`, `isModelLoading(key)` replace
direct Map access
### API (`assetService.ts`)
- Adds `PaginationOptions` interface (`{ limit?, offset? }`)
### Components
- `AssetBrowserModal.vue` uses new accessor API
### Tests
- Updated mocks for new accessor pattern
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8212-feat-implement-progressive-pagination-for-Asset-Browser-model-assets-2ef6d73d36508157af04d1264780997e)
by [Unito](https://www.unito.io)
---------
Co-authored-by: Amp <amp@ampcode.com>
## Summary
Marks the `comfy-api-plugin` Vite plugin as build-time only by adding
`apply: 'build'`.
This prevents the plugin's transform from running during development
(`vite dev`), improving dev server startup time and avoiding unnecessary
processing when the plugin's output is not needed in development mode.
Also updates `build/tsconfig.json` to use `moduleResolution: "bundler"`
which is the recommended setting for Vite projects.
## Changes
- **build/plugins/comfyAPIPlugin.ts**: Add `apply: 'build'` to restrict
plugin to production builds
- **build/tsconfig.json**: Update `moduleResolution` from `"node"` to
`"bundler"`
## Testing
- `pnpm typecheck` passes
- `pnpm build` produces correct output
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8224-fix-Mark-comfy-api-plugin-as-build-time-only-2ef6d73d36508145a48ae849087fbad7)
by [Unito](https://www.unito.io)
## Summary
Add session download tracking to track which assets were downloaded
during the current session. This enables UI features like:
- Badge count on "Imported" nav showing newly downloaded assets
- Visual indicator on asset cards for recently downloaded items
## Changes
- Add `acknowledged` flag to `AssetDownload` interface
- Add `unacknowledgedDownloads` computed for filtering
- Add `sessionDownloadCount` computed for badge display
- Add `isDownloadedThisSession(identifier)` to check individual assets
- Add `acknowledgeDownload(identifier)` to mark assets as seen
## Testing
- 6 new unit tests covering all session tracking functionality
- Run: `pnpm test:unit -- src/stores/assetDownloadStore.test.ts`
## Related
- Part of Asset Browser improvements (#8090)
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8213-feat-add-session-download-tracking-to-assetDownloadStore-2ef6d73d365081538045e8544d26bafa)
by [Unito](https://www.unito.io)
---------
Co-authored-by: Amp <amp@ampcode.com>
Remove explicit any types from 1 test file:
- subgraphNavigationStore.test.ts (11 instances)
Used typeof workflowStore.activeWorkflow to properly type workflow
mock assignments instead of the broader ComfyWorkflow type.
Remove explicit any types from 2 test files:
- firebaseAuthStore.test.ts (10 instances)
- useMinimapSettings.test.ts (10 instances)
Changes:
- Created MockAuth type for firebase auth mocks
- Used UserCredential type for firebase user credential mocks
- Used `ReturnType<typeof func>` to derive proper store types
- Changed Record<string, any> to Record<string, unknown>
All changes pass typecheck and tests.
Remove explicit any types from 3 test files:
- SubgraphMemory.test.ts (10 instances)
- minimapCanvasRenderer.test.ts (8 instances)
- useImageLoader.test.ts (8 instances)
Changes:
- Created InputWithWidget type for test-specific widget properties
- Used `unknown` type with proper type annotations for mock store properties
- Used `as unknown as T` pattern for mock objects
- Used `ReturnType<typeof func>` for store mock return types
All changes pass typecheck and tests.
Remove explicit any types from 7 test files:
- useWatchWidget.test.ts (3 instances)
- LGraphNodeProperties.test.ts (2 instances)
- versionCompatibilityStore.test.ts (2 instances)
- workflowStore.test.ts (2 instances)
- useRemoteWidget.test.ts (2 instances)
- registrySearchGateway.test.ts (2 instances)
- colorUtil.test.ts (2 instances)
Changes:
- Used `unknown` for truly unknown values instead of `any`
- Used `Partial<T>` with type assertions for mock objects
- Used `ReturnType<typeof func>` to derive proper types
- Used proper typing for promise resolvers and spy mocks
- Used `this: unknown` with proper casting for function contexts
All changes pass typecheck and tests.
- useMinimap.test.ts: Created comprehensive mock interfaces for Node, Graph, Canvas, CanvasElement, ContainerElement, and Context2D
- firebaseAuthStore.test.ts: Imported User type from firebase/auth and created MockUser type for mocking
Part 8 - Phase 5 complete: 2 files fixed, 14 any instances removed (9 + 5)
- releaseStore.test.ts: Created mock interfaces for ReleaseService, SettingStore, and SystemStatsStore with proper typing
- ExecuteButton.test.ts: Added Mock type interfaces for Canvas, CanvasStore, and CommandStore
- useManagerQueue.test.ts: Fixed Ref types and used correct ManagerPackInstalled schema types
Part 8 - Phase 4 complete: 8 files fixed, 32 any instances removed
## Summary
Refactors `BaseModalLayout` from a flexbox-based layout to CSS Grid,
enabling smoother panel transitions and improved layout control.
## Changes
### Layout Restructure
- **Flexbox → CSS Grid**: Replaced nested flexbox with a 3-column CSS
Grid (`nav | main | aside`)
- **Smooth panel transitions**: Panel show/hide now animates via
`grid-template-columns` instead of Vue `<Transition>` with `translateX`
- **Removed transition CSS**: Deleted `.slide-panel-*` and `.fade-*`
transition styles (no longer needed with grid approach)
### Right Panel Improvements
- **Dedicated header**: Added header with close button, right panel
toggle, and customizable title slot (`rightPanelHeaderTitle`,
`rightPanelHeaderActions`)
- **New prop**: Added `rightPanelTitle` prop for simple text title in
right panel header
### UX & Accessibility
- **ESC key handling**: Pressing Escape closes the right panel (if open)
before closing the dialog
- **Accessibility**: Added `aria-label` attributes to all panel toggle
and close buttons
- **i18n**: Added translation keys: `showLeftPanel`, `hideLeftPanel`,
`showRightPanel`, `hideRightPanel`, `closeDialog`
---------
Co-authored-by: Amp <amp@ampcode.com>
- Change parameter types from string to unknown in both functions
- Functions already have type guards (typeof check) to handle invalid inputs
- Remove all 'as any' casts from tests - no longer needed
- Better type safety: functions now properly express they can handle any input
- Import SettingParams, SettingTreeNode types from settingStore
- Replace mockSettingStore: any with ReturnType<typeof useSettingStore>
- Replace mockSettings: any with properly typed Record<string, SettingParams> with double-cast
- Replace setting: any parameter with SettingParams in getSettingInfo mock
- Replace activeCategory as any with Partial<SettingTreeNode> and proper cast
- Add casts for dynamically assigned mock settings
- Define RegistryNodePack type from comfyRegistryTypes
- Create GlobalWithAlgolia interface for global properties
- Replace (global as any) with properly typed (globalThis as unknown as GlobalWithAlgolia)
- Type testPack and incompletePack as Partial<RegistryNodePack>
- Replace as any casts with as RegistryNodePack
- Replace ...args: any[] with proper return type annotations
- Replace (original as any).apply() with original.call()
- Replace (originalGetCanvasMenuOptions as any).apply() with .call()
- Add explicit return type (IContextMenuValue | null)[] to functions