Skip to content

feat: render model-authored collapsible details - #114556

Merged
steipete merged 6 commits into
mainfrom
steipete/collapsed-entries-model-responses-a47f2e
Jul 27, 2026
Merged

steipete merged 6 commits into
mainfrom
steipete/collapsed-entries-model-responses-a47f2e

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Models cannot currently tuck optional depth behind a disclosure. Raw <details> tags leak as literal text everywhere except Telegram rich mode, making longer answers noisier and exposing markup that users should never have to see.

Why This Change Was Made

This user-requested feature lets models author collapsible sections. The Control UI and Telegram rich mode preserve native disclosures, while every other channel safely flattens them into readable Markdown instead of exposing raw tags.

AI-assisted: yes (Claude and Codex).

User Impact

The Control UI now renders model-authored <details> and <summary> blocks natively, including while responses stream. Telegram rich mode is unchanged. All other channels show **Summary** followed by the body instead of literal disclosure tags.

This is a release-note-worthy feature.

Evidence

  • Autoreview clean via Codex gpt-5.6-sol at xhigh after 9 rounds, including the block-rule redesign. A fresh post-rebase rerun was also clean with no accepted/actionable findings.
  • Focused suites: 111 Control UI markdown tests, 13 outbound disclosure-flattener tests, and 5 Telegram sanitize tests.
  • Full local changed gate exited 0 across all lanes. It ran locally because the Blacksmith backend was unreachable.
  • Commits:
    • cb347732cd4 feat: render model-authored collapsible details in web UI and flatten for plain channels
    • 5bd53474ecc fix: guard markdown-it line-index access in details block rule
    • 9dc0e1ed0f4 fix: satisfy no-new-array lint in disclosure scanners

@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Jul 27, 2026
@steipete steipete self-assigned this Jul 27, 2026
@steipete
steipete marked this pull request as ready for review July 27, 2026 12:04
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. mantis: telegram-visible-proof Mantis should capture Telegram visible proof. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 27, 2026
@clawsweeper

clawsweeper Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 27, 2026, 8:55 AM ET / 12:55 UTC.

ClawSweeper review

What this changes

This PR lets models author &lt;details>/&lt;summary> sections, renders them as native collapsible content in the Control UI, preserves them for Telegram rich messages, and converts them to readable Markdown for other outbound channels.

Merge readiness

⛔ Blocked until real behavior proof is added - 5 items remain

Keep this protected maintainer feature PR open. The supplied context shows a coherent implementation and no concrete line-level defect, but its prior review’s real-runtime proof gap remains unresolved: tests and CI do not directly demonstrate streamed Control UI disclosures, Telegram rich rendering, and fallback-channel flattening after the change.

Priority: P3
Reviewed head: 45e1d3bc8943010512151769b9807cd99f356419
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The supplied implementation and test signal look substantial, but missing direct runtime evidence remains a merge gate for this user-visible multi-surface change.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR reports focused tests, autoreview, a changed gate, and hosted CI, but it provides no redacted after-fix runtime artifact directly showing Control UI streaming, Telegram rich preservation, or plain-channel fallback behavior. Add a screenshot, recording, terminal/live output, or redacted logs; redact private data before posting. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR reports focused tests, autoreview, a changed gate, and hosted CI, but it provides no redacted after-fix runtime artifact directly showing Control UI streaming, Telegram rich preservation, or plain-channel fallback behavior. Add a screenshot, recording, terminal/live output, or redacted logs; redact private data before posting. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 4 items Prior review remains applicable: The previous ClawSweeper review at commit f5c4c1c found no correctness defect but required real behavior proof. The supplied follow-up comment explicitly says live Control UI and channel artifacts were skipped rather than added.
Current branch extends the reviewed surface: The latest two commits add code-boundary and escaped-tag handling to the disclosure scanners, so the central Control UI and delivery behavior is still a current-head runtime claim rather than a demonstrated artifact.
Shared outbound contract: The supplied diff adds preserveMarkdownDetails to the channel outbound adapter contract and applies it while normalizing outbound payloads; this is a cross-channel compatibility boundary, not only a Telegram presentation change.
Findings None None.
Security None None.

How this fits together

Model responses flow through the Control UI Markdown renderer for streamed web display and through the outbound delivery layer for channel-specific message delivery. This change introduces disclosure handling in both paths so native-capable renderers can preserve collapsible content while other transports receive readable text.

flowchart LR
  A[Model-authored Markdown] --> B[Control UI Markdown renderer]
  A --> C[Outbound delivery layer]
  B --> D[Streamed web disclosures]
  C --> E{Channel preserves disclosures?}
  E -->|Telegram rich mode| F[Native disclosure message]
  E -->|Other channels| G[Flattened Markdown message]
  F --> H[Recipient-visible response]
  G --> H
Loading

Decision needed

Question Recommendation
Should this maintainer-labeled feature proceed on the supplied test-and-CI evidence, or should it wait for redacted current-head runtime proof of streamed Control UI rendering and Telegram/plain-channel delivery? Require runtime proof: Keep the PR open until it includes redacted evidence that directly shows the Control UI stream plus Telegram rich and flattened fallback delivery.

Why: The author describes an accepted proof gap, but the current PR does not provide a proof: override label or direct after-fix runtime artifact, while the change crosses a shared outbound compatibility boundary.

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR reports focused tests, autoreview, a changed gate, and hosted CI, but it provides no redacted after-fix runtime artifact directly showing Control UI streaming, Telegram rich preservation, or plain-channel fallback behavior. Add a screenshot, recording, terminal/live output, or redacted logs; redact private data before posting. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P2) - The new shared outbound adapter decision can change visible message formatting for every channel receiving model-authored disclosure markup; no supplied runtime artifact demonstrates both preservation and fallback behavior on the current head.
  • Resolve merge risk (P1) - Several checks were still in progress in the supplied snapshot, so the final current-head CI result was not established here.
  • Complete next step (P2) - The remaining blocker is proof sufficiency and explicit maintainer acceptance for a protected shared delivery feature, not a narrow mechanical repair.
Agent review details

Security

None.

PR surface

Source +525, Tests +534. Total +1059 across 15 files.

View PR surface stats
Area Files Added Removed Net
Source 11 574 49 +525
Tests 4 535 1 +534
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 15 1109 50 +1059

Review metrics

None.

Mantis proof suggestion

A Telegram Desktop capture can directly prove rich-message disclosure rendering and the readable fallback behavior without asking Mantis to modify the PR. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis telegram desktop proof: verify and capture rich-message disclosure rendering and readable flattened fallback delivery for model-authored details.

Merge-risk options

Maintainer options:

  1. Add current-head runtime evidence (recommended)
    Provide redacted after-fix artifacts for Control UI streaming, Telegram rich rendering, and a plain-channel flattened message before merge.
  2. Accept the documented proof gap
    A maintainer may intentionally accept test-and-CI-only evidence, but should state that the shared outbound formatting risk is accepted for this feature.

Technical review

Best possible solution:

Land only after maintainers either obtain redacted current-head runtime proof for the Control UI and channel paths or explicitly record an override of that proof gate for this feature, while preserving readable fallback output for all non-native channels.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a feature request. The supplied tests describe expected behavior, but there is no directly inspectable current-head runtime artifact for the three claimed user-visible surfaces.

Is this the best way to solve the issue?

Unclear. The design matches the stated native-preserve versus portable-flatten contract, but independent current-main and full adapter-sibling inspection could not be completed from the read-only environment.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 65d58c4945f2.

Labels

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.

Label justifications:

  • P3: This is a new presentation capability, not a reported outage or regression.
  • merge-risk: 🚨 compatibility: The PR adds a shared outbound adapter capability that changes whether model-authored disclosure markup is preserved or transformed.
  • merge-risk: 🚨 message-delivery: The outbound normalization path now rewrites disclosure content for channels without native preservation.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR reports focused tests, autoreview, a changed gate, and hosted CI, but it provides no redacted after-fix runtime artifact directly showing Control UI streaming, Telegram rich preservation, or plain-channel fallback behavior. Add a screenshot, recording, terminal/live output, or redacted logs; redact private data before posting. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The PR changes visible Telegram disclosure handling and can be demonstrated in a short Telegram Desktop recording.

Evidence

What I checked:

  • Prior review remains applicable: The previous ClawSweeper review at commit f5c4c1c found no correctness defect but required real behavior proof. The supplied follow-up comment explicitly says live Control UI and channel artifacts were skipped rather than added. (f5c4c1cd22de)
  • Current branch extends the reviewed surface: The latest two commits add code-boundary and escaped-tag handling to the disclosure scanners, so the central Control UI and delivery behavior is still a current-head runtime claim rather than a demonstrated artifact. (ui/src/components/markdown-details.ts, 45e1d3bc8943)
  • Shared outbound contract: The supplied diff adds preserveMarkdownDetails to the channel outbound adapter contract and applies it while normalizing outbound payloads; this is a cross-channel compatibility boundary, not only a Telegram presentation change. (src/channels/plugins/outbound.types.ts:173, cb347732cd4f)
  • Protected routing: The PR carries the maintainer label and is assigned, so repository policy requires explicit maintainer handling rather than automated cleanup or closure.

Likely related people:

  • steipete: The supplied PR context identifies this person as the assignee, author of all six feature commits, and source of the explicit durable delivery-contract and proof-gap statement. (role: feature author and assigned area contact; confidence: medium; commits: cb347732cd4f, 45e1d3bc8943; files: ui/src/components/markdown-details.ts, src/infra/outbound/markdown-details.ts, extensions/telegram/src/outbound-adapter.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add redacted current-head runtime proof for the Control UI streaming path and both channel delivery modes.
  • Refresh review after the remaining required checks finish.

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-07-27T12:09:35.471Z sha 9dc0e1e :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-27T12:19:31.694Z sha f5c4c1c :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jul 27, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

ClawSweeper rank-up moves reviewed for head f5c4c1cd22de33240775de3ed3e90988e7ec9c5d:

  • Streamed Control UI runtime artifact: skipped for this landing. No sanitized live Control UI capture is available in this session. The accepted proof is the 111-test Control UI Markdown suite, including streaming cases, plus exact-head hosted CI run 30265161465. This remains a known runtime-proof gap rather than a claim of live validation.
  • Telegram rich-message and unsupported-channel runtime artifacts: skipped for this landing. No safe live channel fixture/capture is available in this session. The accepted proof is the 5-test Telegram sanitizer suite, the 13-test disclosure flattener suite, and exact-head hosted CI. This remains a known runtime-proof gap.
  • Shared outbound adapter capability: accepted. This is a maintainer-requested feature, and the intended durable contract is explicit opt-in preservation for native disclosure renderers with readable Markdown flattening everywhere else.

The source-blind behavior contract was: native Control UI disclosures during streaming, preserved Telegram rich disclosures, and **Summary** plus body on unsupported channels without literal tags. Runtime access for those three live surfaces was unavailable, so the behavior-validator result is blocked on runtime evidence; the maintainer accepts that proof gap for this landing.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Jul 27, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

ClawSweeper rank-up moves reviewed for current head 45e1d3bc8943010512151769b9807cd99f356419:

  • Current-head runtime proof: skipped. No sanitized live Control UI, Telegram, or fallback-channel capture is available in this landing session. The maintainer explicitly accepts this documented test-and-CI-only proof gap for the feature. Evidence on this head is 111 legacy UI Markdown tests, 31 disclosure-specific UI tests, 14 outbound flattener tests, clean Codex gpt-5.6-sol xhigh autoreview, and exact-head hosted CI.
  • Refresh ClawSweeper after required checks: skipped because the checks that were still pending in ClawSweeper's snapshot are now terminal green. CI run 30267579818 succeeded with no failed or cancelled jobs. OpenGrep run 30267579749 succeeded on attempt 2 after an unrelated installer-network failure. A re-review would only refresh the rating, not add proof.

The shared outbound capability and its documented proof gap are accepted for landing.

@steipete
steipete merged commit 9e5849a into main Jul 27, 2026
122 of 125 checks passed
@steipete
steipete deleted the steipete/collapsed-entries-model-responses-a47f2e branch July 27, 2026 13:05
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 28, 2026
* feat: render model-authored collapsible details in web UI and flatten for plain channels

* fix: guard markdown-it line-index access in details block rule

* fix: satisfy no-new-array lint in disclosure scanners

* fix: unexport internal disclosure scanner types

* fix: respect markdown code boundaries in details scanners

* fix: preserve escaped disclosure tags
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 channel: telegram Channel integration: telegram maintainer Maintainer-authored PR mantis: telegram-visible-proof Mantis should capture Telegram visible proof. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant