feat(demo): scaffold Avalonia demo shell#34
Conversation
|
Caution Review failedThe pull request is closed. ✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (23)
Comment |
There was a problem hiding this comment.
Pull Request Overview
This PR scaffolds an Avalonia-based demo application for the xBase library with a ReactiveUI architecture. The demo is structured as multiple projects covering domain, infrastructure, diagnostics, and the main Avalonia host application.
- Scaffolds complete demo solution with domain models for catalog browsing and table paging
- Implements basic services with placeholder functionality for catalog discovery and telemetry
- Sets up Avalonia ReactiveUI shell with dependency injection container and service registration
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| xBase.sln | Adds four new demo projects to the solution structure |
| src/demo/tasks.md | Documents milestone roadmap for the Avalonia ReactiveUI implementation |
| src/demo/XBase.Demo.Domain/ | Domain models and service interfaces for catalog and paging functionality |
| src/demo/XBase.Demo.Infrastructure/ | Service implementations with file system catalog scanning and null page service |
| src/demo/XBase.Demo.Diagnostics/ | In-memory telemetry sink for capturing demo events |
| src/demo/XBase.Demo.App/ | Avalonia ReactiveUI application with shell view model and dependency injection setup |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| continue; | ||
| } | ||
|
|
||
| indexes.Add(new IndexModel(Path.GetFileName(indexFile), extension.ToUpperInvariant())); |
There was a problem hiding this comment.
The IndexModel constructor expects (Name, Expression, Order) but is being passed (fileName, extension). This creates an IndexModel where the 'Expression' parameter contains the file extension, which contradicts the parameter name's intent.
| indexes.Add(new IndexModel(Path.GetFileName(indexFile), extension.ToUpperInvariant())); | |
| indexes.Add(new IndexModel(Path.GetFileName(indexFile), string.Empty, 0)); |
| using var host = CreateHost(args); | ||
| host.Start(); | ||
|
|
||
| App.Services = host.Services; |
There was a problem hiding this comment.
App.Services is being set twice - once at line 18 and again in the AfterSetup callback at line 23. The first assignment appears redundant since the AfterSetup callback will override it.
| App.Services = host.Services; |
| try | ||
| { | ||
| return BuildAvaloniaApp() | ||
| .AfterSetup(_ => App.Services = host.Services) |
There was a problem hiding this comment.
App.Services is being set twice - once at line 18 and again in the AfterSetup callback at line 23. The first assignment appears redundant since the AfterSetup callback will override it.
Summary
Testing
dotnet build xBase.slnhttps://chatgpt.com/codex/tasks/task_e_68dd85158ac08322a0d07006ce108707
Summary by CodeRabbit