fix: correct DI and config wiring so app starts cleanly#51
Merged
Conversation
Tmds.DBus.Protocol 0.93.0 removed the Connection class that Avalonia.X11 12.0.0 compiled against, causing a TypeLoadException on Linux startup. Avalonia 12.0.5 ships with 0.92.0 which keeps the Connection API and still fixes GHSA-xrw6-gwf8-vvr9. Also bumps SkiaSharp from the preview (3.119.3-preview.1.1) to the stable 3.119.4 required by Avalonia.Skia 12.0.5. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tivation failure App.axaml.cs registered the logger as the concrete Serilog.Core.Logger type but ImportExportService takes Serilog.ILogger. Add an ILogger alias registration that resolves via the existing Logger singleton. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three bugs in App.axaml.cs:
- GetSection(nameof(ScrapeConfigModel)) used the alias name "ScrapeConfigModel"
not "ScrapeConfiguration", so IOptions<ScrapeConfiguration> always had null
sub-objects, causing NullReferenceException in DataSeed on first run
- GetConnectionString("Sqlite") looked in the root ConnectionStrings section
which is empty; connection string lives at
scrapeConfiguration:connectionStrings:sqlite in user secrets
- Serilog.ILogger never registered (only Serilog.Core.Logger was), so
ImportExportService failed to activate with InvalidOperationException
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
astar-development-jb
approved these changes
Jun 27, 2026
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.
Summary
Three bugs in
App.axaml.csthat together prevented the app from starting:Wrong config section name —
GetSection(nameof(ScrapeConfigModel))resolved to"ScrapeConfigModel"(the using-alias name), not"ScrapeConfiguration". SoIOptions<ScrapeConfiguration>.Valuehad all null sub-objects →NullReferenceExceptioninDataSeed.Seedon first run against an empty DB.Wrong connection string key —
GetConnectionString("Sqlite")reads from the rootConnectionStrings:Sqliteconfig key, which doesn't exist. The actual key isscrapeConfiguration:connectionStrings:sqlite(in user secrets). This causedUseSqlite(null)→ context was "configured" but with no path →IsConfigured = true→OnConfiguringfallback skipped → missing-table errors.Serilog.ILoggernot registered — Logger was registered only as the concreteSerilog.Core.Logger;ImportExportServicerequestsSerilog.ILogger. Added an alias registration so both resolve from the same singleton.Test plan
🤖 Generated with Claude Code