Repository navigation
fix(ui): collapse long forwarded session messages - #150440
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 17, 2026, 1:13 PM ET / 17:13 UTC (Revision 3). ClawSweeper reviewWhat this changesThe Control UI adds expandable previews for long forwarded messages and simplifies their source attribution with inline links and agent avatars. Merge readiness✅ Ready for maintainer review This PR remains useful: current main does not collapse forwarded messages, and related merged work addresses different behavior. No blocking correctness or security defect was found; the inspected screenshots support the presentation change. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI turns Gateway transcript messages and sender metadata into chat bubbles. Its existing disclosure controller manages previews and expansion using session-local presentation state. flowchart TD
A[Gateway transcript and sender metadata] --> B[Chat message groups]
B --> C[Forwarded source detection]
C --> D[Source attribution row]
C --> E[Shared message disclosure]
E --> F[Short or streaming text stays visible]
E --> G[Long text preview]
G --> H[Per-message expand and collapse]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +105, Tests +335. Total +440 across 9 files. View PR surface stats
Review metrics
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 forwarded previews within the existing disclosure owner, preserving full message content, session-local expansion, source navigation and ordinary prompt behavior. Do we have a high-confidence way to reproduce the issue? Not applicable as a defect reproduction: this adds a maintainer-requested presentation behavior. Current source and the paired screenshots establish the existing full-message display and proposed preview. Is this the best way to solve the issue? Yes. Extending the existing disclosure controller and session-local expansion state is a narrow solution, and the patch preserves the recently merged ordinary-prompt and cron-attribution behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 15e2d991282e. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
5d3893e to
037135e
Compare
|
Merged via squash.
|
* fix(ui): collapse forwarded session messages by default * fix(ui): refine forwarded message attribution * fix(ui): align forwarded attribution groups * fix(ui): preserve forwarded attribution through title decoration
Closes #150363
What Problem This Solves
Long instructions forwarded by another session or automation fill the transcript and bury the surrounding conversation.
User Impact
Forwarded messages longer than three rendered lines start with a faded 2.5-line preview and a Show more control. Each message expands independently; short messages stay fully visible. The From row uses a plain session link, with the sender's existing avatar beside another agent's name and a middle dot before its session title.
Why This Change Was Made
Reuses the existing message disclosure controller and session-local expansion state, including the fade and toggle polish from #150037 by @vyctorbrzezowski. Streaming text remains open until finalization. Ordinary user prompts retain the current five-line cutoff and glyph-aware fade from main. Cron links retain their resolved label, clock icon and navigation.
Attribution styling stays scoped to forwarded messages. Session titles capitalize their first letter in presentation; stored titles stay unchanged. Same-agent sessions and subagents keep simple session links, and legacy keys remain readable plain text. Forwarded bubbles retain their tint and use the quiet border treatment of user bubbles.
Evidence
Candidate:
037135e0959b5a8e5ac53596628a7b11b4943658. Before is the merge base with main,bbb65802dc880fc84c121b709e7d156a2cc831d1; After uses the candidate's exact production files. Both use identical synthetic fixtures in the running Control UI with a mock Gateway.350 selected tests pass: 304 unit tests, 14 forwarded-disclosure browser tests, and 32 ordinary-user disclosure E2E cases. Coverage includes independent expansion, streaming, viewport changes, short messages, avatar loading/failure, cron labels/navigation and title-decoration rerenders.
Production build and performance gate pass: startup JavaScript 359,492 B, enforced ceiling 363,282 B; no baseline change.
Final committed change reviewed with no actionable findings.
Inspected screenshots cover light/dark themes at 1440px and 390px. Collapsed forwarded text measures 52.5px at a 21px line height, with a 10.5px fade; expansion removes the mask. The paired captures retain the same bubble backgrounds and show no page errors.
Required changed-file formatting, lint and type checks pass.
Light theme, 1440px
Light theme, 390px
Dark theme, 1440px
Dark theme, 390px
Risk and coverage
The shared message renderer serves both ordinary chat groups (
renderMessageGroup) and turn-frame content (renderMessageGroupContent); both carry the forwarded-source flag. Source review covers these consumers, while the running-app screenshots exercise the transcript path. Unit/browser coverage protects the existing normal-user cutoff and fade, finalized versus streaming text, independent disclosure state, source-title decoration and cron navigation. A reproduced title-decoration rerender regression now passes after retaining the separate cron and plain-link templates.The screenshot gallery covers cron messages, another agent, another session of the same agent, subagents and legacy keys in light/dark themes at desktop/mobile widths. Short messages and default-agent attribution were also inspected. Browser geometry tests load the application's default font before measuring alignment.
Proof uses Chromium and synthetic mock-Gateway traffic; native cron scheduling, live provider delivery, Firefox and Safari were not exercised. This change affects presentation and session-local disclosure state; it does not modify Gateway routing or persisted message data. Separate follow-ups remain outside this change: #150418, #150442 and #150443.