Maintain or extend the NoteApp WPF desktop application in this repository. Use when Codex needs to add features, fix bugs, review code, explain architecture, or update documentation for the .NET 10, WPF, EF Core, and SQL Server codebase, especially around multi-block notes, encrypted notes, MVVM view-models, Material Design XAML views, functional domain models, repositories, mappings, or EF migrations.
Work from the real code and keep the existing architectural boundaries intact. Preserve the functional domain model, the multi-block note model, and the coordination between WPF views, view-models, services, repositories, mappings, entities, and migrations.
README.md for the high-level feature set and setup flow.references/codebase-map.md for the actual file map, change impact areas, and command caveats.plan.md.plan.md is partially stale: it still describes the older single-content-note model and does not capture the encryption changes that are present in the current code.
Domain/ pure and immutable.Option<T> and Result<T, AppError> for expected outcomes instead of exceptions for normal flow.NoteBlockDomain/Models/NoteContent.csSortOrder and keep repository and mapper ordering aligned.EncryptedContent and clear plaintext blocks in storage, then restore blocks through NoteService.UnlockNoteAsync.Domain/Models/Note.cs and Domain/Models/NoteContent.cs.Data/Entities/NoteEntity.cs and Data/Entities/NoteBlockEntity.cs.Services/Mapping/NoteMapper.cs.Data/Repositories/NoteRepository.cs search, persistence, and retrieval logic.ViewModels/NoteEditorViewModel.cs, Views/NoteEditorView.xaml, and any list/detail rendering.Migrations/ when persistence changes.Services/EncryptionService.cs, Services/NoteService.cs, and Data/Repositories/NoteRepository.cs together.ViewModels/NoteEditorViewModel.cs, ViewModels/MainViewModel.cs, Views/PasswordDialog.xaml, and Views/PasswordDialog.xaml.cs together.ViewModels/NoteListViewModel.cs and Data/Repositories/NoteRepository.cs.Services/SearchService.cs only if the task actually routes through it; current search calls also flow through NoteService.SearchAsync.Data/Repositories/TagRepository.cs and Data/Entities/NoteTagEntity.cs.App.xaml.cs first.ConnectionStrings:NoteDb intact unless the task explicitly changes configuration shape.dotnet build NoteApp.slnx from the repo root when package restore is available.DOTNET_CLI_HOME to a writable directory before dotnet commands in sandboxed environments.dotnet user-secrets set "ConnectionStrings:NoteDb" "..." from src/NoteApp before database operations.dotnet ef database update from src/NoteApp after migration changes.Read references/codebase-map.md before making non-trivial changes. It contains the current file map, command examples, and repo-specific caveats that are not obvious from the README alone.