Skip to content

Markdown viewer — full fidelity + text selection #861

Closed as not planned
Closed as not planned

Description

@samanthamsong

Epic: «Chat & everyday UX feel great» (#839)
Backlog Doc ID: #30 · Priority: P2 · Area: chat & ux

Description
Full-fidelity markdown rendering with selection support; currently you can't select all chat text.

Definition of done
Markdown renders fully and text is selectable.

Part of the «Chat & everyday UX feel great» tracking issue (#839).

Activity

  1. clawsweeper commented on Jun 26, 2026

    @clawsweeper

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 3, 2026, 5:16 PM ET / 21:16 UTC.

    Summary
    Keep open for maintainer product direction. The default chat surface renders Markdown through an intentionally inert CommonMark path, so full fidelity for links, images, and raw HTML is not a small missing rendering fix. The collaborator-authored issue is also not eligible for automated closure.

    Reproducibility: no. high-confidence reproduction of a defined bug is available. Current source instead shows deliberate Markdown restrictions, while the report does not specify an exact Markdown sample, expected active-content behavior, or current-version UI observation.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.

    Maintainer decision needed

    Question Recommendation
    Should chat Markdown remain inert for links, images, and raw HTML while improving selectable visual formatting, or should any of those content types become active user interactions? Keep external content inert: Improve formatting and selection while retaining literal links, image placeholders, and raw HTML as non-active text.

    Why: The active renderer intentionally prevents navigation and remote content fetches from untrusted chat output, so choosing fuller fidelity changes a product and security contract rather than repairing a localized defect.

    Next step
    A maintainer must set the untrusted Markdown capability and interaction policy before any focused implementation can be safely scoped.

    Security
    Needs attention: This feature request touches an intentional security boundary because chat Markdown may originate from untrusted gateway, tool, or model output.

    Review details

    Best possible solution:

    Define a supported Markdown capability matrix for untrusted chat output, preserve inert external content by default, and then implement selectable visual fidelity with focused sanitizer, renderer, accessibility, and current-head WinUI proof coverage.

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

    No high-confidence reproduction of a defined bug is available. Current source instead shows deliberate Markdown restrictions, while the report does not specify an exact Markdown sample, expected active-content behavior, or current-version UI observation.

    Is this the best way to solve the issue?

    No, not as an unconditional full-fidelity renderer. The safer path is to decide the untrusted-content contract first, then add formatting and selection support without weakening the existing inert-content guarantees by default.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • Making links, images, or raw HTML fully active in agent-generated chat content could introduce navigation, remote-fetch, tracking, or script-adjacent security regressions.
    • The request does not define whether “full fidelity” means visual formatting only or active external content, so an implementation could silently choose an unsafe or unwanted product contract.
    • Current source establishes the safety boundary, but a Windows UI proof pass is still needed after the supported Markdown contract is selected.

    Codex review notes: model internal, reasoning high; reviewed against 6e225e4758e1.

    Label changes

    Label justifications:

    • P2: Richer Markdown and complete selection would improve the normal chat workflow, but the current behavior is deliberately safety-constrained rather than an urgent outage.
    • impact:ux-friction: Users cannot obtain the requested chat reading and selection experience without a product-approved rendering change.
    Evidence reviewed

    Security concerns:

    • [medium] Define active-content policy before increasing fidelity — src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs:541
      The current renderer deliberately suppresses raw HTML, remote images, and active hyperlinks. Enabling any of them requires explicit navigation, remote-fetch, and untrusted-content safeguards.
      Confidence: 0.95

    What I checked:

    • Active chat route: The default ChatPage mounts the Reactor host, whose assistant bubble calls BuildSafeMarkdown for each assistant message. (src/OpenClaw.Tray.WinUI/Pages/ChatPage.xaml.cs:291, 6e225e4758e1)
    • Intentional content-safety boundary: BuildSafeMarkdown enables CommonMark with NoHtml, renders images as selectable placeholder text, flattens links, and renders raw HTML as literal selectable text rather than active content. (src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs:537, 6e225e4758e1)
    • Security behavior is covered by focused tests: The chat sanitizer tests assert that nested links and images remain inert and that dangerous raw HTML remains literal text, confirming this is an established behavior rather than an accidental renderer omission. (tests/OpenClaw.Tray.Tests/ChatMarkdownSanitizerTests.cs:378, 6e225e4758e1)
    • Current ownership boundary: The architecture ledger identifies ReactorChatTimeline through OpenClawReactorChatRoot and ReactorHostControl as the authoritative production chat timeline; the older FunctionalUI default mount is explicitly closed. (docs/ARCHITECTURE.md:135, 6e225e4758e1)
    • Feature-history provenance: Local history identifies Karen's Reactor migration as the most recent chat-surface change and Régis Brid's native chat implementation as the original Markdown-sanitization foundation. The partial clone could not retrieve some older objects, so this is routing evidence rather than fix provenance. (src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs:537, 9acafa606a4d)
    • Maturity scorecard unavailable: The required maturity helper could not classify the issue because this checkout does not contain qa/maturity-scores.yaml; no maturity label is selected.

    Likely related people:

    • Karen: Recent local history attributes the production chat-surface migration to Reactor, including the active assistant Markdown path, to this contributor. (role: recent area contributor; confidence: high; commits: 9acafa606a4d; files: src/OpenClaw.Tray.WinUI/Chat/ReactorChatTimeline.cs, src/OpenClaw.Tray.WinUI/Chat/OpenClawReactorChatRoot.cs)
    • Régis Brid: The original native chat implementation introduced the chat Markdown sanitization and rendering foundation that the current route preserves. (role: feature introducer; confidence: medium; commits: 08cab69a038c; files: src/OpenClaw.Tray.WinUI/Chat/ChatMarkdownSanitizer.cs, src/OpenClaw.Tray.WinUI/Chat/Markdown/ChatMarkdownRenderer.cs)
    How this review workflow works
    • 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.
  2. added
    P2
    impact:other
    issue-rating: 🐚 platinum hermit
    clawsweeper:needs-live-repro
    clawsweeper:no-new-fix-pr
    clawsweeper:needs-maintainer-review
    clawsweeper:needs-product-decision
    on Jun 26, 2026
  3. added theissue type on Jun 26, 2026
  4. moved this from Backlog to UX in Windows Companion Appon Jul 13, 2026
  5. github-actions commented on Jul 25, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale due to inactivity.
    Please add updated OpenClaw Windows details or it will be closed.

  6. 20 remaining items

  7. added
    issue-rating: 🌊 off-meta tidepool
    issue-rating: 🦞 diamond lobster
    clawsweeper:source-repro
    issue-rating: 🦪 silver shellfish
    clawsweeper:needs-security-review
    and removed
    issue-rating: 🌊 off-meta tidepool
    issue-rating: 🦞 diamond lobster
    clawsweeper:source-repro
    clawsweeper:needs-maintainer-review
    on Aug 3, 2026
  8. github-actions commented on Aug 18, 2026

    @github-actions
    Contributor

    This issue has been automatically marked as stale due to inactivity.
    Please add updated OpenClaw Windows details or it will be closed.

  9. github-actions commented on Aug 25, 2026

    @github-actions
    Contributor

    Closing due to inactivity.
    If this still affects OpenClaw Windows, open a new issue with the current version, logs, and fresh reproduction details.

  10. locked as resolved and limited conversation to collaborators on Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2clawsweeper:needs-product-decisionclawsweeper:needs-security-reviewclawsweeper:no-new-fix-primpact:ux-frictionissue-rating: 🦪 silver shellfishstale

    Type

    Fields

    Priority

    Medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions