Skip to content

fix(site/src): play agent-attached MP4s from the turn Attachments menu - #68

Merged
ibetitsmike merged 3 commits into
mainfrom
mike/todo-transcripts-10-attachment-menu-video
Nov 9, 2026
Merged

ibetitsmike merged 3 commits into
mainfrom
mike/todo-transcripts-10-attachment-menu-video

Conversation

@ibetitsmike

Copy link
Copy Markdown
Owner

Xum opened this PR on behalf of @ibetitsmike.

Closes #64.

With fork-chat-todos on, an MP4 that the agent attaches with attach_file showed only as a download card in the turn's Attachments menu. The #60 player wrapped only the inline file block in MessageBlocks.tsx, and the timeline hides attachment-only rows while steps are collapsed, so the player was out of reach in the default view.

TurnAttachments now wraps each menu card in ForkAttachmentPreview, the same hook MessageBlocks.tsx uses, so the upstream file diff is an import and one wrapper. The gate is unchanged: only video/mp4 with a stored file and the experiment on gets the player. Expired files keep the upstream expired card, and with the experiment off the menu matches upstream.

Tests

  • ForkAttachmentPreview.test.tsx: three Vitest + userEvent cases on the menu: flag on plays the MP4 from the menu, an expired MP4 shows the upstream expired card with no playback or download, flag off keeps the upstream download link. Each case fails when its gate is broken (hook removed, expiry gate removed, experiment gate removed).
  • ForkAttachmentPreview.stories.tsx: AttachmentsMenu story opens the menu with the MP4, since the menu's look changes. MockChatVideoAttachment in forkChatAttachments.ts is shared by both.

UAT

Dev instance at the head with CODER_EXPERIMENTS=fork-chat-todos, a member chat with a workspace, and a real attach_file call on a 4.5 MB MP4 (no seeded file part). With collapsed steps the page shows no inline player; the Attachments menu shows the player, and Play opens "Recording playback" and plays the file (206 range responses). With the experiment off, the menu shows the upstream "MP4 / Download file" card.

…t-attached MP4s from the turn Attachments menu

With fork-chat-todos on, the turn Attachments menu wraps each card in
ForkAttachmentPreview, so an MP4 the agent attached with attach_file plays
from the menu without expanding the turn's steps. Expired files and the
flag-off menu keep the upstream cards.

Closes #64
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike.

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T21:04:52.685726Z 16b4afc Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 16b4afc36c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum acted for Mike.

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 16b4afc36c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) closed and reopened this on behalf of @ibetitsmike.

Main moved to e155b422a2 (#49, #65) after this head's CI ran, and this PR's test merge ref was still built on 277d423787. This PR shares no files with that main delta and git merge-tree is clean; I reopened it to get a fresh pull_request CI run against current main. The head is unchanged.

@ibetitsmike ibetitsmike closed this Nov 9, 2026
@ibetitsmike ibetitsmike reopened this Nov 9, 2026
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) closed and reopened this on behalf of @ibetitsmike.

The previous reopen run (42702218061) still checked out the old test merge on 277d423787, because GitHub recomputed this PR's merge ref only after that reopen. The merge ref is now 69fd68bb78 on current main e155b422a2, so I reopened once more to get a pull_request CI run on it. The head is unchanged.

@ibetitsmike ibetitsmike closed this Nov 9, 2026
@ibetitsmike ibetitsmike reopened this Nov 9, 2026
@ibetitsmike
ibetitsmike merged commit d528cdb into main Nov 9, 2026
33 of 34 checks passed
@ibetitsmike
ibetitsmike deleted the mike/todo-transcripts-10-attachment-menu-video branch November 9, 2026 22:11
@ibetitsmike

Copy link
Copy Markdown
Owner Author

Xum (AI agent) merged this on behalf of @ibetitsmike.

Merge evidence for head 16b4afc36c7b49caba86fd6c0ede16e3a1910ce8:

  • fork-ci pull_request run 42704582414 checked out Merge 16b4afc36c into e155b422a2 (current main). Attempt 1 hit the known chatd flake test(coderd/x/chatd): fix flaky TestRunnerManager_HeartbeatDoesNotReviveStaleLease #61 (TestRunnerManager_HeartbeatDoesNotReviveStaleLease, unrelated to this site-only change); the failed-job rerun (attempt 2) passed. All checks green.
  • Codex review on this exact head: no major issues. 0 unresolved review threads. Merge state CLEAN.

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.

Agent-attached MP4s are not playable from the turn Attachments menu

1 participant