feat(filaments): add spool-count column with sort/filter support#865
Draft
akira69 wants to merge 5 commits intoDonkie:masterfrom
Draft
feat(filaments): add spool-count column with sort/filter support#865akira69 wants to merge 5 commits intoDonkie:masterfrom
akira69 wants to merge 5 commits intoDonkie:masterfrom
Conversation
22 tasks
9d8ae57 to
0b28fca
Compare
0b28fca to
1be3756
Compare
99f3c44 to
b5613ff
Compare
b5613ff to
9938104
Compare
12 tasks
Open
- Use direct assignment instead of setattr() for spool_count attribute - Add noqa override for C901 complexity in find() to match pattern in spool.py - Condense multiline SQL subquery expression
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
This PR hardens filament
spool_countsupport so the filaments list can use it as a reliable inventory signal instead of a one-off display field.Why
The useful part of
spool_countis not just rendering a number. It needs to stay coherent across list queries, numeric filter semantics, spool relationship changes, and adjacent PRs that touch the same query plumbing.Hardening In This PR
Backend
spool_countas a first-class sortable and filterable field.spool_countpopulated on list, get, and update paths instead of leaving event payloads to drift tonullor an implied0.0, without needing empty-string semantics.spool.filament_idindex migration remains in scope to keep count lookups responsive.Frontend
spool_countas a sortable, filterable numeric column.0as the real empty-state count rather than surfacing the generic""option.0for safety, but the backend hydration path is now intended to keep that fallback from masking stale data.Screenshots
Filament list with new
Spool Countcolumn visible. UI enabled to Hide/ShowSpool Countcolumn.Sort by
Spool Count(asc/desc).Filter dropdown for
Spool Countvalues (without"<empty>")Testing Status
Targeted integration coverage was added for:
spool_countspool_count=0spool_countGET /api/v1/filament/spool-countTesting TODO
spool_countget/find/filter/sort/distinct-value cases.Scope Boundary
This PR stays limited to spool-count correctness, query behavior, and integration hardening for the filament list path.
Manufacturer-level count columns and other list-query UX work remain out of scope.
Issues
Merge Notes
This branch still shares nearby query-plumbing touchpoints with adjacent filament-list PRs such as
#858and#862, so rebase/conflict cleanup may still be needed depending on merge order.