Repository navigation
feat(ui): make reasoning blocks collapsible - #117365
chernoff-code wants to merge 2 commits into
Conversation
|
Codex review: blocked before merge. Reviewed September 22, 2026, 1:54 AM ET / 05:54 UTC (Revision 18). ClawSweeper reviewWhat this changesMakes Control UI reasoning blocks expandable and initially collapsed, keeps answers visible, and adds component and browser coverage. Merge readiness⛔ Blocked before merge - 3 items remain Keep open: the per-block disclosure remains distinct useful work, with no blocking defect established in the introduced patch. The related merged visibility repair explicitly does not supersede it. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI renders assistant messages received through the Gateway. Its message renderer separates reasoning from answer content and applies the existing reasoning-visibility setting before displaying either. flowchart TD
A[Gateway conversation messages] --> B[Message grouping]
B --> C[Reasoning visibility setting]
C --> D[Collapsed reasoning disclosure]
B --> E[Visible final answer]
D --> F[Expand or collapse reasoning]
Decision needed
Why: The contributor reports operator approval, while current UI tests expect enabled reasoning to appear when Worked opens; neither establishes maintainer acceptance of the additional disclosure. Before merge
Agent review detailsSecurityNone. PR surfaceSource +64, Tests +76. Total +140 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Use the native disclosure within the current canonical message-body flow, with an agreed default that complements Worked and preserves full-message recovery. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature request; the inspected browser screenshots directly demonstrate the proposed collapsed and expanded presentation. Is this the best way to solve the issue? Yes for the rendering mechanism: native details reuses browser interaction and existing sanitization without new state machinery. Its default and placement within the newer Worked flow still need agreement. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5171c37c9f77. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (17 earlier review cycles; latest 8 shown)
|
|
@openclaw-mantis web UI chat proof: verify that reasoning is collapsed by default, expands on activation, and leaves the final answer visible. Product decision context: the operator explicitly requested a ChatGPT-like chat presentation with reasoning collapsed by default, verified the deployed Control UI behavior, and confirmed that this default is desired. A persisted preference is intentionally out of scope for this focused presentation change. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
dd98f12 to
d6cf7ed
Compare
|
Browser proof is now inspectable and the focused Playwright run passes (1 file, 1 test). Collapsed: Expanded: The E2E fixture now explicitly enables reasoning for the active session and retains the current-main reply-preview privacy assertion. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|


What Problem This Solves
Resolves a Control UI problem where assistant reasoning is always expanded inline with the final answer. Long reasoning traces dominate the conversation, make the final response difficult to find, and can leave reasoning-only messages without a useful visual container.
Why This Change Was Made
Reasoning is rendered in a native collapsed
<details>disclosure with a clearReasoningsummary and chevron. The final answer remains visible outside the disclosure.Using the native disclosure element preserves keyboard behavior and accessibility semantics without introducing new state management. The change also handles reasoning-only messages and keeps reply actions limited to messages with replyable answer content.
Product Decision
Collapsed-by-default reasoning is intentional. The operator requested a ChatGPT-like transcript, verified the deployed Control UI behavior, and confirmed this as the desired default. A persisted preference is intentionally outside this focused presentation change.
User Impact
Control UI conversations read more like ChatGPT: answers stay prominent, while reasoning can be expanded on demand with mouse or keyboard. Existing reasoning content is preserved; only its default presentation changes.
Evidence
ui/src/pages/chat/components/chat-message.test.ts.ui/src/e2e/chat-message-actions.e2e.test.ts.checks-node-compact-small-2were terminated in an unrelated shared TUI/PTY test group; the same infrastructure failure occurred on both independent PRs.git diff --checkpasses against currentorigin/main.Inspectable Browser Proof
The focused Playwright test passed against the built Control UI with
OPENCLAW_CAPTURE_UI_PROOF=1(1 file, 1 test). It explicitly enables reasoning for the fixture, verifies the disclosure is closed initially, opens it through the native summary, confirms the private reasoning becomes visible, and verifies the final answer remains outside the disclosure.The proof files live on a separate fork branch so the official PR diff remains source-only.