Skip to content

Conversation

sheriffjimoh
Copy link
Contributor

@sheriffjimoh sheriffjimoh commented Oct 8, 2025

Summary by Sourcery

Fix regressions and UI inconsistencies from the Sep/22 release by updating empty state text, enhancing profile hero styling, and tidying up URL builder formatting

Enhancements:

  • Standardize empty state messaging in user thread panels to “No public threads” with no description
  • Add vertical padding and a background image to the profile hero sections

Chores:

  • Clean up formatting in the URL builder module

Summary by CodeRabbit

  • Style

    • Profile header now uses a background image for a polished look.
    • Increased vertical padding in profile and chatbot hero sections for improved spacing.
    • Updated profile threads empty-state to “No public threads” for clearer messaging.
    • Adjusted user menu theme toggle sizing for more consistent header layout.
  • New Features

    • Added a "Select All" button to category selection panels.
  • Chores

    • Removed visibility of certain thread fields (is_pro, short_link) for some roles.
    • Minor formatting/whitespace cleanup with no functional impact.

@sheriffjimoh sheriffjimoh requested a review from AndlerRL October 8, 2025 00:05
@sheriffjimoh sheriffjimoh self-assigned this Oct 8, 2025
Copy link

vercel bot commented Oct 8, 2025

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

Project Deployment Preview Comments Updated (UTC)
masterbots Ready Ready Preview Comment Oct 9, 2025 0:02am
masterbots-pro Ready Ready Preview Comment Oct 9, 2025 0:02am

Copy link

sourcery-ai bot commented Oct 8, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR addresses regressions from the Sep/22nd release by standardizing the empty thread state messaging, enhancing the profile hero styling with padding and a background image, and cleaning up URL builder code formatting.

File-Level Changes

Change Details Files
Standardize empty thread state messaging
  • Replaced dynamic username in EmptyState with a static title 'No public threads'
  • Cleared the description field
apps/pro-web/components/routes/thread/user-thread-panel.tsx
apps/web/components/routes/thread/user-thread-panel.tsx
Add vertical padding to profile hero container
  • Added py-5 class to the hero inner div for consistent spacing
apps/pro-web/components/layout/profile/hero.tsx
apps/web/components/layout/profile/hero.tsx
Set background image for profile hero via global CSS
  • Added background-image: url("/hero-bg.jpg") to the .profile-hero-bg class
apps/pro-web/app/globals.css
apps/web/app/globals.css
Clean up URL builder code formatting
  • Inserted a blank line between the pathParts declaration and the push call for readability
apps/web/lib/url.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

coderabbitai bot commented Oct 8, 2025

Walkthrough

Adds a hero background image in both web apps, increases vertical padding in several Hero-related components, replaces a profile EmptyState with the static title "No public threads", removes is_pro and short_link from Hasura public_thread permissions, inserts a minor blank line in a URL util, and tweaks ThemeToggle sizing. No public APIs changed.

Changes

Cohort / File(s) Summary
Profile hero CSS
apps/pro-web/app/globals.css, apps/web/app/globals.css
Added background-image: url("/hero-bg.jpg") to .profile-hero-bg.
Hero & related padding
apps/pro-web/components/layout/profile/hero.tsx, apps/web/components/layout/profile/hero.tsx, apps/web/components/routes/browse/browse-chatbot-desktop-details.tsx
Added py-5 to inner/hero container divs to increase vertical spacing.
Empty state in user-thread panel
apps/pro-web/components/routes/thread/user-thread-panel.tsx, apps/web/components/routes/thread/user-thread-panel.tsx
Replaced dynamic "No Threads Available" EmptyState with static title "No public threads" and an empty description when viewing profile.
URL utility formatting
apps/web/lib/url.ts
Inserted a blank line for readability; no logic or output changes.
Hasura permissions (public_thread)
apps/hasura/metadata/databases/masterbots/tables/public_thread.yaml
Removed is_pro and short_link columns from multiple insert/select permission blocks across roles.
User menu ThemeToggle styling
apps/web/components/layout/header/user-menu.tsx
Adjusted ThemeToggle className from py-3 px-2 to px-2 text-sm py-3 h-11 to change visual sizing.
Category dashboard / onboarding buttons
apps/pro-web/components/shared/category-dashboard.tsx, apps/web/components/shared/category-dashboard.tsx, apps/pro-web/components/shared/onboarding-section.tsx
Added Select All handler and button to category dashboards; onboarding Select All button currently wired to clear handler (same effect as Clear All).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

bug, enhancement

Suggested reviewers

  • AndlerRL
  • Bran18

Poem

I’m a rabbit on a pixel hill,
I painted skies with one small thrill.
Threads grow quiet, banners bloom,
Padding soft around the room.
Hop, click—this patch makes profiles bright! 🐇✨

Pre-merge checks and finishing touches

❌ 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%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The title references fixing regressions and issues from the September 22nd release but uses generic phrasing and includes “Merge” in an unclear context, making it harder to understand the specific changes at a glance. Consider renaming the title to a concise summary of the key updates, for example “Fix UI inconsistencies and standardize empty state messaging from Sep 22 release,” to clearly highlight the primary changes without extra noise.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-new-popup-issues

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

@sourcery-ai sourcery-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.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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 (1)
apps/web/app/globals.css (1)

863-868: Asset exists; add WebP fallback and optimize image

  • apps/web/public/hero-bg.jpg is present.
  • Generate a hero-bg.webp variant with CSS fallback for modern browsers.
  • Compress/resize the image for optimal web delivery.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 774ec7c and 92b2fb3.

📒 Files selected for processing (7)
  • apps/pro-web/app/globals.css (1 hunks)
  • apps/pro-web/components/layout/profile/hero.tsx (1 hunks)
  • apps/pro-web/components/routes/thread/user-thread-panel.tsx (1 hunks)
  • apps/web/app/globals.css (1 hunks)
  • apps/web/components/layout/profile/hero.tsx (1 hunks)
  • apps/web/components/routes/thread/user-thread-panel.tsx (1 hunks)
  • apps/web/lib/url.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Avoid default exports; prefer named exports
Use meaningful variable names; prefix booleans with is/has/does/should
Use interface for objects/classes; type for unions/tuples/aliases; enum for fixed sets; const for literals
Avoid any; prefer specific types
Leverage type inference where clear; annotate function params and return types
Prefer type assertions with 'as' over angle-bracket syntax
Use type guards to narrow types in conditionals

**/*.{ts,tsx}: Avoid default exports; prefer named exports
Use modern JavaScript features with TypeScript across the codebase
Use meaningful names; prefix booleans with is/has/does/should (e.g., isDisabled)
Receive an object and return an object (RORO) for functions interfacing with external services
Type definitions: use interface for objects/classes; type for unions/tuples/aliases; const for literals; enum for fixed sets
Avoid any; prefer specific types
Leverage type inference; omit explicit annotations when obvious
Add explicit type annotations for function parameters and return values
Prefer type assertions with as over angle-bracket syntax
Use type guards to narrow types within conditionals
Favor composition over inheritance in code structure

**/*.{ts,tsx}: Avoid default exports; prefer named exports
Prefer RORO (Receive an object, return an object) for function signatures, especially for external service interactions
Use interface for object shapes/classes; type for unions/tuples/aliases; const for literals; enum for fixed enumerations
Avoid using any; prefer precise types
Leverage type inference when clear; omit redundant annotations
Explicitly annotate function parameters and return types
Prefer type assertions with as over angle-bracket syntax
Use type guards to narrow types safely
Use meaningful variable names; prefix booleans with is/has/does/should
Favor composition over inheritance
Use lowercase dash-separated names for files and folders; use extensions like .config.ts, .test.ts, .context.tsx, .typ...

Files:

  • apps/web/lib/url.ts
  • apps/web/components/layout/profile/hero.tsx
  • apps/pro-web/components/layout/profile/hero.tsx
  • apps/web/components/routes/thread/user-thread-panel.tsx
  • apps/pro-web/components/routes/thread/user-thread-panel.tsx
apps/{web,pro-web}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

apps/{web,pro-web}/**/*.{ts,tsx}: Use lowercase kebab-case for directories and filenames (components can omit extension)
Verify DOM operations and consider timing (RAF/delays) when manipulating the DOM in React
Use Tailwind CSS utility classes for styling React components

apps/{web,pro-web}/**/*.{ts,tsx}: Use TypeScript to define React props types (interfaces for props)
Use custom hooks (useMBChat, useThread, useSidebar, useModel) for domain-specific state and keep providers focused and composed hierarchically
Separate presentation from business logic and compose small components
Use hasura.service.ts for all GraphQL operations from UI layers

apps/{web,pro-web}/**/*.{ts,tsx}: Prefer Server Components; use the use client directive only when client-side features are required
Implement Nested Layouts using the App Router
Use Streaming and Suspense in Next.js 14/15 where appropriate
Follow Next.js file conventions as per documentation
Use IndexedDB for local caching to enable immediate UI updates

Files:

  • apps/web/lib/url.ts
  • apps/web/components/layout/profile/hero.tsx
  • apps/pro-web/components/layout/profile/hero.tsx
  • apps/web/components/routes/thread/user-thread-panel.tsx
  • apps/pro-web/components/routes/thread/user-thread-panel.tsx
**/*

📄 CodeRabbit inference engine (CLAUDE.md)

**/*: Use lowercase with dash-separated directory and file names; use specific extensions: .config.ts, .test.ts, .context.tsx, .type.ts, .hook.ts; components may omit extension
Use Bun for package management and scripts instead of npm/yarn
Use Biome for formatting and linting via bun format-and-lint:fix; avoid Prettier/ESLint configs

Files:

  • apps/web/lib/url.ts
  • apps/web/components/layout/profile/hero.tsx
  • apps/pro-web/components/layout/profile/hero.tsx
  • apps/web/components/routes/thread/user-thread-panel.tsx
  • apps/pro-web/app/globals.css
  • apps/web/app/globals.css
  • apps/pro-web/components/routes/thread/user-thread-panel.tsx
apps/{web,pro-web}/**/*.tsx

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

apps/{web,pro-web}/**/*.tsx: Declare React components with the function keyword
Name React components using PascalCase
Order component files: imports → constants → component → styled components → types/interfaces
Use functional components and hooks; type props with a TypeScript interface
Use regular function references (not inline arrows) for React event handlers to avoid extra re-renders

apps/{web,pro-web}/**/*.tsx: Use regular function references for event handlers instead of inline arrow functions in JSX
Declare React components with the function keyword (function ComponentName() {})
Use PascalCase for React component names
Order React component files: imports, constants, component, styled components, types/interfaces
Style components with Tailwind CSS utility classes

Files:

  • apps/web/components/layout/profile/hero.tsx
  • apps/pro-web/components/layout/profile/hero.tsx
  • apps/web/components/routes/thread/user-thread-panel.tsx
  • apps/pro-web/components/routes/thread/user-thread-panel.tsx
**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

**/*.tsx: Avoid inline arrow functions in JSX props; use stable function references for event handlers
Declare React components with the function keyword (functional components)
Use PascalCase for React component names
Use functional components and hooks instead of class components
Type component props with TypeScript interfaces

Files:

  • apps/web/components/layout/profile/hero.tsx
  • apps/pro-web/components/layout/profile/hero.tsx
  • apps/web/components/routes/thread/user-thread-panel.tsx
  • apps/pro-web/components/routes/thread/user-thread-panel.tsx
apps/{web,pro-web}/components/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Order component files: imports → constants → component → styled components → types/interfaces

Files:

  • apps/web/components/layout/profile/hero.tsx
  • apps/pro-web/components/layout/profile/hero.tsx
  • apps/web/components/routes/thread/user-thread-panel.tsx
  • apps/pro-web/components/routes/thread/user-thread-panel.tsx
apps/{web,pro-web}/components/routes/**

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Place page-specific components under components/routes/[feature]/

Organize page-specific components under components/routes/

Files:

  • apps/web/components/routes/thread/user-thread-panel.tsx
  • apps/pro-web/components/routes/thread/user-thread-panel.tsx
apps/{web,pro-web}/app/**

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

apps/{web,pro-web}/app/**: Prefer Next.js Server Components; use 'use client' only when necessary
Leverage Streaming and Suspense for responsiveness in Next.js 15
Follow Next.js file conventions in the App Router

apps/{web,pro-web}/app/**: Leverage Server Components by default; use the use client directive only when client-side features are needed
Implement Nested Layouts using the App Router
Use Streaming and Suspense features in Next.js 14/15 where appropriate
Follow Next.js file conventions for routing and layout in the App Router
Optimize data fetching: fetch on the server, fetch where needed, and use preload patterns to avoid waterfalls

Files:

  • apps/pro-web/app/globals.css
  • apps/web/app/globals.css
🧠 Learnings (2)
📚 Learning: 2025-08-29T20:34:24.433Z
Learnt from: AndlerRL
PR: bitcashorg/masterbots#542
File: apps/web/components/layout/profile/layout.tsx:67-68
Timestamp: 2025-08-29T20:34:24.433Z
Learning: The UserCard component in apps/web/components/routes/profile/user-card.tsx accepts a loading prop to show skeleton/loading states. This should be used when user data is not yet available rather than passing null or using type assertions.

Applied to files:

  • apps/web/components/layout/profile/hero.tsx
  • apps/pro-web/components/layout/profile/hero.tsx
📚 Learning: 2024-10-23T19:11:47.520Z
Learnt from: AndlerRL
PR: bitcashorg/masterbots#287
File: apps/masterbots.ai/components/routes/thread/user-thread-panel.tsx:39-45
Timestamp: 2024-10-23T19:11:47.520Z
Learning: In the `UserThreadPanel` component (`apps/masterbots.ai/components/routes/thread/user-thread-panel.tsx`), the `count` state variable is used in the `loadMore` function and depends on `finalThreads.length`, so updating `count` in the `useEffect` is necessary.

Applied to files:

  • apps/pro-web/components/routes/thread/user-thread-panel.tsx
🔇 Additional comments (6)
apps/pro-web/components/routes/thread/user-thread-panel.tsx (1)

486-486: LGTM! Simplified empty state messaging.

The change to a static "No public threads" message with an empty description simplifies the UI and clarifies that only public threads are shown on profile pages. The removal of the username-based description makes the message more concise.

apps/web/lib/url.ts (1)

320-320: LGTM! Improved readability.

The added whitespace improves code readability by separating the initialization from the subsequent operations.

apps/web/components/routes/thread/user-thread-panel.tsx (1)

487-487: LGTM! Consistent with pro-web changes.

The static "No public threads" message with an empty description aligns with the parallel change in the pro-web app, ensuring consistent UX across both applications.

apps/web/components/layout/profile/hero.tsx (1)

9-9: LGTM! Improved vertical spacing.

The addition of py-5 provides better vertical spacing around the UserCard, enhancing the visual hierarchy of the profile hero section. This works well with the new background image.

apps/pro-web/components/layout/profile/hero.tsx (1)

9-9: LGTM! Consistent spacing across apps.

The py-5 addition matches the web app implementation, ensuring consistent vertical spacing in the profile hero section across both applications.

apps/pro-web/app/globals.css (1)

863-868: hero-bg.jpg asset exists Verified at apps/pro-web/public/hero-bg.jpg.

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 (1)
apps/web/components/layout/header/user-menu.tsx (1)

100-102: Extract inline arrow function per coding guidelines.

The inline arrow function in the onClick handler should be extracted to a stable function reference to prevent unnecessary re-renders.

Apply this diff to extract the handler:

+	const handleDropdownClick = () => {
+		setOpen(false)
+	}
+
 	return (
 		<div className="items-center justify-between hidden md:block">
 			<DropdownMenu open={open} onOpenChange={setOpen}>
 				{/* ... */}
 				<DropdownMenuContent
 					sideOffset={8}
 					align="start"
 					className="w-[200px]"
-					onClick={(e) => {
-						setOpen(false)
-					}}
+					onClick={handleDropdownClick}
 				>

As per coding guidelines.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 92b2fb3 and 695cf24.

📒 Files selected for processing (3)
  • apps/hasura/metadata/databases/masterbots/tables/public_thread.yaml (0 hunks)
  • apps/web/components/layout/header/user-menu.tsx (1 hunks)
  • apps/web/components/routes/browse/browse-chatbot-desktop-details.tsx (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/hasura/metadata/databases/masterbots/tables/public_thread.yaml
✅ Files skipped from review due to trivial changes (1)
  • apps/web/components/routes/browse/browse-chatbot-desktop-details.tsx
🧰 Additional context used
📓 Path-based instructions (6)
apps/{web,pro-web}/**/*.tsx

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

apps/{web,pro-web}/**/*.tsx: Declare React components with the function keyword
Name React components using PascalCase
Order component files: imports → constants → component → styled components → types/interfaces
Use functional components and hooks; type props with a TypeScript interface
Use regular function references (not inline arrows) for React event handlers to avoid extra re-renders

apps/{web,pro-web}/**/*.tsx: Use regular function references for event handlers instead of inline arrow functions in JSX
Declare React components with the function keyword (function ComponentName() {})
Use PascalCase for React component names
Order React component files: imports, constants, component, styled components, types/interfaces
Style components with Tailwind CSS utility classes

Files:

  • apps/web/components/layout/header/user-menu.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Avoid default exports; prefer named exports
Use meaningful variable names; prefix booleans with is/has/does/should
Use interface for objects/classes; type for unions/tuples/aliases; enum for fixed sets; const for literals
Avoid any; prefer specific types
Leverage type inference where clear; annotate function params and return types
Prefer type assertions with 'as' over angle-bracket syntax
Use type guards to narrow types in conditionals

**/*.{ts,tsx}: Avoid default exports; prefer named exports
Use modern JavaScript features with TypeScript across the codebase
Use meaningful names; prefix booleans with is/has/does/should (e.g., isDisabled)
Receive an object and return an object (RORO) for functions interfacing with external services
Type definitions: use interface for objects/classes; type for unions/tuples/aliases; const for literals; enum for fixed sets
Avoid any; prefer specific types
Leverage type inference; omit explicit annotations when obvious
Add explicit type annotations for function parameters and return values
Prefer type assertions with as over angle-bracket syntax
Use type guards to narrow types within conditionals
Favor composition over inheritance in code structure

**/*.{ts,tsx}: Avoid default exports; prefer named exports
Prefer RORO (Receive an object, return an object) for function signatures, especially for external service interactions
Use interface for object shapes/classes; type for unions/tuples/aliases; const for literals; enum for fixed enumerations
Avoid using any; prefer precise types
Leverage type inference when clear; omit redundant annotations
Explicitly annotate function parameters and return types
Prefer type assertions with as over angle-bracket syntax
Use type guards to narrow types safely
Use meaningful variable names; prefix booleans with is/has/does/should
Favor composition over inheritance
Use lowercase dash-separated names for files and folders; use extensions like .config.ts, .test.ts, .context.tsx, .typ...

Files:

  • apps/web/components/layout/header/user-menu.tsx
apps/{web,pro-web}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

apps/{web,pro-web}/**/*.{ts,tsx}: Use lowercase kebab-case for directories and filenames (components can omit extension)
Verify DOM operations and consider timing (RAF/delays) when manipulating the DOM in React
Use Tailwind CSS utility classes for styling React components

apps/{web,pro-web}/**/*.{ts,tsx}: Use TypeScript to define React props types (interfaces for props)
Use custom hooks (useMBChat, useThread, useSidebar, useModel) for domain-specific state and keep providers focused and composed hierarchically
Separate presentation from business logic and compose small components
Use hasura.service.ts for all GraphQL operations from UI layers

apps/{web,pro-web}/**/*.{ts,tsx}: Prefer Server Components; use the use client directive only when client-side features are required
Implement Nested Layouts using the App Router
Use Streaming and Suspense in Next.js 14/15 where appropriate
Follow Next.js file conventions as per documentation
Use IndexedDB for local caching to enable immediate UI updates

Files:

  • apps/web/components/layout/header/user-menu.tsx
**/*

📄 CodeRabbit inference engine (CLAUDE.md)

**/*: Use lowercase with dash-separated directory and file names; use specific extensions: .config.ts, .test.ts, .context.tsx, .type.ts, .hook.ts; components may omit extension
Use Bun for package management and scripts instead of npm/yarn
Use Biome for formatting and linting via bun format-and-lint:fix; avoid Prettier/ESLint configs

Files:

  • apps/web/components/layout/header/user-menu.tsx
**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

**/*.tsx: Avoid inline arrow functions in JSX props; use stable function references for event handlers
Declare React components with the function keyword (functional components)
Use PascalCase for React component names
Use functional components and hooks instead of class components
Type component props with TypeScript interfaces

Files:

  • apps/web/components/layout/header/user-menu.tsx
apps/{web,pro-web}/components/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Order component files: imports → constants → component → styled components → types/interfaces

Files:

  • apps/web/components/layout/header/user-menu.tsx
🔇 Additional comments (1)
apps/web/components/layout/header/user-menu.tsx (1)

128-128: LGTM! Styling standardization looks good.

The className update aligns the ThemeToggle styling with other menu items by adding text-sm and h-11, ensuring visual consistency across the dropdown menu.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 695cf24 and e20ccd4.

📒 Files selected for processing (3)
  • apps/pro-web/components/shared/category-dashboard.tsx (2 hunks)
  • apps/pro-web/components/shared/onboarding-section.tsx (1 hunks)
  • apps/web/components/shared/category-dashboard.tsx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
apps/{web,pro-web}/components/shared/**

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Place reusable UI under components/shared/

Place reusable UI elements under components/shared/

Files:

  • apps/pro-web/components/shared/category-dashboard.tsx
  • apps/web/components/shared/category-dashboard.tsx
  • apps/pro-web/components/shared/onboarding-section.tsx
apps/{web,pro-web}/**/*.tsx

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

apps/{web,pro-web}/**/*.tsx: Declare React components with the function keyword
Name React components using PascalCase
Order component files: imports → constants → component → styled components → types/interfaces
Use functional components and hooks; type props with a TypeScript interface
Use regular function references (not inline arrows) for React event handlers to avoid extra re-renders

apps/{web,pro-web}/**/*.tsx: Use regular function references for event handlers instead of inline arrow functions in JSX
Declare React components with the function keyword (function ComponentName() {})
Use PascalCase for React component names
Order React component files: imports, constants, component, styled components, types/interfaces
Style components with Tailwind CSS utility classes

Files:

  • apps/pro-web/components/shared/category-dashboard.tsx
  • apps/web/components/shared/category-dashboard.tsx
  • apps/pro-web/components/shared/onboarding-section.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Avoid default exports; prefer named exports
Use meaningful variable names; prefix booleans with is/has/does/should
Use interface for objects/classes; type for unions/tuples/aliases; enum for fixed sets; const for literals
Avoid any; prefer specific types
Leverage type inference where clear; annotate function params and return types
Prefer type assertions with 'as' over angle-bracket syntax
Use type guards to narrow types in conditionals

**/*.{ts,tsx}: Avoid default exports; prefer named exports
Use modern JavaScript features with TypeScript across the codebase
Use meaningful names; prefix booleans with is/has/does/should (e.g., isDisabled)
Receive an object and return an object (RORO) for functions interfacing with external services
Type definitions: use interface for objects/classes; type for unions/tuples/aliases; const for literals; enum for fixed sets
Avoid any; prefer specific types
Leverage type inference; omit explicit annotations when obvious
Add explicit type annotations for function parameters and return values
Prefer type assertions with as over angle-bracket syntax
Use type guards to narrow types within conditionals
Favor composition over inheritance in code structure

**/*.{ts,tsx}: Avoid default exports; prefer named exports
Prefer RORO (Receive an object, return an object) for function signatures, especially for external service interactions
Use interface for object shapes/classes; type for unions/tuples/aliases; const for literals; enum for fixed enumerations
Avoid using any; prefer precise types
Leverage type inference when clear; omit redundant annotations
Explicitly annotate function parameters and return types
Prefer type assertions with as over angle-bracket syntax
Use type guards to narrow types safely
Use meaningful variable names; prefix booleans with is/has/does/should
Favor composition over inheritance
Use lowercase dash-separated names for files and folders; use extensions like .config.ts, .test.ts, .context.tsx, .typ...

Files:

  • apps/pro-web/components/shared/category-dashboard.tsx
  • apps/web/components/shared/category-dashboard.tsx
  • apps/pro-web/components/shared/onboarding-section.tsx
apps/{web,pro-web}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

apps/{web,pro-web}/**/*.{ts,tsx}: Use lowercase kebab-case for directories and filenames (components can omit extension)
Verify DOM operations and consider timing (RAF/delays) when manipulating the DOM in React
Use Tailwind CSS utility classes for styling React components

apps/{web,pro-web}/**/*.{ts,tsx}: Use TypeScript to define React props types (interfaces for props)
Use custom hooks (useMBChat, useThread, useSidebar, useModel) for domain-specific state and keep providers focused and composed hierarchically
Separate presentation from business logic and compose small components
Use hasura.service.ts for all GraphQL operations from UI layers

apps/{web,pro-web}/**/*.{ts,tsx}: Prefer Server Components; use the use client directive only when client-side features are required
Implement Nested Layouts using the App Router
Use Streaming and Suspense in Next.js 14/15 where appropriate
Follow Next.js file conventions as per documentation
Use IndexedDB for local caching to enable immediate UI updates

Files:

  • apps/pro-web/components/shared/category-dashboard.tsx
  • apps/web/components/shared/category-dashboard.tsx
  • apps/pro-web/components/shared/onboarding-section.tsx
**/*

📄 CodeRabbit inference engine (CLAUDE.md)

**/*: Use lowercase with dash-separated directory and file names; use specific extensions: .config.ts, .test.ts, .context.tsx, .type.ts, .hook.ts; components may omit extension
Use Bun for package management and scripts instead of npm/yarn
Use Biome for formatting and linting via bun format-and-lint:fix; avoid Prettier/ESLint configs

Files:

  • apps/pro-web/components/shared/category-dashboard.tsx
  • apps/web/components/shared/category-dashboard.tsx
  • apps/pro-web/components/shared/onboarding-section.tsx
**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

**/*.tsx: Avoid inline arrow functions in JSX props; use stable function references for event handlers
Declare React components with the function keyword (functional components)
Use PascalCase for React component names
Use functional components and hooks instead of class components
Type component props with TypeScript interfaces

Files:

  • apps/pro-web/components/shared/category-dashboard.tsx
  • apps/web/components/shared/category-dashboard.tsx
  • apps/pro-web/components/shared/onboarding-section.tsx
apps/{web,pro-web}/components/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Order component files: imports → constants → component → styled components → types/interfaces

Files:

  • apps/pro-web/components/shared/category-dashboard.tsx
  • apps/web/components/shared/category-dashboard.tsx
  • apps/pro-web/components/shared/onboarding-section.tsx
apps/{web,pro-web}/components/shared/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Store reusable UI elements in components/shared/

Files:

  • apps/pro-web/components/shared/category-dashboard.tsx
  • apps/web/components/shared/category-dashboard.tsx
  • apps/pro-web/components/shared/onboarding-section.tsx
🧬 Code graph analysis (1)
apps/web/components/shared/category-dashboard.tsx (1)
packages/mb-drizzle/src/drizzle/schema.ts (1)
  • category (220-228)
🔇 Additional comments (3)
apps/web/components/shared/category-dashboard.tsx (2)

61-64: LGTM! Clean implementation of bulk selection.

The handleSelectAll function correctly extracts all category IDs and updates the local selection state. The implementation is symmetric with handleClearAll and follows the existing pattern.


142-148: LGTM! Select All button enhances UX.

The button is well-positioned between Clear All and Apply Selection, with consistent styling and proper event handler reference.

apps/pro-web/components/shared/category-dashboard.tsx (1)

61-64: LGTM! Consistent implementation across apps.

The handleSelectAll function and Select All button match the web version exactly, ensuring a consistent user experience across both applications.

Also applies to: 142-148

Comment on lines +102 to +108
<button
type="button"
onClick={handleClearAll}
className="flex-1 px-3 py-2 text-sm font-medium text-white bg-gray-700 rounded-lg shadow-sm transition-colors sm:flex-none sm:px-4 hover:bg-gray-600"
>
Select All
</button>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Critical bug: Select All button clears selections instead of selecting all.

The Select All button on Line 104 calls handleClearAll, which will clear all selections rather than selecting all categories. This is the opposite of the intended behavior.

Apply this diff to fix the issue:

First, add the missing handleSelectAll function after handleClearAll:

 	const handleClearAll = () => {
 		setLocalSelectedCategories([])
 	}
+
+	const handleSelectAll = () => {
+		const allCategoryIds = allCategories.map((category) => category.categoryId)
+		setLocalSelectedCategories(allCategoryIds)
+	}

Then, update the Select All button to call the correct handler:

 				<button
 					type="button"
-					onClick={handleClearAll}
+					onClick={handleSelectAll}
 					className="flex-1 px-3 py-2 text-sm font-medium text-white bg-gray-700 rounded-lg shadow-sm transition-colors sm:flex-none sm:px-4 hover:bg-gray-600"
 				>
 					Select All
 				</button>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<button
type="button"
onClick={handleClearAll}
className="flex-1 px-3 py-2 text-sm font-medium text-white bg-gray-700 rounded-lg shadow-sm transition-colors sm:flex-none sm:px-4 hover:bg-gray-600"
>
Select All
</button>
// … earlier in the component…
const handleClearAll = () => {
setLocalSelectedCategories([])
}
const handleSelectAll = () => {
const allCategoryIds = allCategories.map((category) => category.categoryId)
setLocalSelectedCategories(allCategoryIds)
}
// … later, in the JSX …
<button
type="button"
onClick={handleSelectAll}
className="flex-1 px-3 py-2 text-sm font-medium text-white bg-gray-700 rounded-lg shadow-sm transition-colors sm:flex-none sm:px-4 hover:bg-gray-600"
>
Select All
</button>
🤖 Prompt for AI Agents
In apps/pro-web/components/shared/onboarding-section.tsx around lines 102 to
108, the "Select All" button is wired to handleClearAll which wrongly clears
selections; add a new handleSelectAll function immediately after handleClearAll
that sets the selected state to include all available categories (e.g.,
setSelectedCategories(allCategories) or setSelectedCategories(categories.map(c
=> c.id)) depending on how selections are stored), then change the button's
onClick to call handleSelectAll instead of handleClearAll.

@AndlerRL
Copy link
Member

AndlerRL commented Oct 9, 2025

@sheriffjimoh — I see some updates in the PR 🚀 let me know if it is good to go for a review

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