Skip to content

perf(monitors): Batch issue stream detector fetches on Monitors list#116794

Merged
shashjar merged 1 commit into
masterfrom
shashjar/batch-issue-stream-detector-fetches-on-monitors-list
Jun 3, 2026
Merged

perf(monitors): Batch issue stream detector fetches on Monitors list#116794
shashjar merged 1 commit into
masterfrom
shashjar/batch-issue-stream-detector-fetches-on-monitors-list

Conversation

@shashjar

@shashjar shashjar commented Jun 3, 2026

Copy link
Copy Markdown
Member

Resolves ISWF-2324.

On the Monitors list page, each row individually fetched the project's issue stream detector to compute the connected alerts count. With 20 rows across different projects, this fired up to 20 separate API requests on page load.

This PR introduces an IssueStreamDetectorContextProvider that makes a single batch request for all visible projects and distributes results to rows via a React context provider. The logic falls back to the existing per-row hook when the component is used outside the list (e.g. on the detail page).

Also, useIssueStreamDetectorsForProject is fixed so that the query is skipped when projectId is undefined.

@linear-code

linear-code Bot commented Jun 3, 2026

Copy link
Copy Markdown

ISWF-2324

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 3, 2026
@shashjar shashjar requested review from a team June 3, 2026 18:31
@shashjar shashjar marked this pull request as ready for review June 3, 2026 18:31
@shashjar shashjar merged commit 394ec1d into master Jun 3, 2026
71 checks passed
@shashjar shashjar deleted the shashjar/batch-issue-stream-detector-fetches-on-monitors-list branch June 3, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants