## Summary
Removes **254** `@ts-expect-error` suppressions through proper type
fixes rather than type assertions.
## Key Changes
### Type System Improvements
- Add `globalDefs` and `groupNodes` types to `ComfyAppWindowExtension`
- Extract interfaces for group node handling (`GroupNodeHandler`,
`InnerNodeOutput`, etc.)
- Add `getHandler()` helper to consolidate GROUP symbol access pattern
### Files Fixed
- **pnginfo.ts**: 39 suppressions removed via proper typing of
workflow/prompt data
- **app.ts**: 39 suppressions removed via interface extraction and type
narrowing
- **Tier 1 files**: 17 suppressions removed (maskeditor, imageDrawer,
groupNode, etc.)
- **groupNode.ts**: Major refactoring with proper interface organization
## Approach
Following established constraints:
- No `any` types
- No `as unknown as T` casts (except legacy API boundaries)
- Priority: Fix actual types > Type narrowing > Targeted suppressions as
last resort
- Prefix unused callback parameters with underscore
- Extract repeated inline types into named interfaces
## Validation
- ✅ `pnpm typecheck` passes
- ✅ `pnpm lint` passes
- ✅ `pnpm knip` passes
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7884-Chore-TypeScript-cleanup-remove-254-ts-expect-error-suppressions-2e26d73d3650812e9b48da203ce1d296)
by [Unito](https://www.unito.io)
---------
Co-authored-by: Amp <amp@ampcode.com>
# Canvas Rotation and Mirroring
## Overview
Adds rotation (90° left/right) and mirroring (horizontal/vertical)
capabilities to the mask editor canvas. All three layers (image, mask,
RGB) transform together. Redo and Undo respect transformations as new
states. Keyboard shortcuts also added for all four functions in
Keybinding settings.
Additionally, fixed the issue of ctrl+z and ctrl+y keyboard commands not
restricting to the mask editor canvas while opened.
https://github.com/user-attachments/assets/fb8d5347-b357-4a3a-840a-721cdf8a6125
## What Changed
### New Files
- **`src/composables/maskeditor/useCanvasTransform.ts`**
- Core transformation logic for rotation and mirroring
- GPU texture recreation after transformations
### Modified Files
#### **`src/composables/useCoreCommands.ts`**
- Added check to see if Mask Editor is opened for undo and redo commands
#### **`src/stores/maskEditorStore.ts`**
- Added GPU texture recreation signals
#### **`src/composables/maskeditor/useBrushDrawing.ts`**
- Added watcher for `gpuTexturesNeedRecreation` signal
- Handles GPU texture recreation when canvas dimensions change
- Recreates textures with new dimensions after rotation
- Updates preview canvas and readback buffers accordingly
- Ensures proper ArrayBuffer backing for WebGPU compatibility
#### **`src/components/maskeditor/TopBarHeader.vue`**
- Added 4 new transform buttons with icons:
- Rotate Left (counter-clockwise)
- Rotate Right (clockwise)
- Mirror Horizontal
- Mirror Vertical
- Added visual separators between button groups
#### **`src/extensions/core/maskEditor.ts`**
- Added keyboard shortcut settings for rotate and mirror
#### **Translation Files** (e.g., `src/locales/en.json`)
- Added i18n keys:
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7841-Added-MaskEditor-Rotate-and-Mirror-Functions-2de6d73d365081bc9b84ea4919a3c6a1)
by [Unito](https://www.unito.io)
---------
Co-authored-by: Alexander Brown <drjkl@comfy.org>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
## Summary
Truncate long filenames in the model upload wizard to prevent dialog
overflow.
## Changes
- **UploadModelConfirmation**: Added `min-w-0 flex-1 truncate` to model
filename display
- **UploadModelProgress**: Added truncation to both processing and
success state filename displays
## Testing
1. Import a model with a very long filename
2. Verify the filename truncates with ellipsis instead of expanding the
dialog
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7939-fix-UploadModel-truncate-long-filenames-in-wizard-2e46d73d365081a0a60bd6326129b9a4)
by [Unito](https://www.unito.io)
## Summary
Polishing improvements for the model upload (BYOM) experience.
## Changes
- **HoneyToast z-index**: Increased from `z-50` to `z-9999` so the
ModelImportProgressDialog appears above modal backdrops
- **VideoHelpDialog**: Removed pixel-based max-width constraint, now
uses `90vw` to fill more of the viewport
- **UploadModelDialog responsive layout**: Added `max-height: 90vh` and
scrollable content area to prevent footer buttons from underflowing on
small screens
- **URL validity indicator**: Added green checkmark icon inside the URL
input when a valid Civitai or HuggingFace URL is entered
## Testing
- Open the model upload dialog and verify buttons remain accessible on
small viewport heights
- Enter a valid Civitai/HuggingFace URL and confirm the green checkmark
appears
- Open the help video and verify it uses more of the viewport
- Start a model download and verify the progress toast appears above any
open modals
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7938-fix-Model-upload-UI-improvements-2e46d73d365081a292f5fda70c6db0f5)
by [Unito](https://www.unito.io)
---------
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
## Summary
Adds a polling fallback mechanism to recover from dropped WebSocket
messages during model downloads.
## Problem
When downloading models via the asset download service, status updates
are received over WebSocket. Sometimes these messages are dropped
(network issues, reconnection, etc.), causing downloads to appear
"stuck" even when they've completed on the backend.
## Solution
Periodically poll for stale downloads using the existing REST API:
- Track `lastUpdate` timestamp on each download
- Downloads without updates for 10s are considered "stale"
- Poll stale downloads every 10s via `GET /tasks/{task_id}` to check if
the asset exists
- If the asset exists with size > 0, mark the download as completed
## Implementation
- Added `lastUpdate` field to `AssetDownload` interface
- Use VueUse's `useIntervalFn` with a `watch` to auto start/stop polling
based on active downloads
- Reuse existing `handleAssetDownload` for completion (synthetic event)
- Added 9 unit tests covering the polling behavior
## Testing
- All existing tests pass
- New tests cover:
- Basic download tracking
- Completion/failure handling
- Duplicate message prevention
- Stale download polling
- Polling error handling
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7926-feat-add-polling-fallback-for-stale-asset-downloads-2e36d73d3650810ea966f5480f08b60c)
by [Unito](https://www.unito.io)
---------
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
## Summary
Part 2 of the type safety remediation plan. This PR focuses on the
Litegraph Library Layer as part of the **No Explicit Any** mission.
### Changes
**LiteGraphGlobal.ts:**
- `DEFAULT_GROUP_FONT_SIZE`: Changed from `any` (with no value) to
`number = 24`. The internal fallback was already 24, so the constant was
effectively useless without an assigned value.
- `getParameterNames`: Replace `any` with `unknown` in function
signature
- `extendClass`: Replace deprecated
`__lookupGetter__`/`__defineGetter__` with modern
`Object.getOwnPropertyDescriptor`/`defineProperty` and add proper Record
types
**LGraphNodeProperties.ts:**
- Replace `any` with `unknown` for property values
- Use `Record<string, unknown>` with proper type assertions for dynamic
property access
**types/widgets.ts & BaseWidget.ts:**
- Change `callback` value parameter from `any` to properly typed
(`unknown` in interface, `TWidget['value']` in implementation)
**Consuming code fixes:**
- `previewAny.ts`: Add explicit `boolean` type annotation for callback
value
- `ButtonWidget.ts`: Pass widget value instead of widget instance to
callback (matching the interface signature)
## Breaking Change Analysis (Sourcegraph Verified)
### ButtonWidget callback fix (`this` → `this.value`)
This PR fixes the ButtonWidget callback to pass `value` instead of
`this`, matching the interface definition.
**Verification via Sourcegraph** - all external usages are safe:
-
[comfyui-ollama](https://cs.comfy.org/github.com/stavsap/comfyui-ollama/-/blob/web/js/OllamaNode.js?L84)
- doesn't use callback args
-
[ComfyLab-Pack](https://cs.comfy.org/github.com/bugltd/ComfyLab-Pack/-/blob/dist/js/nodes/list.js?L8)
- doesn't use callback args
-
[ComfyUI_PaintingCoderUtils](https://cs.comfy.org/github.com/jammyfu/ComfyUI_PaintingCoderUtils/-/blob/web/js/click_popup.js?L18)
- doesn't use callback args
-
[ComfyUI-ShaderNoiseKSampler](https://cs.comfy.org/github.com/AEmotionStudio/ComfyUI-ShaderNoiseKSampler/-/blob/web/matrix_button.js?L3055-3056)
- was already working around this bug
---------
Co-authored-by: GitHub Action <action@github.com>
## Problem
The `AssetBrowserModal` triggers hundreds of network requests when
opened because `AssetGrid.vue` renders all asset cards immediately using
a simple `v-for` loop. Each `AssetCard` loads its thumbnail image,
causing a flood of simultaneous requests.
## Solution
Replace the simple `v-for` with the existing `VirtualGrid` component
(already used in `AssetsSidebarTab.vue` and `ManagerDialogContent.vue`)
to only render visible items plus a small buffer.
## Changes
- **`AssetGrid.vue`**: Use `VirtualGrid` with computed `assetsWithKey`
that adds the required `key` property from `asset.id`
- **`BaseModalLayout.vue`**: Add `flex-1` to content container for
proper height calculation (required for `VirtualGrid` to work)
## Testing
- All 130 asset-related tests pass
- TypeScript and lint checks pass
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7919-perf-AssetBrowserModal-virtualize-asset-grid-to-reduce-network-requests-2e36d73d365081a1be18d0eb33b7ef8a)
by [Unito](https://www.unito.io)
Co-authored-by: Amp <amp@ampcode.com>
## Summary
Fix button sizing inconsistencies in modal dialogs and the asset
browser.
## Changes
- **What**: Fix Import button using responsive size (`lg`/`icon` based
on breakpoint) and ensure Modal Close button has explicit `w-10` width
for consistent sizing.
## Review Focus
Button sizing consistency across the modal UI.
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7920-fix-Button-sizing-in-modals-and-asset-browser-2e36d73d365081fc997af8be1e928049)
by [Unito](https://www.unito.io)
## Summary
- Replace hardcoded `text-white` class with theme-aware alternatives to
fix invisible text on light themes
- Update Load3D control backgrounds to use semantic tokens
- Update dropdown menus to use `bg-interface-menu-surface`
- Update overlay backgrounds to use `bg-backdrop` with opacity
## Changes
| Component | Old | New |
|-----------|-----|-----|
| Text on primary bg | `text-white` | `text-base-foreground` |
| Dropdown menus | `bg-black/50` | `bg-interface-menu-surface` |
| Control panels | `bg-smoke-700/30` | `bg-backdrop/30` |
| Loading overlays | `bg-black bg-opacity-50` | `bg-backdrop/50` |
| Selected states | `bg-smoke-600` | `bg-button-active-surface` |
## Files Modified (14)
- `src/components/TopMenuSection.vue`
- `src/components/input/MultiSelect.vue`
- `src/components/load3d/*.vue` (12 files)
- `src/renderer/extensions/vueNodes/VideoPreview.vue`
## Test plan
- [ ] Verify text visibility in light theme
- [ ] Verify text visibility in dark theme
- [ ] Test Load3D viewer controls functionality
- [ ] Test MultiSelect dropdown checkbox visibility
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7908-fix-replace-text-white-with-theme-aware-color-tokens-2e26d73d36508107bb01d1d6e3b74f6a)
by [Unito](https://www.unito.io)
## Summary
Add HoneyToast, a persistent bottom-anchored notification component for
long-running task progress, and migrate existing progress dialogs to use
it.
## Changes
- **What**:
- New `HoneyToast` component with slot-based API, Teleport, transitions,
and accessibility
- Migrated `ModelImportProgressDialog` to use HoneyToast
- Created `ManagerProgressToast` combining the old Header/Content/Footer
components
- Deleted deprecated `ManagerProgressDialogContent`,
`ManagerProgressHeader`, `ManagerProgressFooter`, and
`useManagerProgressDialogStore`
- Removed no-op
`showManagerProgressDialog`/`toggleManagerProgressDialog` functions
- Added Storybook stories for HoneyToast and ProgressToastItem
## Review Focus
- HoneyToast component design and slot API
- ManagerProgressToast self-contained state management (auto-shows when
`comfyManagerStore.taskLogs.length > 0`)
- Accessibility attributes on the toast component
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7902-feat-add-HoneyToast-component-for-persistent-progress-notifications-2e26d73d365081c78ae6edc5accb326e)
by [Unito](https://www.unito.io)
---------
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: sno <snomiao@gmail.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: GitHub Action <action@github.com>
## Summary
Restore the shared button's positioning context so the run-queue badge
anchors to the correct spot.
## Changes
- **What**: add `position: relative` back to `button.variants.ts` so
badge overlays stay attached to their buttons
## Review Focus
- Make sure no buttons rely on being `position: static` (should be
unaffected) and that the run badge now sits beside the Run button
instead of the window edge.
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7912-Fix-run-badge-anchoring-2e26d73d365081aa8fefe5381f37cfa4)
by [Unito](https://www.unito.io)
---------
Co-authored-by: github-actions <github-actions@github.com>
## Summary
Fixes the pt-BR locale generation issue by enabling immediate file
persistence in the lobe-i18n configuration.
## Problem
The pt-BR locale was added in PR #6943 with proper infrastructure, but
translation files have remained empty (`{}`) despite the i18n workflow
running successfully on version-bump PRs.
### Root Cause
The `lobe-i18n` tool has a `saveImmediately` configuration option
(defaults to `false`) that controls whether translations are persisted
to disk immediately during generation. When bootstrapping from
completely empty `{}` JSON files, without `saveImmediately: true`, the
tool generates translations in memory but doesn't write them to disk,
resulting in empty files.
**Evidence:**
- All other locales: ~1,931 lines each (previously bootstrapped)
- pt-BR before fix: 1 line (`{}` in all 4 files)
- CI workflow runs successfully but pt-BR files remain empty
- After adding `saveImmediately: true`: 18,787 lines generated across
all 4 pt-BR files
## Solution
Add `saveImmediately: true` to `.i18nrc.cjs` configuration:
```javascript
module.exports = defineConfig({
modelName: 'gpt-4.1',
splitToken: 1024,
saveImmediately: true, // ← Enables immediate file persistence
entry: 'src/locales/en',
entryLocale: 'en',
output: 'src/locales',
outputLocales: ['zh', 'zh-TW', 'ru', 'ja', 'ko', 'fr', 'es', 'ar', 'tr', 'pt-BR'],
// ...
});
```
This ensures that when lobe-i18n generates translations from empty
files, they are immediately written to disk rather than kept only in
memory.
## Validation
This PR's commit history demonstrates the fix works:
1. **Commit `22e6e28f5`**: Applied the `saveImmediately: true` fix
2. **Commit `cd7e93786`**: Temporarily enabled i18n workflow for this
branch (for testing)
3. **Commit `84545c218`**: CI successfully generated complete pt-BR
translations:
- `commands.json`: 327 lines
- `main.json`: 2,458 lines
- `nodeDefs.json`: 15,539 lines
- `settings.json`: 463 lines
- **Total: 18,787 lines of Portuguese translations**
4. **Commits `85f282f98` & `05d097f7b`**: Reverted test commits to keep
PR minimal
## Changes
- `.i18nrc.cjs`: Added `saveImmediately: true` configuration option (+1
line)
## Impact
After this fix is merged, future `version-bump-*` PRs will automatically
generate and persist pt-BR translations alongside all other locales,
keeping Portuguese (Brazil) translations up-to-date with the codebase.
## References
- Original issue:
https://github.com/Comfy-Org/ComfyUI_frontend/pull/6943#issuecomment-3679664466
- Related PR: #6943 (Portuguese (Brazil) locale addition)
- lobe-i18n documentation:
https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-i18nFixes#6943 (comment)
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
## Summary
Add a progress dialog for model downloads that appears when downloads
are active.
## Changes
- Add `ModelImportProgressDialog` component for showing download
progress
- Add `ProgressToastItem` component for individual download job display
- Add `StatusBadge` component for status indicators
- Extend `assetDownloadStore` with:
- `finishedDownloads` computed for completed/failed jobs
- `hasDownloads` computed for dialog visibility
- `clearFinishedDownloads()` to dismiss finished downloads
- Dialog visibility driven by store state
- Closing dialog clears finished downloads
- Filter dropdown to show all/completed/failed downloads
- Expandable/collapsible UI with animated transitions
- Update AGENTS.md with import type convention and pluralization note
## Testing
- Start a model download and verify the dialog appears
- Verify expand/collapse animation works
- Verify filter dropdown works
- Verify closing the dialog clears finished downloads
- Verify dialog hides when no downloads remain
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7897-feat-add-model-download-progress-dialog-2e26d73d36508116960eff6fbe7dc392)
by [Unito](https://www.unito.io)
---------
Co-authored-by: Amp <amp@ampcode.com>
## Summary
Implements stale-while-revalidate pattern for AssetBrowserModal to show
cached assets immediately while refreshing in background.
## Changes
### AssetBrowserModal.vue
- Reads assets directly from store cache via computed properties
- Shows loading spinner only when loading AND no cached data exists
- Simplified refresh logic: single `refreshAssets()` call on mount
### assetsStore.ts
- Added `updateModelsForTag(tag)` for tag-based fetching
- Added `updateModelsForKey()` internal helper to unify node type and
tag fetching
- Cache key convention: node types as-is, tags prefixed with `tag:`
- Added `isEqual` check before cache updates to prevent unnecessary
re-renders
### useModelUpload.ts
- Simplified signature from `UseAsyncStateReturn<...>['execute']` to `()
=> Promise<unknown> | void`
## UX Improvement
| Scenario | Before | After |
|----------|--------|-------|
| First open | Spinner → Assets | Spinner → Assets |
| Re-open same type | Spinner → Assets | Instant + silent refresh |
| Re-open after download | Spinner → Assets | Cached + auto-update |
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7880-feat-Stale-while-revalidate-pattern-for-AssetBrowserModal-2e16d73d365081ba93f4d6e0415ebfae)
by [Unito](https://www.unito.io)
---------
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
## Summary
- Define `touch:` Tailwind variant using `@media (hover: none)` to
target touch devices
- Add `touch:opacity-100` to `TreeExplorerTreeNode` for node action
buttons
- Add `useMediaQuery('(hover: none)')` to `MediaAssetCard` for action
overlay visibility
## Problem
On touch devices, sidebar buttons that appear on hover are inaccessible
because:
1. The `touch:` Tailwind variant was used but never defined (classes
silently ignored)
2. `TreeExplorerTreeNode` had no touch support for action buttons
3. `MediaAssetCard` used JS-based `useElementHover` which doesn't work
on touch
## Screenshots (Touch Device Emulation)
### Before (main branch)
- No "Generated"/"Imported" tabs visible in header
- Only duration chips shown on cards, no action buttons (zoom, menu)

### After (with fix)
- "Generated"/"Imported" tabs visible in header
- Action buttons (zoom, menu) visible on left of cards
- Duration chips moved to right side

## Test plan
- [ ] On touch device: verify Media Assets sidebar
"Imported"/"Generated" tabs are visible
- [ ] On touch device: verify Node Library filter buttons are visible
- [ ] On touch device: verify tree node action buttons (bookmark, help)
are visible
- [ ] On touch device: verify media asset card zoom/menu buttons are
visible
- [ ] On desktop with mouse: verify hover behavior still works as
expected
A couple small dynamic input fixes.
- When removing widgets, call any onRemove methods
- This is required for DOMWidgets to properly clean themself up.
- Resolve actual current link state when initializing match type
- This is only a partial fix for combing matchtype with autogrow, there
is a separate issue with skipped initialization that will need to be
resolved separately in the future.
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7837-Dynamic-input-fixes-2de6d73d365081bdb263ed659e25e6ea)
by [Unito](https://www.unito.io)
## Summary
Replace single `asset_update_options_enabled` feature flag with two
granular flags:
- `asset_deletion_enabled`: controls delete button visibility
- `asset_rename_enabled`: controls rename button visibility
The context menu only shows when at least one flag is enabled.
## Changes
- Updated `ServerFeatureFlag` enum with new flag names
- Updated `RemoteConfig` type with new properties
- Updated `AssetCard.vue` to conditionally show rename/delete buttons
based on their respective flags
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7864-feat-split-asset_update_options_enabled-into-separate-deletion-and-rename-flags-2e06d73d365081f9ac0afa12b87bd988)
by [Unito](https://www.unito.io)
---------
Co-authored-by: Amp <amp@ampcode.com>
## Summary
Remove 178 `@ts-expect-error` suppressions (935 → 757, 19% reduction) by
fixing underlying type issues instead of suppressing errors.
## Changes
- **What**: Type safety improvements across `src/lib/litegraph/` and
related test files
- Prefix unused callback parameters with `_` instead of suppressing
- Use type intersections for mock methods on real objects
- Use `Partial<T>` for incomplete test objects instead of `as unknown`
- Add non-null assertions after `.toBeDefined()` checks in tests
- Let TypeScript infer vitest fixture parameter types
- **Breaking**: None
## Review Focus
- `LGraphCanvas.ts` has the largest changes (232 lines) — all mechanical
unused parameter fixes
- Test files use type intersection pattern for mocks: `node as
LGraphNode & { mockFn: ... }`
- Removed dead code: `src/platform/cloud/onboarding/auth.ts` (47 lines,
unused)
### Key Files
| File | Change |
|------|--------|
| `LGraphCanvas.ts` | 57 suppressions removed (unused params) |
| `subgraph/__fixtures__/*` | Fixture type improvements |
| `*.test.ts` files | Mock typing with intersections |
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7817-WIP-Chore-Typescript-cleanup-2da6d73d365081d1ade9e09a6c5bf935)
by [Unito](https://www.unito.io)
---------
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: GitHub Action <action@github.com>