Skip to content

fix: render markdown in selection and task answer popups - #1125

Open
addisonking wants to merge 2 commits into
yetanotherbrowser:mainfrom
addisonking:fix/render-markdown-explain-window
Open

addisonking wants to merge 2 commits into
yetanotherbrowser:mainfrom
addisonking:fix/render-markdown-explain-window

Conversation

@addisonking

Copy link
Copy Markdown
Contributor

Summary

  • Render markdown via AgentAnswer.rich(...) in SelectionDockContent (SelectionDock.swift) so Cmd+J selection commands like "Explain simply" format bold text, bullets, headings, code, and tables instead of showing raw syntax.
  • Apply the same markdown rendering to the remaining AI prose popups and cards:
    • SelectionLayer.answer (SelectionList.swift)
    • TaskLineView.macAnswer (AgentTask.swift)
    • previous turns in FieldAnswer (FieldAnswer.swift)
    • ChatThought and ChatReport (ChatNotes.swift)
  • Keep plain text for error states, in-place rewrites (SelectionInk), rewrite diffs (FieldAnswer), and literal message/mail draft previews (AgentAsk / AskCard).
  • Add markdown regression coverage in FieldAnswerTests and an env-gated dock snapshot test in SelectionVisualTests.

Verification

  • ./design-check on all 5 touched source files: clean.
  • swift test --filter "FieldAnswerTests|SelectionCommandsTests|SelectionVisualTests|AgentDockWidthTests": 30/30 passed.
  • Verified rendered dark-mode SelectionDockContent screenshot with bold and bullet markdown.

@greptile-apps

greptile-apps Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with the previous rewrite-preview issue fixed.

Summary

The PR uses the shared Markdown renderer in selection answers, local task answers, field history, and chat thoughts and reports.

  • Selection answers show formatted Markdown while errors and rewrites stay literal.
  • Task, chat, and earlier answer text uses the shared Markdown formatter.

Reviews (2) · Last reviewed commit: "fix: keep rewrite previews literal in se..." · Reviewed by Greptile

Comment thread Sources/Fast/SelectionDock.swift Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant