Repository navigation
fix(chat): render progress attachments inline - #148795
Conversation
Process authored commentary attachments through managed media and preserve them during finalization and history projection. Keep raw model content intact and revalidate the current run and exact transcript row through asynchronous media preparation. Cover mixed phases, teardown, cancellation, concurrent rewrites, documents, and caption limits.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 2:08 AM ET / 06:08 UTC (Revision 2). ClawSweeper reviewWhat this changesThe Gateway prepares assistant progress attachments for inline display, preserves them through final replies and history reloads, and cancels unfinished downloads when the run stops. Merge readiness✅ Ready for maintainer review This remains a useful fix absent from the inspected main implementation. The previous cancellation blocker is resolved, and this review found no new blocking defect. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway turns assistant transcript events into messages displayed in Control UI chat. Its managed-media pipeline validates attachments, stores them, and supplies authenticated previews while preserving the original model text. flowchart TD
A[Assistant progress message] --> B[Authored attachment references]
B --> C[Current run and session checks]
C --> D[Managed media preparation]
D --> E[Guarded transcript display update]
E --> F[Inline preview and history reload]
G[Run cancellation] --> D
D --> H[Cleanup unfinished attachments]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +434, Tests +682, Docs +2, Other 0. Total +1118 across 17 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep progress and final attachments on the existing managed-media pipeline, with cancellable preparation, guarded display updates, and unchanged model transcript bytes. Do we have a high-confidence way to reproduce the issue? Yes, source inspection identifies the path: an extensionless image reference in assistant commentary bypasses managed preparation on main. The supplied before image corroborates the symptom; this read-only review did not execute a reproduction. Is this the best way to solve the issue? Yes. Extending the existing media and transcript owners avoids filename guessing in clients and preserves the established attachment policy and storage format. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against acd9c2702d71. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Cancel unfinished progress downloads with the active run and await artifact cleanup. Keep plain unkeyed commentary hidden unless its own group contains media, and preserve transcript-event readers in the directive test fixture.
|
Fixed the cancellation finding in bffd3d4. The active run's abort signal now reaches the existing remote-ingestion owner and interrupts the response body; teardown still awaits cleanup. The regression leaves the second HTTP response open, aborts the run, and verifies that the response closes, dispatch settles, and no display rewrite, file, or attachment record remains. It failed before the fix and passes afterward. The same commit restores suppression of plain unkeyed commentary, keeps media visibility scoped to its own group, and repairs the incomplete transcript-events mock found by CI. All 553 selected tests, the full build, and changed-file checks passed. Independent Codex review is clean through P2. Inspected screenshots and proof remain in the PR body; fresh exact-head CI is pending. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* fix(chat): render progress attachments inline Process authored commentary attachments through managed media and preserve them during finalization and history projection. Keep raw model content intact and revalidate the current run and exact transcript row through asynchronous media preparation. Cover mixed phases, teardown, cancellation, concurrent rewrites, documents, and caption limits. * fix(chat): preserve progress media lifecycle and visibility Cancel unfinished progress downloads with the active run and await artifact cleanup. Keep plain unkeyed commentary hidden unless its own group contains media, and preserve transcript-event readers in the directive test fixture.
What Problem This Solves
Fixes: screenshots appear as generic FILE cards when an assistant includes an extensionless image URL in a progress message.
User Impact
New progress attachments render inline while work continues and survive final delivery and history reloads. Previously saved raw links are not backfilled; reattach those files to materialize their previews. No configuration or schema migration is required.
Why This Change Was Made
Progress messages bypassed managed media preparation, leaving the UI to guess file types from URLs. The webchat delivery owner now prepares authored commentary media through the existing MIME-detecting media pipeline. It preserves the original model text and keeps progress attachments separate from final attachments, including when both phases share a message. Preparation joins transcript teardown, cancels unfinished downloads when the run stops, and revalidates the current run and exact active row before persistence. Plain unkeyed commentary stays hidden unless its own group contains prepared media.
Evidence
node scripts/check-changed.mjs,pnpm build, andgit diff --checkpassed.bffd3d48ea0. An unchanged Windows checkout-supervisor fixture failed once; its targeted same-head rerun passed all 19 Windows test groups. No source or assertions were changed for the rerun; the original failure remains recorded for CI-owner follow-up.Before
After