Skip to content

Conversation

goldflag
Copy link
Collaborator

@goldflag goldflag commented Aug 20, 2025

Summary by CodeRabbit

  • Chores

    • Bumped client and server package versions to 1.6.0; no dependency, script, or runtime changes.
  • Changes

    • Admin sidebar link now appears only for admin users on cloud deployments (previously shown to admins regardless of deployment).
    • Subscription sidebar item is now shown only on cloud deployments; no other UI or API changes.

Copy link

vercel bot commented Aug 20, 2025

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

Project Deployment Preview Comments Updated (UTC)
rybbit Ready Ready Preview Comment Aug 20, 2025 3:08am

Copy link
Contributor

coderabbitai bot commented Aug 20, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Version numbers were bumped from 1.5.1 to 1.6.0 in client/package.json and server/package.json. Two sidebar items were made cloud-only: the Admin link now requires both isAdmin and IS_CLOUD, and the Subscription item is rendered only when IS_CLOUD is truthy.

Changes

Cohort / File(s) Summary
Version bump to 1.6.0
client/package.json, server/package.json
Update package version fields from 1.5.1 to 1.6.0; no other modifications.
Admin link conditional rendering
client/src/components/AppSidebar.tsx
Added import of IS_CLOUD and changed Admin sidebar link to render only when isAdmin && IS_CLOUD instead of isAdmin alone.
Subscription item cloud-only
client/src/app/settings/components/SettingsSidebar.tsx
Added import of IS_CLOUD and wrapped the Subscription sidebar item to render only when IS_CLOUD is truthy; item content unchanged.

Sequence Diagram(s)

sequenceDiagram
  participant UI as AppSidebar / SettingsSidebar
  participant Auth as UserState
  participant Env as Config (IS_CLOUD)

  note over UI: Sidebar rendering flow

  UI->>Auth: query isAdmin (for Admin link)
  UI->>Env: query IS_CLOUD
  alt isAdmin && IS_CLOUD
    UI-->>UI: render Admin link
  else otherwise
    UI-->>UI: do not render Admin link
  end

  UI->>Env: query IS_CLOUD (for Subscription)
  alt IS_CLOUD
    UI-->>UI: render Subscription item
  else
    UI-->>UI: hide Subscription item
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • bump version #557 — Appears to touch the same package version bumps and the Admin link conditional (IS_CLOUD guard).

Poem

I hop through code with whiskered cheer,
Versions nudged and links appear—then clear.
Admin needs cloud and a tiny clue,
Subscriptions only in skies of blue.
I nibble bytes and vanish near 🥕🐇

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ba61dd3 and 5a731cb.

📒 Files selected for processing (1)
  • client/src/app/settings/components/SettingsSidebar.tsx (2 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 1.6.0

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a32fb53 and c7ad19d.

📒 Files selected for processing (2)
  • client/package.json (1 hunks)
  • server/package.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
client/**/*

📄 CodeRabbit Inference Engine (CLAUDE.md)

Frontend: Use Next.js, Tailwind CSS, Shadcn UI, Tanstack Query, Zustand, Luxon, Nivo, and react-hook-form

Files:

  • client/package.json
server/**/*

📄 CodeRabbit Inference Engine (CLAUDE.md)

Backend: Use Fastify, Drizzle ORM (Postgres), ClickHouse, and Zod

Files:

  • server/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build Client Images (ubuntu-latest, linux/amd64)
  • GitHub Check: Build Client Images (ubuntu-24.04-arm, linux/arm64)
🔇 Additional comments (1)
client/package.json (1)

3-3: Version bump to 1.6.0 is appropriate and consistent.

Minor version bump looks good; no changes to deps/scripts. Matches the coordinated update in server/package.json.

If the UI surfaces the app version (e.g., About modal, footer), please confirm it reads from package.json or env and that no "1.5.1" strings are hardcoded.

@@ -1,6 +1,6 @@
{
"name": "rybbit-backend",
"version": "1.5.1",
"version": "1.6.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Server package version updated to 1.6.0 — LGTM.

Aligned with client; metadata-only change is safe.

Run this script to ensure there are no lingering references to 1.5.1 and that release metadata is in sync (workspace roots, changelogs, docs):


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Searching for remaining 1.5.1 occurrences..."
rg -nP -g '!**/node_modules/**' -g '!**/dist/**' -g '!**/build/**' '\b1\.5\.1\b' || true

echo
echo "Checking package.json version fields still at 1.5.1 (should be none)..."
rg -nP -g '!**/node_modules/**' '"version"\s*:\s*"1\.5\.1"' || true

echo
echo "Detecting workspace root package.json (if present) and its version..."
fd -H '^package\.json$' -td -E node_modules -E dist -E build \
  --exec bash -lc 'for f; do if jq -e ".workspaces" "$f" >/dev/null 2>&1; then echo "Workspace root: $f"; jq -r ".name, .version // \"(no version field)\"" "$f"; fi; done' || true

echo
echo "Checking for changelog files mentioning 1.6.0..."
fd -a -H 'CHANGELOG*.md' -E node_modules -E dist -E build \
  | xargs -I{} sh -c 'echo "--- {} ---"; rg -n "1\\.6\\.0" "{}" || true'

echo
echo "Listing tags matching v1.6.x (may be empty in PR context)..."
git tag -l 'v1.6.*' || true

Length of output: 2093


Lockfiles need version sync

The bump of server/package.json to 1.6.0 is correct, but the corresponding lockfiles still list the old 1.5.1 version at their top‐level version field. Please regenerate the lockfiles so they match the new package version and eliminate project‐level 1.5.1 entries.

• server/package-lock.json – top‐level "version": "1.5.1" → should be "1.6.0"
• client/package-lock.json – top‐level "version": "1.5.1" → should be updated if the client was bumped to 1.6.0

After running npm install (or the appropriate install command) in each workspace, confirm there are no remaining non‐dependency references to 1.5.1.

🤖 Prompt for AI Agents
In server/package.json around line 3 the package version was bumped to 1.6.0 but
the workspace lockfiles still contain a top-level "version": "1.5.1"; regenerate
lockfiles by running npm install (or npm ci) in each workspace (server and
client as applicable) so server/package-lock.json and client/package-lock.json
update their top-level "version" to 1.6.0, then verify there are no remaining
non-dependency references to 1.5.1 (search project files) before committing the
updated lockfiles.

Copy link
Contributor

@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: 0

🧹 Nitpick comments (3)
client/src/components/AppSidebar.tsx (3)

8-11: Sort internal imports alphabetically within the group (per guidelines).

Alphabetize the internal imports to match the repo’s import ordering rules.

Apply:

-import { useAdminPermission } from "../app/admin/hooks/useAdminPermission";
-import { cn } from "../lib/utils";
-import { useEmbedablePage } from "../app/[site]/utils";
-import { IS_CLOUD } from "../lib/const";
+import { useEmbedablePage } from "../app/[site]/utils";
+import { useAdminPermission } from "../app/admin/hooks/useAdminPermission";
+import { IS_CLOUD } from "../lib/const";
+import { cn } from "../lib/utils";

48-56: Behavior change: Admin link now shows only in cloud. Confirm product intent and coerce to boolean.

  • Product check: This hides Admin for self-hosted even if the user is admin. Confirm this is intended.
  • Minor safety: If IS_CLOUD isn’t strictly boolean, coerce it to avoid truthy "false".
  • Note: Hiding the link is not an access control; ensure server-side/route guards still enforce admin-only access.

Apply:

-{isAdmin && IS_CLOUD && (
+{isAdmin && !!IS_CLOUD && (

24-26: Tailwind class looks invalid: "duration-1s00".

Likely a typo; Tailwind uses values like duration-100, duration-300, duration-700, duration-1000. Consider correcting to the intended value (e.g., duration-1000 for 1s).

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c7ad19d and ba61dd3.

📒 Files selected for processing (1)
  • client/src/components/AppSidebar.tsx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
{client,server}/**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (CLAUDE.md)

{client,server}/**/*.{ts,tsx}: Use TypeScript with strict typing throughout both client and server
Use try/catch blocks with specific error types for error handling
Use camelCase for variables and functions, PascalCase for components and types
Group imports by external, then internal, and sort alphabetically within groups

Files:

  • client/src/components/AppSidebar.tsx
client/**/*

📄 CodeRabbit Inference Engine (CLAUDE.md)

Frontend: Use Next.js, Tailwind CSS, Shadcn UI, Tanstack Query, Zustand, Luxon, Nivo, and react-hook-form

Files:

  • client/src/components/AppSidebar.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build Client Images (ubuntu-24.04-arm, linux/arm64)
  • GitHub Check: Build Client Images (ubuntu-latest, linux/amd64)
🔇 Additional comments (1)
client/src/components/AppSidebar.tsx (1)

11-11: IS_CLOUD is client-safe and strictly boolean
In client/src/lib/const.ts, IS_CLOUD is sourced from process.env.NEXT_PUBLIC_CLOUD and compared with === "true", yielding a true boolean value. No further changes are needed.

@goldflag goldflag merged commit b58e5aa into master Aug 20, 2025
6 checks passed
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