You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change the default landing page after login and OIDC callback from /dashboard to the new /all-books route to reflect updated UX/navigation.
Replace client-side aggregation of filter options with server-provided options to improve performance and correctness for the book filter UI.
Improve filter UI behavior by ensuring stable sorting, proper virtual scroll sizing, and auto-expanding a sensible default panel when the filter panel becomes visible.
Description
Updated post-login redirects in OidcCallbackComponent, LoginComponent, and setup redirect guards/specs to navigate to /all-books instead of /dashboard and adjusted related spec expectations (oidc-callback.component.ts, login.component.ts, setup-redirect.guard.spec.ts, setup-guards.spec.ts, login.component.spec.ts, oidc-callback.component.spec.ts).
Reworked BookFilterService to build cached filterSignals from AppBooksApiService and Angular Signal/computed APIs instead of computing filters from the local BookService, and added helpers serverOptionsToFilters, countedToFilters, and rangedFilters to convert server options into Filter[] structures.
Updated BookFilterComponent to sort visible filter types alphabetically, provide getSortedFilters() for stable locale-aware ordering, switch the template to iterate over sorted filters and compute virtual scroll height from that sorted list, and added an auto-expand effect (wasFilterVisible, autoExpandVisiblePanels) and getAutoExpandedPanels() to set sensible default expanded panels.
Removed older aggregation/streaming code paths and adjusted imports and types to align with server-driven filter option shapes (e.g. AppFilterOptions, LanguageOption, range constants, and READ_STATUS_LABELS).
Testing
Updated and ran unit tests covering the login flow and OIDC callback (oidc-callback.component.spec.ts and login.component.spec.ts) and the setup redirect guards (setup-redirect.guard.spec.ts and setup-guards.spec.ts), and the spec expectations were updated to assert navigation to /all-books where applicable.
Ran the frontend unit test suite for modified components and services, and all updated tests passed.
buildFilterSignals() now manually enumerates filter keys, but this block only wires amazonRating, goodreadsRating, and hardcoverRating; it never creates signals for lubimyczytacRating, ranobedbRating, or audibleRating. Those types are still part of FilterType and DEFAULT_VISIBLE_FILTERS, so they silently disappear from visibleFilterTypes() and users can no longer select them in the sidebar. Please add computed signals for all three using the corresponding AppBooksApiService option signals.
Re-run default panel expansion after options arrive
This effect marks wasFilterVisible as true on the first visible render even when filter data has not loaded yet. In the common case where the sidebar is already visible and category options arrive asynchronously, getAutoExpandedPanels() initially returns [], and later updates no longer call expandedPanels.set(...) because of the wasFilterVisible guard. The result is that the default panel never auto-expands unless the user hides and re-shows the sidebar.
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
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
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.
Motivation
/dashboardto the new/all-booksroute to reflect updated UX/navigation.Description
OidcCallbackComponent,LoginComponent, and setup redirect guards/specs to navigate to/all-booksinstead of/dashboardand adjusted related spec expectations (oidc-callback.component.ts,login.component.ts,setup-redirect.guard.spec.ts,setup-guards.spec.ts,login.component.spec.ts,oidc-callback.component.spec.ts).BookFilterServiceto build cachedfilterSignalsfromAppBooksApiServiceand AngularSignal/computedAPIs instead of computing filters from the localBookService, and added helpersserverOptionsToFilters,countedToFilters, andrangedFiltersto convert server options intoFilter[]structures.BookFilterComponentto sort visible filter types alphabetically, providegetSortedFilters()for stable locale-aware ordering, switch the template to iterate over sorted filters and compute virtual scroll height from that sorted list, and added an auto-expand effect (wasFilterVisible,autoExpandVisiblePanels) andgetAutoExpandedPanels()to set sensible default expanded panels.AppFilterOptions,LanguageOption, range constants, andREAD_STATUS_LABELS).Testing
oidc-callback.component.spec.tsandlogin.component.spec.ts) and the setup redirect guards (setup-redirect.guard.spec.tsandsetup-guards.spec.ts), and the spec expectations were updated to assert navigation to/all-bookswhere applicable.Codex Task