Repository navigation
feat(apps): render collapsible details natively - #115641
Merged
Merged
Conversation
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 30, 2026
* feat(apps): render collapsible details natively in chat * fix(apps): preserve reference definitions when folding disclosures * fix(apps): keep authored details summaries unlocalized * fix(apps): keep raw-HTML disclosure examples literal * refactor(apps): isolate summaries and raw HTML contexts * fix(apps): honor all CommonMark raw HTML contexts in disclosures * chore(apps): refresh native i18n inventory for disclosure strings
This was referenced Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #114556
Related: #114706
What Problem This Solves
Fixes an issue where native app users would see raw
<details>markup when a model authored a collapsible section. Native apps use the samewebchatsession channel as the web client but render messages natively: iOS and macOS printed the tags literally throughAttributedString, while Android rendered theHtmlBlockverbatim in monospace.Why This Change Was Made
This follow-up to #114556 and #114706 adds native disclosure rendering while keeping the same recognition contract as the web block rule. SwiftUI uses
DisclosureGroupthrough a new.disclosurecase in the shared block segmenter and renderer, covering iOS main chat, macOS main chat, and macOS Quick Chat; Android uses a Compose expandable; and the macOS onboarding/system-agent chat now uses the shared renderer instead of its weaker per-line parser.Recognition is line-start anchored and accepts only strict
<details>,<details open>,<summary>, and</details>tags. Unsupported attributes still balance but render literally, nesting is capped at 32, CommonMark raw-HTML block types 1-5 are protected, and unclosed disclosures fold implicitly while streaming. Authored summaries are never localized; only an omitted summary uses the localized "Details" fallback.User Impact
iOS, macOS, and Android users now see model-authored collapsible sections as native expandable controls instead of raw HTML tags. Reference-style links resolve in disclosure bodies but deliberately not in summaries, avoiding fragile cross-fragment document splicing.
Evidence
check:changedapps lane exited 0.origin/main, the 107-testChatMarkdownBlockSegmenterTestssuite passed again.ChatMarkdownTestand ktlint completed withBUILD SUCCESSFUL. After the rebase,ChatMarkdownTestpassed again.git diff --checkwas clean.Known shared limitation: when CommonMark coalesces a type-6 HTML block that begins with another tag, for example
<div>body</div>immediately followed by</details>with no blank line, the closing tag is swallowed into that block. The disclosure then implicitly closes only at the end of the message, nesting following content inside it. This behavior is pre-existing on web inui/src/components/markdown-details.ts, shipped in #114556, and native is intentionally at parity here. A follow-up will fix both surfaces together.Proof gap: an on-device screenshot of the collapsed disclosure could not be captured because the host
xcode-selectpoints at a broken Xcode beta, which disables the simulator-control MCP. The install, pairing, connection, and live-session render were verified, but the collapsed disclosure screenshot is not available.