Skip to content

[backport core/1.52] fix: accept output media listed in widget options - #19066

Merged
christian-byrne merged 1 commit into
core/1.52from
backport-17240-to-core-1.52
Sep 27, 2026
Merged

christian-byrne merged 1 commit into
core/1.52from
backport-17240-to-core-1.52

Conversation

@christian-byrne

Copy link
Copy Markdown
Contributor

Backports #17240 to the active desktop release line.

The production change and regression coverage cherry-picked cleanly. The unit test was adapted to the release branch’s hoisted mockFetchHistoryPage API, and the newer shared view-file mock was inlined because that helper is not present on 1.52.

Validation:

  • pnpm exec vitest run src/platform/missingMedia/missingMediaScan.test.ts (62 passed)
  • pnpm exec oxfmt --check on changed TypeScript files
  • repository pre-commit typechecks
  • repository pre-push knip check

Original: #17240
Relates to PM-1501 and PM-1598.

## ELI5

A local output image can be listed in its node's selector even when it
is absent from job history. Missing-media detection now accepts either
source, so a valid selectable file is not incorrectly marked missing.

## Summary

Local scans now check widget options before falling back to generated
history. An exact output option is accepted immediately; an absent
option still uses the existing history verification.

## Changes

- Accept output-annotated image, video and audio values present in
widget options, including when history is empty.
- Preserve history-only selections, missing-file warnings, input/output
path identity and Cloud asset validation.
- Check that valid output selections remain selectable in Vue node
popovers, including LoadImageOutput's remote options.

## Review Focus

An input option named `photo.png` must not validate `photo.png
[output]`. Remote options are allowed to settle before the direct
LoadImageOutput rescan; cold remote initialization is a separate
concern.

The existing "not in options" fixture now omits the selected value,
matching its stated purpose; separate new cases assert that an exact
option is valid.

## Red-green proof

| Phase | Commit | Unit | E2E |
| --- | --- | --- | --- |
| Red |
[fd1f809](fd1f809)
| [3 regression
failures](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/34328633650/job/102391769657)
| [2 regression
failures](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/34328633912/job/102392632172)
|
| Green |
[4bcbae8](4bcbae8)
| [20,555
passed](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/34331275748/job/102400243503)
| [122 passed in regression
shard](https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/34331275891/job/102401133953)
|

RED failures were limited to the new output-option cases. GREEN passes
the same unchanged tests, all other E2E shards, and the remaining CI
checks.

## Provenance

- **Authored by:** interactive session.
- **Verified:** 112 targeted unit tests and 3 Chromium E2E tests passed
with one worker, including history-only fallback. Restoring the old
production code reproduced exactly 3 unit and 2 E2E failures; restoring
the fix passed all 115 again. Tests are unchanged from the RED commit.
`pnpm typecheck`, `pnpm typecheck:browser`, `pnpm lint`, `pnpm
format:check` and `pnpm knip` passed. Independent final review found no
issues. Both complete CI workflows passed at the GREEN commit, and all
other checks passed or were skipped.
- **Deviations:** none.

## Cache freshness boundary

An exact loader option, including its `[output]` annotation, is accepted
as the best available evidence that an OSS output is present. This
avoids falsely rejecting a valid file solely because generated history
does not contain it. It is not a fresh disk-existence check: after a
successful fetch, a deleted file can remain in cached options until
refresh, including while the option endpoint is unavailable. Input
options already have the same freshness limitation, and history itself
does not verify disk existence.

Shared refresh/invalidation and unavailable-endpoint policy for input
and output are tracked in #17815. Cloud asset verification and the
history fallback when no exact output option exists remain unchanged.
@christian-byrne christian-byrne added the backport Backporting a PR onto a release candidate label Sep 27, 2026
@vercel

vercel Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
billing-web-test Error Error Sep 27, 2026 5:24am UTC
1 Skipped Deployment
Project Deployment Actions Updated
billing-web Ignored Ignored Sep 27, 2026 5:24am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Ignore keyword(s) in the title.

⛔ Ignored keywords (2)
  • [release]
  • [backport

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 819c70ea-77b8-4822-9fed-052b74ba253b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 09/27/2026, 05:30:37 AM UTC

Links

🎭 Playwright: ❌ 1982 passed, 2 failed · 2 flaky

❌ Failed Tests

📊 Browser Reports
  • chromium: View Report (✅ 1961 / ❌ 2 / ⚠️ 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)

@christian-byrne
christian-byrne enabled auto-merge (squash) September 27, 2026 05:28
@github-actions github-actions Bot added the risk:R2 PR risk grade (advisory shadow check; grader-owned) label Sep 27, 2026
@christian-byrne
christian-byrne merged commit 817d7bd into core/1.52 Sep 27, 2026
55 of 56 checks passed
@christian-byrne
christian-byrne deleted the backport-17240-to-core-1.52 branch September 27, 2026 05:28
@codecov

codecov Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@             Coverage Diff             @@
##           core/1.52   #19066    +/-   ##
===========================================
  Coverage      82.01%   82.02%            
===========================================
  Files           1909     1909            
  Lines         109083   109086     +3     
  Branches       30246    29778   -468     
===========================================
+ Hits           89462    89473    +11     
- Misses         19269    19276     +7     
+ Partials         352      337    -15     
Flag Coverage Δ
e2e 66.41% <100.00%> (-0.02%) ⬇️
unit 73.94% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/missingMedia/missingMediaScan.ts 98.75% <100.00%> (ø)

... and 28 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.

This branch had an error being deployed

1 failed deployment
Preview – billing-web-test — 3b58bd78 Deployed Sep 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Backporting a PR onto a release candidate risk:R2 PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants