Render health reports as formatted markdown - #20
Merged
Conversation
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>
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.
Health reports were displaying raw markdown text (escaped via
Markup.Escape) instead of rendered formatting. Users saw literal**bold**,### headers, and> blockquotesin the dashboard instead of the rich Spectre.Console output that AnalysisBrowser already provides.Approach
HealthCommand.ShowStatePageandShowRunDetailnow useMarkdownRenderer.ToMarkupLines()to render content with proper formatting (headers, bold, bullets, tables, blockquotes, numbered lists).MarkdownRendererwith support for blockquotes (> text-- dim bar + italic), numbered lists (1.-- blue numbers), and strikethrough (~~text~~).RenderToLinesto 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.mdwith an explicit "Assertion Style" section that prohibitsAssert.Containsacross all tests and mandates fullAssert.Equalcomparisons.