fix(containers): show all matching containers in template builder dropdown (#30047) - #36475
Conversation
…pdown (#30047) getFiltered/getContainerByTitle sent the page size as `perPage`, but the REST endpoint reads `per_page`, so the size was ignored and the server returned its default of 10. Combined with a hardcoded maxOptions=10 in DotContainerOptionsDirective, the grouped container dropdown only ever showed the first 10 results with no way to reach the rest. Correct the query param and raise the fetch bound so all matches are shown. Refs: #30047 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Claude finished @dsilvam's task in 12m 59s —— View job Rollback-Safety Analysis
Verdict: ✅ Safe to Rollback The PR's actual changeset (3 files, +17/-14) is:
No database migration, no Elasticsearch mapping/reindex, no data model change, no backend REST/GraphQL contract change (the server already expected This does not match any category (C-1–C-4, H-1–H-8, M-1–M-4) in Label |
|
Tick the box to add this pull request to the merge queue (same as
|
Proposed Changes
DotContainersService.getFiltered()andgetContainerByTitle()to send the page size asper_page(the REST endpoint's actual query param) instead ofperPage. The mismatched name was silently ignored, so the server always fell back to its default page size of 10.DotContainerOptionsDirective.maxOptionsfrom 10 → 100 so the grouped container dropdown in the template builder shows all matching containers. The dropdown filters server-side as the user types, so this is the upper bound shown at once, not the total reachable.dot-containers.service.spec.tsURL assertions toper_page(they had been asserting the buggy URL).Root Cause
The template-builder "add container" dropdown (
p-select[dotContainerOptions]) only ever displayed the first 10 containers with no pagination or scroll-to-load. Two stacked defects: the ignoredperPageparam capped the server response at its default of 10, andmaxOptionswas hardcoded to 10 as well. Searching a term that matched more than 10 containers left the rest unreachable.Checklist
dot-containers.service.spec.ts;data-accessservice spec 15/15 anduidirective spec 2/2 pass)Additional Info
p-selecthas no clean server-side lazy-load-on-scroll, and it already filters server-side, so "show all (up to a generous bound, refine by typing)" is the appropriate fix for this control rather than infinite scroll.ContainerFactoryImpl.findContainers()capstotalResultsat ~500 via its counting loop — worth a follow-up ticket for Sites with very large container counts.Refs: #30047
🤖 Generated with Claude Code
This PR fixes: #30047