mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-11 08:00:21 +00:00
fix: use previewable output count for asset sidebar badge (#9535)
## Summary Fix asset sidebar badge showing inflated output count by using previewable outputs length instead of raw server count. ## Changes - **What**: Changed `outputCount` in `mapHistoryToAssets` from `job.outputs_count` (includes all output types: text, JSON, custom data) to `task.previewableOutputs.length` (only image, video, audio, 3D). The badge now matches what users actually see in the expanded view. ## Review Focus One-line change. The `task.previewableOutputs` array is already computed on the line immediately below and used for `allOutputs`, so this introduces no new computation. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9535-fix-use-previewable-output-count-for-asset-sidebar-badge-31c6d73d365081c49161caec64cf3921) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -70,7 +70,7 @@ function mapHistoryToAssets(historyItems: JobListItem[]): AssetItem[] {
|
||||
|
||||
assetItem.user_metadata = {
|
||||
...assetItem.user_metadata,
|
||||
outputCount: job.outputs_count,
|
||||
outputCount: task.previewableOutputs.length,
|
||||
allOutputs: task.previewableOutputs
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user