fix(android): filter thinking and reasoning blocks from chat message display#87939
fix(android): filter thinking and reasoning blocks from chat message display#87939xianshishan wants to merge 1 commit into
Conversation
…display Explicitly drop thinking, reasoning, and redacted_thinking content blocks in parseChatMessageContent() instead of relying on the generic else branch. Tighten ChatMessageBody and ChatBubble rendering to only handle explicit text and image types, skipping everything else. This prevents LLM thinking/reasoning content from leaking into visible chat message bubbles on Android. Fixes #87918
|
Codex review: needs real behavior proof before merge. Reviewed May 29, 2026, 4:06 AM ET / 08:06 UTC. Summary PR surface: Other +3. Total +3 across 3 files. Reproducibility: yes. from source inspection: a chat.history row with role toolResult and text content is accepted by Android history parsing and can be rendered as an OpenClaw bubble. I did not run a live Android device reproduction in this read-only review. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Filter internal tool-result, tool-call, and reasoning rows from the chat.history display projection with an Android defensive guard and regression tests, then verify the Android chat view with redacted real behavior proof. Do we have a high-confidence way to reproduce the issue? Yes, from source inspection: a chat.history row with role toolResult and text content is accepted by Android history parsing and can be rendered as an OpenClaw bubble. I did not run a live Android device reproduction in this read-only review. Is this the best way to solve the issue? No. The PR is not the best fix because it only makes already-filtered content-block handling explicit; the maintainable fix should filter internal rows at the gateway display projection and keep an Android defensive guard with tests. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 8363d6596c17. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Other +3. Total +3 across 3 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
Superseded by #89453 with proper Real behavior proof section. |
Summary
Prevent LLM thinking/reasoning content from appearing as visible chat
message bubbles in the Android app. The fix adds explicit handling for
thinking-related content block types at both the parsing and rendering layers.
Changes
"thinking","reasoning","redacted_thinking"cases toparseChatMessageContent()that returnnullinstead of relying on the genericelsebranchChatMessageBodyrendering to onlyhandle explicit
"text"and"image"types, withelse -> continueto skip any unknown types
if/elserendering with explicitwhenbranches for
"text"and"image"types, skipping non-displayabletypes in
elseDesign rationale
The existing
else -> nullbranch inparseChatMessageContent()already drops unrecognized content types. This change makes thinking
filtering explicit rather than implicit, preventing future regressions
if content type handling evolves. The rendering-layer changes add
defense-in-depth by ensuring only known displayable types can render.
Fixes #87918