Repository navigation
fix(parser): namespaced Slide node types round-trip Notes/Background - #546
Merged
Merged
Conversation
… 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>
Contributor
There was a problem hiding this comment.
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 bothSlideand{namespace}/Slidenode type variants. - Updated parsing and serialization logic to use the new slide-type predicate for constructing
SlideContentand extractingnotes/backgroundfrom untypedJsonElementcontent. - Added tests covering namespaced slide parsing + round-trip, and namespaced slide serialization from
JsonElementwire 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.
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MarkdownFileParsercompared node types against the bareSlideNodeType.NodeType("Slide") only. The Slides store plugin ships slides asSlides/Slide, so those files:MarkdownContenton git import (Notes/Background discarded — the live memex-cloud Training slides showMarkdownContenttoday), andSerializefell through its SlideContent/JsonElement cases and destroyed theNotes:/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}/Slidevariant, used at both sites (Parse content construction + Serialize JsonElement extraction). New tests pin the namespaced.mdround-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 -warnaserroron MeshWeaver.Hosting + Content.Test green;MarkdownFileParserTestsuite green.🤖 Generated with Claude Code