Repository navigation
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
🎭 Playwright: ⏳ Running... |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/extensions/vueNodes/components/LGraphNode.test.ts (1)
346-369: Cover the “promise resolvesfalsestill claims event” contract explicitly.Great regression test. One small gap: it only checks the
Promise<true>path. Since this PR intentionally claims the event for async handlers regardless of final resolution, add amockResolvedValue(false)variant so that behavior is locked in.Suggested test addition
+ it('should still stop propagation when onDragDrop promise resolves false', async () => { + const onDragDrop = vi.fn().mockResolvedValue(false) + mockData.mockLgraphNode = { + onDragDrop, + onDragOver: vi.fn(), + isSubgraphNode: () => false + } + + const wrapper = mountLGraphNode({ nodeData: mockNodeData }) + const parentListener = vi.fn() + const parent = wrapper.element.parentElement + expect(parent).not.toBeNull() + parent!.addEventListener('drop', parentListener) + + wrapper.element.dispatchEvent( + new Event('drop', { bubbles: true, cancelable: true }) + ) + + await Promise.resolve() + + expect(onDragDrop).toHaveBeenCalled() + expect(parentListener).not.toHaveBeenCalled() + })🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/renderer/extensions/vueNodes/components/LGraphNode.test.ts` around lines 346 - 369, Add a second test case mirroring the existing "should stop propagation when onDragDrop returns a promise" scenario but set onDragDrop = vi.fn().mockResolvedValue(false); mount the node the same way (using mountLGraphNode with mockNodeData), attach a parent 'drop' listener (parentListener), dispatch a cancelable bubbling 'drop' event on wrapper.element, await the promise resolution (e.g., await Promise.resolve()), and assert that onDragDrop was called and parentListener was not called; reference the mockData.mockLgraphNode object and the onDragDrop mock to locate where to inject this new test.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/renderer/extensions/vueNodes/components/LGraphNode.test.ts`:
- Around line 346-369: Add a second test case mirroring the existing "should
stop propagation when onDragDrop returns a promise" scenario but set onDragDrop
= vi.fn().mockResolvedValue(false); mount the node the same way (using
mountLGraphNode with mockNodeData), attach a parent 'drop' listener
(parentListener), dispatch a cancelable bubbling 'drop' event on
wrapper.element, await the promise resolution (e.g., await Promise.resolve()),
and assert that onDragDrop was called and parentListener was not called;
reference the mockData.mockLgraphNode object and the onDragDrop mock to locate
where to inject this new test.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 8d532a8e-8dc2-481a-8248-e5d5ebbdd6fb
📒 Files selected for processing (2)
src/renderer/extensions/vueNodes/components/LGraphNode.test.tssrc/renderer/extensions/vueNodes/components/LGraphNode.vue
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/composables/usePaste.ts`:
- Around line 72-83: The initial paste dispatch in usePaste() currently checks
item.type.startsWith(...) and therefore ignores clipboard File items with empty
MIME; update that dispatch loop to detect files by item.kind === 'file', call
item.getAsFile(), and use
hasImageType(file)/hasAudioType(file)/hasVideoType(file) to decide whether to
call pasteImageNode(), pasteAudioNode(), or pasteVideoNode(); ensure this
mirrors pasteItemsOnNode() behavior and add a regression test for usePaste()
that pastes a File with type === '' and verifies it routes to the appropriate
paste*Node handler.
In `@src/utils/eventUtils.ts`:
- Around line 36-46: The function getMediaTypeFromFile currently falls back to
getMediaTypeFromFilename even when File.type is non-empty; change
getMediaTypeFromFile to only call getMediaTypeFromFilename when type is empty
(e.g., type === ''), and if type is non-empty and doesn't start with
image|audio|video return null immediately; update the function's control flow
around the existing type.startsWith checks and the filename fallback, and add a
regression test that asserts a mismatched non-empty MIME (e.g., name
"report.jpg" with type "application/pdf") returns null to ensure precedence is
enforced.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7e865afd-ab9e-460d-9288-9c1d49c68649
📒 Files selected for processing (7)
src/composables/usePaste.test.tssrc/composables/usePaste.tssrc/renderer/extensions/vueNodes/widgets/composables/useImageUploadWidget.tssrc/scripts/app.test.tssrc/scripts/app.tssrc/utils/__tests__/eventUtils.test.tssrc/utils/eventUtils.ts
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/extensions/vueNodes/components/LGraphNode.test.ts (1)
347-353: Add a concreteidto the asyncmockLgraphNode.At Line 349, the drop cleanup path is keyed by
node.id; this mock currently omits it, so the guard is exercised viaundefinedrather than realistic IDs.Suggested test tweak
const onDragDrop = vi.fn().mockResolvedValue(true) mockData.mockLgraphNode = { + id: 123, onDragDrop, onDragOver: vi.fn(() => true), isSubgraphNode: () => false }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/renderer/extensions/vueNodes/components/LGraphNode.test.ts` around lines 347 - 353, The test's mockLgraphNode lacks a concrete id which causes the drop-cleanup guard (keyed by node.id) to run with undefined; update the mockLgraphNode in the "should stop propagation when onDragDrop returns a promise" test to include a realistic id (e.g., id: 'node-1') so the cleanup path is exercised with a proper identifier; modify the mock object that contains onDragDrop, onDragOver and isSubgraphNode to also include this id.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/renderer/extensions/vueNodes/components/LGraphNode.test.ts`:
- Around line 347-353: The test's mockLgraphNode lacks a concrete id which
causes the drop-cleanup guard (keyed by node.id) to run with undefined; update
the mockLgraphNode in the "should stop propagation when onDragDrop returns a
promise" test to include a realistic id (e.g., id: 'node-1') so the cleanup path
is exercised with a proper identifier; modify the mock object that contains
onDragDrop, onDragOver and isSubgraphNode to also include this id.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e2586fa1-3836-4d05-b2c0-cd8bb9a55823
📒 Files selected for processing (2)
src/renderer/extensions/vueNodes/components/LGraphNode.test.tssrc/renderer/extensions/vueNodes/components/LGraphNode.vue
|
@coderabbitai resume |
✅ Actions performedReviews resumed. |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/renderer/extensions/vueNodes/components/LGraphNode.test.ts (1)
325-445:⚠️ Potential issue | 🟠 MajorThis bug fix still needs a browser-level regression or an explicit exemption.
These component tests cover the Vue boundary, but the reported failure only reproduced when the browser delivered the final drop to
canvas#graph-canvas. The PR metadata still shows nobrowser_tests/change and no explanation for skipping one, so the fix does not satisfy the repo’s bug-fix regression requirement yet.Based on learnings, "End-to-end regression coverage for fixes: For PRs that include bug-fix language in the title or commit subjects (fix, fixed, fixes, fixing, bugfix, hotfix), ensure at least one of the following: (1) files are changed under browser_tests/, or (2) the PR description includes a concrete, non-placeholder explanation of why an end-to-end regression test was not added."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/renderer/extensions/vueNodes/components/LGraphNode.test.ts` around lines 325 - 445, The PR adds unit tests around Vue handling in LGraphNode.test.ts but lacks the required browser-level regression for the bug that reproduced only when the browser delivered the final drop to canvas#graph-canvas; either add an end-to-end browser test under browser_tests/ that reproduces the failing drop behavior (exercise the real DOM drop to canvas#graph-canvas and assert propagation/handling matches the fix), or update the PR description to include a concrete explanation why an E2E test is not applicable; reference the related test/spec file LGraphNode.test.ts and the DOM target canvas#graph-canvas when adding the browser test or documenting the exemption.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/composables/node/useNodeDragAndDrop.ts`:
- Around line 33-37: The Drag-and-Drop flow incorrectly treats Chrome→Firefox
BMP placeholders as real files; update the file-filtering so that any File with
type 'image/bmp' is removed before branching on "file-backed" length checks.
Concretely, change filterFiles and filterItemFiles (and the other spots
referenced near the other ranges) to filter out files with file.type ===
'image/bmp' (in addition to the existing fileFilter) and ensure any logic that
decides "is file-backed" uses the filtered array returned by getFilesFromItems /
filterFiles rather than the raw dataTransfer.files or raw File[]; keep using
getFilesFromItems for items but apply the BMP exclusion first so
extractFilesFromDragEvent receives a true URI-only path when appropriate.
In `@src/renderer/extensions/vueNodes/components/LGraphNode.vue`:
- Around line 827-845: hasFileTransfer currently treats any file item or
FileList entry as a file drop, which misclassifies Chrome→Firefox URI drags that
include a synthetic "image/bmp" placeholder; update hasFileTransfer to ignore
placeholder BMP entries (or otherwise mirror extractFilesFromDragEvent's filter)
by only returning true for file items/entries whose MIME type is not 'image/bmp'
(or not in the list extractFilesFromDragEvent ignores), so isUriOnlyDrop
correctly recognizes URI-only drops; apply the same logic where file-list checks
occur so both hasFileTransfer and isUriOnlyDrop behave consistently with
extractFilesFromDragEvent.
In `@src/scripts/app.ts`:
- Around line 610-627: Remove the drop tracing console.log added in the
app.documentDrop handler in src/scripts/app.ts: delete the entire
console.log('app.documentDrop', {...}) block (and any similar drag/upload
tracing added in this PR) so filenames, item file names, and the text/uri-list
payload are not logged; if lightweight telemetry is required instead, replace it
with a non-sensitive log that only records safe booleans or counts (e.g.,
whether a drop occurred and number of items) without including file names,
types, or URI contents.
---
Outside diff comments:
In `@src/renderer/extensions/vueNodes/components/LGraphNode.test.ts`:
- Around line 325-445: The PR adds unit tests around Vue handling in
LGraphNode.test.ts but lacks the required browser-level regression for the bug
that reproduced only when the browser delivered the final drop to
canvas#graph-canvas; either add an end-to-end browser test under browser_tests/
that reproduces the failing drop behavior (exercise the real DOM drop to
canvas#graph-canvas and assert propagation/handling matches the fix), or update
the PR description to include a concrete explanation why an E2E test is not
applicable; reference the related test/spec file LGraphNode.test.ts and the DOM
target canvas#graph-canvas when adding the browser test or documenting the
exemption.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 48b9157e-c849-42e1-b597-5bfd50f33319
📒 Files selected for processing (8)
src/composables/node/useNodeDragAndDrop.test.tssrc/composables/node/useNodeDragAndDrop.tssrc/composables/node/useNodeImageUpload.tssrc/renderer/extensions/vueNodes/components/LGraphNode.test.tssrc/renderer/extensions/vueNodes/components/LGraphNode.vuesrc/scripts/app.tssrc/utils/__tests__/eventUtils.test.tssrc/utils/eventUtils.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- src/utils/tests/eventUtils.test.ts
✅ Actions performedReviews resumed. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/extensions/vueNodes/components/LGraphNode.vue (1)
873-880: Minor: Consider consistent cleanup pattern for early return.This early return path clears
app.dragOverNodeunconditionally if it exists, unlikeclearDragOverState(node.id)which checks the id. This is functionally fine since a node withoutonDragDropshouldn't have been set asdragOverNode, but for consistency you could use:if (!node?.onDragDrop) { - isDraggingOver.value = false - if (app.dragOverNode) { - app.dragOverNode = null - app.canvas.setDirty(false, true) - } + clearDragOverState(node?.id) return }With
node?.idbeingundefined,clearDragOverStatewould only clearisDraggingOver.value(as intended). However, the current code explicitly clearsapp.dragOverNodewhich may be intentional for edge cases—no functional bug here.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/renderer/extensions/vueNodes/components/LGraphNode.vue` around lines 873 - 880, The early-return block that handles nodes without onDragDrop currently sets isDraggingOver.value = false and unconditionally clears app.dragOverNode and calls app.canvas.setDirty, which is inconsistent with the elsewhere-used clearDragOverState behavior; replace the manual cleanup with a call to clearDragOverState(node?.id) so the same id-check and cleanup logic is reused (this will clear isDraggingOver.value and only clear app.dragOverNode when the ids match) while preserving the canvas dirty handling.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/renderer/extensions/vueNodes/components/LGraphNode.vue`:
- Around line 873-880: The early-return block that handles nodes without
onDragDrop currently sets isDraggingOver.value = false and unconditionally
clears app.dragOverNode and calls app.canvas.setDirty, which is inconsistent
with the elsewhere-used clearDragOverState behavior; replace the manual cleanup
with a call to clearDragOverState(node?.id) so the same id-check and cleanup
logic is reused (this will clear isDraggingOver.value and only clear
app.dragOverNode when the ids match) while preserving the canvas dirty handling.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: f435411b-482a-45c4-8987-270dbcfa600f
📒 Files selected for processing (5)
src/composables/node/useNodeDragAndDrop.test.tssrc/composables/node/useNodeDragAndDrop.tssrc/renderer/extensions/vueNodes/components/LGraphNode.test.tssrc/renderer/extensions/vueNodes/components/LGraphNode.vuesrc/scripts/app.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- src/composables/node/useNodeDragAndDrop.test.ts
- src/renderer/extensions/vueNodes/components/LGraphNode.test.ts
- src/composables/node/useNodeDragAndDrop.ts
ab17cf7 to
93f5da8
Compare
|
@christian-byrne October 3 upstream reconciliation is ready for review.
I rebuilt the change from current Validation was run on isolated fork PR xmarre#36 before rewriting this branch. Lint, both typecheck surfaces, repo checks, Fallow, localhost/desktop/cloud builds, package tests, all 8 application Vitest coverage shards, merged coverage thresholds, Storybook, website/billing checks, telemetry/assets/ADR/performance/binary-size checks, and CodeRabbit passed. The fork browser matrix could not execute because the fork runner was denied access to Upstream advanced once during validation via #19916, which only changed |
93f5da8 to
674cf50
Compare
|
@christian-byrne October 11 upstream reconciliation is ready for review.
The branch is rebuilt from current upstream. The reconciliation retains #19722's extensionless-video rejection/warning and adds explicit, side-effect-free hover ownership for rejected video files; #20374's Vue pointer state machine; #16313's design-system toast API; and #20156's Agent asset-tray metadata and successful-attachment telemetry. Existing drag/drop handoff, URI/BMP handling, MIME fallback and paste routing are retained. The two additional changed files thread the video-rejection eligibility callback into node upload handling and test it. Work was isolated on Validation limitation: the isolated fork validation PR #37 did not receive any workflow or check runs. No fresh Vitest, typecheck, lint, build or browser-test pass is claimed for this October 11 tree. The native OS-to-browser external-file drag path also still needs live verification. The updated PR description documents the reconciliation and its validation limits in detail. |
674cf50 to
27c72f7
Compare
|
October 14 upstream reconciliation is on this PR.
The five conflicting files were reconciled against current behavior. The change preserves #20839's HDR normalization, #20540's consumed model-drop handling, #19143/#19153's app-registry architecture, #18389's Agent video validation, and the semantic colors/dependency removal from #16407, which landed during validation. Executable tests also exposed four missing event utility exports in the prior PR head; these are restored from the earlier implementation. Evidence and limits: 777 tests passed / 1 skipped across 11 focused suites on the earlier mirror, and the later fetch-mock adjustment passed 26 node routing tests. Format, Stylelint, type-aware Oxlint, ESLint and the changed-line server-fact check completed. CodeRabbit reviewed the earlier mirror with no actionable findings. Typecheck identified a missing constructor argument in the new fixture; this head fixes it, but the execution environment disconnected before final-base revalidation. No fresh final-base typecheck/build or native external-drag pass is claimed, and no fork workflow runs were created. The PR description records the exact tested tree and the three final file differences. |
|
@christian-byrne October 18 upstream reconciliation is ready for review.
The 118 intervening upstream commits include #20782 (import-cycle isolation), #19976/#20757 (canvas lifecycle and selection), #19601 (Agent attachment acceptance and invalid-state flow), and #17469 (Agent transport/identity changes). The reconciliation retains these upstream contracts and reapplies this PR's accepted-drop ownership and paste/media routing. The removed Agent drop-ownership test was retargeted to an existing workflow-JSON drop case. The PR description details the code paths and preserved behavior. Validation limits: GitHub's merge shape and intended file scope are verified. CodeRabbit reports success on the isolated fork, and the final PR head has passing CLA and Socket Security checks. All 17 upstream Actions runs are The branch is ready for review; it has not been merged. |
|
@christian-byrne October 22 upstream reconciliation is ready for re-review.
The 181 intervening upstream commits were audited for the affected code paths. The reconciliation preserves #20988's theme migration, #21423's extensionless imports, #21300's workflow-owned execution frames, and current Agent consent, workspace auth, EXR preview and attachment contracts (#21532, #21575, #21203). It also incorporates the latest #21644 change to refresh node definitions only after ComfyUI reconnects following an Agent restart. The sole non-exact overlapping hunk was the Agent panel import block; both the EXR imports and the PR's drop-ownership import are retained. Work was isolated on Validation limitation: no current-tree typecheck, Vitest, lint, build, browser E2E or native external-file drag pass was executed. The 18 upstream Actions runs all show The PR branch now contains the final one-commit candidate; no upstream merge was performed. |
|
@christian-byrne October 30 upstream reconciliation is published and ready for review.
The PR description includes the upstream rationale and specific compatibility decisions. No upstream merge was performed. |
|
@christian-byrne Reconciled #10841 against current Final head: The 37 upstream commits since the October 30 reconciliation overlap seven PR files. Their PR and upstream patches were replayed against the common base and merged without replacing unrelated changes. The substantive overlap was in The prior head is preserved at Test status: patch-replay and GitHub topology checks passed. Typecheck, lint, Vitest, build, browser E2E and native external file drag have not been run on this candidate. Upstream Actions runs are The PR description contains the detailed upstream compatibility notes and verification boundaries. |
|
@christian-byrne The November 4 upstream reconciliation is ready for review.
The PR description contains the upstream rationale and full reconciliation record. |
|
@christian-byrne The November 12 upstream reconciliation for #10841 is published and ready for re-review.
Runtime validation is still outstanding. The isolated fork PR has no CI results. Fourteen upstream Actions workflows on this head stopped at The upstream PR has not been merged. |
Retain the latest Vue preview metadata and worker display-copy contracts, properties-panel ownership, Cloud skipped-output errors and lazy startup. Preserve explicit drop ownership, item/URI media handling and paste routing.
|
@christian-byrne November 13 upstream reconciliation of #10841 is published for re-review.
Execution is not yet validated: there are no fork CI jobs; 14 upstream Actions workflows stop at The PR remains open for upstream review; it has not been merged. |

Summary
Restore local file drops over Vue upload nodes after #9463. Graph-canvas drops that already have
defaultPreventedcan reach the intended node; explicit event ownership prevents duplicate handling by Vue, Agent-panel, and document handlers.The routing also handles
DataTransfer.items, Firefox URI transfers, zero-byte BMP placeholders, and empty-MIME media files. Explicit MIME types take precedence over filename extensions. Clipboard files are captured before asynchronous work, with a compatible selected media node taking priority.Behavior and compatibility
ComfyAppinterface and read the app registry throughuseApp().Upstream reconciliation — November 13, 2026
Rebuilt the existing one-commit PR on the exact upstream
maincommit47fb5568bb1b46c97bffa177b49a0c446af3d35e(35 new upstream commits since the November 12 base9d22b6634e4889b583b26dbc0ed27cdc21c10d33). Six PR-owned files changed upstream; the other 13 retain their exact previous PR blobs.Upstream changes preserved and rationale
getNodeOutputs/getNodeOutputItems, retaining original-versus-preview identity and cache revisions, while preserving live preview rendering and MIME-sensitive output filtering. The PR'suseVueNodeDragAndDrophook remains installed independently of the preview contract.usePropertiesPanelStoredomain import; no removed right-side-panel import or obsoletenodeMedia.value.urlsusage is reintroduced.queuePromptclears prior run errors, preserves early socket errors for the current prompt and usesrecordSubmissionNodeErrorswith prompt id. The PR's document-drop handler remains separate from that submission/error lifecycle.useSubgraphStoreimport. The node-drop implementation does not revive those startup side effects.The PR's existing drag/paste behavior and all previous upstream contracts remain intact.
Isolation, tree verification and limits
xmarre/ComfyUI_frontend:checkpoint/pr-10841-20261113preservesd8c201f8a9941bd77a80c370ee07b30da1218c12.mirror/pr-10841-reconcile-20261113is built on the exact upstream base. Isolated fork validation PR #51, againstvalidation/pr-10841-base-20261113, reportsmergeable: true,mergeable_state: clean.81b929f9ea56faa9409ab907293f756c74999c45, with one parent47fb5568bb1b46c97bffa177b49a0c446af3d35e.LGraphNode.test.tswas deliberately combined in upstream-then-PR order to keep both the structured-preview fixture and native file-drag fixtures. All 13 other paths were copied using their previous Git blob IDs. A read of all 19 final file blobs confirmed no merge markers, obsolete properties-panel imports, stalenodeMedia.value.urlsreferences or unguardedURL.parsecalls.action_required(no jobs executed) and CLA Assistant passed. Structural verification and clean GitHub mergeability are not runtime test passes.Upstream GitHub reports
mergeable: truewithmergeable_state: blockedfrom review/check gates. This reconciliation updates the existing PR; it does not merge it.