Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements a major version upgrade to schema v2, introducing YAML frontmatter support for markdown files and migrating from Go's standard log package to structured logging with slog. The changes enable better metadata management and improve logging consistency across the application.
Key changes:
- Schema migration system enhanced to support incremental migrations with per-version schema file updates
- New frontmatter parsing and generation functionality with robust handling of edge cases
- Migration to structured logging using
slogwith configurable log levels
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/core/tree/frontmatter.go | New file implementing YAML frontmatter parsing, splitting, and building functions with heuristic detection |
| internal/core/tree/frontmatter_test.go | Comprehensive test coverage for frontmatter functionality including edge cases |
| internal/core/tree/tree_service.go | Enhanced migration system, added v2 migration for frontmatter backfill, migrated to slog |
| internal/core/tree/tree_service_test.go | New migration tests and updated existing tests for frontmatter support, translated German comments |
| internal/core/tree/page_store.go | Updated CRUD operations to include frontmatter in all file operations, new ReadPageRaw method |
| internal/core/tree/page_store_test.go | Updated test expectations to account for frontmatter in created files |
| internal/core/tree/schema.go | Bumped CurrentSchemaVersion from 1 to 2 |
| internal/core/tree/errors.go | Added ErrFrontmatterParse and ErrFileNotFound error types |
| cmd/leafwiki/main.go | Added structured logging setup with LOG_LEVEL environment variable support |
| go.mod | Added gopkg.in/yaml.v3 dependency for YAML parsing |
| go.sum | Updated with new yaml.v3 and transitive dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
117d9d1 to
56c871e
Compare
fa1b4e1 to
d13eecb
Compare
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.
No description provided.