BookShelfComponent.filteredBooks is a computed() that reads this.books() (a signal) plus three plain fields (sortCategory, sortLibrary, sortLangage). Changing a filter via tab click / sortByLanguage etc. mutates those plain fields only, so the computed is not invalidated and the card grid keeps showing the unfiltered list until something else updates books (e.g. a SignalR refresh).
Expected
Selecting a language/category/library tab should immediately narrow filteredBooks / the rendered cards.
Actual
Tab handlers set private string fields; filteredBooks() keeps returning the previous snapshot. Confirmed in unit tests (wave6 a4).
Fix sketch
Promote the three sort fields to signals (or a single filters signal) and read them inside the computed.
## Summary
`BookShelfComponent.filteredBooks` is a `computed()` that reads `this.books()` (a signal) plus three plain fields (`sortCategory`, `sortLibrary`, `sortLangage`). Changing a filter via tab click / `sortByLanguage` etc. mutates those plain fields only, so the computed is **not** invalidated and the card grid keeps showing the unfiltered list until something else updates `books` (e.g. a SignalR refresh).
## Expected
Selecting a language/category/library tab should immediately narrow `filteredBooks` / the rendered cards.
## Actual
Tab handlers set private string fields; `filteredBooks()` keeps returning the previous snapshot. Confirmed in unit tests (wave6 a4).
## Fix sketch
Promote the three sort fields to `signal`s (or a single `filters` signal) and read them inside the computed.
## Location
`projects/spikersoft/src/app/_components/book-shelf/book-shelf.component.ts`
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
BookShelfComponent.filteredBooksis acomputed()that readsthis.books()(a signal) plus three plain fields (sortCategory,sortLibrary,sortLangage). Changing a filter via tab click /sortByLanguageetc. mutates those plain fields only, so the computed is not invalidated and the card grid keeps showing the unfiltered list until something else updatesbooks(e.g. a SignalR refresh).Expected
Selecting a language/category/library tab should immediately narrow
filteredBooks/ the rendered cards.Actual
Tab handlers set private string fields;
filteredBooks()keeps returning the previous snapshot. Confirmed in unit tests (wave6 a4).Fix sketch
Promote the three sort fields to
signals (or a singlefilterssignal) and read them inside the computed.Location
projects/spikersoft/src/app/_components/book-shelf/book-shelf.component.tsFixed in
spikersoft-angularPR #823 (a0f0ccd9). Closing.