fix: imaging DI lifetime + wizard scan-button consistency - #56
Merged
Conversation
IImageService and ITracingService were registered Singleton but depend on the scoped IDependencyPathResolver (-> scoped IConfigurationService), a captive dependency that aborts Dev startup via ValidateOnBuild. They are stateless per-call CLI wrappers consumed only by scoped Blazor pages, so Scoped is correct and matches every other resolver consumer. Tests/CI missed it because bUnit never builds the real container and the packaged app runs with scope validation off.
Both wizard Scan Network buttons now use btn-secondary + the bi-broadcast icon. Previously the Devices button was btn-secondary/bi-arrow-clockwise and the Cameras button was btn-primary/bi-broadcast, so the two steps looked inconsistent.
bilbospocketses
enabled auto-merge (squash)
June 12, 2026 18:11
bilbospocketses
added a commit
that referenced
this pull request
Jun 24, 2026
…eanup (Item 45) (#77) * fix(backend): audit MINOR cleanup #38/#40/#48/#54/#55/#56 + #39/#49 + imaging temp cleanup - #38 clearing a device PIN deletes the secret row (was writing an empty plaintext setting) - #54 DeviceForm guards double-submit (disable + re-entrancy guard while a save is in flight) - #40 OperationLogger.GetDefaultBackupDirectory is pure (no directory-creation side effect) - #48 SubnetParser octet validation via byte.TryParse (was a regex + int-range pair) - #55 DependencyManagerService.BuildVersionedDownloadUrl honours dep.AssetPattern (was a hardcoded sqlite literal) - #56 remove dead appsettings ConnectionStrings:DefaultConnection (the live path comes from the resolver) - #39 clarifying comment on the AddTypedDeviceFieldsRemoveMetadata migration (renames, not removes; do not rename) - #49 collapse the no-op IsWindows?"go2rtc":"go2rtc" ternary - Item 45: MagicWand/ImageResize/FormatConverter implement IDisposable to delete their /temp web-copies on navigate-away; ImageResize/FormatConverter also replace the prior copy per conversion Tests +8 (SubnetParser edges, BuildVersionedDownloadUrl AssetPattern, OperationLogger purity, MagicWand no-accumulation + dispose-cleanup, DeviceForm double-submit). 690 green. * fix(backend): review polish — sqlite-host doc note (#55) + DeleteWebCopy nulls _downloadUrl (Item 45) Whole-branch review follow-ups (both Minor, no behavior change): - #55 BuildVersionedDownloadUrl: XML-doc note that the URL reconstruction is sqlite.org-scheme specific (AssetPattern generalises only the filename match), to prevent future misuse. - Item 45: ImageResize/FormatConverter DeleteWebCopy now also nulls _downloadUrl, matching MagicWand's cleanup helpers.
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
Two fixes from a dev session.
1. DI lifetime bug (the important one).
IImageServiceandITracingServicewere registered Singleton but depend on the scopedIDependencyPathResolver- a captive dependency that abortsdotnet runin Development viaValidateOnBuild(exit 82). It slipped past 444 green tests + CI because bUnit never builds the real container and the packaged app runs with scope validation off. Both services are stateless per-call CLI wrappers consumed only by scoped Blazor pages, so Scoped is correct and matches every other resolver consumer.2. Wizard button consistency. The setup wizard's Devices and Cameras "Scan Network" buttons looked completely different (btn-secondary/refresh-icon vs btn-primary/broadcast-icon). Both now use btn-secondary + the broadcast icon.
Test plan
dotnet runstarts clean in Development (was exit 82)dotnet testgreen (444, 0 failed)