Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
360795a
feat: YAML validation, NRE fix, Cookbook, and llms updates
RoboNET Mar 8, 2026
440a0a4
docs(cookbook): add CLI commands and image source recipes
RoboNET Mar 8, 2026
f75a7c5
refactor: unify resource loading through IResourceLoader chain
RoboNET Mar 8, 2026
1966698
fix(security): reject absolute paths in FileResourceLoader
RoboNET Mar 8, 2026
171be7b
docs: update resource loader documentation
RoboNET Mar 8, 2026
17c6321
docs: add ExprValue BytesValue unification design and implementation …
RoboNET Mar 8, 2026
09c6c41
feat: add BytesValue property to ExprValue
RoboNET Mar 8, 2026
e01ade5
feat: resolve BytesValue into ExprValue.Bytes in TemplateExpander
RoboNET Mar 8, 2026
1370ba0
refactor: ContentSourceResolver uses ExprValue.Bytes instead of TryRe…
RoboNET Mar 8, 2026
2a77f15
feat: load URI sources into ExprValue.Bytes during template expansion
RoboNET Mar 8, 2026
b9beeba
feat: PreloadImages uses ExprValue.Bytes, skips loader chain when byt…
RoboNET Mar 8, 2026
8ea8583
test: add BytesValue image integration tests
RoboNET Mar 8, 2026
fc61440
fix: prevent flaky cache tests by disabling parallel execution
RoboNET Mar 8, 2026
0524c6a
fix: address code review findings (security, error handling, consiste…
RoboNET Mar 8, 2026
a0de753
docs: add KnownProperties and test parallelism rules to checklists
RoboNET Mar 8, 2026
3977022
refactor: move element cloning into elements, eliminate sync expansio…
RoboNET Mar 8, 2026
47240db
chore: remove completed plans, known-issues, and TODO
RoboNET Mar 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ byte[] png = await render.Render(_templates["receipt"], data);
| Configuration | `FlexRenderBuilder`, `SkiaBuilder`, `FlexRenderOptions`, `ResourceLimits` |
| Abstractions | `IFlexRender`, `IResourceLoader` |
| Parsing | `TemplateParser`, `Template`, `CanvasSettings`, `TextElement`, `FlexElement`, `QrElement`, `BarcodeElement`, `ImageElement`, `SeparatorElement`, `TableElement`, `TableColumn`, `TableRow`, `EachElement`, `IfElement`, `ContentElement` |
| Template Engine | `TemplateExpander`, `TemplateProcessor`, `ExpressionLexer`, `ExpressionEvaluator`, `TemplateContext`, `InlineExpressionParser`, `InlineExpressionEvaluator`, `FilterRegistry`, `ITemplateFilter`, `ContentSourceResolver` |
| Template Engine | `TemplateExpander`, `TemplateProcessor`, `ExpressionLexer`, `ExpressionEvaluator`, `TemplateContext`, `InlineExpressionParser`, `InlineExpressionEvaluator`, `FilterRegistry`, `ITemplateFilter` |
| Layout | `LayoutEngine`, `LayoutNode`, `LayoutContext`, `LayoutSize`, `IntrinsicSize`, `Unit`, `UnitParser`, `MarginValue`, `MarginValues`, `PaddingParser.ParseMargin` |
| Rendering (Skia) | `SkiaRender` (IFlexRender impl), `SkiaRenderer`, `TextRenderer`, `FontManager`, `ColorParser`, `RotationHelper`, `BmpEncoder`, `BoxShadowParser`, `GradientParser` |
| Rendering (ImageSharp) | `ImageSharpRender` (IFlexRender impl), `ImageSharpRenderingEngine`, `ImageSharpTextRenderer`, `ImageSharpFontManager` |
| Providers | `IContentProvider<T,O>`, `QrProvider`, `BarcodeProvider`, `ImageProvider` |
| Loaders | `FileResourceLoader`, `Base64ResourceLoader`, `EmbeddedResourceLoader`, `HttpResourceLoader` |
| DI | `ServiceCollectionExtensions.AddFlexRender()` |
| Values | `TemplateValue` (abstract), `StringValue`, `NumberValue`, `BoolValue`, `NullValue`, `ArrayValue`, `ObjectValue` |
| Content Parsers | `IContentParser`, `IBinaryContentParser`, `ContentParserRegistry`, `ContentSourceResolver`, `NdcContentParser` |
| Content Parsers | `IContentParser`, `IBinaryContentParser`, `ContentParserRegistry`, `NdcContentParser` |

## Coding Conventions

Expand Down Expand Up @@ -409,9 +409,10 @@ var sb = new StringBuilder(estimatedCapacity);

1. Create AST model in `Parsing/Ast/` (sealed class extending `TemplateElement`)
2. Add parser function in `TemplateParser.cs` -- register in `_elementParsers` dictionary
3. Add flex-item property support via `switch` pattern matching in layout engine
4. Add rendering in `SkiaRenderer.RenderNode()` or create a provider
5. Write tests for each step
3. Register all YAML properties in `KnownProperties.cs` (for YAML validation and typo suggestions)
4. Add flex-item property support via `switch` pattern matching in layout engine
5. Add rendering in `SkiaRenderer.RenderNode()` or create a provider
6. Write tests for each step

### Add new template expression

Expand All @@ -424,9 +425,10 @@ var sb = new StringBuilder(estimatedCapacity);

1. Add property to `TemplateElement` in `Parsing/Ast/TemplateElement.cs`
2. Parse the property in `ElementParsers.cs`
3. Add the property to `TemplateElement.CopyBaseProperties()` (single source of truth in `Parsing/Ast/TemplateElement.cs`)
4. If the property contains expressions (e.g., `{{variable}}`), also add `ProcessExpression()` calls in the preprocessors
5. Write tests to verify the property survives the full rendering pipeline
3. Add the property name to `KnownProperties.cs` for the corresponding element type (YAML validation)
4. Add the property to `TemplateElement.CopyBaseProperties()` (single source of truth in `Parsing/Ast/TemplateElement.cs`)
5. If the property contains expressions (e.g., `{{variable}}`), also add `ProcessExpression()` calls in the preprocessors
6. Write tests to verify the property survives the full rendering pipeline

## Important Patterns

Expand Down
2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ When reviewing code changes, verify:
- [ ] Null checks via `ArgumentNullException.ThrowIfNull()` -- not manual `if (x == null)`
- [ ] Resource limits preserved -- never remove or weaken `MaxFileSize`, `MaxNestingDepth`, `MaxRenderDepth`
- [ ] New element types follow the switch-based dispatch pattern (not base class properties)
- [ ] New YAML properties registered in `KnownProperties.cs` for validation and typo suggestions
- [ ] Tests using shared static state use `[Collection(..., DisableParallelization = true)]`
- [ ] XML docs on all public API surface
- [ ] Snapshot tests added/updated for visual changes (`UPDATE_SNAPSHOTS=true`)
- [ ] Wiki pages updated -- if code changes affect public API, element properties, YAML syntax, builder methods, or CLI options, update the corresponding `docs/wiki/` pages
41 changes: 0 additions & 41 deletions docs/TODO.md

This file was deleted.

Loading