Skip to content

fix(parser): namespaced Slide node types round-trip Notes/Background - #546

Merged
rbuergi merged 1 commit into
mainfrom
fix/namespaced-slide-frontmatter
Jul 19, 2026
Merged

rbuergi merged 1 commit into
mainfrom
fix/namespaced-slide-frontmatter

Conversation

@rbuergi

@rbuergi rbuergi commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

MarkdownFileParser compared node types against the bare SlideNodeType.NodeType ("Slide") only. The Slides store plugin ships slides as Slides/Slide, so those files:

  1. degraded to MarkdownContent on git import (Notes/Background discarded — the live memex-cloud Training slides show MarkdownContent today), and
  2. on the next mesh→repo export, Serialize fell through its SlideContent/JsonElement cases and destroyed the Notes:/Background: frontmatter in git — the 2026-07-18 education bot commit (07c4d90) stripped 86 lines (64 presenter notes, all 22 stage backgrounds) exactly this way.

Fix: IsSlideNodeType() accepts the bare constant and any {ns}/Slide variant, used at both sites (Parse content construction + Serialize JsonElement extraction). New tests pin the namespaced .md round-trip and the untyped JsonElement wire form.

Content restoration (the stripped lines, from 07c4d90^) is education PR Systemorph/education#18 — this parser fix must deploy before the next mesh→repo export of that course, or the export strips them again.

Local gate: dotnet build -c Release -warnaserror on MeshWeaver.Hosting + Content.Test green; MarkdownFileParserTest suite green.

🤖 Generated with Claude Code

… round-trip

MarkdownFileParser matched only the bare SlideNodeType constant
('Slide'), so a plugin-namespaced slide ('Slides/Slide' from the Slides
store plugin) degraded to MarkdownContent on import — dropping
Notes/Background — and Serialize then had nothing to re-emit. The
2026-07-18 education-repo bot export destroyed 86 frontmatter lines
(64 presenter notes, 22 stage backgrounds) exactly this way.

IsSlideNodeType() accepts the bare constant and any '{ns}/Slide'
variant at both sites (Parse content construction, Serialize
JsonElement extraction). Tests pin the namespaced .md round-trip and
the untyped JsonElement wire form.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 19, 2026 10:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes .md import/export round-tripping for slide nodes whose NodeType is namespaced (e.g. Slides/Slide), ensuring SlideContent is preserved and Notes/Background frontmatter is not lost during git import/export.

Changes:

  • Introduced IsSlideNodeType() to recognize both Slide and {namespace}/Slide node type variants.
  • Updated parsing and serialization logic to use the new slide-type predicate for constructing SlideContent and extracting notes/background from untyped JsonElement content.
  • Added tests covering namespaced slide parsing + round-trip, and namespaced slide serialization from JsonElement wire form.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/MeshWeaver.Hosting/Persistence/Parsers/MarkdownFileParser.cs Recognizes namespaced slide node types in both parse and serialize paths to preserve SlideContent and slide frontmatter metadata.
test/MeshWeaver.Content.Test/MarkdownFileParserTest.cs Adds regression tests for namespaced slide .md round-trip and namespaced slide serialization from untyped JSON.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 3)

   11 files  ±0     11 suites  ±0   4m 14s ⏱️ -1s
1 065 tests ±0  1 065 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 120 runs  ±0  1 120 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 06e4e7e. ± Comparison against base commit e73b7cc.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 4)

2 223 tests  ±0   2 035 ✅ ±0   5m 36s ⏱️ ±0s
   12 suites ±0     188 💤 ±0 
   12 files   ±0       0 ❌ ±0 

Results for commit 06e4e7e. ± Comparison against base commit e73b7cc.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 0)

904 tests  ±0   898 ✅ ±0   4m 8s ⏱️ -26s
  4 suites ±0     6 💤 ±0 
  4 files   ±0     0 ❌ ±0 

Results for commit 06e4e7e. ± Comparison against base commit e73b7cc.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 1)

715 tests  ±0   611 ✅ ±0   5m 57s ⏱️ +24s
 10 suites ±0   104 💤 ±0 
 10 files   ±0     0 ❌ ±0 

Results for commit 06e4e7e. ± Comparison against base commit e73b7cc.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 2)

1 297 tests  ±0   1 293 ✅ ±0   5m 49s ⏱️ +50s
   11 suites ±0       4 💤 ±0 
   11 files   ±0       0 ❌ ±0 

Results for commit 06e4e7e. ± Comparison against base commit e73b7cc.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (shard 5)

790 tests  +2   789 ✅ +2   5m 42s ⏱️ -21s
 12 suites ±0     1 💤 ±0 
 12 files   ±0     0 ❌ ±0 

Results for commit 06e4e7e. ± Comparison against base commit e73b7cc.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results

   60 files  ±0     60 suites  ±0   31m 28s ⏱️ +26s
6 994 tests +2  6 691 ✅ +2  303 💤 ±0  0 ❌ ±0 
7 049 runs  +2  6 746 ✅ +2  303 💤 ±0  0 ❌ ±0 

Results for commit 06e4e7e. ± Comparison against base commit e73b7cc.

@rbuergi
rbuergi merged commit dcafb37 into main Jul 19, 2026
16 checks passed
@rbuergi
rbuergi deleted the fix/namespaced-slide-frontmatter branch August 5, 2026 10:45
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