Comfy-Org / Comfy-Org/Comfy-Desktop
Media Assets panel: drag-and-drop and file picker both do nothing (backend upload API works)
- Dominant language
- TypeScript
- Stars
- 458
- Forks
- 59
- Avg merge
- 22h 18m
- Merged PRs (30d)
- 45
Description
# Media Assets panel: drag-and-drop and file picker both do nothing (backend upload API works)
## Summary
In the **Media Assets** sidebar panel, neither import route works:
- Dragging files onto the panel does nothing — no highlight, no error, no import
- The upload / "browse" control does not open a native file dialog at all
The backend is not at fault: `POST /api/assets` accepts the exact same files
successfully (`201 Created`). Only the UI paths fail, and they fail **silently** —
nothing is logged in either the Electron app log or the ComfyUI backend log.
## Environment
| | |
|---|---|
| Comfy Desktop | 1.0.29 (build `260714bj83fq3d3`) |
| ComfyUI core | 0.28.3 |
| `comfyui-frontend-package` | 1.45.21 |
| Install | standalone `mac-mps`, `v0.20.1-env1` |
| macOS | 26.5.1 (25F80) |
| Hardware | Apple M1 Pro, 16 GB |
| Launch args | `--enable-manager --enable-assets` |
## Steps to reproduce
1. Launch Comfy Desktop with assets enabled
2. Open the **Media Assets** sidebar → **Imported** tab
3. Drag an image or video file from Finder onto the panel → nothing happens
4. Click the upload control → no file dialog appears
Expected: the file is imported and appears under **Imported**.
Actual: panel continues to show "No imported files found".
## The backend API works fine
The same files import correctly when posted directly, so the server side and the
asset database are healthy:
```bash
curl -X POST http://127.0.0.1:8188/api/assets \
-F "file=@/path/to/image.png" \
-F "tags=input"
# -> 201 Created
```
After doing this for 5 files, `/api/assets` reports them correctly and they appear
in the **Imported** tab. So only the UI's own import paths are broken.
Note: the error messages from this endpoint are good and were what revealed the
correct usage — `tags` is a required *destination role* (`input` / `models` /
`output`), and omitting it returns
`"uploads require exactly one destination role"`.
## What I ruled out
- **Not sandboxing** — the app has no `com.apple.security.app-sandbox` entitlement
- **Not IPC** — the Electron main process logs normally (`[ipc] Using bootstrap pygit2 ...`)
- **Not a crash** — no entries in Crashpad or `~/Library/Logs/DiagnosticReports`
- **Not the assets feature being off** — `/api/features` reports `"assets": true`,
and `/api/assets` returns all indexed assets (models + outputs)
- **Not a stale renderer** — cleared `Cache`, `Code Cache`, `GPUCache` and fully
restarted the app several times; no change
- **Not an outdated app** — 1.0.29 is what the update feed
(`download.todesktop.com/241130tqe9q3y/latest-mac.yml`) currently serves, and
"Check for updates" therefore does nothing (arguably a separate small UX issue:
it gives no "you're up to date" feedback)
## Possibly related observation
The **Generated** tab only lists generations it observed live during the session.
Output files produced by a different backend instance are present in the database
with the correct `output` tag and are returned by `/api/assets`, but never appear
in that tab. If that is intended, it may be worth making clearer in the UI, since
"No generated files found" is shown even when generated files demonstrably exist.
## Secondary bug: interrupted model downloads leave corrupt files silently
Unrelated to the above but found while diagnosing. The in-app model downloader
failed mid-download:
```
[templates] Retrying qwen_3_4b.safetensors (attempt 3/3): net::ERR_NETWORK_CHANGED
[templates] Failed qwen_3_4b.safetensors: net::ERR_NETWORK_CHANGED — will fall back to in-app download.
[templates] Failed z_image_turbo_bf16.safetensors: net::ERR_NETWORK_CHANGED
```
The **partial files were left in place** with no warning and no UI indication:
| file | expected | on disk |
|---|---|---|
| `z_image_turbo_bf16.safetensors` | 12,309,866,400 | 5,111,582,147 (42%) |
| `qwen_3_4b.safetensors` | 8,044,982,048 | 5,114,057,857 (64%) |
The models appeared normally in the node dropdowns, and the failure only surfaced
much later at runtime as:
```
safetensors_rust.SafetensorError: Error while deserializing header:
incomplete metadata, file not fully covered
```
Suggestion: on download failure, either delete the partial file or mark it as
incomplete in the UI. The `.dl-meta` sidecar already stores `expectedSize` and a
sha256 etag, so validating on completion (or on load) would catch this. Resuming
with `curl -C -` against the sidecar URL recovered both files intact.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the Media Assets sidebar's Imported tab and trace the drag-and-drop and upload-control entry points, comparing their behavior with the documented POST /api/assets request. Done means both UI import routes open or accept files and imported assets appear in the Imported tab; treat the Generated-tab observation and interrupted model downloads as separate scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, typescript
- Domain
- desktop-dev, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100