Avoid anonymous PR Queue refetch bursts on window focus

Open Beginner friendly
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github, react, typescript
Domain
frontend

Research direction

Start in src/PullRequestQueue.tsx around lines 127–146 and compare the focus-refetch policy with src/queries.ts and src/PullRequestChip.tsx. Locate the queue’s request setup and existing test conventions, then add a regression test covering window focus with multiple stale summaries and no authenticated GitHub connection. Done means the queue issues no summary requests on focus in that state while initial queue loading still succeeds.

Written by the indexing model from the issue text.

Description

Problem

At c8d3972a244ffaa96ffee86fa1b8e5a656d82905, src/PullRequestQueue.tsx:127–146 sets refetchOnWindowFocus: unlessRefused for each queue summary without checking whether GitHub access is authenticated. Eligible stale summaries can refetch together when focus returns to a visible queue. The existing chip policy disables focus refetch for this reason (src/queries.ts:184–186, src/PullRequestChip.tsx:11–14), also present in upstream d4aa39a.

Impact

A focus-triggered burst can consume GitHub’s 60-request/hour anonymous budget and leave other public PR surfaces, including thread chips, unable to refresh.

Done when

With no authenticated GitHub connection and several stale public PR summaries, focusing the window with the queue already visible issues no queue-driven summary requests. A regression test verifies that initial queue loading still works.

Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
1m
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bketelsen/pr-queue-chat

All issues in bketelsen/pr-queue-chat

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.