Repository navigation
feat: show each turn's attachments in the chat action bar - #31145
Conversation
|
@codex review
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f1a908ec60
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c35dfe1f66
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 65d6b668e2
ℹ️ 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".
|
@codex review
|
1 similar comment
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 407a6f49d1
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 089c448eb5
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb0ab923fa
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a54ba451d
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bdbdddb782
ℹ️ 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".
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09209efd59
ℹ️ 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".
|
@codex review
|
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review
|
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review
|
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d4be6192a1
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8bdd19acd
ℹ️ 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".
@codex review Please review head 0843774. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 084377451c
ℹ️ 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".
DanielleMaywood
left a comment
There was a problem hiding this comment.
This review was performed by ai-review, an automated review bot.
3 inline findings and 1 below.
whole PR
SCOPE-1: This PR changes 1497 lines in 16 files (limit 1000). Split it into smaller PRs.
Remedy: split
Coverage
Coverage: 16 of 17 files reviewed, 1 unsupported; 13 rules.
Candidates: 39 found, 33 outside changed lines, 0 already discussed, 6 evaluated.
Findings: 4 (6 sites, 3 pre-existing sites), 0 over budget, 0 failed.
nickvigilante
left a comment
There was a problem hiding this comment.
Docs LGTM, and I'm approving provided you're doing an engineer review on this 👍
…pill to the chat action bar
f800dc6 to
9640324
Compare
|
@codex review Please review head 9640324, which rebases this PR onto main and adapts the turn attachments pill to the new working block slices from #30656.
|
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
DanielleMaywood
left a comment
There was a problem hiding this comment.
This review was performed by ai-review, an automated review bot.
4 inline findings.
Coverage
Coverage: 16 of 17 files reviewed, 1 unsupported; 22 rules.
Candidates: 237 found, 190 outside changed lines, 0 already discussed, 47 evaluated.
Findings: 5 (17 sites, 2 pre-existing sites), 0 over budget, 0 failed.
Model: deepseek/deepseek-v4.1-flash; 44 questions, 42 answered, 2 abstained (truncated 2), 40 cached; 0 uncalibrated findings held back; 4335 input and 1704 output tokens.
… restating comments and split long blocks
|
FYI: on
|
|
@mafredri Thanks, confirmed. The pill's thumbnails, cards, and expired note all read
|
…e message action flags and flatten block pill lookup - Gate the edit and jump buttons on canEditUserMessage and canJumpBetweenUserMessages instead of re-deriving them in JSX. - Split getBlockTurnAttachments' condition into an early continue. - Type children explicitly instead of React.PropsWithChildren. - Name the running-chat test options mockRunningChat.
| The agent can also attach files to its messages (for example, with the `attach_file` tool). | ||
| After a turn ends, an **Attachments** button at the end of the turn opens a list of the files the agent attached during it. | ||
| The **Attachments** section of the chat's **Summary** tab lists the files the agent attached across the chat. | ||
| In either list, you can download the files, and open PNG, JPEG, GIF, and WebP images and plain text, Markdown, CSV, and JSON files in the chat. |
There was a problem hiding this comment.
I'd keep it. The docs guidelines ask for a user-facing feature's docs in the same PR ("Documentation lands with the change" in docs/.style/content-guidelines.md), and the File attachments section only covered uploads, so nothing described the pill. nickvigilante approved the wording. If you'd rather it say less, I can cut it down to the pill alone.
Xum, an AI agent, replied for @ibetitsmike.
…t message actions by role and simplify turn pill logic - Move the action bar into UserMessageActions and AssistantMessageActions; the assistant bar renders the spacer when it has no buttons. - Restore hasExpired to take a string; new callers check file_id first, as AttachmentBlocks does. - Write getMessageFileAttachments with an if instead of a ternary. - Rewrite getTurnAttachmentsByRow as plain per-turn steps and name the slice check in getBlockTurnAttachments. - Test that a hook notice after the answer leaves the pill on the answer.
… a restating comment and spell out canHostPill - Delete the UserMessageActions JSDoc, which restated its classes. - Say what keepsSpacing renders when there are no buttons. - Give each canHostPill exclusion its own early return.
… message actions next to the action bar - Move UserMessageActions and AssistantMessageActions into MessageActionBar.tsx, which keeps ConversationTimeline.tsx shorter than on main, and make MessageActionButton private to that file. - Spell out onEditUserMessage's signature, as the other props types do. - Give AssistantMessageActions one branch for a message without buttons. - Drop the splitIntoTurns and canHostPill comments, which restated the code, and stop claiming in hasNewestTurnEnded that chatd never resumes an answered turn: a post_compact hook can.
…ing block in the block pill comment The block shows the pill below itself whether it is collapsed or expanded.
… the message actions module for its components - Rename MessageActionBar.tsx to MessageActions.tsx, since it now holds the user and assistant message actions too. - Say in the components' docs what their names do not: which buttons show on hover, and when AssistantMessageActions renders a spacer. - Say working blocks, not collapsed ones, in the MessageActionBar doc.
…y the spacer rule in the AssistantMessageActions doc
Files an agent attaches during a turn are easy to lose: they render between the turn's steps or fold into the "Worked for ..." block, and the Summary panel lists every attachment in the chat.
Each turn in which the agent attached files now gets an Attachments pill under its last assistant message, or under its collapsed working block when the turn ended without an answer, and keeps it as newer turns arrive. The pill shows up to three thumbnails and a "+N" count, and opens a popover that lists the turn's agent files (user uploads are left out). The popover uses the Summary panel's
MessageAttachmentCard, so its cards view and download files the same way. A file that the timeline knows has expired keeps its name in an expired card, and the popover then explains why files expire. When viewing a stored text file from the popover finds it deleted, the rest of the timeline treats it as expired too. A thumbnail that fails to load shows a file icon instead. The pill uses the composer pills' colors.Copy now shows at all times instead of on hover, and assistant messages in the middle of a turn that end in text get it too. A prompt's Edit and jump buttons still appear on hover, before Copy. An answer's row ends with the pill, after Copy.
The newest turn's pill appears once the chat stops, because a stop hook or a client tool result can continue a running turn. An answered turn keeps its pill while a compaction streams or after a context clear. A turn without an answer gets its pill only once the chat stops, because chatd can resume that turn after the compaction.
The File attachments section of the Coder Agents docs now describes both lists of the agent's files: the pill at the end of a turn and the Summary tab's Attachments section.
Left out to keep this PR small, as follow-ups: keeping the pill while a run that this client started on an idle chat begins, and holding back the pill of a turn whose prompt is on an unloaded page.
Screenshots
These screenshots predate the switch to the Summary panel's cards, so the card layout in the popover can differ slightly. Storybook has the current states in
pages/AgentsPage/ChatConversation/ConversationTimeline/WorkingBlocks, in the stories whose names start with "Turn Attachments Pill".Two turns, each with its pill, and Copy on every message. The newest turn's popover shows image thumbnails, "View file" for the images and the Markdown file, and a download card for the PDF.
"View file" on the Markdown card opens its preview over the popover.