Commit Graph

6502 Commits

Author SHA1 Message Date
Johnpaul
7a98d772ff Merge remote-tracking branch 'origin/main' into fix/remove-any-types-part8
# Conflicts:
#	src/composables/node/useNodePricing.test.ts
2026-01-22 23:07:25 +01:00
Simula_r
a08ccb55c1 Workspaces 3 create a workspace (#8221)
## Summary

Add workspace creation and management (create, edit, delete, leave,
switch workspaces).

  Follow-up PR will add invite and membership flow.

  ## Changes

  - Workspace CRUD dialogs
  - Workspace switcher popover in topbar
  - Workspace settings panel
  - Subscription panel for workspace context
  

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8221-Workspaces-3-create-a-workspace-2ef6d73d36508155975ffa6e315971ec)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 14:54:41 -07:00
Johnpaul
f6718adec9 refactor: remove any types from E2E test files (10 instances)
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.
2026-01-22 22:52:58 +01:00
Johnpaul
f34b8aa39e refactor: remove any types from batch 18 test files (2 instances)
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
2026-01-22 22:47:12 +01:00
Johnpaul
df0aba83a0 refactor: remove any types from batch 17 test files (10 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
2026-01-22 22:43:18 +01:00
Johnpaul
cbd5e7fed3 refactor: remove any types from batch 16 test files (6 instances)
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
2026-01-22 22:39:13 +01:00
Johnpaul
cc6da76aa9 refactor: remove any types from batch 15 test files (10 instances)
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
2026-01-22 22:34:27 +01:00
Johnpaul
35ddd998ec refactor: remove any types from batch 14 test files (6 instances)
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
2026-01-22 22:28:43 +01:00
Johnpaul
07a89ed0cb refactor: remove as any from 4 test files (batch 13)
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
2026-01-22 22:16:29 +01:00
Johnpaul
87c01c9819 refactor: remove as any from 5 test files (batch 12)
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.
2026-01-22 22:09:19 +01:00
Johnpaul
981394830c refactor: remove as any from 5 test files (batch 11)
- useWorkflowAutoSave.test.ts (12 instances)
- ToOutputRenderLink.test.ts (12 instances)
- useMinimapRenderer.test.ts (9 instances)
- SubgraphEdgeCases.test.ts (8 instances)
- SignInForm.test.ts (8 instances)
2026-01-22 21:59:10 +01:00
Johnpaul
a40ab32a49 refactor: remove as any from useMinimapInteraction.test.ts 2026-01-22 21:41:22 +01:00
Johnpaul
3891df9a03 refactor: remove as any from useTransformState.test.ts 2026-01-22 21:37:58 +01:00
Johnpaul
49d2a71119 refactor: remove as any from useRemoteWidget.test.ts 2026-01-22 21:21:23 +01:00
Johnpaul
82413c17c2 refactor: remove as any from workflowStore.test.ts 2026-01-22 20:57:05 +01:00
Johnpaul
a9151795ae refactor: remove as any from LinkConnector.integration.test.ts 2026-01-22 20:20:01 +01:00
Johnpaul
7e7971f96c refactor: remove as any from useMinimapGraph.test.ts 2026-01-22 20:08:28 +01:00
Johnpaul
ea961f9128 refactor: remove as any from useMinimapViewport.test.ts 2026-01-22 19:53:04 +01:00
Johnpaul
61de77b981 refactor: remove as any from SelectionToolbox.test.ts 2026-01-22 19:43:31 +01:00
Johnpaul
3203ec5478 refactor: remove as any from useManagerState.test.ts 2026-01-22 19:37:42 +01:00
Johnpaul
fd8118564a refactor: remove 'as any' assertions from test files (batch 1: 16 files)
- 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.
2026-01-22 19:32:16 +01:00
Johnpaul
181f8c3a88 refactor: remove any types from modelStore, surveyNormalization, and SurveyResponses
- 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
2026-01-22 19:13:42 +01:00
Johnpaul
5683c388e4 refactor: remove any types from fuseUtil, ui, isobmff, and fix clipspace
- 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
2026-01-22 19:07:26 +01:00
Alexander Piskun
5c142275ad Move price badges to python nodes (#7816)
## 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)
2026-01-22 09:17:07 -08:00
Johnpaul
35139da175 refactor: remove any types from widget and template files
- widgetInputs: use TWidgetValue[] for controlValues instead of any[]
- nodeTemplates: define NodeTemplate interface with name and data properties
2026-01-22 17:59:37 +01:00
AustinMroz
4a5e7c8bcb Further dynamic input fixes (#8026)
- 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)
2026-01-22 00:02:49 -08:00
Benjamin Lu
df93277802 refactor: use orderBy for queue list sorting (#8228)
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>
2026-01-21 20:21:39 -08:00
Comfy Org PR Bot
db16cfbb2b 1.38.9 (#8226)
Patch version increment to 1.38.9

**Base branch:** `main`

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8226-1-38-9-2f06d73d3650817d9770f965c3497200)
by [Unito](https://www.unito.io)

---------

Co-authored-by: christian-byrne <72887196+christian-byrne@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
v1.38.9
2026-01-21 20:11:03 -08:00
Benjamin Lu
92357445e4 feat: show active jobs label in top menu (#8169)
Replace the top-menu queue history icon with a localized “N active”
label so active jobs are visible at a glance.

Requested as part of the new
[designs](https://www.figma.com/design/LVilZgHGk5RwWOkVN6yCEK/Queue-Progress-Modal?node-id=3381-6181&m=dev).

I checked all failing snapshots and they are all expected (1 flaky).

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8169-feat-show-active-jobs-label-in-top-menu-2ee6d73d3650812cbf0cda389395c563)
by [Unito](https://www.unito.io)

---------

Co-authored-by: github-actions <github-actions@github.com>
2026-01-21 20:45:29 -07:00
Alexander Brown
93e7a4f9f9 feat(assets): add ModelInfoPanel for asset browser right panel (#8090)
## 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>
2026-01-21 19:43:56 -08:00
Johnpaul
2282f37fb5 refactor: remove any types from utility files and components
- 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
2026-01-22 04:24:45 +01:00
Johnpaul
a02f7a15ff refactor: replace custom callback types with TypeScript built-in utilities
- 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
2026-01-22 03:56:29 +01:00
Johnpaul Chiwetelu
8261e1d187 feat: add preview version badge for nightly builds (#8222)
## 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)
2026-01-22 03:32:52 +01:00
Johnpaul
2aa4885696 refactor: remove any types from test files (batch 5)
Remove explicit any types from 14 test files:
- useMissingNodes.test.ts (1 instance)
- DescriptionTabPanel.test.ts (1 instance)
- PackEnableToggle.test.ts (3 instances)
- NodeConflictDialogContent.test.ts (7 instances)
- queueStore.test.ts (2 instances)
- useIntWidget.test.ts (1 instance)
- useFloatWidget.test.ts (1 instance)
- FormSelectButton.test.ts (3 instances)
- useTemplateWorkflows.test.ts (1 instance)
- useFrontendVersionMismatchWarning.test.ts (1 instance)
- releaseService.test.ts (1 instance)
- useSubscription.test.ts (1 instance)
- assetService.test.ts (1 instance)
- ResultGallery.test.ts (2 instances)

Used typed mock objects, ReturnType pattern, and specific type aliases
where appropriate. All changes pass typecheck with 0 errors.
2026-01-22 03:30:18 +01:00
Jin Yi
e4d2bc2b59 [feat] Add active jobs display to grid view (#8209)
## 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
2026-01-22 11:02:28 +09:00
Alexander Brown
482159957e feat: implement progressive pagination for Asset Browser model assets (#8212)
## 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>
2026-01-21 17:59:08 -08:00
Alexander Brown
f08b0f44ef fix: Mark comfy-api-plugin as build-time only (#8224)
## 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)
2026-01-21 16:38:18 -08:00
Alexander Brown
f1d1747582 feat: add session download tracking to assetDownloadStore (#8213)
## 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>
2026-01-21 16:32:30 -08:00
Johnpaul
dbf6d02f0d refactor: remove any types from subgraphNavigationStore.test.ts
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.
2026-01-22 00:20:55 +01:00
Johnpaul
06dbb0fd32 refactor: remove any types from test files (batch 3)
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.
2026-01-22 00:16:15 +01:00
Benjamin Lu
d12c6d7814 fix: sort queue jobs by create time (#8225)
Sort queue overlay ordering by create_time instead of priority so queued
jobs keep their order when completions arrive.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8225-fix-sort-queue-jobs-by-create-time-2ef6d73d3650815a8a81ec9d0b23a4e6)
by [Unito](https://www.unito.io)
2026-01-21 23:13:27 +00:00
Johnpaul
94fc1f6e30 refactor: remove any types from test files (batch 2)
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.
2026-01-22 00:08:42 +01:00
Johnpaul
27359f945b refactor: remove any types from test files (batch 1)
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.
2026-01-22 00:02:14 +01:00
Johnpaul
dc9f75c011 refactor: remove any types from useMinimap and firebaseAuthStore 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)
2026-01-21 23:46:43 +01:00
Johnpaul
20a0ae04cf refactor: remove any types from releaseStore, ExecuteButton, and useManagerQueue tests
- 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
2026-01-21 22:40:55 +01:00
Alexander Brown
2db246f494 refactor: restructure BaseModalLayout from flexbox to CSS Grid (#8211)
## 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>
2026-01-21 13:20:39 -08:00
Johnpaul
415845a325 refactor: fix normalizeIndustry and normalizeUseCase to accept unknown
- 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
2026-01-21 22:11:11 +01:00
Johnpaul
4014984300 refactor: remove any types from useSettingSearch.test.ts
- 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
2026-01-21 21:59:26 +01:00
Johnpaul
d4af46327b refactor: remove any types from algoliaSearchProvider.test.ts
- 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
2026-01-21 21:55:29 +01:00
Johnpaul
acccd6c3a7 refactor: remove any types from contextMenuCompat.test.ts
- 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
2026-01-21 21:48:30 +01:00