Skip to content

Fix ghost links on IO remove slot - #12473

Merged
AustinMroz merged 2 commits into
mainfrom
austin/fe-868-ghost-io-links
May 29, 2026
Merged

AustinMroz merged 2 commits into
mainfrom
austin/fe-868-ghost-io-links

Conversation

@AustinMroz

Copy link
Copy Markdown
Collaborator

Context menu operations on subgraph IO slots only set the foreground canvas as dirty, so links would visually persist until a different operation caused a background draw.

@coderabbitai

coderabbitai Bot commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Updates one call in SubgraphIONodeBase to pass a second boolean to setDirtyCanvas. Separately, Playwright subgraph slot/link interaction tests are modified to precompute/reuse a clipped screenshot region and to add a disconnect/remove-slot verification that compares clipped screenshots.

Changes

Subgraph canvas and tests

Layer / File(s) Summary
Dirty canvas invalidation parameter
src/lib/litegraph/src/subgraph/SubgraphIONodeBase.ts
The IO slot context menu action handler now calls setDirtyCanvas(true, true) instead of setDirtyCanvas(true).
Subgraph link interactions E2E test update
browser_tests/tests/subgraph/subgraphSlots.spec.ts
Reordered imports; precomputes a clipped screenshot region (twoLinkScreenshot), reuses that clip for hover/highlight assertions, and adds a test step that disconnects/removes a subgraph input slot then asserts the clipped screenshot matches the baseline.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

size:M, core/1.44, cloud/1.44

Suggested reviewers

  • DrJKL
  • pythongosssss

Poem

A rabbit hops on canvas bright,
Clicks a slot and holds it tight,
Two trues whisper, redraw anew,
Tests take screenshots—compare the view.
Hooray for tiny changes, stitched and right. 🐰

🚥 Pre-merge checks | ✅ 6 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The provided description explains the problem (context menu operations only mark foreground canvas dirty) and the solution, but it does not follow the repository's required template structure with Summary, Changes, Review Focus, and Screenshots sections. Restructure the description to follow the template: add a Summary section with one sentence, a Changes section with What and Breaking items, a Review Focus section, and Screenshots section if applicable.
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix ghost links on IO remove slot' directly relates to the main change: fixing ghost links that persist visually when IO slots are removed from subgraphs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
End-To-End Regression Coverage For Fixes ✅ Passed PR uses bug-fix language ("Fix") and changes src/ files, but also includes browser_tests changes, satisfying E2E regression test requirement.
Adr Compliance For Entity/Litegraph Changes ✅ Passed PR changes only a setDirtyCanvas argument in SubgraphIONodeBase; no new methods, god-object growth, or extension-facing API changes reported.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch austin/fe-868-ghost-io-links

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ✅ 1654 passed, 0 failed · 2 flaky

📊 Browser Reports
  • chromium: View Report (✅ 1633 / ❌ 0 / ⚠️ 2 / ⏭️ 5)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

@github-actions

github-actions Bot commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 05/29/2026, 12:13:52 AM UTC

Links

@codecov

codecov Bot commented May 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@             Coverage Diff             @@
##             main   #12473       +/-   ##
===========================================
- Coverage   74.69%   60.37%   -14.32%     
===========================================
  Files        1528     1426      -102     
  Lines       92012    73911    -18101     
  Branches    26339    20460     -5879     
===========================================
- Hits        68725    44623    -24102     
- Misses      22413    28788     +6375     
+ Partials      874      500      -374     
Flag Coverage Δ
e2e ?
unit 60.37% <ø> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1244 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@browser_tests/tests/subgraph/subgraphSlots.spec.ts`:
- Around line 711-715: The byte-exact screenshot assertion is flaky because
setDirtyCanvas(true, true) repaints the background asynchronously; replace the
one-shot expect(postScreenshot).toStrictEqual(twoLinkScreenshot) with a
retrying/polled comparison that repeatedly captures comfyPage.page.screenshot({
clip }) (after comfyPage.canvas.hover({ position: await seedIOSlot.getPosition()
})) until the captured buffer equals twoLinkScreenshot or a timeout elapses.
Locate the check around comfyPage.canvas.hover and seedIOSlot.getPosition and
implement the retry using Playwright-friendly polling (e.g., expect.poll or a
short-loop with a reasonable timeout) so the test waits for the async canvas
redraw instead of doing a single byte-exact match.
🪄 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: 5f95dc95-6fb4-40ed-9cbb-96cc403de3cb

📥 Commits

Reviewing files that changed from the base of the PR and between 8f15084 and c1e40f8.

📒 Files selected for processing (1)
  • browser_tests/tests/subgraph/subgraphSlots.spec.ts

@AustinMroz
AustinMroz marked this pull request as ready for review May 29, 2026 00:51
@AustinMroz
AustinMroz requested a review from a team May 29, 2026 00:51
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 29, 2026
@DrJKL
DrJKL added this pull request to the merge queue May 29, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 29, 2026
@AustinMroz
AustinMroz added this pull request to the merge queue May 29, 2026
@AustinMroz AustinMroz added needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch core/1.45 labels May 29, 2026
Merged via the queue into main with commit b7990f7 May 29, 2026
85 checks passed
@AustinMroz
AustinMroz deleted the austin/fe-868-ghost-io-links branch May 29, 2026 17:14
@comfy-pr-bot

Copy link
Copy Markdown
Member

@AustinMroz Successfully backported to #12522

@comfy-pr-bot

Copy link
Copy Markdown
Member

@AustinMroz Successfully backported to #12523

@github-actions github-actions Bot removed the needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch label May 29, 2026
AustinMroz added a commit that referenced this pull request May 29, 2026
Backport of #12473 to `cloud/1.45`

Automatically created by backport workflow.

Co-authored-by: AustinMroz <austin@comfy.org>
AustinMroz added a commit that referenced this pull request May 29, 2026
Backport of #12473 to `core/1.45`

Automatically created by backport workflow.

Co-authored-by: AustinMroz <austin@comfy.org>
@comfy-pr-bot comfy-pr-bot added the released:cloud PR has been released to cloud label Jun 19, 2026
DrJKL pushed a commit that referenced this pull request Jul 6, 2026
Context menu operations on subgraph IO slots only set the foreground
canvas as dirty, so links would visually persist until a different
operation caused a background draw.
dante01yoon pushed a commit that referenced this pull request Jul 27, 2026
Context menu operations on subgraph IO slots only set the foreground
canvas as dirty, so links would visually persist until a different
operation caused a background draw.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released:cloud PR has been released to cloud size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants