Skip to content

fix(usage): infer history modality, format ticket fees, and drop fake drawer previews - #47

Merged
eliteprox merged 1 commit into
mainfrom
fix/usage-history-modality
Sep 5, 2026
Merged

fix(usage): infer history modality, format ticket fees, and drop fake drawer previews#47
eliteprox merged 1 commit into
mainfrom
fix/usage-history-modality

Conversation

@eliteprox

@eliteprox eliteprox commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Usage history treated OpenMeter pipeline as a first-party pipeline id (text-to-imaget2i). Live-runner tickets now write the price unit there (fixed, hour, 720p), so the modality pill collapsed to "f" and the request drawer fell through to JSON.

This PR is history UI only. The MCP asset store stays an in-memory Map so this can land on main without a competing Drizzle 0000. Persist + output joins stay on feat/mcp-assets-on-early-access.

  • Infer modality from capability metadata (pipeline name, fal endpoint_id, app slug). Persistent live jobs (hour / live) resolve as realtime. Unknown batch tickets stay unknown instead of looking like live video.
  • History is a rolling 7-day window, paged in chunks of 50.
  • MCP Auth0 sub hashes to the same eu_ principal as Console (ready for a later asset join).
  • Show ticket fees from wei + ETH/USD as a compact USD figure, with a tooltip for the exact value when it differs.
  • Image preview in the request drawer shows a loader until an asset URL is ready. Without a stored URL the drawer says No output stored (no Picsum placeholders).

Test plan

  • /home History: live-runner rows (e.g. livepeer-example/fal-gpt-image-2) show a t2i pill, not f or fixed
  • Persistent live / hour tickets show realtime; unknown batch apps show unknown, not a live session
  • Scroll / load more through older than 50 rows within the last 7 days
  • Open a text-to-image request: Capability, Modality t2i; preview is empty unless a URL is present
  • Open an edit / i2v / whisper request: modality is edit / i2v / asr
  • video-understanding / ASR rows are text, not a video player
  • Cost column shows a readable USD amount; hover shows the exact figure when it was rounded
  • Search history by modality (t2i) still filters
  • First-party tickets with a real pipeline name (text-to-image, live-video-to-video) still map to t2i / v2v
  • lib/mcp/store.ts is still the in-memory Map (no db/ / drizzle/)

@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
console Ready Ready Preview Sep 5, 2026 6:33am UTC

Request Review

@eliteprox

Copy link
Copy Markdown
Collaborator Author

Not super satisfied with Infer modality from capability metadata, but this works until we get time to improve the runner side for pricing

Keep the in-memory MCP store so this can land on main without racing Codex's waitlist migrations. Output joins stay a no-op until mcp_assets exists on that chain.
@eliteprox
eliteprox force-pushed the fix/usage-history-modality branch from 4f0b45d to aa3e699 Compare September 5, 2026 06:32
@eliteprox eliteprox changed the title Fix usage history: modality, outputs, fees, and MCP assets Fix usage history: modality, fees, and request drawer Sep 5, 2026
@eliteprox
eliteprox changed the base branch from feat/mcp-assets-schema to main September 5, 2026 06:32
@eliteprox eliteprox changed the title Fix usage history: modality, fees, and request drawer fix(usage): infer history modality, format ticket fees, and drop fake drawer previews Sep 5, 2026
@eliteprox
eliteprox merged commit aab9b61 into main Sep 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant