Skip to content

Avoid fetching all projects in the UI - #4449

Merged
r4victor merged 5 commits into
masterfrom
pr_ui_reduce_api_calls
Nov 2, 2026
Merged

r4victor merged 5 commits into
masterfrom
pr_ui_reduce_api_calls

Conversation

@r4victor

@r4victor r4victor commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

The UI requested up to 2000 visible projects, all projects for global admins, in places that need one project or none.

  • The tutorial panel and the GitHub login callback check whether the user has a project with projects/list {username, limit: 1}, so public projects the user hasn't joined no longer count as theirs.
  • The run launch project picker lists only projects the user owns or joined, so admins no longer see every project on the server there, while ?project_name= still preselects any project.
  • The no-fleet alert on the run and fleet lists uses projects/list_only_no_fleets alone instead of also listing all projects.
  • Drop the unused is_payment_method_attached billing info field and the commented-out "Edit payment method" code.
  • Add a TODO to limit job submissions returned by runs/get and a FIXME about run costs being underestimated with job_submissions_limit ([Bug]: Run cost is underestimated in the run list for runs with multiple job submissions #4448).

The field is unused since the edit payment method button was commented out. Remove the type field and the dead commented-out code.
The tutorial panel, GitHub login callback, Run launch project picker, and the no-fleet alerts on Runs and Fleets lists requested every visible project (all projects for admins, plus all public ones for members). Request only the current user's projects, with limit 1 for existence checks, and use list_only_no_fleets directly for the alerts.
@r4victor
r4victor merged commit 38846e5 into master Nov 2, 2026
29 checks passed
@r4victor
r4victor deleted the pr_ui_reduce_api_calls branch November 2, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant