Skip to content

feat(ui): transcode renditions and waveform audio cards - #116115

Merged
steipete merged 11 commits into
mainfrom
steipete/media-web-renditions
Jul 29, 2026
Merged

steipete merged 11 commits into
mainfrom
steipete/media-web-renditions

Conversation

@steipete

@steipete steipete commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Control UI chat messages can contain audio and video formats that browsers cannot play directly, leaving users with a generic attachment or download path instead of reliable inline playback. Long audio responses also lacked a useful waveform and playback timeline.

Why This Change Was Made

This adds transcode-aware audio and video cards, managed-media ticket refresh, bounded readiness checks, and waveform rendering while keeping the original attachment available as the explicit fallback. Media source state now survives safe ticket refreshes without retaining failed or cross-authentication playback state.

User Impact

Users can play assistant audio and video inline in the web Control UI, see preparation and unavailable states instead of silent failure, and navigate long audio with a waveform-backed timeline. Part of #115590.

Evidence

  • Rebased onto origin/main at 54e273e6953; PR head is a844e3e10517fea2324558ab050f6ad5b29381ff.
  • node scripts/run-vitest.mjs ui/src/pages/chat/components/chat-audio-player.test.ts ui/src/pages/chat/components/chat-video-player.test.ts ui/src/pages/chat/components/chat-audio-waveform.test.ts ui/src/pages/chat/components/chat-message.test.ts — 4 files, 181 tests passed.
  • node scripts/run-vitest.mjs ui/src/pages/chat/components/chat-media-source.test.ts ui/src/pages/chat/components/chat-audio-player.test.ts ui/src/pages/chat/components/chat-video-player.test.ts — 3 files, 33 tests passed.
  • pnpm ui:build passed on Blacksmith Testbox tbx_01kyr2zmtsf0cbrge7tcgfbq5c, including precompressed-asset and Control UI performance checks: https://github.com/openclaw/openclaw/actions/runs/30499322303.
  • Targeted Oxfmt and Oxlint checks pass, including the 700-line max-lines ratchet.
  • Fresh Codex autoreview cycles completed; every accepted finding was fixed and the final patch review reported no accepted or actionable findings.
  • The final structured-review finding about the video-player auth test was verified false by the coordinator: the reviewer sees redacted token values as identical; the source assigns distinct principals and the test passes deterministically.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Jul 29, 2026
@steipete steipete self-assigned this Jul 29, 2026
@steipete
steipete marked this pull request as ready for review July 29, 2026 22:55
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jul 29, 2026
@clawsweeper

clawsweeper Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 29, 2026, 7:29 PM ET / 23:29 UTC.

ClawSweeper review

What this changes

This PR adds Control UI audio and video cards that wait for transcoded renditions, refresh managed-media tickets, render bounded audio waveforms, and retain an explicit download fallback.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 4 items remain

Keep this PR open for normal maintainer review. The patch has focused test and build evidence, but the current PR body still lacks directly inspectable after-fix Control UI proof for native playback, transcoded preparation/success, and the unavailable/download fallback; the existing maintainer label also requires explicit human handling. Likely related person: steipete, with medium-confidence feature ownership from the linked media-playback program and this PR’s iteration history.

Priority: P2
Reviewed head: a844e3e10517fea2324558ab050f6ad5b29381ff

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The implementation has useful focused coverage and no confirmed line-level defect in this review, but real browser behavior proof remains a merge gate.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR body reports focused tests, lint/format checks, and a UI build, but contains no directly inspectable after-fix Control UI recording, screenshot with diagnostics, live output, or redacted runtime log proving playback preparation, success, and fallback behavior. Please add redacted evidence; updating the PR body should trigger a fresh review, or a maintainer can comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR body reports focused tests, lint/format checks, and a UI build, but contains no directly inspectable after-fix Control UI recording, screenshot with diagnostics, live output, or redacted runtime log proving playback preparation, success, and fallback behavior. Please add redacted evidence; updating the PR body should trigger a fresh review, or a maintainer can comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 3 items Changed playback boundary: The branch introduces a shared readiness helper for appending playback intent, authenticated probing, bounded retries, and cancellation before the new audio and video cards use the media source.
Visible fallback surface: The branch routes managed and assistant attachments through availability state and renders preparation or unavailable cards alongside the dedicated audio/video players.
Available validation is supplemental: The PR body reports focused Vitest coverage, formatting/lint checks, and a Control UI build, but does not include a directly inspectable redacted recording, screenshot with diagnostic output, terminal/live output, or runtime log proving after-fix browser behavior.
Findings None None.
Security None None.

How this fits together

Control UI chat normalizes assistant and managed-media attachment records, resolves authenticated media URLs, and renders audio or video cards in the chat transcript. The new rendition-readiness path decides whether browser playback can begin, remains in preparation, or exposes a visible fallback.

flowchart LR
  A[Assistant or managed attachment] --> B[Chat message normalization]
  B --> C[Attachment availability]
  C --> D[Ticketed media URL]
  D --> E[Rendition readiness check]
  E --> F[Audio or video card]
  F --> G[Inline playback]
  E --> H[Visible download fallback]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR body reports focused tests, lint/format checks, and a UI build, but contains no directly inspectable after-fix Control UI recording, screenshot with diagnostics, live output, or redacted runtime log proving playback preparation, success, and fallback behavior. Please add redacted evidence; updating the PR body should trigger a fresh review, or a maintainer can comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P2) - The PR changes browser playback behavior for authenticated media, but no inspectable real Control UI evidence yet demonstrates the native path, a 202-to-ready transcode path, and the unavailable/download fallback after the fix.
  • Resolve merge risk (P1) - The protected maintainer label means landing requires explicit human review even after adequate behavior proof is supplied.
  • Complete next step (P2) - No concrete mechanical defect was established for an automated repair; the contributor needs to provide real behavior proof and the protected maintainer label requires human review.
Agent review details

Security

None.

PR surface

Source +1466, Tests +1385. Total +2851 across 24 files.

View PR surface stats
Area Files Added Removed Net
Source 16 1740 274 +1466
Tests 8 1398 13 +1385
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 24 3138 287 +2851

Review metrics

None.

Stored data model

Persistent data-model change detected: vector/embedding metadata: ui/src/lib/chat/message-normalizer.test.ts. Confirm migration or upgrade compatibility proof before merge.

Mantis proof suggestion

A redacted web UI chat transcript or recording would directly demonstrate the three user-visible states that automated tests cannot prove in a browser runtime. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis web UI chat proof: verify native playback, a transcoded rendition progressing from preparing to playable, and the unavailable download fallback with redacted evidence.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Add one redacted Control UI chat recording or equivalent live evidence that shows native playback, rendition preparation followed by successful playback, and the unavailable state retaining a usable download path; then let a maintainer assess the feature’s final UX and scope.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Add one redacted Control UI chat recording or equivalent live evidence that shows native playback, rendition preparation followed by successful playback, and the unavailable state retaining a usable download path; then let a maintainer assess the feature’s final UX and scope.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this PR proposes a new Control UI playback capability rather than reporting a currently failing behavior with a single reproduction path. The PR includes focused automated coverage for its intended flows, but that is not a live browser reproduction.

Is this the best way to solve the issue?

Unclear: the readiness and fallback design is plausible and bounded, but real Control UI evidence is still required to establish that it is the best user-facing solution across the native, transcoded, and unavailable states.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 342826b90440.

Labels

Label justifications:

  • P2: This is a substantial but bounded Control UI media-playback improvement; the available evidence does not establish an urgent regression or emergency impact.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body reports focused tests, lint/format checks, and a UI build, but contains no directly inspectable after-fix Control UI recording, screenshot with diagnostics, live output, or redacted runtime log proving playback preparation, success, and fallback behavior. Please add redacted evidence; updating the PR body should trigger a fresh review, or a maintainer can comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Changed playback boundary: The branch introduces a shared readiness helper for appending playback intent, authenticated probing, bounded retries, and cancellation before the new audio and video cards use the media source. (ui/src/pages/chat/components/chat-media-playback.ts:1, a844e3e10517)
  • Visible fallback surface: The branch routes managed and assistant attachments through availability state and renders preparation or unavailable cards alongside the dedicated audio/video players. (ui/src/pages/chat/components/chat-message-attachments.ts:1, a844e3e10517)
  • Available validation is supplemental: The PR body reports focused Vitest coverage, formatting/lint checks, and a Control UI build, but does not include a directly inspectable redacted recording, screenshot with diagnostic output, terminal/live output, or runtime log proving after-fix browser behavior. (a844e3e10517)

Likely related people:

  • steipete: The linked cross-client media-playback proposal and all eleven commits in this focused PR identify steipete as the clearest available routing candidate for the Control UI rendition and waveform work. (role: feature proposer and recent area contributor; confidence: medium; commits: d8aab8a1f686, a844e3e10517; files: ui/src/pages/chat/components/chat-media-playback.ts, ui/src/pages/chat/components/chat-message-attachments.ts, ui/src/pages/chat/components/chat-audio-player.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add redacted Control UI evidence covering a directly playable source, a 202 preparation state that becomes playable, and an unavailable rendition with the download fallback.
  • Keep private endpoints, bearer tokens, file paths, and user media redacted in any recording, screenshot, terminal output, or runtime logs.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-07-29T23:00:12.572Z sha d41174d :: needs real behavior proof before merge. :: none

@steipete
steipete merged commit d60436a into main Jul 29, 2026
104 of 105 checks passed
@steipete
steipete deleted the steipete/media-web-renditions branch July 29, 2026 23:44
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 30, 2026
)

* feat(ui): add chat media renditions and waveforms

* fix(ui): tighten media playback guards

* fix(ui): bound waveform decode memory

* fix(ui): harden media playback retries

* fix(ui): preserve valid media state

* fix(ui): stop detached video playback

* fix(ui): bound media artifact resolution

* fix(ui): reject failed media fallback sources

* refactor(ui): split attachment availability helpers

* fix(ui): unload media across auth resets

* fix(ui): retain the longest-lived media ticket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant