Skip to content

Fix Docs YAML frontmatter parsing - #868

Closed
amadad wants to merge 2 commits into
ymichael:mainfrom
amadad:fix/docs-yaml-frontmatter
Closed

Fix Docs YAML frontmatter parsing#868
amadad wants to merge 2 commits into
ymichael:mainfrom
amadad:fix/docs-yaml-frontmatter

Conversation

@amadad

@amadad amadad commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • parse fenced YAML frontmatter through one shared Docs boundary
  • use a string frontmatter title (or the document H1) for navigation and mentions
  • keep frontmatter out of the rich editor and previews while preserving it byte-for-byte on save
  • keep frontmatter-managed filenames stable instead of auto-renaming them

Problem

Docs previously derived a note title from the first raw Markdown line and passed the whole file to Tiptap. Wiki pages therefore appeared as repeated --- entries, rendered metadata as document content, and risked rewriting frontmatter after an edit.

Verification

  • pnpm exec turbo run test --filter=bb-plugin-simple-notes --force — 46 passed
  • pnpm exec turbo run typecheck --filter=bb-plugin-simple-notes --force — passed
  • pnpm exec turbo run build --filter=bb-app --force — passed
  • pnpm exec turbo run smoke:tarball --filter=bb-app --force — passed
  • exercised against a 433-document Markdown vault — zero delimiter-derived titles

@SawyerHood

Copy link
Copy Markdown
Collaborator

Superseded by #875.

Thanks for this — the change is real and it's in. I reviewed it against a local checkout and found four issues — the biggest being that any text between two --- lines was treated as frontmatter, so a document opening with a thematic break had its first section hidden from the editor, so rather than round-trip here I folded the fix into #875 alongside the other three open contributor PRs (#865, #868, #869, #870).

Your commits are preserved on that branch with your original authorship, and the follow-up commit credits you as co-author. The full reasoning and the live QA evidence are in the #875 description.

Closing this one in favour of #875.

@SawyerHood SawyerHood closed this Jul 27, 2026
SawyerHood added a commit that referenced this pull request Jul 27, 2026
Supersedes #865, #868, #869, and #870. Each was reviewed against a local checkout, found defective, and fixed; this branch carries the original contributor commits plus one follow-up commit per PR.

- #868 Docs YAML frontmatter — frontmatter is only recognised when the fenced block parses to a YAML mapping, so a document opening with a thematic break is no longer hidden; the blank line after frontmatter survives a save; rename gates on the parsed title; only a title-matching heading is dropped from the preview.
- #869 remark-directive colons — rewrite narrowed to text directives, containers left on the previous path, literal merged into an adjacent text node, plus a regression test for "Meeting at 9:30 and 10:45 today."
- #865 Project machine picker — the single-machine gate counts connected machines, a loading host list is not treated as single-machine, the all-offline state blocks submit, and the target host is a required parameter.
- #870 Skill dedup logs — the injected-skills test logger captures debug so the three precedence assertions work against the demoted level.

Verified with the full app, server, and docs-plugin suites plus a live QA pass against a running dev instance.

Co-authored-by: Ali Madad <ali@scty.org>
Co-authored-by: Bhuvan Singla <bhuvansingla2000@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

2 participants