test: added CI testing for all blocks installation#147
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRefactors Select-based playback-rate components and prop passing, adds "use client" to basic-player media-kit and updates imports and registry mapping, tweaks a button variant, updates a registry submodule pin, and adds a CI job to run a registry-install test. ChangesPlayer Component and Registry Refactor
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Pull request overview
Adds an integration-style CI test to validate that Limeplay registry blocks can be installed into freshly scaffolded apps and successfully built, while also making a few registry/block fixes to keep installs/builds compatible.
Changes:
- Add a new
test:registry-installscript that builds the registry, servespublic/, scaffolds apps (Next.js + TanStack Start; radix + base), installs all blocks, generates routes, and builds. - Fix basic-player registry wiring by referencing
media-kit.ts(and update import/registry metadata accordingly). - Adjust playback-rate demo/control usage and simplify playback-rate UI exports.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/www/scripts/test-registry-install.ts | New end-to-end install/build test runner used by CI. |
| apps/www/registry/default/ui/playback-rate.tsx | Removes the extra SelectTrigger wrapper/export. |
| apps/www/registry/default/examples/playback-rate-demo.tsx | Adjusts SelectContent props usage for broader template compatibility. |
| apps/www/registry/default/blocks/linear-player/components/playback-rate-control.tsx | Same SelectContent prop adjustment as the demo. |
| apps/www/registry/default/blocks/basic-player/lib/media-kit.ts | Marks media kit as client module. |
| apps/www/registry/default/blocks/basic-player/components/playback-state-control.tsx | Switches button variant to ghost (more template-compatible than custom variants). |
| apps/www/registry/default/blocks/basic-player/components/media-player.tsx | Updates import to use lib/media-kit. |
| apps/www/registry/collection/registry-blocks.ts | Updates basic-player block file path from media.ts to media-kit.ts. |
| apps/www/package.json | Adds test:registry-install script entry. |
| .github/workflows/ci.yml | Adds registry install test job; changes when typecheck runs. |
| server = http.createServer((req, res) => { | ||
| const urlPath = req.url?.split("?")[0] ?? "/" | ||
| const filePath = join(PUBLIC_DIR, urlPath) | ||
|
|
||
| if (!existsSync(filePath) || !statSync(filePath).isFile()) { | ||
| res.writeHead(404) | ||
| res.end("Not found") | ||
| return |
|
|
||
| const SCRIPT_DIR = resolve(dirname(new URL(import.meta.url).pathname)) |
| typecheck: | ||
| name: Type Check | ||
| runs-on: ubuntu-latest | ||
| if: github.event_name == 'push' | ||
| steps: |
| - uses: actions/checkout@v4 | ||
| with: | ||
| token: ${{ secrets.WINOFFRG_PAT }} | ||
| submodules: recursive | ||
|
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
apps/www/registry/default/blocks/linear-player/components/playback-rate-control.tsx (1)
3-4: 💤 Low valueConsider using a type-only import.
Since the
Reactimport is only used for type access (React.ComponentProps), you can optimize this with a type-only import for better tree-shaking and clarity:-import React from "react" +import type { ComponentProps } from "react"Then update line 29:
-} as React.ComponentProps<typeof Select.SelectContent>)} +} as ComponentProps<typeof Select.SelectContent>)}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/www/registry/default/blocks/linear-player/components/playback-rate-control.tsx` around lines 3 - 4, The current import "import React from 'react'" is only used for type access (React.ComponentProps); change it to a type-only import and update the prop typing: replace the default React import with "import type { ComponentProps } from 'react'" and update the usage of React.ComponentProps (on the component props at or around line 29) to just ComponentProps<typeof SomeElementOrComponent> so the import is purely type-only and tree-shakeable.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Line 38: The CI currently skips the typecheck job for pull requests because
the job-level condition uses "if: github.event_name == 'push'"; update the
typecheck job's conditional so it also runs for pull_requests (or at least
same-repo PRs) — e.g., change the condition on the typecheck job to allow
github.event_name == 'pull_request' as well, or use a guard that runs when
github.event_name == 'pull_request' and
github.event.pull_request.head.repo.full_name == github.repository to exclude
forked PRs; locate the typecheck job and replace the existing if condition
accordingly.
- Around line 79-83: The checkout step currently passes the secret-backed token
(uses: actions/checkout@v4 with token: ${{ secrets.WINOFFRG_PAT }}) which will
fail for forked PRs; update the workflow to guard that usage by branching the
checkout: create two checkout steps (both using uses: actions/checkout@v4) and
add an if conditional so the step that uses token: ${{ secrets.WINOFFRG_PAT }}
only runs when the PR is not from a fork (e.g. if: github.event.pull_request ==
null || !github.event.pull_request.head.repo.fork) and have the other step (no
secret token or using github.token) run for forked PRs; this ensures the
checkout step(s) referenced by uses: actions/checkout@v4 won’t reference secrets
for forked PRs.
In `@apps/www/registry/collection/registry-blocks.ts`:
- Line 141: Update verification: ensure you ran the registry build after moving
media.ts to blocks/basic-player/lib/media-kit.ts by executing "bun run
registry:build" from the apps/www/ directory, confirm the command completed
without errors, and re-run tests; also scan the repo for any remaining
references to the old media.ts path and confirm registry-blocks.ts now points to
"blocks/basic-player/lib/media-kit.ts" (search for that string) and that the
build output/artifacts reflect the new file location.
---
Nitpick comments:
In
`@apps/www/registry/default/blocks/linear-player/components/playback-rate-control.tsx`:
- Around line 3-4: The current import "import React from 'react'" is only used
for type access (React.ComponentProps); change it to a type-only import and
update the prop typing: replace the default React import with "import type {
ComponentProps } from 'react'" and update the usage of React.ComponentProps (on
the component props at or around line 29) to just ComponentProps<typeof
SomeElementOrComponent> so the import is purely type-only and tree-shakeable.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a6e99af6-047d-4dd0-9601-237835e32e36
⛔ Files ignored due to path filters (2)
apps/www/package.jsonis excluded by none and included by noneapps/www/scripts/test-registry-install.tsis excluded by none and included by none
📒 Files selected for processing (9)
.github/workflows/ci.ymlapps/www/registry/collection/registry-blocks.tsapps/www/registry/default/blocks/basic-player/components/media-player.tsxapps/www/registry/default/blocks/basic-player/components/playback-state-control.tsxapps/www/registry/default/blocks/basic-player/lib/media-kit.tsapps/www/registry/default/blocks/linear-player/components/playback-rate-control.tsxapps/www/registry/default/examples/playback-rate-demo.tsxapps/www/registry/default/ui/playback-rate.tsxapps/www/registry/pro
💤 Files with no reviewable changes (1)
- apps/www/registry/default/ui/playback-rate.tsx
Summary by CodeRabbit
Style
Chores / Tests
Refactor
Chores