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
feat(requests): add compact view, sorting and user filtering to requests list (#5424)
* feat(requests): add compact view, sorting and user filtering to requests list
Addresses the feedback in #5422 about the card redesign losing the old
table's capabilities:
- Compact (table) view for movies, TV and albums with a cards/compact
toggle persisted per media type; column headers are click-to-sort
- Sort controls (field dropdown + direction toggle) in both views,
persisted and applied server-side
- Requested-by user filter for admins/power users, applied server-side
via a new optional requestedBy query parameter on the v2 request
list endpoints
- Fix music request sorting: ascending order previously always sorted
by requested date, and the sort property was resolved against the
wrong entity type
* chore: relax global.json SDK rollForward to latestMajor
Allows building with any newer installed .NET SDK when the pinned
8.0.419 feature band is not available locally.
* style(requests): redesign toolbar with cohesive pill controls
Replace the stock Material outline selects with custom pill-style
menu buttons that match the existing filter chips and dark theme:
- User filter, sort field and page size become rounded pill buttons
backed by mat-menu, with icons, carets and an accent highlight
when a user filter is active
- Sort field + direction joined into a single segmented pill group
- View toggle restyled as a rounded segmented control
- Dark dropdown panels with an accent check on the active option
- Select All wrapped in a matching pill
* style(requests): align Select All with the pill toolbar design
Replace the raw Material checkbox in the toolbar with a pill toggle
button matching the other controls. The icon reflects selection state
(empty square / minus for partial / check for all) and the pill lights
up in the accent colour while anything is selected.
* fix: address CodeRabbit review — safer SDK roll-forward and stylelint block disable
- global.json: revert rollForward from latestMajor to latestMinor so the
build stays within .NET 8 rather than potentially picking up .NET 9/10
- _shared-card-grid.scss: replace stylelint-disable-next-line with a
block-style disable/enable pair so both ::ng-deep selectors in the
comma-separated rule are suppressed
* fix(engines): address self-review findings — auth, null-ref, and double-query bugs
- FilterByRequestedUser: add isAdmin guard so only admins/power-users can
filter the request list by another user's ID; unauthenticated or
non-admin callers receive the full (or HideRequestsUsers-scoped) list
unchanged
- Add HideResult.IsAdmin flag set by HideFromOtherUsers so the engine
methods can pass the caller's privilege level without an extra
IsInRole call
- Fix NullReferenceException in all six sort blocks: extend the
sortProperty.Contains('.') guard to also cover prop == null, which
occurs when the client sends an unrecognised property name
- Fix double DB round-trip in MovieRequestEngine.GetRequestsByStatus:
sort the already-materialised 'requests' list instead of re-issuing
allRequests.ToList(), which was a redundant second query
* perf(engines): push ORDER BY to DB; fix TV paginator total after DistinctBy
Movies and Music:
- Replace TypeDescriptor reflection sort with static ApplySortMovies /
ApplySortAlbums helpers that build typed IQueryable expressions, so
ORDER BY + LIMIT/OFFSET execute server-side instead of loading the
full table into memory first
- Remove System.ComponentModel import (TypeDescriptor no longer used)
TV (ChildRequests already loaded in-memory due to FilterChildren):
- Replace TypeDescriptor reflection sort with ApplySortTv switch
expression (same semantics, no reflection overhead)
- Move total = allRequests.Count to AFTER DistinctBy in all three
GetRequests / GetRequestsByStatus / GetUnavailableRequests methods;
previously total was computed before de-duplication so the paginator
showed more pages than actually existed
* test: fix IAsyncQueryProvider failures and restore sort-by-id case
- MovieRequestEngineTests: replace movies.AsQueryable() with
movies.AsQueryable().BuildMock() on all GetWithUser() setups so that
CountAsync / ToListAsync have an IAsyncQueryProvider (required after
the engine methods were updated to use EF async operators)
- Add "id" branch to ApplySortMovies / ApplySortAlbums / ApplySortTv;
the test suite uses sortProperty="id" for deterministic ordering and
the TypeDescriptor-based approach handled it implicitly; the explicit
switch needs to be kept in sync
* fix(cypress): align TV grid element IDs with TMDB show ID for E2E tests
TV grid was using item.id (DB auto-increment PK) for element IDs but
Cypress tests identify rows by the TMDB show ID (externalProviderId).
Switch all card-grid ID bindings to item.parentRequest.externalProviderId
so selectors like #detailsButton60735 resolve correctly.
Also update the page object: requestsToDisplayDropdown now points to
#gridCountButton (renamed in redesign), and getRowCheckbox now uses
#adminSelectCheckbox to match the movie grid template.
https://claude.ai/code/session_01GcnVpVpeRah1KpH2g77oBr
0 commit comments