Skip to content

Render Markdown panel content in the terminal #39

Description

@tnez

Problem

Text panels currently render plain wrapped text. For AI-generated summaries and docs-backed dashboards, Markdown is the natural interchange format, but the terminal output loses useful structure like headings, emphasis, code spans, and lists.

The desired behavior is closer to passing panel content through glow, but rendered natively inside hud rather than shelling out during UI rendering.

Proposed Shape

Add an explicit Markdown output protocol, likely:

[[panels]]
id = "briefing"
title = "Briefing"
command = "./scripts/briefing.md"
output = "markdown"

The parser boundary should convert Markdown once into typed renderable content. Rendering should consume typed lines/spans, not parse Markdown repeatedly.

Initial Markdown Scope

  • Headings
  • Paragraphs
  • Bulleted and numbered lists
  • Bold / italic / inline code
  • Fenced code blocks as plain styled blocks
  • Links rendered as readable text, with URL visible if useful

Out of scope initially:

  • Tables
  • Images
  • HTML
  • Deep CommonMark edge cases

Acceptance Criteria

  • Markdown panels render with useful terminal styling in dashboard and detail views.
  • Malformed or unsupported Markdown does not crash the app.
  • Plain text panels continue to behave unchanged.
  • Tests cover the Markdown parser boundary and representative rendering line/span output.

Notes

Potential parser: pulldown-cmark. Keep side effects at the command boundary; do not invoke glow from the renderer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions