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
{{ message }}
Repository navigation
perf(platform): search projects on the server in the settings pickers #5205
Split from #5194 (itself split from #5156, item 4 of 7 of #4708).
What the screens do now
The change for #5194 has the chat pickers, the breadcrumb's project switcher and Home read Home's page of projects (GET /api/app/projects/sidebar, 100, the pinned first) and, while that page does not hold every project, the server's name search for what is typed (GET /api/app/projects/search, 20 at most), with a selected project past the page read by id (GET /api/app/projects/:id). The rules they share are in services/platform/app/features/projects/lib/project-choices.ts; the projects feature's hook is useProjectChoices (app/features/projects/hooks/queries.ts).
Three settings screens still read every project the caller can read, through useProjects (projects/queries:listProjects, GET /api/app/projects, no LIMIT). Paths under services/platform/app/:
the budget editor's project scope (features/settings/governance/components/budget-editor.tsx);
the API key's owner field (features/settings/api-keys/components/api-key-owner-field.tsx);
the metrics scope (routes/dashboard/$id/settings/metrics/projects.tsx).
What to do
Each picker offers useProjectChoices for what is typed, with the selected project resolved by id, instead of useProjects.
Once these and the automations screens (perf(platform): search projects on the server in the automations pickers #5204) no longer call useProjects, retire the app's whole-list read: useProjects, the projects/queries:listProjects contract entry and its adapter row in app/lib/backend/projects.ts. GET /api/app/projects itself stays for the CLI (tools/cli/src/lib/deployment/projects.ts and its smoke check).
Done means:
no settings screen loads every project the caller can read, and the app has no read left that does;
a project past Home's 100 can still be picked and shown;
tests cover a picker with more projects than one page holds.
Activity
perf(platform): search projects on the server in the pickers
perf(platform): search projects on the server in the pickers
perf(platform): search projects on the server in the pickers
perf(platform): search projects on the server in the pickers
perf(platform): search projects on the server in the pickers
perf(platform): search projects on the server in the pickers
perf(platform): search projects on the server in the pickers
test(ui): cover the metrics scope's search report
test(ui): cover the metrics scope's search report
docs(platform): point the manual layer at the settings pickers' reads
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the pickers
perf(platform): search projects on the server in the settings pickers
18 remaining items
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the pickers
perf(platform): search projects on the server in the settings pickers
perf(platform): search projects on the server in the pickers
perf(platform): search projects on the server in the settings pickers