Repository navigation
fix: place user file attachments above text bubbles - #142671
vyctorbrzezowski merged 4 commits into
Conversation
|
🦞👀 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 8, 2026, 11:56 PM ET / September 9, 2026, 03:56 UTC (Revision 7). ClawSweeper reviewWhat this changesThe PR places user document cards above separate text bubbles and aligns images, videos, and files with each participant’s side of the conversation. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix with sufficient visual evidence and no actionable findings. Both prerequisite PRs are merged, resolving the previous stack-order blocker; current main still lacks the document layout repair. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI turns Gateway chat history into message groups, attachment previews, and text bubbles. This change adjusts their visual layout while retaining the existing attachment actions. flowchart TD
A[Gateway chat history] --> B[Message and attachment renderer]
B --> C[Participant side]
C --> D[Bare media area]
C --> E[Colored text bubble]
D --> F[Existing preview and download actions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +7, Tests +76. Total +83 across 4 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep one shared media layout with participant-owned alignment and the existing file cards, preview actions, and downloads. Do we have a high-confidence way to reproduce the issue? Yes: render a user ZIP/PDF attachment with text through the Control UI transcript; current main omits the bare-shell condition for documents. Source and supplied before captures establish the path; this review did not execute it. Is this the best way to solve the issue? Yes: extending the existing media shell and participant alignment avoids a competing attachment renderer or new wrapper, with focused geometry checks protecting the result. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b72b30249fd0. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (6 earlier review cycles)
|
1502998 to
0d89987
Compare
2c5aa3e to
d886bb6
Compare
d886bb6 to
2fe7c10
Compare
|
Merged via squash.
|
* fix: place user file attachments above text bubbles * fix(ui): align user media with participant bubble side * test(ui): copy media scenario fields explicitly * test(ui): keep minimal attachment layout regression cases
Closes #142662. Related: #142593.
The dependency PRs #142623 and #142639 by @vyctorbrzezowski have merged. This branch is now rebased directly on
main; its complete delta is four files: production +32/-25 (net +7), tests +79/-3 (net +76).What Problem This Solves
User file cards appeared inside the colored message bubble. In mixed image/file turns, the image could also stop short of the bubble's edge. Another participant's media in a shared session retained a separate layout from the viewer's own media.
Why This Change Was Made
Documents now use the existing image/video media shell and canonical file cards. The existing own/peer participant classes select logical
endorstartalignment for the message column, bare shell, and media items. Fixing the shared item's intrinsic sizing keeps visible media on the same edge as the bubble, without a media-specific alignment rule or new DOM wrapper.User Impact
Images, videos, galleries, and document cards sit above text and follow its side: the viewer's own turns align to the end; another participant's turns align to the start. Multiple documents stack vertically, and file-only messages show just the cards. Open and Download actions remain available. Assistant presentation is preserved. Avatar placement remains owned by the separate alignment change.
Evidence
All 17 cases in the remaining attachment-spacing E2E file passed after the rebase and test consolidation. Three regression witnesses were run against parent production and all failed for the intended reason: document shell still painted, the viewer's image edge offset by 108.625px, and another participant's media shell still painted.
The document invariant extends the existing mobile spacing case. Two focused desktop cases verify visible image/card edges against the own/peer text bubble using canonical sender identities. Redundant video, gallery, image-only and second-viewport permutations were removed from automated coverage; their inspected visual evidence remains below. The original spacing tests from the base retain their separate block-rhythm contract. The test delta is reduced from +220/-31 to +79/-3 without changing production behavior.
The current
check:changedpassed its policy, formatting, graph-boundary, and i18n stages, then stopped atDeclaration input escapes checkout: the required linked dependencies are outside this nested worktree. The prior standalone UI typecheck hit the same restriction. No guard was bypassed or dependencies installed. Current scoped TypeScript lint and CSS lint passed. The unchanged production code retains the prior clean coercion and unused-export scans. Full CI and the current integrated-head review remain landing gates.Captures use the actual Control UI with synthetic Gateway identities and attachments, and the app's Instrument Sans loaded. Each cell embeds the message crop and full viewport. The first eight pairs retain the original file-placement proof; their assistant crops are byte-for-byte identical. The remaining pairs show the alignment repair for own and shared-participant turns. The peer gallery captures use two images; the earlier browser matrix also verified five-image galleries before this test consolidation. Open ZIP/PDF, download, image preview, close, and light/dark controls were exercised in the retained mock app.
A real composer paste of 1,782 bytes generated
pasted-text-1788914352304.txt; Send preserved its exact bytes, filename andtext/plainMIME as a file attachment. The same captured file was then replayed through canonical transcript history for the viewer and Colin. The four added pairs at 1440px/390px show its card outside the painted text, sharing the corresponding start/end edge (0px difference), with the existing 14px gap. Open, Close, and a byte-identical download were verified. This additional case needs no production change.Risk and coverage
Checked consumers of the shared shell and gallery: own and peer image/file/text, image/text, video/text, and multi-image/text turns; user document/text, multiple documents and document-only turns; assistant documents; and audio-only rendering. The shared alignment owner has focused decoded-image/card geometry checks for own and peer turns. Image, video, gallery and pasted-text paths retain desktop/mobile captures; decoder lifecycle coverage remains with the parent video work. Original assistant captures have pixel parity; fresh assistant content is also unchanged. Audio-only conditions and attachment actions remain unchanged. No attachment transport, storage, permission, download, preview decoder, or avatar-layout implementation changes.
Evidence uses a mock Gateway and Chromium, not authenticated live media delivery or a physical mobile device. Both dependency PRs have merged. Landing is authorized after the required checks and current review pass on the integrated head.