fix: deal with GitLab graphql timeouts with smaller faster queries

Problem

Listing all Renovate MRs (when no single project is selected) almost always timed out, even when only a handful of rows were requested. Two separate causes:

  1. Query complexity — the old all-projects query fetched the heavy per-MR fields (headPipeline, labels, approved, detailedStatus, …) across currentUser.reviewRequestedMergeRequests for every project at once, blowing past GitLab's GraphQL complexity/timeout limits.
  2. Label join — filtering with labelName: "maintenance::dependency" forced an expensive label join on the GitLab side that timed out regardless of page size.

Changes to avoid timeouts

  • Compose the list per-project instead of one big query. When no project filter is set, we now:

    1. Discover which projects have open Renovate MRs via a lightweight query that selects only project { fullPath } + labels (no heavy nested fields), paged client-side.
    2. Iterate those projects sequentially, running the proven per-project query and accumulating MRs until n (the page size) rows are collected, or all projects are exhausted. Each query is bounded to a single project, so it stays well under the complexity limit.
  • Drop labelName from both queries; filter the maintenance::dependency label client-side. This removes the slow server-side label join. Filtering is done in JS via hasRenovateLabel(), and the per-project fetch pages within each project (bounded by MAX_PAGES_PER_PROJECT) so matching MRs sitting below non-Renovate ones aren't missed.

  • The single-project filter path also filters by label client-side, since that query is no longer label-scoped either.

Behaviour notes

  • The composed list is grouped by project (each project's MRs in UPDATED_DESC), not globally sorted across projects.
  • n (page size) is a hard cap in compose mode; Reload re-runs composition from the top (cross-project Next/Previous is disabled).

Also included

  • Configure mise to load env vars/secrets from the gitignored .env file.

Verification

  • npm run build passes (type-check + lint).
  • Manual: load with no project filter and confirm rows populate without a timeout at various page sizes.
Edited by Andrew Newdigate

Merge request reports

Loading
Loading