feat(clerk-bird): add leaderboard, audio cue, and surface in help#304
Conversation
🦋 Changeset detectedLatest commit: f667c2d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR adds persistent leaderboards to the "clerk bird" easter-egg game, making it more discoverable and feature-complete. The game now supports a name-entry phase after death, displays a ranked leaderboard with entry selection and deletion, persists scores to Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
!snapshot |
Snapshot publishednpm install -g clerk@1.4.1-snapshot.4ae2e98
|
4ae2e98 to
3bdf62c
Compare
wyattjoh
left a comment
There was a problem hiding this comment.
I found two issues worth fixing before merging.
- Local top-10 leaderboard with name entry on game-over and ↑↓/jk + D to inspect and delete rows; stored as JSON in `~/.flap-rankings.json` - ASCII BEL on each pipe-pass and on death — cross-platform audio feedback that respects the host terminal's own bell setting - `clerk bird` is no longer hidden; it now appears as the last item in `clerk --help`, rendered below the auto-generated help row
- Clamp scores in sanitizeEntry() to [0, 99999] so a corrupted ~/.flap-rankings.json cannot crash the leaderboard renderer via negative repeat() in padBox(). - Add packages/extras/src/ to the root test script so flap tests are picked up by CI.
3bdf62c to
f667c2d
Compare
Summary
clerk birdeaster egg. From the GAME OVER screen, pressNto submit a name andLto view the board; use↑/↓(orj/k) to select a row andDto delete it (withY/Nconfirmation). Rankings live in~/.flap-rankings.json; the existing~/.flap-bestfile is unchanged.+1) and the death event now emit a short bell tone via ASCII BEL (\x07). The host terminal handles cross-platform behavior on Windows, macOS, Linux, and any POSIX TTY — terminals with the bell disabled stay silent, respecting the user's own setting. No subprocess, no platform branching, no bundled audio asset.clerk birdis no longer hidden. The help formatter now renders easter-egg commands after the auto-generatedhelprow so the easter egg surfaces inclerk --helpwithout cluttering the top of the command list.Test plan
bun run format && bun run lint && bun run typecheck— all clean locallybun test packages/extras/src/clerk-bird/flap.test.ts— 23 passing (includes newbeep+it.eachrefactors ofremoveRanking)clerk --helpends with thebirdrow below thehelprowclerk birdlaunches the game; passing a pipe produces a+1popup and a bell tick on the same render frame; death produces a bell tick + screen shake