`/leaderboard`, the page and the share image say "be the first" for a program that hasn't started
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
Start in src/messages.ts at leaderboardMessage (line 136) and the empty-board text (lines 167-173): the message needs a started/not-started flag passed in the way final is today. src/page.ts already builds statusLine and src/card.ts builds boardState, so thread that status into both, and in src/commands.ts (leaderboard case, line 80) skip the GitHub search when the program has not started. Write failing tests first in test/messages.test.ts, test/card.test.ts and test/page.test.ts; done is all three surfaces saying the start date and npm test plus npm run typecheck passing.
Written by the indexing model from the issue text.
Description
Pick CODERCOPS December 2026 in /leaderboard and the reply says:
No merged PRs counted yet. Pick a starter issue and be the first.
But a PR merged now counts for November, not December. The program's page and its share image say the same thing, right under their own "Starts Dec 1, 2026" and "STARTS DEC 1" labels. oss.codercops.com/leaderboard/2026-12 shows it today. The text comes from three places:
src/messages.ts, line 172.leaderboardMessageonly knows whether a program has ended (final), not whether it has started.src/page.ts, line 245, the empty board on the pagesrc/card.ts, line 219, the board image at/leaderboard/2026-12.png
The /leaderboard reply also searches GitHub for a date range in the future (getLeaderboard in src/commands.ts, line 83). Nothing can match, and it uses up a request from GitHub's search limit (30 a minute with a token).
What to do
- For a program that hasn't started, say when it starts instead, for example "Starts Dec 1, 2026 (UTC). PRs merged before then don't count for it." in all three places. The page and the card already know the status (
statusLineinsrc/page.ts, line 23, andboardStateinsrc/card.ts, line 130).leaderboardMessageneeds it passed in, the wayfinalis today. - In the
leaderboardcommand, don't search GitHub for a program that hasn't started. An empty board is enough.
Where to look
src/messages.ts:leaderboardMessage(line 136) and the empty board text (lines 167 to 173)src/page.ts:statusLine(line 23) and line 245src/card.ts:boardState(line 130) and lines 217 to 219src/commands.ts: theleaderboardcase (line 80)test/messages.test.ts: the empty board tests (lines 277 and 286);test/card.test.ts: the empty state test (line 160);test/page.test.ts:statusLine(line 51)
Acceptance criteria
- For a program that hasn't started, the reply, the page and the image say when it starts and don't say "be the first"
- Running and ended programs read the same as now
-
/leaderboardfor a program that hasn't started makes no GitHub search request - Tests that fail on the current code
-
npm run typecheckandnpm testpass
How to test
The tests already have an upcoming program to copy (test/card.test.ts, line 372, uses one starting in 2100). For the command, run runCommand with the program option set to an upcoming one and check with mockFetch that no /search/issues call was made. By hand: npm run dev, then open http://localhost:8787/leaderboard/2026-12 and http://localhost:8787/leaderboard/2026-12.png. Both work without any secrets.
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off develop, and open your PR against develop with Closes #152 in the description.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- Avg merge
- 2h 38m
- Merged PRs (30d)
- 73
Getting set up
- No 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 codercops/discord-bot
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
codercops/discord-bot#108 · 1 comment ·
Maintainers usually reply within 1 day
-
Keep the slash command list in one module, and test that `/help` and the registered commands matchOpenhelp wanted testing
Difficulty 3/5 1-2 days Newbie friendliness 78/100
codercops/discord-bot#154 ·
Maintainers usually reply within 1 day
-
enhancement help wanted
Difficulty 3/5 1-2 days Newbie friendliness 74/100
codercops/discord-bot#153 ·
Maintainers usually reply within 1 day
-
Contributing to discord-bot: start hereMay be free again @sank8-2 claimed this 21 days ago, and no pull request is open. Open
Difficulty 1/5 Under an hour Newbie friendliness 15/100
codercops/discord-bot#15 · 4 comments ·
Maintainers usually reply within 1 day
All issues in codercops/discord-bot
Similar issues
-
Out of order / duplicate key error shows the key bytes as decimal or UTF-8, not hexPossibly taken @bardrop claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 86/100
-
bug i18n
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
endora-commerce/endora-commerce#1315 ·
Maintainers usually reply within 1 day
-
area:data-quality importer size:S
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
enorm-labs/event-junkie#5136 ·
Maintainers usually reply within 1 day
-
fix(scripts): set-device-owner.ps1 fails to parse on Windows PowerShell 5.1 (UTF-8 without BOM)Open
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
WenyuChiou/agent-board#1518 ·
Maintainers usually reply within 1 day