Comfy-Org / Comfy-Org/ComfyUI_frontend
bug(assets): 3D preview card fails to remount after media-type filter is toggled off
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 495
Description
## Summary
In the assets sidebar (cloud mode), toggling a media-type filter ON and then OFF leaves the **3D preview card unmounted**, even though `mediaTypeFilters` is empty and the underlying job is unchanged. Image, video, and audio cards remount correctly under the same flow.
## Reproduction
1. Open the assets sidebar in cloud mode.
2. Mock generated jobs that include all four media kinds: an image (\`.png\`), a video (\`.mp4\`), an audio (\`.wav\`), and a 3D model (\`.glb\`).
3. All four cards render. ✅
4. Open the filter menu and check **Image**. Only the image card is visible. ✅
5. Uncheck **Image**.
6. **Expected**: all four cards visible.
**Actual**: only image, video, and audio reappear; the 3D card does not remount.
## Evidence
Discovered while writing E2E coverage in #11633 (\`browser_tests/tests/sidebar/assets-filter.spec.ts\`). The reduced-DOM snapshot from a failing CI run shows only three buttons after toggle-off:
\`\`\`
- button \"output_images-001.png - image asset\"
- button \"output_video-002.mp4 - video asset\"
- button \"output_audio-003.wav - audio asset\"
\`\`\`
(\`output_3D-004.glb\` is missing.)
The test is currently working around this by asserting the three remountable kinds only, with a \`TODO\` linking back here.
## Suspected area
\`MediaAssetCard.vue\`'s \`adaptedAsset\` computed branches on \`fileKind === '3D'\` for \`src\`. The 3D top component (\`Media3DTop\` or similar) likely has different lifecycle / async-loading behavior that breaks under the unmount → remount path triggered by clearing a filter.
## Notes
- Image/video/audio cards on the same flow do remount cleanly, so this is specific to the 3D rendering path.
- The bug also reproduces consistently — it was deterministic across all 4 retries on each of the 3 CI runs that exercised it.
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-11635-bug-assets-3D-preview-card-fails-to-remount-after-media-type-filter-is-toggled-off-34e6d73d3650818a824af2d9bab484d8) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.