feat: render collapsible markdown details sections#1388
Conversation
Render raw details/summary pairs as accessible, locally expandable Compose sections while preserving literal escaped or malformed markup. Keep disclosure state stable when the message body moves between footer layouts. Fixes #1130
|
Warning Review limit reached
Next review available in: 34 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (13)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Ready to review this PR? Stage has broken it down into 6 individual chapters for you: Chapters generated by Stage for commit 231a436 on Jul 15, 2026 1:07am UTC. |
agent-p1p
left a comment
There was a problem hiding this comment.
Adversarial review of d1bbec5.
BLOCKING:
- none
SUGGESTION:
- Summary inline Markdown falls back to raw tags:
app/src/main/java/dev/ipf/whitenoise/android/ui/MarkdownRenderer.kt:459-469rejects an opening paragraph as soon as marmot-markdown emitsStrong,Emph,Code, orLinkinside<summary>. For example,<summary>**bold** name</summary>renders the literal<details>/<summary>markup rather than a disclosure. This is outside #1130's explicit nested-body requirement, so it is non-blocking, but either flatten those inline nodes to safe summary text or add a test/documented limitation.
NITPICK:
- Add translator context for
markdown_details_collapsed_stateandmarkdown_details_expanded_stateinapp/src/main/res/values/strings.xml:1019-1020; these are TalkBack state descriptions, not visible labels.
SUMMARY: The implementation solves #1130 with native Compose disclosures, nested Markdown bodies, correct open boolean-attribute semantics, accessible button/state semantics, safe literal fallbacks, and state preservation across footer-layout moves. I verified the hand-built fixtures against the pinned marmot-markdown parser shape and reran MarkdownMessageBodyTest: 17 tests, 0 failures/errors. No security/privacy regression or unnecessary blocking complexity found.
VERDICT: APPROVE
SENSITIVE_PATHS: none
Note: GitHub does not allow agent-p1p to formally approve its own PR, so this is an approve-equivalent COMMENTED review.
Preview APK for PR #1388Home-screen label: 1388 White Noise with the blueprint launcher icon — installs side-by-side with the production and staging apps. Install directly — one tap, no GitHub sign-in (public, content-addressed Every push to this PR rebuilds and updates this comment. |
Flatten inline formatting inside summary headers into safe button text and add translator context for the disclosure state descriptions.
|
Addressed both adversarial-review notes in 231a436:
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Flagging a blocker from an on-device + parser-source investigation: this renders the The root cause is in the shared It can't be fixed robustly at this layer without reimplementing HTML parsing (fragile inline-offset surgery, or threading the FFI parser to re-parse the body), and that would have to be duplicated per client. The correct fix is core-side: have Filed the engine request: marmot-protocol/mdk#891 Recommend holding this PR until the parser emits the structured block, then rebasing it to render that instead of matching raw paragraphs. |
Summary
blocks as native Compose disclosure rows
Test plan
Fixes #1130