Expiriments with AvaloniaEdit and tracking document changes

This commit is contained in:
eelke 2025-08-30 19:41:10 +02:00
parent 29a141a971
commit 6325409d25
53 changed files with 643 additions and 627 deletions

51
.ai-guidelines.md Normal file
View file

@ -0,0 +1,51 @@
# pgLabII AI Assistant Guidelines
## Project Context
This is a .NET 8/C# 13 Avalonia cross-platform application for document management.
### Architecture Overview
- **Main Project**: pgLabII (Avalonia UI)
- **Platform Projects**: pgLabII.Desktop
- **Utility Project**: pgLabII.PgUtils
- **Core Components**: DocumentSession, DocumentSessionFactory, LocalDb
## Coding Standards
### C# Guidelines
- Use C# 13 features and modern .NET patterns
- Prefer primary constructors for dependency injection
- Use `var` for obvious types, explicit types for clarity
- Implement proper async/await patterns for I/O operations
- Use nullable reference types consistently
- Prefer "target-typed new"
- Prefer "list initializer" over new
### Avalonia-Specific
- Follow MVVM pattern strictly
- ViewModels should inherit from appropriate base classes
- Use ReactiveUI patterns where applicable
- Make use of annotations to generate bindable properties
- Implement proper data binding
- Consider cross-platform UI constraints
### Project Patterns
- Services should use dependency injection
- Use the DocumentSession pattern for data operations
- Integrate with LocalDb for persistence
- Implement proper error handling and logging
- Consider performance for document operations
- Use FluentResults.Result for expected errors
### Architecture Rules
- Keep platform-specific code in respective platform projects
- Shared business logic in main pgLabII project
- Utilities in pgLabII.PgUtils
- Follow clean architecture principles
## Code Review Focus Areas
1. Memory management for document operations
2. Cross-platform compatibility
3. Proper async patterns
4. Error handling and user feedback
5. Performance considerations for large documents
6. UI responsiveness