Skip to content

feat: pro components handling#137

Open
WINOFFRG wants to merge 3 commits intomainfrom
feat/pro-blocks
Open

feat: pro components handling#137
WINOFFRG wants to merge 3 commits intomainfrom
feat/pro-blocks

Conversation

@WINOFFRG
Copy link
Owner

@WINOFFRG WINOFFRG commented Feb 3, 2026

Summary by CodeRabbit

  • New Features

    • Added YouTube Music block to the component registry.
  • Removals

    • Removed picture-in-picture control component.
  • Improvements

    • Updated timeline slider styling and progress indicator appearance.
    • Modified playback error handling behavior.

Copilot AI review requested due to automatic review settings February 3, 2026 07:14
@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (3)
  • apps/www/components/pro-youtube-music-player.tsx is excluded by none and included by none
  • apps/www/next-env.d.ts is excluded by none and included by none
  • apps/www/scripts/build-registry.ts is excluded by none and included by none

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'tools'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
📝 Walkthrough

Walkthrough

This PR adds a new YouTube Music block to the registry while removing the pip-control UI component. It also refactors timeline control styling and simplifies className composition, along with disabling automatic playlist progression on asset errors.

Changes

Cohort / File(s) Summary
Registry Updates
apps/www/registry/collection/registry-blocks.ts, apps/www/registry/collection/registry-ui.ts
Added new "youtube-music" block entry with full configuration including metadata, dependencies, and file definitions. Removed the "pip-control" UI registry entry.
Timeline Control Components
apps/www/registry/default/ui/timeline-control.tsx, apps/www/registry/default/blocks/linear-player/components/timeline-slider-control.tsx
Simplified Root className composition with DEV notes indicating unopinionated migration. Updated Progress component styling and applied rounded-s-full class to TimelineSlider.Progress.
Asset Hook
apps/www/registry/default/hooks/use-asset.ts
Disabled automatic playlist advancement on error by commenting out playlist.next() call in the onError handler.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • fix: base ui dependency in select #129 — Modifies registry collection entries for block dependencies, sharing the same registry configuration pattern with this PR's block additions and removals.

Poem

🐰 Hoppy tunes now play,
pip-control hops away,
Timeline rounded bright,
Registry takes flight,
Code made cleaner today! 🎵

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'feat: pro components handling' is vague and does not clearly describe the specific changes made in this PR. Consider using a more specific title that describes the actual changes, such as 'feat: add youtube-music block and update pro components' or 'feat: reorganize registry blocks and ui components'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/pro-blocks

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

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

Copy link

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/www/registry/default/blocks/linear-player/components/timeline-slider-control.tsx (1)

1-1: ⚠️ Potential issue | 🔴 Critical

Fix styling violations: use CSS variables instead of hardcoded colors.

Line 35: bg-white should use an approved CSS variable instead of a hardcoded color.

Line 95: bg-red-600 should use an approved CSS variable instead of a Tailwind color.

Line 41: top-auto! uses a forced property override; confirm this is intentional and cannot be solved through proper component composition.

🤖 Fix all issues with AI agents
In `@apps/www/registry/collection/registry-blocks.ts`:
- Around line 169-264: The registry entry for the "youtube-music" block declares
many files under blocks/youtube-music (e.g.,
blocks/youtube-music/components/media-player.tsx and
blocks/youtube-music/lib/create-media-store.ts) but those files and the
apps/www/registry/pro/blocks/ directory are missing, causing imports like
pro-youtube-music-player.tsx ->
"@/registry/pro/blocks/youtube-music/components/media-player" to fail; fix by
either (A) creating the declared files and matching directory
(blocks/youtube-music/*) with the exported components and a
lib/create-media-store implementation and ensure pro-youtube-music-player.tsx
imports the correct module paths, or (B) remove or disable the youtube-music
entry from the registry block list and update pro-youtube-music-player.tsx to
stop importing the missing module (or point it to an existing replacement), then
run the build to verify no unresolved imports remain.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds “pro” tier handling to the registry and begins wiring a new pro “YouTube Music” player into the site UI.

Changes:

  • Update pro-registry detection logic to look for any TS/TSX files under registry/pro (recursive).
  • Introduce a new youtube-music pro block entry in the registry collection and remove an existing pro UI entry.
  • Adjust several UI pieces (timeline slider + toggle-group) and add a new home-page embed for the pro player.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
apps/www/scripts/build-registry.ts Updates pro-submodule detection to determine whether to build the pro registry tier.
apps/www/registry/default/ui/timeline-control.tsx Tweaks timeline slider styling (currently with commented/TODO styles).
apps/www/registry/default/hooks/use-asset.ts Changes playlist error behavior by disabling auto-advance.
apps/www/registry/default/blocks/linear-player/components/timeline-slider-control.tsx Adjusts progress rounding via a passed className.
apps/www/registry/collection/registry-ui.ts Removes a pro UI item (pip-control) from the collection.
apps/www/registry/collection/registry-blocks.ts Adds a new pro block definition for youtube-music.
apps/www/components/ui/toggle-group.tsx Extends toggle-group API with orientation/spacing and updates styling.
apps/www/components/pro-youtube-music-player.tsx Adds a client component that dynamically imports the pro YouTube Music player.
apps/www/app/(home)/page.tsx Renders the pro YouTube Music player on the home page.

className
)}
// DEV: Opinidated animations and border without variable
// TODO: Uncomment and migrate to unopininated before PR
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

Typo in comment: "unopininated" should be "unopinionated".

Suggested change
// TODO: Uncomment and migrate to unopininated before PR
// TODO: Uncomment and migrate to unopinionated before PR

Copilot uses AI. Check for mistakes.
console.error("[useAsset] Playlist error:", item.id, error)

playlist.next()
// playlist.next()
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

Commenting out playlist.next() in onError changes behavior so a failing item will no longer be skipped, which can stall playback/queue progression. If the intent is to stop auto-advancing on errors, replace this with explicit error state handling; otherwise restore the playlist.next() call.

Suggested change
// playlist.next()
if (playlist.hasNext()) {
playlist.next()
}

Copilot uses AI. Check for mistakes.
Comment on lines +39 to +41
group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg
data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch
data-[size=sm]:rounded-[min(var(--radius-md),10px)]
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

gap-[--spacing(var(--gap))] is not a valid Tailwind arbitrary value expression (the --spacing() token is used with numeric literals elsewhere, e.g. (--spacing(4))). As written, this is likely to generate invalid CSS and the spacing prop won’t apply. Consider using a supported pattern (e.g. gap-[var(--gap)] with a length value, or a Tailwind spacing token) and ensure --gap includes units if it’s meant to be a length.

Copilot uses AI. Check for mistakes.
Comment on lines +45 to 49
data-orientation={orientation}
data-size={size}
data-slot="toggle-group"
data-spacing={spacing}
data-variant={variant}
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

The new orientation prop is only reflected via data-orientation, but it is not passed to ToggleGroupPrimitive.Root as orientation={orientation}. Radix uses orientation for correct keyboard navigation/roving focus behavior, so this should be forwarded (or rename the prop if it’s styling-only).

Copilot uses AI. Check for mistakes.
Comment on lines +80 to +87
group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg
group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg
group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg
group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg
group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0
group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0
group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l
group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

These variants (group-data-horizontal/... and group-data-vertical/...) don’t correspond to any data-* attribute set on the group, so they won’t ever match. Elsewhere in the codebase, the established pattern is group-data-[attr=value]/... (e.g. group-data-[collapsible=icon] in components/ui/sidebar.tsx). Consider switching these to group-data-[orientation=horizontal]/toggle-group: and group-data-[orientation=vertical]/toggle-group: (and apply the same fix to the subsequent border variants).

Suggested change
group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg
group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg
group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg
group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg
group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0
group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0
group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l
group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t
group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:rounded-l-lg
group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:first:rounded-t-lg
group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:last:rounded-r-lg
group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:last:rounded-b-lg
group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0
group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0
group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l
group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t

Copilot uses AI. Check for mistakes.
Comment on lines +8 to 9
import { ProYouTubeMusicPlayer } from "@/components/pro-youtube-music-player"
import { ScrollIndicator } from "@/components/scroll-indicator"
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

Importing ProYouTubeMusicPlayer here will break builds where the apps/www/registry/pro submodule isn’t checked out, because the component currently references @/registry/pro/... modules that won’t resolve at compile time. Please gate this behind a mechanism that doesn’t require the pro module to exist (or remove it from the default home page).

Copilot uses AI. Check for mistakes.
Comment on lines +79 to +88
// DEV: Opinidated animations and border without variable
// TODO: Uncomment and migrate to unopininated before PR
// className={cn(
// `
// relative h-1 rounded-full transition-[height] duration-150 ease-out-quad
// data-[orientation=horizontal]:h-(--lp-timeline-track-height)
// active:data-[orientation=horizontal]:h-(--lp-timeline-track-height-active)
// `,
// className
// )}
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

This leaves temporary DEV/TODO comments and a large commented-out className block in a shared UI component. Please remove the commented code/TODO before merging and commit the finalized styling (either restore the previous behavior or implement the intended variable-driven styles).

Suggested change
// DEV: Opinidated animations and border without variable
// TODO: Uncomment and migrate to unopininated before PR
// className={cn(
// `
// relative h-1 rounded-full transition-[height] duration-150 ease-out-quad
// data-[orientation=horizontal]:h-(--lp-timeline-track-height)
// active:data-[orientation=horizontal]:h-(--lp-timeline-track-height-active)
// `,
// className
// )}

Copilot uses AI. Check for mistakes.
Comment on lines +79 to +80
// DEV: Opinidated animations and border without variable
// TODO: Uncomment and migrate to unopininated before PR
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

Typo in comment: "Opinidated" should be "Opinionated".

Suggested change
// DEV: Opinidated animations and border without variable
// TODO: Uncomment and migrate to unopininated before PR
// DEV: Opinionated animations and border without variable
// TODO: Uncomment and migrate to unopinionated before PR

Copilot uses AI. Check for mistakes.
Comment on lines 7 to 8
import("@/registry/pro/blocks/youtube-music/components/media-player")
.then((mod) => mod.YouTubeMusicPlayer)
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

This dynamic import points at @/registry/pro/..., but apps/www/registry/pro is a git submodule and is empty/unavailable in CI and many checkouts (and import() specifiers must still resolve at build time). As a result, Next.js will fail to compile with "module not found" even though there’s a .catch(). Consider importing through a stable wrapper that always exists (e.g. the autogenerated registry/__index__.tsx which only includes pro entries when the submodule is present), or provide a stub module in this repo so builds succeed without initializing the pro submodule.

Suggested change
import("@/registry/pro/blocks/youtube-music/components/media-player")
.then((mod) => mod.YouTubeMusicPlayer)
import("@/registry/__index__")
.then((mod) => {
return mod.YouTubeMusicPlayer ?? (() => null)
})

Copilot uses AI. Check for mistakes.
Comment on lines +179 to +237
files: [
{
path: "blocks/youtube-music/lib/create-media-store.ts",
type: "registry:lib",
},
{
path: "blocks/youtube-music/components/media-player.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/controls.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/playback-controls.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/action-controls.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/playback-mode-controls.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/volume-group-control.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/fixed-timeline-control.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/track-info.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/playlist.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/player-hooks.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/icons.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/ui/button.tsx",
type: "registry:ui",
},
{
path: "blocks/youtube-music/youtube-music.module.css",
target: "components/youtube-music/youtube-music.module.css",
type: "registry:style",
},
],
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

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

This new pro block entry references a set of blocks/youtube-music/... files that are not present in the current repo checkout (and apps/www/registry/pro is a submodule). If these files are expected to live in the pro submodule, the submodule commit pointer needs to be updated alongside this metadata; otherwise, enabling the pro registry build will fail when shadcn build tries to read missing files.

Suggested change
files: [
{
path: "blocks/youtube-music/lib/create-media-store.ts",
type: "registry:lib",
},
{
path: "blocks/youtube-music/components/media-player.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/controls.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/playback-controls.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/action-controls.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/playback-mode-controls.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/volume-group-control.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/fixed-timeline-control.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/track-info.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/playlist.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/player-hooks.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/components/icons.tsx",
type: "registry:component",
},
{
path: "blocks/youtube-music/ui/button.tsx",
type: "registry:ui",
},
{
path: "blocks/youtube-music/youtube-music.module.css",
target: "components/youtube-music/youtube-music.module.css",
type: "registry:style",
},
],
files: [],

Copilot uses AI. Check for mistakes.
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