Skip to content

Conversation

@TheOrcDev
Copy link
Owner

@TheOrcDev TheOrcDev commented Sep 10, 2025

…th customizable stats and health/mana bars


Summary by cubic

Adds an 8-bit Player Profile Card component with health, mana, and experience bars, plus optional custom stats. Includes docs, a demo page, and registry entries for easy install.

  • New Features

    • PlayerProfileCard with avatar, level badge, class label, and per-stat toggles (health/mana/XP).
    • Custom stats support (label, value/max, color, retro/default variant).
    • Retro-styled progress bars; responsive layout.
    • New /blocks/player-profile page and examples in gaming blocks.
    • README with props and examples.
    • Registry item added and wired into registry.json.
  • Migration

    • Install: pnpm dlx shadcn@latest add @8bitcn/player-profile-card
    • Import: "@/components/ui/8bit/blocks/player-profile-card"
    • Pass stats: health, mana, experience { current, max } and optional customStats.

Summary by CodeRabbit

  • New Features

    • Introduced an 8‑bit Player Profile Card with avatar, name, level badge, class, health/mana/experience bars, and optional custom stats.
    • Supports visibility toggles and style variants for retro-styled progress elements.
    • Added a showcase page and Gaming UI panels with sample profiles and quick actions to copy/open.
  • Documentation

    • Added comprehensive guide with props, variants, and TSX examples (basic, compact, detailed, custom stats).
  • Chores

    • Updated component registry and added supporting 8‑bit UI assets (card, avatar, badge, progress, health/mana bars, retro styles).

@vercel
Copy link

vercel bot commented Sep 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
8bitcn-ui Ready Ready Preview Comment Sep 10, 2025 2:48pm

@coderabbitai
Copy link

coderabbitai bot commented Sep 10, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Introduces a new 8-bit PlayerProfileCard component, adds a dedicated showcase page, integrates the card into the gaming blocks UI (rendered twice), and registers the component and its primitives in registry manifests. Includes documentation for the card and updates registry entries to reference related 8-bit UI primitives.

Changes

Cohort / File(s) Summary
Gaming blocks integration
app/blocks/gaming/gaming.tsx
Imports and renders two PlayerProfileCard panels with sample data and header actions; no existing logic altered.
Player profile showcase page
app/blocks/player-profile/page.tsx
Adds a new Next.js page that displays two PlayerProfileCard examples with action buttons; exports default PlayerProfilePage.
PlayerProfileCard component + docs
components/ui/8bit/blocks/player-profile-card.tsx, components/ui/8bit/blocks/README-player-profile-card.md
Adds retro-styled PlayerProfileCard component with optional health/mana/XP and custom stats; documents props, variants, usage, and dependencies.
Registry and manifests
public/r/player-profile-card.json, public/r/registry.json, registry.json
Registers player-profile-card and associated 8-bit primitives (card, avatar, badge, progress, health-bar, mana-bar, retro.css); appends item and file mappings.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Next.js Page as PlayerProfilePage
  participant PlayerProfileCard
  participant Bars as Health/Mana/XP Bars
  User->>Next.js Page: Navigate to /blocks/player-profile
  Next.js Page->>PlayerProfileCard: Render with props (name, avatar, stats, customStats)
  PlayerProfileCard->>Bars: Compute percentages & render progress
  Bars-->>PlayerProfileCard: Progress UI
  PlayerProfileCard-->>Next.js Page: Composed card
  Next.js Page-->>User: Showcase UI
  note right of PlayerProfileCard: Toggles: showLevel/Health/Mana/XP
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

Poem

A pixely bard with a carrot blade,
I hop through props the devs have made.
Health and mana, bars aglow,
XP climbs with retro flow.
New cards bloom in registry light—
Stats and sprites, a crunchy byte.
Boing! Shipping tonight. 🥕✨

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1dde6cb and 7b791b2.

📒 Files selected for processing (7)
  • app/blocks/gaming/gaming.tsx (2 hunks)
  • app/blocks/player-profile/page.tsx (1 hunks)
  • components/ui/8bit/blocks/README-player-profile-card.md (1 hunks)
  • components/ui/8bit/blocks/player-profile-card.tsx (1 hunks)
  • public/r/player-profile-card.json (1 hunks)
  • public/r/registry.json (1 hunks)
  • registry.json (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/player-profile-card-block

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.

@TheOrcDev TheOrcDev merged commit 484340d into main Sep 10, 2025
3 of 4 checks passed
@TheOrcDev TheOrcDev deleted the feat/player-profile-card-block branch September 10, 2025 14:51
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 7 files


Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Ask questions if you need clarification on any suggestion

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

command="pnpm dlx shadcn@latest add @8bitcn/player-profile-card"
copyCommand="pnpm dlx shadcn@latest add @8bitcn/player-profile-card"
/>
<OpenInV0Button name="8bit-player-profile-card" className="w-fit" />
Copy link

@cubic-dev-ai cubic-dev-ai bot Sep 10, 2025

Choose a reason for hiding this comment

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

OpenInV0Button name points to /r/8bit-player-profile-card.json, which does not exist; use "player-profile-card" to match the available JSON.

Prompt for AI agents
Address the following comment on app/blocks/gaming/gaming.tsx at line 294:

<comment>OpenInV0Button name points to /r/8bit-player-profile-card.json, which does not exist; use &quot;player-profile-card&quot; to match the available JSON.</comment>

<file context>
@@ -279,6 +280,75 @@ export default function GamingBlocks() {
+              command=&quot;pnpm dlx shadcn@latest add @8bitcn/player-profile-card&quot;
+              copyCommand=&quot;pnpm dlx shadcn@latest add @8bitcn/player-profile-card&quot;
+            /&gt;
+            &lt;OpenInV0Button name=&quot;8bit-player-profile-card&quot; className=&quot;w-fit&quot; /&gt;
+          &lt;/div&gt;
+        &lt;/div&gt;
</file context>
Suggested change
<OpenInV0Button name="8bit-player-profile-card" className="w-fit" />
<OpenInV0Button name="player-profile-card" className="w-fit" />
Fix with Cubic

"type": "registry:component",
"title": "8-bit Player Profile Card",
"description": "A comprehensive player profile card component with stats, health/mana bars, and custom stats support.",
"registryDependencies": ["card", "avatar", "badge", "progress"],
Copy link

@cubic-dev-ai cubic-dev-ai bot Sep 10, 2025

Choose a reason for hiding this comment

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

registryDependencies omits health-bar and mana-bar even though their files are bundled here; include them for correct dependency metadata and consistency.

Prompt for AI agents
Address the following comment on registry.json at line 1496:

<comment>registryDependencies omits health-bar and mana-bar even though their files are bundled here; include them for correct dependency metadata and consistency.</comment>

<file context>
@@ -1487,6 +1487,55 @@
+      &quot;type&quot;: &quot;registry:component&quot;,
+      &quot;title&quot;: &quot;8-bit Player Profile Card&quot;,
+      &quot;description&quot;: &quot;A comprehensive player profile card component with stats, health/mana bars, and custom stats support.&quot;,
+      &quot;registryDependencies&quot;: [&quot;card&quot;, &quot;avatar&quot;, &quot;badge&quot;, &quot;progress&quot;],
+      &quot;files&quot;: [
+        {
</file context>
Fix with Cubic

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.

2 participants