Skip to content

there's nothing to see here#242

Open
rafa-thayto wants to merge 2 commits intomainfrom
rafa-thayto/clerk-bird
Open

there's nothing to see here#242
rafa-thayto wants to merge 2 commits intomainfrom
rafa-thayto/clerk-bird

Conversation

@rafa-thayto
Copy link
Copy Markdown
Contributor

@rafa-thayto rafa-thayto commented Apr 28, 2026

Summary

  • Adds a new private workspace package @clerk/cli-extras that registers extra/easter-egg commands on the main Clerk CLI via a single registerExtras(program) call
  • First (and currently only) easter-egg: clerk bird — a Flappy Bird game that runs in the terminal (alt-screen buffer, 30 FPS delta-time physics, persistent high score in ~/.flap-best, parallax clouds, screen shake on death)
  • Command is registered with { hidden: true } so it does not appear in clerk --help or clerk help
  • Root typecheck / lint / format / format:check scripts now use --filter './packages/*' so they cover any new workspace package automatically

Why a separate package

Keeps cli-core focused on the CLI's real surface area. cli-core depends on cli-extras (one-way, no cycle), so future easter eggs can be added without touching cli-program.ts. Throws plain Error instead of CliError to keep the dep graph clean — runProgram already maps Errorlog.error(message) + EXIT_CODE.GENERAL.

Test plan

  • bun install --frozen-lockfile — clean (lockfile in sync)
  • bun run build — bundle still produces a single ~2.4 MB binary (workspace dep inlined)
  • bun run format:check — passes for both packages
  • bun run lint — 0 warnings, 0 errors across both packages
  • bun run typecheck — clean for both packages + scripts
  • bun run check:patches — passes
  • bun run test — 82/82 passing
  • bun changeset status --since=origin/main — empty changeset added (no release needed)
  • clerk --helpbird not listed
  • clerk helpbird not listed
  • clerk bird --help — reachable directly
  • Manual play-test: launch the game, flap, score, die, hit Q — terminal restored cleanly via alt-screen exit

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 28, 2026

🦋 Changeset detected

Latest commit: db0af3d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Warning

Rate limit exceeded

@rafa-thayto has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 51 minutes and 34 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 44cf2b22-c917-420a-9064-b721e5805d36

📥 Commits

Reviewing files that changed from the base of the PR and between 4f18a9a and db0af3d.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (9)
  • .changeset/modern-bats-pick.md
  • package.json
  • packages/cli-core/package.json
  • packages/cli-core/src/cli-program.ts
  • packages/extras/package.json
  • packages/extras/src/clerk-bird/flap.ts
  • packages/extras/src/clerk-bird/index.ts
  • packages/extras/src/index.ts
  • packages/extras/tsconfig.json
📝 Walkthrough

Walkthrough

This pull request adds a new private workspace package @clerk/cli-extras containing a terminal Flappy Bird implementation and a registerExtras function that registers a hidden "bird" command. packages/cli-core now depends on @clerk/cli-extras and calls registerExtras(program) during CLI setup. Root package.json scripts for typecheck, lint, and format were changed to run across ./packages/*. New TypeScript config and changeset for the extras package were also added.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'there's nothing to see here' is vague and misleading—it provides no meaningful information about the substantial changeset adding a new private package and hidden easter-egg command. Replace with a descriptive title like 'Add @clerk/cli-extras package with hidden clerk bird easter-egg command' or similar that clearly conveys the main change.
Docstring Coverage ⚠️ Warning Docstring coverage is 27.78% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description is comprehensive and directly related to the changeset, explaining the new package, easter-egg feature, design rationale, and test plan.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 51 minutes and 34 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/extras/src/clerk-bird/flap.ts (1)

260-266: Minor: Bun.write is async but called without await.

The try-catch won't catch promise rejections. Since this is a best-effort high score save that rarely fails, it's not blocking, but you could make it fire-and-forget explicitly:

Optional fix
 function saveBest(n: number): void {
-  try {
-    Bun.write(BEST_FILE, String(n));
-  } catch {
-    /* best-effort */
-  }
+  Bun.write(BEST_FILE, String(n)).catch(() => {
+    /* best-effort */
+  });
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/extras/src/clerk-bird/flap.ts` around lines 260 - 266, The saveBest
function calls the async Bun.write without awaiting, so promise rejections won't
be caught; update saveBest to either be async and await Bun.write inside the
try/catch, or keep it sync and explicitly fire-and-forget by calling
Bun.write(BEST_FILE, String(n)).catch(() => {}) (or prefix with void) so any
rejection is handled and no unhandled promise rejection occurs; reference the
saveBest function, Bun.write call, and BEST_FILE constant when making the
change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/extras/src/clerk-bird/flap.ts`:
- Around line 260-266: The saveBest function calls the async Bun.write without
awaiting, so promise rejections won't be caught; update saveBest to either be
async and await Bun.write inside the try/catch, or keep it sync and explicitly
fire-and-forget by calling Bun.write(BEST_FILE, String(n)).catch(() => {}) (or
prefix with void) so any rejection is handled and no unhandled promise rejection
occurs; reference the saveBest function, Bun.write call, and BEST_FILE constant
when making the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8a105937-c231-4ae2-8d38-884b78508a90

📥 Commits

Reviewing files that changed from the base of the PR and between 30d9724 and bc60862.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • package.json
  • packages/cli-core/package.json
  • packages/cli-core/src/cli-program.ts
  • packages/extras/package.json
  • packages/extras/src/clerk-bird/flap.ts
  • packages/extras/src/clerk-bird/index.ts
  • packages/extras/src/index.ts
  • packages/extras/tsconfig.json

@rafa-thayto rafa-thayto force-pushed the rafa-thayto/clerk-bird branch 3 times, most recently from b0f130c to ad91dba Compare April 28, 2026 21:06
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/extras/src/clerk-bird/flap.ts`:
- Around line 260-263: The saveBest function currently calls
Bun.write(BEST_FILE, String(n)) without awaiting or handling its returned
Promise, so write failures will produce unhandled rejections; update saveBest
(the function named saveBest and the Bun.write call) to handle the Promise
explicitly—either make saveBest async and await Bun.write inside the try/catch,
or attach .catch(...) to Bun.write to swallow/log the error (e.g., log via your
logger or ignore) so filesystem write failures to BEST_FILE do not produce
unhandled rejections while the program runs in raw/alt-screen mode.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7410d2db-9657-4fc5-80a3-27523a6f618f

📥 Commits

Reviewing files that changed from the base of the PR and between bc60862 and ad91dba.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (9)
  • .changeset/modern-bats-pick.md
  • package.json
  • packages/cli-core/package.json
  • packages/cli-core/src/cli-program.ts
  • packages/extras/package.json
  • packages/extras/src/clerk-bird/flap.ts
  • packages/extras/src/clerk-bird/index.ts
  • packages/extras/src/index.ts
  • packages/extras/tsconfig.json
✅ Files skipped from review due to trivial changes (5)
  • packages/cli-core/package.json
  • packages/extras/src/clerk-bird/index.ts
  • packages/extras/tsconfig.json
  • .changeset/modern-bats-pick.md
  • packages/extras/package.json
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/extras/src/index.ts
  • packages/cli-core/src/cli-program.ts
  • package.json

Comment thread packages/extras/src/clerk-bird/flap.ts Outdated
Introduces a new private workspace package, @clerk/cli-extras, that
registers extra/easter-egg commands on the main Clerk CLI program via a
single registerExtras(program) call. The first such command is
`clerk clerk-bird`, a Flappy Bird game that runs entirely in the
terminal (alt-screen buffer, 30 FPS delta-time physics, persistent high
score, parallax clouds). The command is registered with { hidden: true }
so it does not appear in `clerk --help` or `clerk help`.

Why a separate package: keeps cli-core focused on the CLI's real surface
area. cli-core depends on cli-extras (one-way), so future easter eggs
can be added without touching cli-program.ts.

Root scripts (typecheck/lint/format/format:check) now use
--filter './packages/*' so they automatically cover any new workspace
package.
Bun.write() returns a Promise, so wrapping it in a sync try/catch
does not catch rejections. Use void with .catch() instead.
@rafa-thayto rafa-thayto force-pushed the rafa-thayto/clerk-bird branch from 4f18a9a to db0af3d Compare April 29, 2026 20:54
@rafa-thayto rafa-thayto requested a review from wyattjoh April 29, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant