Skip to content

Annotate: frontmatter card shows wrong values when the YAML has nested keys #1485

Description

@JaeyeongYang

What happened?

I run plannotator annotate on OKF-based documents before committing them. Their frontmatter holds nested provenance metadata: who generated the document, who verified it, and which sources back it. The frontmatter card at the top of the annotate view flattens that structure, so child keys from different parents end up next to each other under the wrong names.

Example document:

---
type: Fact
title: Markdown code fences
tags:
  - markdown
  - commonmark
status: stable
generated:
  by: claude-code/claude-fable-5-1
  at: 2026-09-02T12:05:02+09:00
verified:
  - by: human:jaeyeong.yang
    at: 2026-09-02T12:11:00+09:00
sources:
  - id: commonmark-fences
    resource: https://spec.commonmark.org/0.31.2/#fenced-code-blocks
  - id: rumdl
    resource: https://github.com/rvben/rumdl
---

What the card shows:

Image

I expected nested mappings to stay together: generated as a group with its own by and at, and each sources or verified item as one entry with its fields. If nested rendering is out of scope, showing only the top-level keys and leaving the nested part as raw text would still be better than merging child keys upward.

The card is what I read to decide whether a document is ready: is verified filled in, by whom, when, and do the sources cover the claims. Right now it answers those questions wrongly while looking complete, so I end up scrolling to the raw YAML anyway. Any frontmatter with a sub-map such as author: or params: gets the same treatment.

Related: #43 (frontmatter card), #1101 (block scalars). Neither mentions nested keys.

Plannotator version

plannotator 0.27.12

OS

macOS

Agent

Claude Code

Where did it happen?

Annotate

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions