[BUG] Weekly summary truncates PR and issue results at 100
Maintainers usually reply within 1 day
Assessment
This issue has not been assessed yet.
Description
What happened?
The weekly summary fetches authored pull requests and issues with per_page=100 but does not fetch later pages. Users with more than 100 matching records in the 14-day window therefore receive silently incomplete counts. The affected PR and issue searches are in src/app/api/metrics/weekly-summary/route.ts; the route also omits GitHub search total_count and incomplete_results from its response handling.
Proposed solution: Paginate both searches, respect GitHub's search result cap and incomplete-search flag, and return explicit partial-data metadata or an error when a complete count cannot be established. Add mocked tests for multiple pages and incomplete GitHub searches.
Steps to reproduce
- Use an account with more than 100 authored PRs or issues in the last 14 days.
- Request
GET /api/metrics/weekly-summary. - Compare returned counts with all matching GitHub search results.
- Observe that records after the first 100 are omitted without a partial-result signal.
Where is it?
API
Where did you see it?
Local development
Browser and device
Not browser-specific: server-side API route. Local environment: Linux x86_64, Node v26.13.1, Vitest 4.1.12.
Screenshots, console errors or logs
No screenshot applies to this API behavior. Validation: ./node_modules/.bin/tsc --noEmit completed successfully. Focused existing tests ./node_modules/.bin/vitest run test/goals-sync-lib.test.ts test/weekly-summary-combined.test.ts --reporter=dot passed (2 files, 28 tests); they do not cover pagination in this endpoint. Full ./node_modules/.bin/vitest run: 3,405 passed, 54 failed. All 54 failures were in six component suites because localStorage was undefined in JSDOM; they are unrelated to this API path. There is no regression test for page two or GitHub's incomplete-search flag in the weekly-summary route.
Want to fix it?
- I'd like to work on this. A maintainer will assign you; please don't start before that.
- Dominant language
- TypeScript
- Stars
- 246
- Forks
- 436
- Avg merge
- 9h 33m
- Merged PRs (30d)
- 213
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Priyanshu-byte-coder/devtrack
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Priyanshu-byte-coder/devtrack#4067 ·
Maintainers usually reply within 1 day
-
bug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Priyanshu-byte-coder/devtrack#4066 ·
Maintainers usually reply within 1 day
-
Webhook manager: replace the browser confirm() dialogs with ConfirmModalPossibly taken @Nandaninaulaa claimed this 5 days ago. Opengood first issue level 1 level:beginner status:assigned type:design
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Priyanshu-byte-coder/devtrack#3889 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Goals form: square arcade buttons for recurrence, Create goal and RefreshPossibly taken @KartikeyG-world claimed this 5 days ago. Opengood first issue level 1 level:beginner status:assigned type:design
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Priyanshu-byte-coder/devtrack#3877 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Goals: the error banner and the "No goals yet" hint show at the same timePossibly taken @KartikeyG-world claimed this 5 days ago. Opengood first issue level 1 level:beginner status:assigned type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Priyanshu-byte-coder/devtrack#3872 · 6 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in Priyanshu-byte-coder/devtrack
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
callstackincubator/simlock#2113 ·
Maintainers usually reply within 1 day
-
BUG: Backend Docker build fails due to Go version mismatchPossibly taken @Aakriti0207 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 93/100
gittuf/visualizer#203 ·
Maintainers usually reply within 2 days
-
bug 🐛
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
BaaRai/ARTEX#981 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day