Skip to content

Render health reports as formatted markdown - #20

Merged
jaredpar merged 1 commit into
mainfrom
jaredpar-health-report-markdown-rendering
Jun 23, 2026
Merged

Render health reports as formatted markdown#20
jaredpar merged 1 commit into
mainfrom
jaredpar-health-report-markdown-rendering

Conversation

@jaredpar

Copy link
Copy Markdown
Owner

Health reports were displaying raw markdown text (escaped via Markup.Escape) instead of rendered formatting. Users saw literal **bold**, ### headers, and > blockquotes in the dashboard instead of the rich Spectre.Console output that AnalysisBrowser already provides.

Approach

  • HealthCommand.ShowStatePage and ShowRunDetail now use MarkdownRenderer.ToMarkupLines() to render content with proper formatting (headers, bold, bullets, tables, blockquotes, numbered lists).
  • Extended MarkdownRenderer with support for blockquotes (> text -- dim bar + italic), numbered lists (1. -- blue numbers), and strikethrough (~~text~~).
  • Fixed RenderToLines to skip entire markdown tables (previously only skipped the header row, leaving separator and data rows as raw text).

Testing

Added tests using a real-world health report as input (from this gist), asserting the complete rendered output with raw string literals. Also added targeted tests for blockquote, numbered list, and strikethrough rendering.

Updated AGENTS.md with an explicit "Assertion Style" section that prohibits Assert.Contains across all tests and mandates full Assert.Equal comparisons.

HealthCommand was displaying health report content using Markup.Escape(),
showing raw markdown syntax to users. Now uses MarkdownRenderer.ToMarkupLines()
to render headers, bold, bullets, tables, etc. with proper Spectre.Console
formatting -- matching what AnalysisBrowser already does.

Changes:
- HealthCommand: ShowStatePage and ShowRunDetail use MarkdownRenderer
- MarkdownRenderer: Add blockquote, numbered list, and strikethrough support
- MarkdownRenderer: Fix RenderToLines to skip entire tables (not just header)
- Tests: Full raw-string-literal assertions for all new rendering behavior
- AGENTS.md: Add explicit 'no Assert.Contains' rule for all tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jaredpar
jaredpar merged commit 5b20716 into main Jun 23, 2026
1 check passed
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