Skip to content

feat(ui): expand video attachments in the media overlay - #132131

Merged
vyctorbrzezowski merged 3 commits into
openclaw:mainfrom
vyctorbrzezowski:fix/video-expand-overlay
Aug 28, 2026
Merged

vyctorbrzezowski merged 3 commits into
openclaw:mainfrom
vyctorbrzezowski:fix/video-expand-overlay

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 28, 2026 •

Copy link
Copy Markdown
Member

Closes #132130

What Changes

  • Expands playable video attachments in the shared media overlay instead of the Files panel.
  • Reuses the player's prepared source, including transcoded playback, while keeping the original-file action available where supported.
  • Accepts the existing strict base64 video format at the page boundary without permitting other data URL types.
  • Pauses inline playback before opening the autoplaying overlay and includes native video controls in the keyboard focus cycle.
  • Keeps unavailable video attachments on the existing Files fallback.

Why

Video is visual transcript media, so its Expand action should preserve chat context like image expansion does. The playback owner must still select and prepare the usable source before the overlay opens.

User Impact

Users can expand a ready video directly over the chat, watch it with native controls, and close the overlay to return to the unchanged transcript. Preparing video does not expose a dead action, and unavailable video retains its previous Files behavior.

Evidence

Exact-head CI is green at 4de71f9af50ea7f5afe07d63b5e1b9098b1b9e69. Regression coverage exercises base64 video from Expand through page-owned overlay state, transcode readiness, inline pause, unavailable fallback, original-file routing, and keyboard focus order.

The visual proof below used a real Control UI flow with a Gateway fixture and a locally generated 8-second 1280x720 synthetic MP4. Both themes were exercised, and overlay captures were taken only after playback was active and currentTime > 0.

Theme Before: main Expand behavior After: inline video attachment After: shared overlay playing with controls
Light Light theme baseline: video Expand opens the Files side panel Light theme: playable video attachment inline in chat Light theme: expanded video playing in the shared media overlay with controls
Dark Dark theme baseline: video Expand opens the Files side panel Dark theme: playable video attachment inline in chat Dark theme: expanded video playing in the shared media overlay with controls

Synthetic source clip used by the browser flow:

openclaw-video-demo.mp4

Visual proof was captured at 6c1c8c51c2a65809574e15b485463aa7e4e34e67; subsequent exact-head changes preserve the approved presentation and repair playback, validation, fallback, and focus ownership. Local tests and builds were not run for this closeout; the complete GitHub CI suite validated the exact head.

Follow-up

An overlay that remains open beyond a later media-ticket renewal still holds the source selected when it opened. Keeping an already-open overlay synchronized with future ticket rotations is a separate source-lifecycle change and is not required for the approved Expand behavior.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Aug 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 28, 2026
@clawsweeper

clawsweeper Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 28, 2026, 5:47 PM ET / 21:47 UTC.

ClawSweeper review

What this changes

The PR changes Control UI chat so a playable video attachment’s Expand action opens the shared media overlay with native video controls instead of the Files panel.

Regression provenance

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

This PR remains necessary but is not ready to merge: its new video-overlay action silently fails for supported base64 video attachments. The author is a repository member and the PR has a protected maintainer label, so it stays open for explicit maintainer handling.

Priority: P2
Reviewed head: 6c1c8c51c2a65809574e15b485463aa7e4e34e67

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The shared-overlay approach is useful and visually evidenced, but one supported video source path remains a merge-blocking functional regression.
Proof confidence 🌊 off-meta tidepool Not applicable: Not applicable to this member-authored PR; its supplied Control UI captures cover the HTTPS path but do not cover the separate accepted base64-video route identified by source review.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Not applicable to this member-authored PR; its supplied Control UI captures cover the HTTPS path but do not cover the separate accepted base64-video route identified by source review.
Evidence reviewed 7 items Introduced routing change: The PR replaces the video player’s Files-panel expand handler with the new overlay handler at this line.
Supported source is accepted upstream: The attachment boundary explicitly accepts well-formed base64 audio and video data URLs, including data:video/mp4;base64 sources.
Page owner rejects video data URLs: The overlay state validates every selected item with allowDataImage; the shared resolver admits only image MIME types and rejects all other data URLs, so the new callback returns without setting overlay state.
Findings 1 actionable finding [P1] Preserve Expand for accepted base64 videos
Security None None.

How this fits together

Control UI chat renders playable attachment cards and sends their Expand action to page-level overlay state. That state validates the selected source before the shared media overlay renders image or video content.

flowchart LR
A[Playable video attachment] --> B[Attachment card]
B --> C[Expand action]
C --> D[Chat overlay state]
D --> E[URL safety validation]
E --> F[Shared media overlay]
F --> G[Native video controls]
Loading

Before merge

  • Preserve Expand for accepted base64 videos (P1) - safeMediaAttachmentHref accepts normalized data:video/...;base64 sources, but this new handler now sends them to handleOpenImage, whose state owner only permits data images. It returns without setting overlay state, while the old handler opened Files. Cover this callback through the state boundary with a base64 video and preserve the same narrow media validation there.
  • Resolve merge risk (P1) - Supported data:video/*;base64 attachments currently play inline and can open Files, but this PR reroutes Expand to a state owner that drops them without a visible result.
  • Complete next step (P2) - The member-authored, maintainer-labeled PR should remain with its current owners; the concrete P1 must be repaired before a normal review refresh.

Findings

  • [P1] Preserve Expand for accepted base64 videos — ui/src/pages/chat/components/chat-message-attachments.ts:660
Agent review details

Security

None.

PR surface

Source +57, Tests +56. Total +113 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 6 100 43 +57
Tests 2 61 5 +56
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 161 48 +113

Review metrics

Metric Value Why it matters
Production vs test LOC production +100/-43; tests +61/-5 The feature adds a distinct video rendering path and attachment routing; the remaining blocker is a missing supported-source handoff, not raw patch size.

Merge-risk options

Maintainer options:

  1. Preserve accepted inline-video sources (recommended)
    Update the page-owned overlay validation and add end-to-end state-boundary coverage for a valid data:video/*;base64 Expand action before merge.

Technical review

Best possible solution:

Keep one shared overlay, but make its page-owned validation explicitly accept only the already-supported, strictly base64-validated video data subset and add a callback-to-state regression test.

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

Yes, by source: invoke Expand for data:video/mp4;base64,AAAA, which the attachment layer accepts but the overlay state rejects as a non-image data URL.

Is this the best way to solve the issue?

No: reusing the shared overlay is the right design, but the patch does not carry its accepted video-source contract through the page-owned safety boundary.

Full review comments:

  • [P1] Preserve Expand for accepted base64 videos — ui/src/pages/chat/components/chat-message-attachments.ts:660
    safeMediaAttachmentHref accepts normalized data:video/...;base64 sources, but this new handler now sends them to handleOpenImage, whose state owner only permits data images. It returns without setting overlay state, while the old handler opened Files. Cover this callback through the state boundary with a base64 video and preserve the same narrow media validation there.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 5b605da38946.

Labels

Label justifications:

  • P2: This is a bounded Control UI media-navigation feature whose unresolved path affects a supported attachment subset.
  • merge-risk: 🚨 other: Merging would make Expand silently stop producing any visible outcome for accepted base64 video attachments.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: Not applicable to this member-authored PR; its supplied Control UI captures cover the HTTPS path but do not cover the separate accepted base64-video route identified by source review.

Evidence

What I checked:

Likely related people:

  • vyctorbrzezowski: Authored the preceding delivered audio/video playback change and this follow-up overlay work. (role: recent feature contributor; confidence: high; commits: 04f6630f7f1b, 6c1c8c51c2a6; files: ui/src/pages/chat/components/chat-message-attachments.ts, ui/src/pages/chat/components/chat-attachment-href.ts)
  • Peter Steinberger: Current URL-safety resolver history and blame identify this adjacent validation surface as Peter-authored. (role: adjacent owner; confidence: medium; commits: 276483320d96; files: ui/src/lib/open-external-url.ts, ui/src/pages/chat/chat-state-page.ts)

Rank-up moves

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

  • Repair the page-owned data-video validation without broadening permitted data URL types.
  • Add a regression test that exercises accepted base64 video from Expand through overlay state.

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-08-28T21:34:55.788Z sha 6c1c8c51c2a65809574e15b485463aa7e4e34e67 :: found issues before merge. :: [P1] Preserve the supported base64-video Expand path

@vyctorbrzezowski
vyctorbrzezowski force-pushed the fix/video-expand-overlay branch from 6c1c8c5 to 06379c4 Compare August 28, 2026 22:10
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Review follow-up:

  • Applied the page-owned data-video validation move by reusing the strict media validator with an expected video kind. Other data URL types remain rejected.
  • Added regression coverage that starts from the base64 video's Expand callback and reaches the page-owned overlay state.
  • Preserved the canonical prepared playback source for native and transcoded video, paused inline playback before opening the overlay, restored Files for unavailable media, and added native controls to the focus cycle.

The new overlay item is local to Control UI. TUI, channels, transcript announcements, and history/replay consume the canonical attachment envelope rather than this local presentation state, so no sibling change is required there.

Named follow-up: an overlay that remains open across a later media-ticket rotation does not yet hot-swap its source. That is a separate source-lifecycle change from this PR's approved Expand behavior.

@vyctorbrzezowski
vyctorbrzezowski merged commit 9684f8f into openclaw:main Aug 28, 2026
179 checks passed
@vyctorbrzezowski

vyctorbrzezowski commented Aug 28, 2026 •

Copy link
Copy Markdown
Member Author

Merged via squash.

Playable Control UI video attachments now expand in the shared media overlay with the canonical ready playback source. Inline playback pauses before the overlay opens, native controls remain keyboard-accessible, strict base64 video is accepted, and unavailable media retains the Files fallback.

Proof: the complete exact-head CI suite passed at the prepared head, and the PR body retains inspected light/dark Control UI evidence. Closes #132130 completed the associated issue.

@vyctorbrzezowski
vyctorbrzezowski deleted the fix/video-expand-overlay branch August 28, 2026 22:37
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 29, 2026
)

* feat(ui): expand video attachments in media overlay

* fix(ui): preserve video overlay playback ownership

* fix(ui): satisfy video overlay CI boundaries
@vyctorbrzezowski vyctorbrzezowski self-assigned this Oct 25, 2026
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 merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Expand video attachments in the media overlay

1 participant