User history detail only shows the first output of a multi-image run

Open
#82 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Start in components/console/CallDetailDrawer.tsx, focusing on the user variant of MediaStage and its selectedAsset logic; compare it with the existing admin-only asset switching. Review lib/console/activity-assets.ts for the one-URL usage-ticket behavior. Done means the user drawer can inspect every persisted output while keeping one history row and the run-level cost.

Written by the indexing model from the issue text.

Description

Summary

A single run_capability job that returns multiple outputs (e.g. Flux Schnell with num_images: 4) correctly persists every image as mcp_assets and shows as one history row. User history detail then stages only the first output. There is no way to page or open the rest.

This is a user-drawer gap, not a persistence or billing bug.

Expected

  • One history row per execution (one runs row / gateway_request_id).
  • User detail can inspect every stored output (gallery, pager, or output list).
  • Cost stays the joined PymtHouse receipt/manifest for that run (not num_images × unit price).

Actual

  • History list: one row. Correct.
  • Sidebar still shows num_images: 4. Correct.
  • extractRunOutputs walks images[] and persist writes all public media URLs. Correct — MCP returned four asset IDs for the Schnell batch.
  • CallDetailDrawer MediaStage is a single slot. It picks selectedAsset, else the first image/video/audio output, else assets[0]:
// components/console/CallDetailDrawer.tsx
const outputAssets = activeDetail?.assets.filter((item) => item.role !== "input");
const asset =
  outputAssets?.find(/* selected */) ??
  outputAssets?.find((item) => /^(?:image|video|audio)(?:\/|$)/i.test(item.mediaType ?? "")) ??
  outputAssets?.[0];
  • Click-to-switch asset list is admin-only.
  • User variant never renders result images[] — only submitted params plus inference.
  • Usage-ticket attachment also keeps one URL per gateway job (lib/console/activity-assets.ts).

Not a defect

Observation Verdict
One history row Correct — history is execution-scoped
Cost $0.0030 for the Schnell job Correct unless a receipt billed 4×. Schnell is a fixed job price; the label is the run total

Repro

  1. Run Flux Schnell once with num_images: 4 (MCP livepeer-example/fal-flux-schnell).
  2. Open /home history and the resulting row.
  3. Confirm the sidebar says Num Images 4 and the stage shows only one image.
  4. Compare admin run detail: asset list can switch outputs.

Example run from local MCP: 4a18002c-c778-4416-a2b1-41ccb5885c60 (job_7fa2242c6d634f8f).

Suggested fix

Expose the already-persisted outputs on the user drawer (thumb strip / prev-next on MediaStage, or the same asset list admin already has). Keep one history row. Do not invent per-image cost unless billing evidence says so.

Dominant language
TypeScript
Stars
1
Forks
0
Avg merge
15h 45m
Merged PRs (30d)
48

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from livepeer/console

All issues in livepeer/console

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.