Repository navigation
Read Host health and inventory summaries without loading detail rows - #356
Merged
Merged
Conversation
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
Host health and the library snapshot now read the library ID, mode and device name directly. The snapshot counts printers in SQLite and counts active outbound loans using the same joins and eligibility rules as the detailed loan list. The snapshot still reads its inventory overview, optional Dashboard stock and counts in one read transaction.
The API regression exercises health plus the ordinary and Dashboard snapshots after injecting unreadable detail-only fields into printer, loan and client validation records. It checks normalized identity, legacy direction spelling, returned loans, deleted spools and the optional Dashboard projection.
Local comparison
Median elapsed time to construct the ordinary Host snapshot in the debug build, on the same synthetic SQLite database, with alternating implementations and 11 measured samples per implementation after warm-up. Excludes HTTP and rendering.
Verification
npm run verifynpm run check:public-readinesscargo test -p bambu-filament-manager host_health_and_summary_are_independent