Skip to content

fix(ui): collapse long forwarded session messages - #150440

Merged
vyctorbrzezowski merged 4 commits into
mainfrom
fix/chat-forwarded-message-collapse
Sep 17, 2026
Merged

vyctorbrzezowski merged 4 commits into
mainfrom
fix/chat-forwarded-message-collapse

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

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

StateBeforeAfter
Cron, defaultBefore: light, 1440px, cron-collapsedAfter: light, 1440px, cron-collapsed
Cron, expandedBefore: light, 1440px, cron-expandedAfter: light, 1440px, cron-expanded
Other agentBefore: light, 1440px, other-agentAfter: light, 1440px, other-agent
Same agent, other sessionBefore: light, 1440px, same-agent-sessionAfter: light, 1440px, same-agent-session
SubagentBefore: light, 1440px, subagentAfter: light, 1440px, subagent
Legacy keyBefore: light, 1440px, legacyAfter: light, 1440px, legacy

Light theme, 390px

StateBeforeAfter
Cron, defaultBefore: light, 390px, cron-collapsedAfter: light, 390px, cron-collapsed
Cron, expandedBefore: light, 390px, cron-expandedAfter: light, 390px, cron-expanded
Other agentBefore: light, 390px, other-agentAfter: light, 390px, other-agent
Same agent, other sessionBefore: light, 390px, same-agent-sessionAfter: light, 390px, same-agent-session
SubagentBefore: light, 390px, subagentAfter: light, 390px, subagent
Legacy keyBefore: light, 390px, legacyAfter: light, 390px, legacy

Dark theme, 1440px

StateBeforeAfter
Cron, defaultBefore: dark, 1440px, cron-collapsedAfter: dark, 1440px, cron-collapsed
Cron, expandedBefore: dark, 1440px, cron-expandedAfter: dark, 1440px, cron-expanded
Other agentBefore: dark, 1440px, other-agentAfter: dark, 1440px, other-agent
Same agent, other sessionBefore: dark, 1440px, same-agent-sessionAfter: dark, 1440px, same-agent-session
SubagentBefore: dark, 1440px, subagentAfter: dark, 1440px, subagent
Legacy keyBefore: dark, 1440px, legacyAfter: dark, 1440px, legacy

Dark theme, 390px

StateBeforeAfter
Cron, defaultBefore: dark, 390px, cron-collapsedAfter: dark, 390px, cron-collapsed
Cron, expandedBefore: dark, 390px, cron-expandedAfter: dark, 390px, cron-expanded
Other agentBefore: dark, 390px, other-agentAfter: dark, 390px, other-agent
Same agent, other sessionBefore: dark, 390px, same-agent-sessionAfter: dark, 390px, same-agent-session
SubagentBefore: dark, 390px, subagentAfter: dark, 390px, subagent
Legacy keyBefore: dark, 390px, legacyAfter: dark, 390px, legacy

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.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Sep 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review September 17, 2026 01:09
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 17, 2026, 1:13 PM ET / 17:13 UTC (Revision 3).

ClawSweeper review

What this changes

The 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
Reviewed head: 037135e0959b5a8e5ac53596628a7b11b4943658

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation with convincing visual evidence and useful browser coverage; no blocking defect was identified.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The inspected before/after screenshots show the changed shared renderer in the running Control UI with synthetic mock-Gateway input: the long automation message becomes a faded preview and expands back to full text. Browser coverage supplements this visible proof with independent toggles, streaming and resize behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The inspected before/after screenshots show the changed shared renderer in the running Control UI with synthetic mock-Gateway input: the long automation message becomes a faded preview and expands back to full text. Browser coverage supplements this visible proof with independent toggles, streaming and resize behavior.
Evidence reviewed 10 items Introduced behavior and shared owner: The introduced delta extends the existing disclosure controller with a forwarded-message threshold and distinct expansion keys while preserving ordinary user-message logic and bypassing collapse during streaming.
Production entry points: Both ordinary groups and turn-frame content carry the forwarded-source flag into the shared message renderer. Transcript projection supplies the existing session-local expansion callbacks; no persisted settings or Gateway protocol changes are introduced.
Still absent from current main: The fetched main implementation still limits this disclosure path to ordinary user messages. Its differences from the candidate retain the substantive forwarded-collapse and attribution changes.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +105, Tests +335. Total +440 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 6 152 47 +105
Tests 3 336 1 +335
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 488 48 +440

Review metrics

Metric Value Why it matters
Production versus test growth Net production +105 lines; tests +335 lines Production growth supports the requested forwarded presentation while reusing the existing disclosure and avatar owners.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #150363
Summary: This PR implements the linked forwarded-message presentation request; neighboring work does not replace its central behavior.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best 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.

Labels

Label justifications:

  • P2: This is a bounded chat-readability improvement for repeated long forwarded instructions.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The inspected before/after screenshots show the changed shared renderer in the running Control UI with synthetic mock-Gateway input: the long automation message becomes a faded preview and expands back to full text. Browser coverage supplements this visible proof with independent toggles, streaming and resize behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. The inspected before/after screenshots show the changed shared renderer in the running Control UI with synthetic mock-Gateway input: the long automation message becomes a faded preview and expands back to full text. Browser coverage supplements this visible proof with independent toggles, streaming and resize behavior.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The inspected before/after screenshots show the changed shared renderer in the running Control UI with synthetic mock-Gateway input: the long automation message becomes a faded preview and expands back to full text. Browser coverage supplements this visible proof with independent toggles, streaming and resize behavior.

Evidence

What I checked:

  • Introduced behavior and shared owner: The introduced delta extends the existing disclosure controller with a forwarded-message threshold and distinct expansion keys while preserving ordinary user-message logic and bypassing collapse during streaming. (ui/src/pages/chat/components/chat-message-text.ts:255, 037135e0959b)
  • Production entry points: Both ordinary groups and turn-frame content carry the forwarded-source flag into the shared message renderer. Transcript projection supplies the existing session-local expansion callbacks; no persisted settings or Gateway protocol changes are introduced. (ui/src/pages/chat/components/chat-message-group.ts:427, 037135e0959b)
  • Still absent from current main: The fetched main implementation still limits this disclosure path to ordinary user messages. Its differences from the candidate retain the substantive forwarded-collapse and attribution changes. (ui/src/pages/chat/components/chat-message-text.ts:249, 15e2d991282e)
  • Latest release comparison: The v2026.9.4 source also restricts message disclosure to user-role messages passing the ordinary length threshold; it does not provide the requested forwarded-message treatment. (ui/src/pages/chat/components/chat-message-text.ts, 3a9d69db306c)
  • Inspected visual proof: Inspected all four prepared images: the light desktop automation message before and after, collapsed and expanded. The after images visibly show the faded preview, Show more/Show less controls, retained attribution and tint, and restored full text. The PR identifies the running Control UI with synthetic mock-Gateway fixtures and candidate 037135e. Other theme and width captures are described in the body but were not among these four prepared files. (037135e0959b)
  • Complete body identity and review continuity: Read the omitted body tail through GitHub and verified that the complete body matches captured SHA-256 d595d2a9fadf8dd37d81e1ab7e71b6b41ce3acb43574dd7ea91031462f63d6cb. The prior completed review covers the same head and retains no findings or published rank-up moves. (037135e0959b)

Likely related people:

  • vyctorbrzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-09-17T01:15:45.045Z sha 5d3893e :: needs maintainer review before merge. :: none
  • reviewed 2026-09-17T17:04:16.492Z sha 037135e :: needs maintainer review before merge. :: none

@vyctorbrzezowski
vyctorbrzezowski force-pushed the fix/chat-forwarded-message-collapse branch from 5d3893e to 037135e Compare September 17, 2026 16:55
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: L maintainer Maintainer-authored PR labels Sep 17, 2026
@vyctorbrzezowski
vyctorbrzezowski merged commit 8571736 into main Sep 17, 2026
175 checks passed
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

@vyctorbrzezowski
vyctorbrzezowski deleted the fix/chat-forwarded-message-collapse branch September 17, 2026 17:22
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 18, 2026
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chat: collapse forwarded session messages by default and flatten their attribution row

1 participant