Repository navigation
Deck: default to nodeType:Slide scope:subtree; parser understands [path1, path2, …] - #460
Merged
Merged
Conversation
…ds [path1, path2, …] A Deck whose slides are simply its children — no hardcoded Slides manifest — rendered "This deck has no slides yet" even though the slide nodes exist. The data was never corrupt (the manifest, when present, deserializes fine); the deck just had no way to find its slides without an explicit array. Two changes, both test-first: 1. QueryParser recognizes an explicit ORDERED path list `[a, b, c]` and populates the existing ParsedQuery.Paths (order-preserving), so GetQuery / IMeshService.Query resolve exactly those nodes in that order — the "alternatively specify the exact slides" surface, the array form of path:a|b|c. Tests: Parse_BracketList_PopulatesOrderedPaths, Parse_BracketList_SingleEntry. 2. DeckLayoutAreas: when a deck carries no explicit manifest, its slide set DEFAULTS to the live query `nodeType:Slide scope:subtree` under the deck path, ordered by MeshNode.Order — a deck can be just "a folder of slides", no hardcoded array. An explicit manifest still rules when present. Test: DeckPresent_NoManifest_DefaultsToSubtreeSlideQuery_InOrder (was red — deck with two child slides and no manifest now presents them in Order). Verified: QueryParserTests 79/79, DeckLayoutAreaTest 6/6, SlideLayoutAreaTest 3/3; full solution builds Release -warnaserror. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes Deck rendering when no explicit slide manifest is present, and extends the query language with an ordered “explicit path list” form to support order-sensitive consumers.
Changes:
- Added whole-query bracket list parsing (
[path1, path2, ...]) that populatesParsedQuery.Pathsin order. - Updated Deck slide resolution to fall back to a live
nodeType:Slide scope:subtreequery under the deck path (ordered byMeshNode.Order) whenDeckContent.Slidesis empty. - Added tests covering bracket-list parsing and the “no-manifest deck defaults to subtree slides” behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/MeshWeaver.Query.Test/QueryParserTests.cs | Adds coverage for the new bracket-list query syntax and its ordered Paths output. |
| test/MeshWeaver.Hosting.Monolith.Test/DeckLayoutAreaTest.cs | Adds a regression test proving decks without a manifest still present child slides in Order. |
| src/MeshWeaver.Mesh.Contract/Query/QueryParser.cs | Implements whole-query bracket-list parsing that maps to ParsedQuery.Paths. |
| src/MeshWeaver.Graph/DeckLayoutAreas.cs | Implements default slide discovery via subtree query when the deck has no explicit manifest. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+32
to
+33
| if (TryParseBracketPathList(query, out var listPaths)) | ||
| return ParsedQuery.Empty with { Paths = listPaths, Path = listPaths[0] }; |
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
Contributor
This was referenced Aug 13, 2026
Merged
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.
The report
A deck rendered "This deck has no slides yet" even though its slide nodes exist. I first mis-diagnosed this as a
ContentAs/JsonElementdeserialization bug and wrote a hack — that was wrong (reverted): the deck's manifest deserializes fine, and the data was never corrupt. The real gap: a deck whose slides are simply its children had no way to find them without a hardcoded array.Two changes, both test-first (red test → implement → green):
1. Query parser understands
[path1, path2, …]An explicit ordered path list is now a recognized query form, populating the existing
ParsedQuery.Pathsorder-preserving — soGetQuery/IMeshService.Queryresolve exactly those nodes in that order. It's the array surface of the existingpath:a|b|calternation — the "alternatively, specify the exact slides in order" form.Tests:
Parse_BracketList_PopulatesOrderedPaths,Parse_BracketList_SingleEntry.2. Deck defaults to
nodeType:Slide scope:subtreeWhen a deck carries no explicit manifest, its slide set now defaults to the live query
nodeType:Slide scope:subtreeunder the deck path, ordered byMeshNode.Order. A deck can be just "a folder of slides" — no hardcoded array required. An explicit manifest still rules when present.Test:
DeckPresent_NoManifest_DefaultsToSubtreeSlideQuery_InOrder— a deck with two child slides and no manifest was red ("no slides yet"), now presents them in Order.Verification
QueryParserTests79/79,DeckLayoutAreaTest6/6,SlideLayoutAreaTest3/3; full solution builds Release-warnaserror.🤖 Generated with Claude Code