Bound PR Queue background reads as submission history grows

Open
#3 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github, react, typescript
Domain
performance

Research direction

Start with src/prQueue.ts and src/PullRequestQueue.tsx, especially the submission collection, observer creation, timestamp filtering, and five-minute polling paths. Run the existing request-count tests to establish current fetches, then add coverage for expired merges and closed-unmerged PRs. Done means large histories use a bounded initial-read policy with unknown status, open PRs remain refreshable, and Matrix submission history is retained.

Written by the indexing model from the issue text.

Description

Problem

At c8d3972a244ffaa96ffee86fa1b8e5a656d82905, the queue collects every valid submission from joined rooms (src/prQueue.ts:92–98, src/PullRequestQueue.tsx:243–261) and creates summary observers for the full deduplicated set (src/PullRequestQueue.tsx:316–320). The 12-hour cutoff filters rendered rows, not observers (src/PullRequestQueue.tsx:292–307). Known merges with a valid timestamp do not interval-poll, but expired merges can still be fetched on load or eligible refetch triggers. Closed-unmerged PRs remain in Active and can poll every five minutes when the panel is visible, auto-refresh is enabled by authenticated GitHub access, and the query is not refused (src/PullRequestQueue.tsx:35,50–68,128–146,228–233).

Impact

Historical submissions can increase background GitHub traffic even when they add no visible queue items or are no longer open.

Done when

Request-count tests demonstrate that known expired merges are not automatically re-fetched and that closed-unmerged PRs do not poll on the active five-minute interval. Document and test a bounded initial-read policy for large histories with unknown status. Keep open PRs refreshable and retain Matrix submission history.

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.