Skip to content

[Bug]: Markdown file preview renders YAML frontmatter as a setext heading #23704

Closed

Description

@evilkels

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Open a project that has a Markdown file starting with YAML frontmatter, for example:

    ---
    type: Task
    title: Decide the joke source and Draft safety limits
    description: Settle where Jokes come from and what a Draft may never contain.
    status: draft
    task_status: ready
    blocked_by: []
    created: 2026-10-22
    ---
    
    # Decide the joke source and Draft safety limits
  2. Open that file from the Files panel so it shows in the rendered Markdown preview.

Expected behavior

The frontmatter block is recognised as metadata. It is either hidden or shown as a small key/value table, the way GitHub, GitLab and Obsidian render it. The document starts at the # heading.

Actual behavior

The frontmatter is rendered as ordinary Markdown:

  • The opening --- becomes a horizontal rule.
  • All the YAML lines collapse into one paragraph (type: Task title: … created: 2026-10-22).
  • The closing --- under that paragraph turns it into a setext H2.

So every file with frontmatter opens with a large bold run-on "heading" made of its metadata.

Impact

Minor bug or occasional failure

Version or commit

T3 Code (Beta) desktop 0.1.0

Environment

macOS 27 (Darwin 27.0.0), T3 Code desktop app

Workaround

Switch the file tab to source view, or open the file in an external editor.

Context

We keep project knowledge as Markdown files with YAML frontmatter, using the OKF v0.2 convention: every page carries type, title, description and status, and Task pages also carry Board fields such as task_status and blocked_by. Agents and humans read these files side by side in T3 Code. Frontmatter is also standard in Obsidian vaults, static-site generators and agent skill files (SKILL.md), so most Markdown in agent-driven repositories hits this.

A likely fix: enable frontmatter parsing in the Markdown preview (for example remark-frontmatter, if the preview uses remark/react-markdown), then hide the block or render it as a compact properties table.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions