Repository navigation
Assets backed assets panel - #15381
Merged
Merged
Conversation
Need to put some further thought into loadNew invalidation. Ideal case is that output is flagged stale and async fetch doesn't occur if there isn't active dependent? But per current design specs, all existent views should be subscribed and thus require update. That a new 'output' asset might farm out 3 requests (all: load node, outputs, outputs+temp) leaves a bad taste in my mouth
christian-byrne
added a commit
that referenced
this pull request
Sep 2, 2026
- renumber 0027 -> 0028 to resolve the identifier collision with #16160 (0027-seq-gap-recovery-is-replay-never-wipe.md), which is also open - rewrite Current implementation to reflect #15381 (merged): both listing and deletion now branch on the assetsEnabled/assetDeletionEnabled flags, not just the legacy history path - fold the 2026-08-29 update into the numbered Decision list instead of keeping it as a separate dated section - rename Current Gaps -> Implementation gaps and correct it: decision 7 (history deletion gated on every record deletion succeeding) is verified unimplemented in useMediaAssetActions.deleteAssets on main; only the legacy (assetsEnabled=false) path deletes history today - replace 'unwind' in the meta-review reference bullet with the actual non-atomic/no-rollback semantics decision 7 states - fix three References links: the old asset-record-content-split paths in Comfy-Org/ideation-sharing 404; repoint to the real asset-deletion/intended/{index,logical,scenarios}.md paths pinned to ab6246440c3234fe315e4fc36145c818e5309868 All rewritten claims verified against origin/main source (useMediaAssetActions.ts, assetsStore.ts) and the referenced repo's current tree before applying. Addresses: #16102 (review)
mattmillerai
added a commit
that referenced
this pull request
Sep 2, 2026
The `null` case in `extractApiPromptFromAsset`'s table was reached by casting through `unknown`, which asserted a shape the boundary could not actually produce: `zAsset` inherits `user_metadata` as `.optional()` from the generated ingest shape, so a payload carrying `null` failed `safeParse` and dropped the whole asset rather than reaching the guard. Accept `null` at the boundary and normalize it to `undefined`, then drive the regression test through `assetItemSchema.parse` instead of the cast. Also realigns the table's last negative case with main: #15381 changed `isOutputAssetMetadata` to require `subfolder` rather than `nodeId`, so `{ jobId, subfolder }` is now valid output metadata and 'missing nodeId' no longer describes a rejected shape. 'missing subfolder' does.
Merged
christian-byrne
added a commit
that referenced
this pull request
Sep 2, 2026
- renumber 0027 -> 0028 to resolve the identifier collision with #16160 (0027-seq-gap-recovery-is-replay-never-wipe.md), which is also open - rewrite Current implementation to reflect #15381 (merged): both listing and deletion now branch on the assetsEnabled/assetDeletionEnabled flags, not just the legacy history path - fold the 2026-08-29 update into the numbered Decision list instead of keeping it as a separate dated section - rename Current Gaps -> Implementation gaps and correct it: decision 7 (history deletion gated on every record deletion succeeding) is verified unimplemented in useMediaAssetActions.deleteAssets on main; only the legacy (assetsEnabled=false) path deletes history today - replace 'unwind' in the meta-review reference bullet with the actual non-atomic/no-rollback semantics decision 7 states - fix three References links: the old asset-record-content-split paths in Comfy-Org/ideation-sharing 404; repoint to the real asset-deletion/intended/{index,logical,scenarios}.md paths pinned to ab6246440c3234fe315e4fc36145c818e5309868 All rewritten claims verified against origin/main source (useMediaAssetActions.ts, assetsStore.ts) and the referenced repo's current tree before applying. Addresses: #16102 (review)
zeus-onl
pushed a commit
to zeus-onl/ComfyUI_frontend
that referenced
this pull request
Sep 3, 2026
A couple of small high priority follow-ups to Comfy-Org#15381 - Conditionally update type when `temp` is included as a tag on an asset. - Removed spreads which break getters - Fix several instances of where migrating `PagedList` was broken by calls dropped the `this` binding --------- Co-authored-by: Amp <amp@ampcode.com>
comfy-pr-bot
pushed a commit
that referenced
this pull request
Sep 13, 2026
This was referenced Sep 15, 2026
pull Bot
pushed a commit
to Penguinjanator/ComfyUI_frontend
that referenced
this pull request
Sep 20, 2026
…fy-Org#18096) <!-- ccr-slack-attribution --> _Requested by **Christian Byrne** · [Slack thread](https://comfy-organization.slack.com/archives/C0BGH348Z0C/p1789785533918339?thread_ts=1789715585.888609&cid=C0BGH348Z0C)_ ## Summary Video assets generated through the Comfy Agent / cloud path show up as an unplayable black tile in the Media Assets panel. This is an asset-panel regression from the assets-backed panel migration (Comfy-Org#15381): history records used to carry the original video URL, but an `/api/assets` video record has neither `thumbnail_url` nor `preview_url` (the backend only builds previews for images), and `MediaAssetCard.vue` had no fallback for that case, unlike the `3D` kind, which already falls back to a real content URL. ## Changes - **Fix (black tile / unplayable video)**: `MediaAssetCard.vue`'s `src` fallback now points video and audio assets at their real content URL (`getAssetFileUrl()`) when both preview fields are empty, mirroring the `3D` pattern. `getAssetFileUrl()` gained an optional `{ disposition: 'inline' }` option because `/api/assets/{id}/content` defaults to `Content-Disposition: attachment`, which makes the browser download instead of play. Existing callers (downloads, the 3D viewer) are unaffected. - Perf: `VirtualGrid` unmounts off-screen cards and `<video>` uses `preload="metadata"`, so this does not turn the panel into an eager video downloader. - **Follow-up (audio waveform perf)**: the waveform player fetches and decodes the whole audio file as soon as it gets a source, independent of `preload="metadata"`, and has no unmount cancellation for the in-flight download. Restoring missing URLs activates that work for these assets too. Not measured as a blocking regression here; tracked separately. - **Tests**: - `browser_tests/tests/sidebar/agentVideoAsset.spec.ts`: the MP4 fixture (`workflowInMedia/workflow.mp4`) is served only at the card's own asset-id content URL; every other `/api/assets/*/content` id returns the backend's 404 JSON. The playback test asserts the video's `currentSrc` is that URL, its dimensions load (`videoWidth > 0`), and `currentTime` advances after clicking play, so a 404'd source can no longer pass. - Component level (`MediaAssetCard.test.ts`): a video/audio table asserts the inline content URL reaches each media element (`<video>`, `<audio>`), queried via `data-testid` (`media-asset-video`, `wave-audio-media`). Removing the audio fallback fails the audio row. - `assetUrlUtil.test.ts` covers the `disposition: 'inline'` option. - **Drag-to-canvas (not fixed here, `test.fail()` kept)**: this is a frontend bug, not an upstream metadata gap. The card is grouped per job, so its `id` is the job id; the drag publishes `/api/assets/<job-id>/content`, which 404s, and the error JSON gets loaded as the "workflow". Fixed in the stacked PR Comfy-Org#18111, which flips this test to passing. ## Verification `pnpm vitest run` on the two affected unit files, `pnpm eslint`, `pnpm oxfmt --check`, `pnpm vue-tsc --noEmit`, and `pnpm knip` pass locally. The Playwright spec could not be run in this sandbox (no Chromium, no backend); it lists cleanly and runs in CI. ## Notes - This branch replaces `test/pm-1342-video-asset-repro`, which had an internal ticket ID baked into the branch name, commit message, and test file. That branch is left in place, unused, for whoever wants to delete it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01UP49A8QXF7zN5cYmUqsAx4 --- _Generated by [Claude Code](https://claude.ai/code/session_01UP49A8QXF7zN5cYmUqsAx4)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
pull Bot
pushed a commit
to Penguinjanator/ComfyUI_frontend
that referenced
this pull request
Sep 27, 2026
…Comfy-Org#13957) ## ELI-5 When you generate an image through the API (or the Comfy MCP), the job never stores the editor file the canvas saves — only the machine-format graph. Drop that machine-format JSON on the canvas and it rebuilds a workflow just fine, but the asset three-dots "Open this workflow in a new tab" just said there was no workflow data. This teaches the menu the same trick the canvas already knows: no editor workflow, open the stored machine-format graph instead. Nothing is written back to the job or the asset — save it yourself if you want to keep it. ## Summary The asset menu's "Open this workflow in a new tab" now falls back to the API-format graph a job stores at `workflow.prompt` when `extra_data.extra_pnginfo.workflow` is absent, loading it through `app.loadApiJson` — the same loader the canvas uses for a dropped API-format JSON file, ending in the same `afterLoadNewGraph` new-tab handoff. ## Changes - `jobTypes.ts`: `zWorkflowContainer` also parses `prompt` (it was previously stripped). - `fetchJobs.ts`: `extractApiPrompt()` — returns the stored API graph **only** when no editor workflow is embedded. An embedded workflow always suppresses the fallback, so frontend/desktop submissions are used as-is and never re-derived (this holds even when that embedded workflow fails validation, which is deliberate — presence, not validity, is the switch). - `jobOutputCache.ts` / `workflowExtractionUtil.ts`: `getJobApiPrompt()` / `extractApiPromptFromAsset()`, reusing the same LRU-cached job detail, so the fallback costs no extra request. - `useMediaAssetActions.ts`: single-asset `openWorkflow` and bulk `openMultipleWorkflows` both go through one `openAssetWorkflow` helper that uses the fallback when extraction yields no workflow, gated by `app.isApiJson`. The fallback returns the same `{ success, error }` shape as `openWorkflowAction`, with the prompt fetch and the load inside one try/catch, so a failure at either step degrades to the warning toast with the underlying message rather than escaping as an unhandled rejection. - `app.ts`: the canvas drop path's `await this.loadApiJson(...)` gets its own `try`/`catch`, reporting through `showErrorOnFileLoad`. Previously a failed load fell into `handleFile`'s prompt-parse `catch` and continued on to the A1111-parameters fallback, surfacing a misleading parse error instead of the real one. - `assetSchema.ts`: `zAsset` accepts a `null` `user_metadata` and normalizes it to `undefined`. The generated ingest shape is `.optional()`, which rejects an explicit `null` outright — so an asset whose payload carried one failed `safeParse` and was dropped entirely rather than reaching the metadata guard. The fallback engages only on the branch that previously always failed, so no existing behavior changes. One incidental improvement: that branch's toast now shows the translated `mediaAsset.noWorkflowDataFound` instead of the raw English `'No workflow data available'` that leaked out of `openWorkflowAction`. ## Deviation from the plan — please read The plan for this called for converting the stored graph with the extracted `@comfyorg/api-to-workflow` package and feeding the result to `loadGraphData`. **That package is not consumable from this repo today**, verified rather than assumed: - `npm view @comfyorg/api-to-workflow` → `E404`, while `npm view @comfyorg/comfyui-electron-types version` → `0.7.0` from the same registry and scope, so this is a genuine absence, not a registry/auth artifact. - Its source repo is **private**, and the package directory there holds only `README`/`package.json`/`tsconfig` — it compiles from that repo's own `src/converter`. So a git dependency is not an option either: this repo is public and every contributor's `pnpm install` and CI would fail. So this ships the fallback through the converter the frontend **already has** and already ships in the drop path, which is also what the plan named as the behavioral target ("same downstream behavior as the chunk path" — `handleFile` prefers the `workflow` chunk and falls back to the `prompt` chunk via `loadApiJson`). No second copy of any converter is introduced. When the package is published, swapping `openApiPromptAsWorkflow` to convert-then-`loadGraphData` is a contained change, and it would also be the moment to retire `app.loadApiJson`'s in-place path for the drop path too. ## Deliberately not in scope - **Export workflow** still reports no workflow for these assets. Export needs a serialized workflow document, which `loadApiJson` cannot produce without mutating the user's open graph. That wants the pure converter, so it is left for the package. - The **queue** job menu is a separate call path and untouched. ## Overlap to be aware of Open draft Comfy-Org#10929 (@guill, last updated May) does the same fallback for the **queue** menu in `useJobMenu.ts` and touches `fetchJobs.ts` / `jobTypes.ts` / `jobOutputCache.ts` too, so the two will conflict textually. Neither supersedes the other on behavior — that PR covers the queue menu, this covers the asset menu. Whichever lands second should rebase onto the first and reuse its `prompt` plumbing rather than duplicating it. I have not touched Comfy-Org#10929. ## Merge with `main` Merged `main` in. One textual conflict (an import block in `jobOutputCache.test.ts`, both sides kept) and one semantic one that no conflict marker would have shown: Comfy-Org#15381 changed `isOutputAssetMetadata` to require `subfolder` rather than `nodeId`, so this PR's `'missing nodeId'` negative case (`{ jobId, subfolder }`) is now *valid* output metadata and the fallback correctly fires for it. That row is realigned to `'missing subfolder'`, which is what the current guard actually rejects. No production code changed for this — the guard is shared with `extractWorkflowFromAsset`, which already followed `main`. Merged `main` a second time (`27f79c4d42`) to pick up Comfy-Org#16577, which temporarily disables the automatic custom-node suites. Those two `custom_nodes_e2e` shards were the branch's only red checks and their failure came from `main`, not this diff — a stale `ROUNDTRIP_VALUE_ALLOWED_KEYS` allowance for VHS `per_batch` that Comfy-Org#15381 made obsolete (analysis in the comment thread; the real ledger fix is Comfy-Org#16567). Clean merge, no conflicts. ## Review Focus - The synthesized graph has invented layout and no groups/reroutes; that is inherent to API format and accepted here. - `extractApiPrompt` returns `unknown` on purpose: the canonical format check is `app.isApiJson`, a type guard, and importing `app` into the remote layer to use it there would invert the layering. ## Provenance - **Authored by:** agent-work loop - **Verified:** re-verified on the merged tree at `27f79c4d42`: `pnpm vitest run` over the five touched suites plus `src/platform/assets` — 55 files, 931 passed, 1 skipped, 0 failed; `pnpm typecheck`, `pnpm format:check` and `eslint` on the changed files all clean (only the pre-existing `apiSchema is deprecated` warnings on imports this PR did not add). `pnpm test:unit` on the previous head — 1455/1457 files pass; the two failures (`scripts/cicd/check-binary-size.test.ts`, `useFreeTierQuota.test.ts`) reproduce identically on unmodified `origin/main` and are a local Node 24 vs required >=25 artifact, not this branch. Merges clean with `main` (`mergeable: MERGEABLE`); no merge-queue run has ever been ejected for this PR. - **Deviations:** the planned `@comfyorg/api-to-workflow` conversion path was not used — see "Deviation from the plan" above for the evidence. Still unverified end to end: no run against a live API-submitted cloud job, so the assertion that these jobs populate `workflow.prompt` and omit `extra_pnginfo.workflow` rests on the plan and Comfy-Org#10929's manual repro rather than a first-hand reproduction. CodeRabbit's transactional-`loadApiJson` finding is deferred rather than fixed here — pre-existing across `loadGraphData` / `importA1111` too, and a design call; recorded as a follow-up (rationale on the resolved thread). --------- Co-authored-by: bymyself <cbyrne@comfy.org> Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Closed
7 of 8 tasks
j0n4t
pushed a commit
to j0n4t/ComfyUI_frontend
that referenced
this pull request
Nov 4, 2026
…y-Org#20742) *PR Created by the Glary-Bot Agent* --- ## Summary Adds a regression guard for FE-3332 and FE-2812 (Pylon Comfy-Org#19184). From Sep 9 to Sep 30, users' Imported tab on Cloud showed every base-template input. The cause: Comfy-Org#15381 moved the Assets panel to `useAssetsQuery` without `include_public=false`. Cloud ingest defaults that parameter to `true`, so the shared template-input catalog came back with the user's own uploads. Comfy-Org#18633 restored the parameter (backported as Comfy-Org#19542, shipped in `cloud/v1.55.15`), but no test pinned it. The new `@cloud` spec `browser_tests/tests/sidebar/assets-imported-public.spec.ts` stubs `/api/assets` to match the server default: it returns public assets unless the request sends `include_public=false`. It then asserts: - the Imported tab shows only the user's own input; - the Generated tab shows no other user's assets; - every panel request (`tags_any=input` and `tags_any=output`) sends `include_public=false`. Test only, no production code changes. Companion PR in `Comfy-Org/cloud`: Comfy-Org/cloud#12841. It pins the same contract at the ingest handler and in the daily staging/prod e2e. ## Verification - Ran `pnpm build:cloud`, served `dist/` from local ComfyUI (`--cpu --multi-user` plus devtools, same as CI), then `pnpm exec playwright test --project=cloud browser_tests/tests/sidebar/assets-imported-public.spec.ts`: **2 passed (~12s)**. - Negative control: I removed `include_public: false` from `BASE_PARAMS` in `useAssetsQuery.ts` and rebuilt. **Both tests fail.** `template_sample_a` and `published_render` cards render, `toHaveCount(0)` gets 1, and the parameter assertion fails. Then I restored the line. - oxfmt, oxlint (type-aware), `typecheck:browser` and the server-facts gate passed via pre-commit. - Screenshots come from the same spec: with the fix, the Imported tab shows only `my_upload`. With `include_public` removed, extra template-input cards appear. ## Screenshots   --------- Co-authored-by: Glary-Bot <glary-bot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrate the assets sidebar to be backed by the
/assetsendpoint when feasible. This applies to both cloud, and core with the--enable-assetslaunch argument.