Skip to content

perf(platform): search projects on the server in the settings pickers #5205

Closed

Description

@tale-code-bot

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

  1. added
    agent-ready
    on Oct 31, 2026
  2. added
    perf
    on Oct 31, 2026
  3. added a commit that references this issue on Nov 2, 2026
    07c3f63
  4. 18 remaining items

  5. added 11 commits that reference this issue on Nov 4, 2026
    ac7af1d
    e3c6163
    8c8871c
    4911062
    c2922cc
    b7e7b37
    f3d823d
    68397b4
    93ffa3e
    5a9abcc
    6e2f39c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyperf

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions