Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: prelaunch UX/UI Changes #336

Merged
merged 15 commits into from
Jan 21, 2025
Merged

Conversation

Bran18
Copy link
Contributor

@Bran18 Bran18 commented Jan 10, 2025

Summary by Sourcery

New Features:

  • Introduce a new onboarding experience for new users to guide them through the chatbot selection process.

Summary by CodeRabbit

Release Notes v1.0.0

  • New Features

    • Added mobile-specific views for chat onboarding and selected chatbot
    • Enhanced sidebar gradient styling for different routes
    • Improved route-based UI customization
  • UI/UX Improvements

    • Refined navigation links in header and sidebar
    • Updated mobile responsiveness for chat and browse sections
    • Removed font size selector from chat options
  • Performance

    • Updated dependencies to latest versions
    • Added Node.js version compatibility requirements
  • Chores

    • Cleaned up unused components and imports
    • Standardized code formatting and styling

@Bran18 Bran18 self-assigned this Jan 10, 2025
Copy link

vercel bot commented Jan 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
masterbots ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 21, 2025 3:45am

Copy link

sourcery-ai bot commented Jan 10, 2025

Reviewer's Guide by Sourcery

This PR introduces several UX/UI improvements to the prelaunch experience, enhancing user onboarding and navigation. It simplifies the onboarding process on both desktop and mobile, improves UI elements in the sidebar, and streamlines the model selection process.

State diagram for sidebar and chat interface states

stateDiagram-v2
    [*] --> Welcome
    Welcome --> BotSelection: User clicks sidebar
    BotSelection --> ChatInterface: Bot selected
    ChatInterface --> ActiveChat: Start chat
    ActiveChat --> BotSelection: Change bot

    state ChatInterface {
        [*] --> ShowBotDetails
        ShowBotDetails --> ReadyToChat
        ReadyToChat --> [*]
    }

    state BotSelection {
        [*] --> PublicRoute
        [*] --> ChatRoute
        PublicRoute --> SelectBot
        ChatRoute --> SelectBot
    }
Loading

File-Level Changes

Change Details Files
Improved UI elements in the sidebar to enhance navigation and user experience.
  • Added route-based background gradients to the sidebar links.
  • Added a selected state for better visual feedback.
  • Improved styling for active and hover states.
apps/masterbots.ai/components/layout/sidebar/sidebar-link.tsx
apps/masterbots.ai/app/globals.css
Simplified onboarding experience on desktop and mobile devices.
  • Removed unnecessary elements from the onboarding view.
  • Added clearer instructions for new users.
  • Improved visual appeal of the onboarding screens.
  • Created separate mobile views for onboarding and selected bot states.
apps/masterbots.ai/components/routes/chat/onboarding-chatbot-details.tsx
apps/masterbots.ai/components/routes/chat/chat-chatbot-details.tsx
apps/masterbots.ai/components/routes/chat/chat-selected-chatbot-mobile.tsx
apps/masterbots.ai/components/routes/chat/chat-onboarding-chatbot-mobile.tsx
Streamlined model selection in non-production environments.
  • Simplified model selection to default Masterbot's model in production.
  • Full model selection is retained for development and local environments.
apps/masterbots.ai/components/routes/chat/chat-combobox.tsx
Removed publicity switch and font size selector from chat options.
  • Removed the publicity switch from the thread popup.
  • Removed the font size selector from chat options.
apps/masterbots.ai/components/routes/chat/chat-options.tsx
apps/masterbots.ai/components/routes/thread/thread-popup.tsx
Improved prompt form interaction and bot selection.
  • Added a clickable overlay to prompt bot selection when no bot is selected.
  • Improved prompt form height and padding for better mobile responsiveness.
apps/masterbots.ai/components/routes/chat/prompt-form.tsx
Updated routing and navigation.
  • Added a getRouteType utility function to determine route types.
  • Updated sidebar styling based on route.
  • Updated header links.
  • Refactored navigation logic in the profile sidebar.
apps/masterbots.ai/components/layout/sidebar/profile-sidebar.tsx
apps/masterbots.ai/components/layout/header/header.tsx
apps/masterbots.ai/lib/utils.ts
apps/masterbots.ai/components/layout/sidebar/sidebar.tsx
Improved search input visibility.
  • Search input is now only visible when there are threads to search.
apps/masterbots.ai/components/routes/thread/user-thread-panel.tsx
Updated tooltip styling and animation.
  • Updated tooltip styles for better visibility and animation.
apps/masterbots.ai/components/ui/tooltip.tsx
Upgraded Radix UI tooltip package.
  • Upgraded @radix-ui/react-tooltip to version 1.1.6.
apps/masterbots.ai/package.json

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.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a 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. You can also use
    this command to specify where the summary should be inserted.

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 Jan 10, 2025

Walkthrough

This pull request introduces several enhancements to the Masterbots.ai application, focusing on improving the user interface and routing experience. The changes span multiple components, including sidebar styling, navigation links, mobile views for chatbots, and route-specific gradient backgrounds. Key modifications include adding route-specific gradients, updating mobile views for chatbot interactions, removing certain UI elements like font size selectors, and introducing more dynamic routing capabilities.

Changes

File Change Summary
apps/masterbots.ai/app/globals.css Added new CSS gradient properties for chat and public routes
apps/masterbots.ai/components/layout/header/header.tsx Simplified navigation links, removed "Ww" link
apps/masterbots.ai/components/layout/sidebar/* Updated sidebar components with route-specific styling and interactions
apps/masterbots.ai/components/routes/chat/* Introduced new mobile views, removed font size selector, enhanced chatbot selection
apps/masterbots.ai/lib/utils.ts Added getRouteType function for route classification
package.json Updated dependency versions and added Node.js engine requirements

Sequence Diagram

sequenceDiagram
    participant User
    participant Sidebar
    participant Header
    participant ChatView
    
    User->>Sidebar: Interact with navigation
    Sidebar->>Sidebar: Apply route-specific gradient
    Sidebar->>Header: Update active route
    Sidebar->>ChatView: Trigger route change
    ChatView->>ChatView: Render appropriate mobile view
Loading

Possibly related PRs

Suggested Labels

enhancement, feature

Poem

🐰 A Rabbit's Ode to UI Delight

Gradients dance, routes take flight,
Sidebars shimmer, colors bright
Mobile views with playful grace,
Masterbots now have a new face!
Code hops, design takes its leap! 🌈


📜 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 967bc7d and bac3f05.

⛔ Files ignored due to path filters (1)
  • bun.lockb is excluded by !**/bun.lockb
📒 Files selected for processing (1)
  • package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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

@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 @Bran18 - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider fixing the dependency arrays in useCallback/useEffect hooks instead of using biome-ignore comments. Missing dependencies could lead to stale closures and bugs.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

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: 4

🧹 Nitpick comments (17)
apps/masterbots.ai/components/routes/chat/onboarding-chatbot-details.tsx (6)

8-12: Consider adding prop validation for required fields.

With the removal of default values, botName and other props are now required. Consider adding PropTypes or TypeScript type guards to ensure these required props are properly validated at runtime.


15-16: Remove commented code.

Remove the commented background styling code if it's no longer needed. If this is temporary, consider creating a task to address this later.


17-18: Extract magic number into a named constant.

The height calculation uses a magic number (196px). Consider extracting this into a named constant to improve maintainability and document its purpose.

+const HEADER_OFFSET = 196; // Document why this specific value is used
-<div className="hidden h-[calc(100vh-196px)] md:flex items-center justify-center -translate-y-8 relative">
+<div className={`hidden h-[calc(100vh-${HEADER_OFFSET}px)] md:flex items-center justify-center -translate-y-8 relative`}>

32-36: Simplify className concatenation.

Consider using a CSS module or creating a dedicated style constant for better maintainability.

+const avatarStyles = {
+  base: 'size-32 rounded-full relative',
+  background: 'bg-zinc-200 dark:bg-black',
+  ring: 'ring-4 ring-[#be16e8] dark:ring-[#82e46a]'
+};
-className={cn(
-  'size-32 rounded-full relative',
-  'bg-zinc-200 dark:bg-black',
-  'ring-4 ring-[#be16e8] dark:ring-[#82e46a]'
-)}
+className={cn(avatarStyles.base, avatarStyles.background, avatarStyles.ring)}

38-44: Add loading and error handling for the avatar image.

The Image component should handle loading states and potential errors gracefully.

<Image
  src={avatar}
  alt={`${botName} avatar`}
  height={128}
  width={128}
+ loading="eager"
+ onError={(e) => {
+   e.currentTarget.src = '/default-avatar.png'
+ }}
  className="object-cover rounded-full"
/>

51-54: Consider using CSS Grid for responsive layout.

The current approach uses complex width calculations. CSS Grid could provide a more maintainable solution for the layout.

-<p className="pt-2.5 max-w-[calc(100%-160px)] text-base text-zinc-500 dark:text-zinc-500 min-h-24">
+<div className="grid grid-cols-[1fr_160px] gap-4">
+  <p className="pt-2.5 text-base text-zinc-500 dark:text-zinc-500 min-h-24">
apps/masterbots.ai/components/routes/chat/chat-onboarding-chatbot-mobile.tsx (1)

7-7: Use CSS variables for theme colors.

Hard-coded colors like #be16e8 and #82e46a should be moved to CSS variables for better maintainability and theme consistency.

Consider using CSS variables like:

-<Card className="w-full bg-white dark:bg-[#09090B]">
+<Card className="w-full bg-card">
-<PanelLeft className="size-6 text-[#be16e8] dark:text-[#82e46a]" />
+<PanelLeft className="size-6 text-accent" />

Also applies to: 25-26

apps/masterbots.ai/components/layout/sidebar/sidebar.tsx (2)

19-26: Explain the useEffect dependency warning ignore.

The biome-ignore comment should include a proper explanation for why the exhaustive dependencies warning is being ignored.

Consider either:

  1. Adding the missing dependencies
  2. Explaining the reason in the ignore comment

36-39: Use CSS variables for route-specific styling.

The background colors are hardcoded, which makes theme maintenance difficult.

Consider using CSS variables:

-          isChatRoute 
-            ? 'bg-[#eeffea] dark:bg-[#081D02]' // For /c routes
-            : 'bg-[#fae8ff] dark:bg-[#17021D]'  // For other routes
+          isChatRoute 
+            ? 'bg-chat-gradient dark:bg-chat-gradient-dark'
+            : 'bg-public-gradient dark:bg-public-gradient-dark'
apps/masterbots.ai/components/routes/chat/chat-selected-chatbot-mobile.tsx (2)

45-51: Optimize image loading for better UX.

The Image component could benefit from additional optimization properties.

Consider adding priority and loading properties:

 <Image
   src={avatar}
   alt={`${botName} avatar`}
   height={64}
   width={64}
+  priority
+  loading="eager"
   className="object-cover rounded-full"
 />

38-43: Use CSS variables for consistent theming.

Similar to other components, the colors and dimensions should use CSS variables.

Consider using CSS variables:

-                    'ring-4 ring-[#be16e8] dark:ring-[#82e46a]'
+                    'ring-4 ring-accent dark:ring-accent-dark'
apps/masterbots.ai/components/routes/chat/chat-chatbot-details.tsx (1)

98-107: Consider extracting mobile view props.

The mobile view components receive multiple props that could be simplified using a shared props object, similar to how sharedProps is used for OnboardingChatbotDetails.

-      {isWelcomeView ? (
-        <OnboardingMobileView />
-      ) : (
-        <SelectedBotMobileView
-          botName={botName}
-          description={activeChatbot?.description || ''}
-          avatar={activeChatbot?.avatar || randomChatbot?.avatar || ''}
-          onNewChat={handleNewChat}
-        />
-      )}{' '}
+      {isWelcomeView ? (
+        <OnboardingMobileView />
+      ) : (
+        <SelectedBotMobileView {...sharedProps} />
+      )}
apps/masterbots.ai/components/routes/chat/chat-combobox.tsx (1)

48-48: Consider using a constant for environment check.

The environment check could be moved to a constant or utility function for reusability and consistency across the application.

+const ENV = {
+  isProd: process.env.NEXT_PUBLIC_APP_ENV === 'prod',
+  isDev: process.env.NEXT_PUBLIC_APP_ENV !== 'prod'
+} as const
+
-const isDevEnv = process.env.NEXT_PUBLIC_APP_ENV !== 'prod'
+const isDevEnv = ENV.isDev
apps/masterbots.ai/components/layout/sidebar/profile-sidebar.tsx (2)

46-57: Consider adding loading state for profile navigation.

The goToProfile function should handle loading states to provide better user feedback during navigation.

+  const [isNavigating, setIsNavigating] = useState(false)
   const goToProfile = useCallback(
     async (e: React.MouseEvent) => {
       e.preventDefault()
       e.stopPropagation()
+      setIsNavigating(true)
       const userSlug = toSlugWithUnderScore(user.name || '')
       if (userSlug) {
         setIsOpen(false)
-        router.push(`/u/${userSlug}/t`)
+        try {
+          await router.push(`/u/${userSlug}/t`)
+        } finally {
+          setIsNavigating(false)
+        }
       }
     },
-    [router, user.name]
+    [router, user.name, setIsNavigating]
   )

129-144: Consider extracting navigation config to a constant.

The navigation buttons could be defined in a configuration object for better maintainability.

+const NAVIGATION_ITEMS = {
+  pro: {
+    path: '/c/p',
+    label: 'Pro',
+    requiresDevMode: true
+  },
+  wordware: {
+    path: '/wordware',
+    label: 'Ww',
+    requiresDevMode: true
+  }
+} as const

 {appConfig.features.devMode && (
   <>
-    <Button
-      variant="ghost"
-      className="justify-start w-full text-sm"
-      onClick={() => handleNavigation('/c/p')}
-    >
-      Pro
-    </Button>
-    <Button
-      variant="ghost"
-      className="justify-start w-full text-sm"
-      onClick={() => handleNavigation('/wordware')}
-    >
-      Ww
-    </Button>
+    {Object.entries(NAVIGATION_ITEMS).map(([key, item]) => (
+      <Button
+        key={key}
+        variant="ghost"
+        className="justify-start w-full text-sm"
+        onClick={() => handleNavigation(item.path)}
+      >
+        {item.label}
+      </Button>
+    ))}
   </>
 )}
apps/masterbots.ai/components/layout/sidebar/sidebar-link.tsx (1)

29-29: Consider memoizing route type calculation.

The getRouteType(pathname) is called in multiple components. Consider memoizing this value at a higher level to avoid recalculation.

-const routeType = getRouteType(pathname)
+const routeType = useMemo(() => getRouteType(pathname), [pathname])
apps/masterbots.ai/lib/utils.ts (1)

337-342: Consider handling additional edge cases for route determination.

While the current implementation works for basic routes, consider these improvements:

  1. Handle subpaths that might contain 'chat' or 'public' elsewhere in the URL
  2. Consider normalizing the pathname to handle trailing slashes consistently

Here's a more robust implementation:

 export function getRouteType(pathname: string | null): 'chat' | 'public' | '' {
   if (!pathname) return ''
-  if (pathname.startsWith('/c')) return 'chat'
-  if (pathname.startsWith('/')) return 'public'
+  // Normalize pathname by removing trailing slash
+  const normalizedPath = pathname.replace(/\/$/, '')
+  // Match exact /c or /c/ prefix or /c/<anything> pattern
+  if (/^\/c(?:\/|$)/.test(normalizedPath)) return 'chat'
+  // Any other valid path starting with / is public
+  if (normalizedPath.startsWith('/')) return 'public'
   return ''
 }
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4ed5de7 and 444f364.

⛔ Files ignored due to path filters (1)
  • bun.lockb is excluded by !**/bun.lockb
📒 Files selected for processing (18)
  • apps/masterbots.ai/app/globals.css (3 hunks)
  • apps/masterbots.ai/components/layout/header/header.tsx (1 hunks)
  • apps/masterbots.ai/components/layout/sidebar/profile-sidebar.tsx (2 hunks)
  • apps/masterbots.ai/components/layout/sidebar/sidebar-link.tsx (8 hunks)
  • apps/masterbots.ai/components/layout/sidebar/sidebar.tsx (2 hunks)
  • apps/masterbots.ai/components/routes/chat/chat-chatbot-details.tsx (3 hunks)
  • apps/masterbots.ai/components/routes/chat/chat-combobox.tsx (4 hunks)
  • apps/masterbots.ai/components/routes/chat/chat-onboarding-chatbot-mobile.tsx (1 hunks)
  • apps/masterbots.ai/components/routes/chat/chat-options.tsx (1 hunks)
  • apps/masterbots.ai/components/routes/chat/chat-selected-chatbot-mobile.tsx (1 hunks)
  • apps/masterbots.ai/components/routes/chat/onboarding-chatbot-details.tsx (1 hunks)
  • apps/masterbots.ai/components/routes/chat/onboarding-chatbot-mobile-details.tsx (0 hunks)
  • apps/masterbots.ai/components/routes/chat/prompt-form.tsx (5 hunks)
  • apps/masterbots.ai/components/routes/thread/thread-popup.tsx (0 hunks)
  • apps/masterbots.ai/components/routes/thread/user-thread-panel.tsx (1 hunks)
  • apps/masterbots.ai/components/ui/tooltip.tsx (2 hunks)
  • apps/masterbots.ai/lib/utils.ts (1 hunks)
  • apps/masterbots.ai/package.json (1 hunks)
💤 Files with no reviewable changes (2)
  • apps/masterbots.ai/components/routes/thread/thread-popup.tsx
  • apps/masterbots.ai/components/routes/chat/onboarding-chatbot-mobile-details.tsx
✅ Files skipped from review due to trivial changes (2)
  • apps/masterbots.ai/package.json
  • apps/masterbots.ai/components/ui/tooltip.tsx
🔇 Additional comments (10)
apps/masterbots.ai/components/routes/chat/onboarding-chatbot-details.tsx (1)

20-28: Well-structured conditional rendering!

The component effectively handles different states with clear, distinct UI elements and appropriate messaging for each view.

Also applies to: 57-64, 67-78

apps/masterbots.ai/components/layout/header/header.tsx (1)

23-24: LGTM! Navigation structure simplified.

The navigation changes improve clarity by replacing specialized links with a more intuitive "Public" link, while maintaining the conditional "Pro" link for development mode.

apps/masterbots.ai/components/routes/chat/chat-onboarding-chatbot-mobile.tsx (1)

6-6: Consider using dynamic height calculation.

The fixed height calculation h-[calc(100vh-196px)] might not work well across different mobile devices and screen sizes.

Consider using a more flexible approach like CSS Grid or Flexbox with min-height to ensure the content is always visible.

apps/masterbots.ai/components/routes/chat/chat-selected-chatbot-mobile.tsx (1)

20-20: Consider flexible height calculation.

Similar to the onboarding view, the fixed height calculation might cause issues on different devices.

Consider using a more flexible layout approach that adapts to different screen sizes.

apps/masterbots.ai/components/routes/chat/chat-options.tsx (1)

21-21: LGTM! UI simplification by removing font size selector.

The removal of the font size selector streamlines the chat options interface, focusing on essential features like thread visibility and sharing.

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

217-221: LGTM! Improved UX by conditionally rendering search.

The search input is now only shown when threads exist, reducing visual clutter and providing a cleaner interface.

apps/masterbots.ai/components/layout/sidebar/sidebar-link.tsx (1)

158-159: LGTM! Well-structured route-based styling implementation.

The addition of data-route attributes enables consistent styling across different routes while maintaining clean separation of concerns between logic and styles.

Also applies to: 175-176, 251-257, 276-292

apps/masterbots.ai/app/globals.css (1)

53-58: LGTM! Well-structured gradient system for route-specific styling.

The implementation:

  • Uses CSS custom properties for maintainable theming
  • Provides consistent styling for both light and dark modes
  • Implements smooth transitions for hover states

Also applies to: 105-110, 325-345

apps/masterbots.ai/lib/utils.ts (2)

332-336: Well-documented function with clear JSDoc comments.

The documentation clearly describes the purpose, parameters, and return types of the function.


337-342: Verify the impact on route-based styling.

Since this function is crucial for UI/UX changes, let's verify its usage in the sidebar components.

✅ Verification successful

Route type function is correctly integrated with styling system.

The getRouteType function is properly used for route-based styling across sidebar components, with CSS classes correctly matching its return values. The implementation handles all route patterns consistently and is crucial for the UI/UX styling system.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check how getRouteType is used in sidebar components and verify potential edge cases

# Find all files that import or use getRouteType
echo "Files importing or using getRouteType:"
rg -l "getRouteType" --type ts --type tsx

# Check for all route patterns in the codebase to ensure we handle them correctly
echo -e "\nAll unique route patterns in the codebase:"
rg -o 'path(?:name)?=["\'`](.*?)["\'`]' --type ts --type tsx | sort -u

Length of output: 375


Script:

#!/bin/bash
# Search for getRouteType usage with context
echo "=== Files using getRouteType with context ==="
rg "getRouteType" -t typescript -t tsx -C 2

# Find route patterns with proper quote escaping
echo -e "\n=== Route patterns in the codebase ==="
rg "pathname\s*=\s*['\"].*?['\"]" -t typescript -t tsx

# Look specifically in sidebar-related files
echo -e "\n=== Sidebar-related files containing route logic ==="
rg -l "Sidebar|sidebar" -t typescript -t tsx | xargs rg "pathname|route" -C 2

Length of output: 76309

@AndlerRL
Copy link
Member

@sheriffjimoh -- @Bran18 has some code conflicts, which some of them are related with your changes. Can you double-check? It should be the chat-chatbot-details component. Also it would be good to read the changes as well, most of the changes are key for the UI/UX upgrades.

@coderabbitai please help our collaborators to see if any of these conflicting files (or others that Bran18 has worked on this PR) was previously updated by sheriffjimoh.

Copy link
Contributor

coderabbitai bot commented Jan 14, 2025

Tip

For best results, initiate chat on the files or code changes.

@AndlerRL I've found several recent changes by @sheriffjimoh that could be causing conflicts:

  1. Most notably, PR User following  #319 (merged Dec 21) made significant changes to chat-chatbot-details.tsx (+68/-9 lines) along with changes to onboarding-chatbot-details.tsx and onboarding-chatbot-mobile-details.tsx.

  2. Additionally, PRs Fix browse category navigation #316 and Shallow routing for category & chatbots for chat & profile page  #313 also modified some of the same components, particularly in the sidebar and chat-related files.

I recommend @sheriffjimoh and @Bran18 to:

  1. Review the changes from PR User following  #319 specifically for the chat components
  2. Resolve any conflicts in chat-chatbot-details.tsx as it had the most substantial changes
  3. Ensure the new UI/UX changes align with the recently merged functionality
🔗 Analysis chain
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Get the list of files modified in this PR
gh pr view 336 --json files --jq '.files[].path'

# Check recent commits by sheriffjimoh in the chat-chatbot-details component
git log --author="sheriffjimoh" -p -- apps/masterbots.ai/components/routes/chat/chat-chatbot-details.tsx

# Get recent commits by sheriffjimoh in all files modified in this PR
for file in $(gh pr view 336 --json files --jq '.files[].path'); do
  echo "=== Checking $file ==="
  git log --author="sheriffjimoh" -p -- "$file"
done

Length of output: 6069


Script:

#!/bin/bash
# Check for recent commits by sheriffjimoh in relevant directories
echo "=== Recent commits in chat components ==="
git log --since="1 month ago" --author="sheriffjimoh" -p -- apps/masterbots.ai/components/routes/chat/

echo "=== Recent commits in layout components ==="
git log --since="1 month ago" --author="sheriffjimoh" -p -- apps/masterbots.ai/components/layout/

# Check for recent merged PRs by sheriffjimoh
echo "=== Recent merged PRs by sheriffjimoh ==="
gh pr list --state merged --author sheriffjimoh --json number,title,mergedAt,files --limit 5

Length of output: 11657

@AndlerRL
Copy link
Member

@sheriffjimoh / @Bran18 -- we need updates on this PR with the conflicts fixed. Any update in here?

@Bran18
Copy link
Contributor Author

Bran18 commented Jan 20, 2025

@sheriffjimoh / @Bran18 -- we need updates on this PR with the conflicts fixed. Any update in here?

Hello Andler,

I need to discuss the changes with @sheriffjimoh to determine which ones we should keep and address the issues. This PR includes several modifications related to what we recently discussed in the main channel. I believe the issues stem from the old components that were displaying more details than the new ones implemented in this PR.

@sheriffjimoh
Copy link
Contributor

@sheriffjimoh / @Bran18 -- we need updates on this PR with the conflicts fixed. Any update in here?

Hello Andler,

I need to discuss the changes with @sheriffjimoh to determine which ones we should keep and address the issues. This PR includes several modifications related to what we recently discussed in the main channel. I believe the issues stem from the old components that were displaying more details than the new ones implemented in this PR.

@Bran18 @AndlerRL -- I never touch anything around UI on those components, it's mostly functionality. i have resolved the conflict, @Bran18 I hope everything look goods on your end ?

@AndlerRL
Copy link
Member

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

♻️ Duplicate comments (1)
apps/masterbots.ai/components/routes/chat/chat-chatbot-details.tsx (1)

123-123: ⚠️ Potential issue

Add session?.user back to the dependency array.

The getThreadNum function called within fetchData depends on session?.user for authentication and JWT token access. Omitting it could lead to stale data or authentication issues if the session changes.

-  }, [activeCategory, activeChatbot])
+  }, [activeCategory, activeChatbot, session?.user])
🧹 Nitpick comments (6)
apps/masterbots.ai/components/routes/chat/onboarding-chatbot-details.tsx (3)

9-18: Consider adding prop validation for required fields.

With the removal of default values, consider adding runtime prop validation to ensure required props are provided. This will help catch potential issues early in development.

import PropTypes from 'prop-types';

OnboardingChatbotDetails.propTypes = {
  botName: PropTypes.string.isRequired,
  avatar: PropTypes.string,
  description: PropTypes.string.isRequired,
  isWelcomeView: PropTypes.bool,
  onNewChat: PropTypes.func.isRequired,
  onFollow: PropTypes.func.isRequired,
  followers: PropTypes.array.isRequired,
  threadCount: PropTypes.number.isRequired
};

24-25: Remove commented out background styles.

If these styles are no longer needed, they should be removed. If they're meant to be restored later, create a task to track this and remove the comments from the code.


Line range hint 116-131: Enhance button accessibility.

Consider the following accessibility improvements:

  1. Add ARIA labels for screen readers
  2. Verify color contrast ratios meet WCAG guidelines
 <Button
   onClick={onNewChat}
+  aria-label={`Start new chat with ${botName}`}
   className={cn(
     'w-full min-h-[44px] px-4',
     'bg-[#be16e8] hover:bg-[#be16e8]/90',
     'dark:bg-[#82e46a] dark:hover:bg-[#82e46a]/90',
     'text-white dark:text-zinc-950',
     'flex items-center justify-center gap-2'
   )}
 >
package.json (1)

Line range hint 14-19: Good practice: Centralizing type definitions at root.

Moving @types/node from workspace package to root package.json is a good practice in monorepos. This ensures consistent type definitions across workspaces and reduces dependency duplication.

apps/masterbots.ai/components/routes/chat/chat-chatbot-details.tsx (1)

159-165: Remove trailing whitespace.

There's an unnecessary whitespace character {' '} after the conditional rendering.

-      )}{' '}
+      )}
apps/masterbots.ai/app/globals.css (1)

51-57: Consolidate duplicate gradient definitions.

The gradient variables are identical in both light and dark modes. Consider moving them outside the theme definitions to avoid duplication.

@layer base {
  :root {
    /* ... other variables ... */
+   /* Shared gradients */
+   --background-chat-gradient: linear-gradient(180deg, rgba(115, 201, 97, 0.2) 0%, rgba(122, 214, 104, 0.4) 100%);
+   --background-chat-hover-gradient: linear-gradient(-180deg, rgba(113, 199, 96, 0.1) 0%, rgba(117, 205, 99, 0.3) 100%);
+   --background-public-gradient: linear-gradient(180deg, rgba(155, 22, 232, 0.2) 0%, rgba(190, 22, 232, 0.53) 100%);
+   --background-public-hover-gradient: linear-gradient(-180deg, rgba(166, 22, 232, 0.1) 0%, rgba(190, 22, 232, 0.3) 100%);
  }

  .dark {
    /* ... other dark mode variables ... */
-   --background-chat-gradient: linear-gradient(180deg, rgba(115, 201, 97, 0.2) 0%, rgba(122, 214, 104, 0.4) 100%);
-   --background-chat-hover-gradient: linear-gradient(-180deg, rgba(113, 199, 96, 0.1) 0%, rgba(117, 205, 99, 0.3) 100%);
-   --background-public-gradient: linear-gradient(180deg, rgba(155, 22, 232, 0.2) 0%, rgba(190, 22, 232, 0.53) 100%);
-   --background-public-hover-gradient: linear-gradient(-180deg, rgba(166, 22, 232, 0.1) 0%, rgba(190, 22, 232, 0.3) 100%);
  }
}

Also applies to: 104-109

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between f3482ca and 967bc7d.

⛔ Files ignored due to path filters (1)
  • bun.lockb is excluded by !**/bun.lockb
📒 Files selected for processing (12)
  • .package.json.swp (1 hunks)
  • apps/masterbots.ai/.package.json.swp (1 hunks)
  • apps/masterbots.ai/app/globals.css (3 hunks)
  • apps/masterbots.ai/components/layout/sidebar/profile-sidebar.tsx (1 hunks)
  • apps/masterbots.ai/components/layout/sidebar/sidebar-link.tsx (8 hunks)
  • apps/masterbots.ai/components/routes/chat/chat-chatbot-details.tsx (3 hunks)
  • apps/masterbots.ai/components/routes/chat/chat-options.tsx (1 hunks)
  • apps/masterbots.ai/components/routes/chat/onboarding-chatbot-details.tsx (1 hunks)
  • apps/masterbots.ai/components/routes/thread/user-thread-panel.tsx (1 hunks)
  • apps/masterbots.ai/lib/utils.ts (1 hunks)
  • apps/masterbots.ai/package.json (2 hunks)
  • package.json (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • .package.json.swp
  • apps/masterbots.ai/.package.json.swp
🚧 Files skipped from review as they are similar to previous changes (6)
  • apps/masterbots.ai/components/layout/sidebar/profile-sidebar.tsx
  • apps/masterbots.ai/components/routes/thread/user-thread-panel.tsx
  • apps/masterbots.ai/components/routes/chat/chat-options.tsx
  • apps/masterbots.ai/package.json
  • apps/masterbots.ai/lib/utils.ts
  • apps/masterbots.ai/components/layout/sidebar/sidebar-link.tsx
🔇 Additional comments (6)
apps/masterbots.ai/components/routes/chat/onboarding-chatbot-details.tsx (3)

66-73: Well-implemented welcome view with clear user guidance!

The welcome view provides clear visual guidance with both text and icons, making it intuitive for users to understand the next steps.


94-94: Good handling of nullable values in stats display!

The implementation safely handles undefined/null values using nullish coalescing and optional chaining, preventing potential runtime errors.

Also applies to: 101-101


Line range hint 26-131: Implementation aligns well with PR objectives.

The changes successfully enhance the onboarding experience by:

  1. Providing clear visual guidance for new users
  2. Maintaining a clean interface for both welcome and chatbot detail views
  3. Improving the overall user interaction flow
apps/masterbots.ai/components/routes/chat/chat-chatbot-details.tsx (2)

11-12: Well-structured component split!

Good separation of concerns by splitting the mobile view into OnboardingMobileView and SelectedBotMobileView components, which should improve maintainability and provide a clearer user experience flow.


156-158: Clean conditional rendering implementation!

Good use of the isWelcomeView flag to determine which mobile view to display, improving the user experience by showing context-appropriate content.

apps/masterbots.ai/app/globals.css (1)

324-344: Well-structured gradient implementation!

Good use of:

  • Data attributes for route-specific styling
  • Smooth transitions for gradient changes
  • Clear separation between hover and selected states

@AndlerRL
Copy link
Member

@Bran18 @sheriffjimoh -- I just did the conflict fix. In short, there was a bun.lock conflict along with some package.json regressions, so I fixed them: It was adding an old lucide-react package. Using the latest version is OK most of the times however, it is better to stay on a stable version and sometimes these packages get updated while it is getting build in vercel and can turn into multiple (or outdated if not frequently checking bun install) version conflicts. Not a big issue, just be aware of any regression.

@AnoukRImola -- it will be key to test this to check for regressions. The app should have and feel better experience and UI/UX as discussed in the recent weeks.

@AndlerRL AndlerRL merged commit 72b3574 into develop Jan 21, 2025
2 checks passed
@AndlerRL AndlerRL deleted the refactor/prelaunch-ui-ux-changes branch January 21, 2025 20:31
@coderabbitai coderabbitai bot mentioned this pull request Jan 21, 2025
AndlerRL added a commit that referenced this pull request Jan 22, 2025
* devops: force deploy

* devops: trigger automated build

* devops: trigger automated build

* devops: trigger automated build

* devops: trigger automated build

* devops: trigger automated build

* devops: trigger automated build

* devops: trigger automated build

* impr(masterbots.ai): add return to browse on bot thread page view (#204)

* ✨ Added back button to thread details page

* ⚡️  changed char to svg

* feat: ai gen 404 image for custom 404 error page  (#210)

* ⚡️ added custom  error page

* ⚡️  clean up

* fix(masterbots.ai): terms page visibility and access

* feat(masterbots.ai): consistent og image style design and dynamic metadata  (#215)

* feat: added og api endpoint

* feat: design og image for dark mode

* fix: file formated

* fix: amend  og image to pick current theme color and adapt

* feat: added custom metadata to thread page

* feat: added custom metadata to bot page

* fix: clean up

* fix: move bg to a component

* fix: move og-image design  to a component

* fix: use variable for URL

* fix: to slug func

* ⚡️ Move and clean up UrlToSlug

* fix(masterbots.ai): zod dependecy

* fix: type error

* fix: type error for metadata

* fix: clean and build fix

---------

Co-authored-by: Roberto Lucas <[email protected]>

* fix(masterbots.ai): OG not redering   (#224)

* fix: og to render first letter of username if there's no avatar

* fix: clean up

* fix: clean up

* fix(masterbots.ai): share function (#225)

* feat: create action.ts

* fix: upt share button

* fix: add axios module

* fix: add resend module

* fix: update vercel env config

* fix: split share function

* fix: update share component

* [coderabbitai] style: upt thread-user-actions condition

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat(hasura): update user db schema for pro users (#227)

* feat: add get_free_month column to user table

* feat: create referral table

* feat: add is_blocked column to user table

* feat: add pro_user_subscription_id  column to user table

* fix: upt metadata

* fix: update relationship name

* feat(hasura): add Ai Model Tracker To Threads (#229)

* feat: create 'models' table AI models

* fix: add 'model' column to 'thread' table with foreign key constraint

* feat: add model_value into models

* [masterbots.ai] feat: multi AI models integration (#228)

* [masterbots.ai]feat:(multimodels-integration)add actions - helpers - routes

* [masterbots.ai]feat:(multimodels-integration)add NextTopLoader

* [masterbots.ai]feat:(multimodels-integration)add NextTopLoaders

* [masterbots.ai]feat:(multimodels-integration)add new chat components

* [masterbots.ai]chore:next version

* [masterbots.ai]feat:(multimodels-integration)update use context

* [masterbots.ai]feat:(multimodels-integration)icons update

* [masterbots.ai]chore:command ui

* [masterbots.ai]refactor:moving chat componets to folder

* [masterbots.ai]feat:env checker

* [masterbots.ai]feat:env guard

* docs: site map diagram

* [masterbots.ai] fix: multi AI models guard (#235)

* fix-guards + dom warning

* fix-rename env var - vercel name

* chore(masterbots.ai): update payment terms & conditions (#233)

* fix: update terms

* fix:  building error

* fix: update terms content

* fix: rm the older part at the bottom

* feat(masterbots.ai): pro subscription payment + wizard (#226)

* feat: added free card

* feat: added animation to the plan card

* feat: added more plan card and referral code link

* fix: clean up

* wip: wizard

* feat: wizard & modal

* feat: plan Design theme and modal Header and Footer

* feat: plan clean up

* update

* clean up

* fix: rm plan comp on browse page

* fix: wizard clean up

* feat: succes & error modal

* feat: loading comp

* feat: added checkout comp

* feat: set up stripe and context

* wip: implementing subscription

* feat: implementing subscription

* feat: payment reciept

* fix: clean up receipt

* fix: modal not showing & shallow routing

* fix: small fix

* fix: receipt comp

* fix: clean up

* fix: shallow rerouting

* feat: check if user has an active subscription

* fix: coderabbit ob

* fix: coderabbit ob

* fix: coderabbit clean up update

* fix: coderabbit clean up update

* fix: coderabbit clean up update

* fix: clean up

* fix: clean up

* fix: page restructuring and status on the receipt

* fix: revamp receipt and structure

* fix: rm unused file

* fix: clean up

* fix: update & clean up

* fix: update

* fix: rm the svg

* fix: revamp formatSystemPrompts

* fix: revamp msg to formatSystemPrompts

* fix:  update

* fix:  refactor the receipt page

* fix: rm public key

* fix: update

* fix: update

* fix: update

* fix: code refactor for error and loading rendering

* ref: calling  secret keys from server

* ref: receipt page and small fix

* fix: rm file

* fix(impr): subs & flow ux + cleanup

* fix(masterbots.ai): OG not redering   (#224)

* fix: og to render first letter of username if there's no avatar

* fix: clean up

* fix: clean up

* fix(masterbots.ai): share function (#225)

* feat: create action.ts

* fix: upt share button

* fix: add axios module

* fix: add resend module

* fix: update vercel env config

* fix: split share function

* fix: update share component

* [coderabbitai] style: upt thread-user-actions condition

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat(hasura): update user db schema for pro users (#227)

* feat: add get_free_month column to user table

* feat: create referral table

* feat: add is_blocked column to user table

* feat: add pro_user_subscription_id  column to user table

* fix: upt metadata

* fix: update relationship name

* feat(hasura): add Ai Model Tracker To Threads (#229)

* feat: create 'models' table AI models

* fix: add 'model' column to 'thread' table with foreign key constraint

* feat: add model_value into models

* [masterbots.ai] feat: multi AI models integration (#228)

* [masterbots.ai]feat:(multimodels-integration)add actions - helpers - routes

* [masterbots.ai]feat:(multimodels-integration)add NextTopLoader

* [masterbots.ai]feat:(multimodels-integration)add NextTopLoaders

* [masterbots.ai]feat:(multimodels-integration)add new chat components

* [masterbots.ai]chore:next version

* [masterbots.ai]feat:(multimodels-integration)update use context

* [masterbots.ai]feat:(multimodels-integration)icons update

* [masterbots.ai]chore:command ui

* [masterbots.ai]refactor:moving chat componets to folder

* [masterbots.ai]feat:env checker

* [masterbots.ai]feat:env guard

* docs: site map diagram

* feat: set up stripe and context

* wip: implementing subscription

* fix: rm the svg

* fix: replace secret with variable

* fix: chat restructure

* fix(update): chat restructure

* fix(deployment error): can't find an  icon or not exported

* fix: deployment issues

* fix: deployment issues

* fix: deployment issues

* fix: adjust design

* fix: clean up

* fix: clean up

* fix: color var updaye

* [coderabbitai] impr: update apps/masterbots.ai/components/stripe-element.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [coderabitai] impr: update apps/masterbots.ai/components/succes-content.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix: success close button

* fix: bg image for yearly card

* fix: move func to util

* ref: receipt page function to use reac-use

* fix: move depencies to the app

* fix: clean up

* ref: wizard to use radix dialog components

* update

* fix: coderabitai update

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: Nathanael Liu <[email protected]>
Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Brandon Fernández <[email protected]>

* [masterbots.ai] fix: llama3 models  (#236)

* fix-guards + dom warning

* fix-rename env var - vercel name

* fix-changed PERPLEXITY-LLama model

* [masterbots.ai] impr(fix): ui tweaks (#237)

* fix(UI):varius UI fixes

* fix(UI):varius UI fixes

* fix(UI): Tailwind class corrections, conflict resolution, text alignent to the left

* fix(UI):update

* fix(masterbots.ai): payment feedbacks (#240)

* fix: make the dialog content responsive

* fix: free plan card adjusted

* fix: update

* fix: update receipt styles

* fix: build error

* fix: build error

* fix: build error update

* fix: update

* fix: observation

* fix(masterbots.ai): update env variable (#244)

* feat: sitemap (#238)

* feat: add redirection rules

* fix: update all links with new shorten urls

* fix: update all links with new shorten urls

* feat: make folder structure according to sitemap

* [coderabbitai] impr(masterbots.ai): update app/c/page.tsx error handling

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [coderabbitai] impr(masterbots.ai): update app/c/[category]/[chatbot]/page.tsx error handling

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix: build error

* [coderabbitai] impr(masterbots.ai): update app/c/[category]/[chatbot]/page.tsx error handling

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat: add sitemap and metagraph

* fix: use original generateMetadata

* fix: update page links

* fix: show only filtered threads on page reload

* fix: build error

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix(masterbots.ai): show first question & answer in thread list (#246)

* feat: add 'disabled' state to ChatAccordion

* fix: show default question's answer in thread list

* fix: use braces and create explicit statement blocks

* fix: subscription mobile responsive tweaks (#245)

* update

* fix: update

* fix: responsiveness

* fix: update

* fix: few clean up

* fix: rm unused image

* fix: rm unused image

* fix(impr): models enum table migrations (#247)

* impr(hasura): db tables

* impr(hasura): db tables

* fix(hasura): user permissions

* impr(hasura): sql models enum migration

* fix(hasura): models_enum pk

* fix(hasura): ci/cd default regional log bucket

* docs: bun to requirements (#250)

Co-authored-by: b <b>

* feat: next auth, email/pw strategy (#249)

* (masterbots.ia)-chore-auth-dependencies

* (masterbots.ia)-feat-webauth-nextauth

* wip(masterbots.ai): email/pw login + signup

* feat-login ui

* feat-login-component+page

* feat-login-component+page

* feat-auth-middleware.ts

* feat-auth-nextauth + googleauth

* feat-auth-coderabit-feedback

* feat-auth-callback + elements added

* wip(webapp): email/pw login+signup

* feat:add toke storage for webauth

* feat:updates webauth

* feat:updates webauth

* fix(masterbots.ai): blankBot fetch

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: Roberto Romero Lucas <[email protected]>

* docs: mb sytem diagram v1.0a

* feat(impr): next auth environment helper function (#251)

* (masterbots.ia)-chore-auth-dependencies

* (masterbots.ia)-feat-webauth-nextauth

* wip(masterbots.ai): email/pw login + signup

* feat-login ui

* feat-login-component+page

* feat-login-component+page

* feat-auth-middleware.ts

* feat-auth-nextauth + googleauth

* feat-auth-coderabit-feedback

* feat-auth-callback + elements added

* wip(webapp): email/pw login+signup

* feat:add toke storage for webauth

* feat:updates webauth

* feat:updates webauth

* fix(masterbots.ai): blankBot fetch

* feat:protecting env

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: Roberto Romero Lucas <[email protected]>

* impr(masterbots.ai): sign up form + sign in session data

* docs: claude3 project knowledge docs

* fix(masterbots.ai): devMode conditional

* chore(masterbots.ai): rm console.log

* chore: upt default hardcoded gpt model

* fix: toSlug imports

* fix: typo

* fix(hasura): seeds

* chore(impr): MB seeds update and upgrade (#253)

* wip: upt seeds

* chore: rm alter and table creations

* chore(impr): MB seeds update and upgrade

* fix: set thread to private by default

* fix: prompt row typo

* chore(hasura): seeds update default thread publicity

* fix(masterbots.ai): adjust arrow direction in thread list (#255)

* feat(impr): Vercel AI SDK Update (#256)

* chore:ai version upt

* chore:ai version upt

* upt-ai delete

* upt-ai versions

* upt-sdk-actions

* upt-complete-sdk-3.3 + dev notes

* upt-@anthropic-ai/sdk + MessageParam

* Delete apps/masterbots.ai/apps/masterbots.ai/package.json

* Delete apps/masterbots.ai/apps/masterbots.ai/package-lock.json

* impr-convertToCoreMessages ternary

* Leandro/develop (#257)

* chore: create thread-component to avoid to become thread list into a client component

* refactor: remove unnecesary hooks from thread component

* refactor: remove unnecesary hooks on thread componen

* impr(masterbots): components folder structur (#259)

* impr:refactor components folders + names + imports

* hotfix:chat-list useEffect dependency removal

* fix(masterbots): google signIn (#260)

* fix(masterbots.ai): fix thread-component loop (#261)

* fix:(masterbots.ai) add useScroll hook (#263)

* fix:introducing Two-phase scroll

* impr: new hook to handle scrolling

* impr: useScroll + respo

* feat(masterbots.ai): chat sidebar filtering (#264)

* sidebar refactor with ai

* fix: sidebar AI V - Prev Jun (#262)

* fix:semistable

* fix:stable v

* impr:delete nonused component

* fix: upt category filtering

* fix typo

---------

Co-authored-by: Roberto Lucas <[email protected]>

* feat: sidebar state

* fix(masterbots.ai): logic typo

* fix(masterbots.ai): ts typo

---------

Co-authored-by: Jun Dam <[email protected]>
Co-authored-by: Brandon Fernández <[email protected]>

* fix(masterbots.ai): bot button redirect change (#265)

* wip(masterbots.ai): seo data impr (#267)

* wip: seo data impr

* impr(chore): ga tags

* feat: add chat publicity trigger (#258)

* update

* feat: design thread visibilty

* fix: added the backend

* fix: added the backend

* fix: rm files

* fix: few clean up

* fix(masterbots): google signIn (#260)

* feat: design thread visibilty

* fix: added the backend

* fix: few clean up

* Leandro/develop (#257)

* chore: create thread-component to avoid to become thread list into a client component

* refactor: remove unnecesary hooks from thread component

* refactor: remove unnecesary hooks on thread componen

* impr(masterbots): components folder structur (#259)

* impr:refactor components folders + names + imports

* hotfix:chat-list useEffect dependency removal

* feat: design thread visibilty

* fix: added the backend

* fix: few clean up

* fix: update

* fix: add permission

* fix: update query

* fix(masterbots.ai): fix thread-component loop (#261)

* feat: design thread visibilty

* fix: added the backend

* fix: few clean up

* feat: design thread visibilty

* fix: added the backend

* fix: few clean up

* Leandro/develop (#257)

* chore: create thread-component to avoid to become thread list into a client component

* refactor: remove unnecesary hooks from thread component

* refactor: remove unnecesary hooks on thread componen

* impr(masterbots): components folder structur (#259)

* impr:refactor components folders + names + imports

* hotfix:chat-list useEffect dependency removal

* feat: design thread visibilty

* fix: added the backend

* fix: few clean up

* update

* fix: update

* fix: publicity toggle

* fix: error catch in the functions

* fix: observations

* fix: design impr

* fix: thread pop-up height

* chore(masterbots.ai): log rm & app version upt

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: Leandro Gavidia Santamaria <[email protected]>
Co-authored-by: Brandon Fernández <[email protected]>
Co-authored-by: Roberto Lucas <[email protected]>

* feat(masterbots.ai): user messages ai refactor (#266)

* feat:userMessages refactor + hooks and utils

* upt:rm console.log

* fix:rollback useAiChat hook

* fix:rollback - actions

* fix(masterbots.ai): sidebar trigger

* chore(hasura: s

---------

Co-authored-by: Roberto Lucas <[email protected]>

* wip: browse sidebar

* impr(masterbots.ai): browse sidebar (#270)

* fix: browse layout

* feat(masterbots.ai): browse sidebar

* fix: browse sidebar link condition

* chore: upt signup default profile pic

* chore: seeds upt (#269)

* wip: seeds upt

* chore(hasura): seeds review

* feat(hasura): add "is_approved" thread field + seeds

* chore: mb-genql upt

* fix(hasura): thread param permission

* fix(masterbots.ai): typo

* fix(masterbots.ai): allow svg content-type

* fix: chat + browse layout

* style: clean up

* Seo data (#273)

* fix: build error

* feat: Add SEO data to the chat page

* feat: add default image, if not found

* feat: Add SEO data to the browse page

* fix: generates the image with error, in api/og

* Update route.tsx

fix: generates the image with error, in api/og

* impr(masterbots.ai): title impr prompt

* impr(masterbots.ai): improve current features v2 (#274)

* add-impr-chat-prompt-footer-header-disclaimer

* add-impr-chat-prompt-footer-header-disclaimer

* add-UI-upt

* add-UI-upt

* add-action-prompt

* add-clickable-upt

* add-clickable-upt

* Masterbots/fix redirects (#275)

* fix:avatar-redirects

* fix:avatar-redirect

* fix(masterbots.ai): upt components/ui/button.tsx

Coderabbitai suggestion.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix:URL correction

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [masterbots.ai] feat: wordware api (#276)

* feat: add wordware api + vercel sdk strategy

* feat: add wordware api + vercel sdk

* wordware describe feat

* wordware run + interface

* impr(masterbots.ai): upt /api/wordware/describe/route.ts

coderabbitai code suggestion.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* impr(masterbots.ai): upt /api/wordware/describe/route.ts

coderabbitai code suggestion.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix(masterbots.ai): typo /api/wordware/describe/route.ts

coderabbitai code suggestion.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* doc: mb system diagram upt

* wip: icl calls integrations

* impr(masterbots.ai): permission for thread & user action mode (#281)

* update

* feat: added permissions & new column

* fix: rm unnessecary files

* fix: rm permission check

* feat(masterbots.ai): create password recovery (#282)

* feat:add-recovery-strategy

* chore:add nodeemailer

* upt:hasura

* upt:hasura

* upt:gmail service

* feat(hasura): otp, token table + junction w/user + mb-genql gen

* feat:add recovery password API

* fix:ai suggestion + UX

* feat:improve ux show password feat

* chore:env sample

* chore:useSetState

* chore:roles

---------

Co-authored-by: Roberto Lucas <[email protected]>

* [masterbots.ai] impr: WW API sanitize and keep alive (#284)

* keep-alive + API sanitize + timeOut guard

* impr streamAndValidateResponse fn

* wip(masterbots.ai): impr createImprovementPrompt

* style(masterbots.ai): chat loading states comments

* feat(masterbots.ai): add admin mode to approve thread (#283)

* feat:added mode toggle and approve btn

* feat: added migration for user role

* feat: user role flow implet

* fix: impr admin approve process

* fix: clean up

* fix: toggle CTA changed

* fix: update

* fix: update

* fix: observ

* fix: obs clean up

* fix: update

* fix: clean up

* impr(masterbots.ai): alpha metadata chatbot labels (#288)

* wip: metadata chatbot labels

* wip(masterbots.ai): chatbot metadata labels

* impr(masterbots.ai): gen chatMetadata

* impr: simplifying prompt defitions + biome.json base config

* impr(masterbots.ai): recursive improved text prompt

* style: code comments + eslint chk

* impr: biome.json config

* fix(masterbots.ai): conflicts typo fix

* style(impr): cleanPrompt + followingQuestionsPrompt relocation & cleanup

* doc: map system (simplified)

* fix(masterbots.ai): sideBar updating URL (#286)

* fix:sideBar updating URL

* feat: coderabbit-ai suggestions

* fix: Implement auto-expanding sidebar categories and chatbot highlighting based on URL

* feat: optimize sidebar navigation with Link

* feat: thread options (#287)

* feat: added verified and label to the options

* usethreadvisibility as context

* feat: added option design  and functions

* fix: clean up

* fix: update

* fix: update

* fix: obsv

* fix: merge and update

* fix: update the delete popup

* fix: observ

* fix: update

* fix: delete thread flow

* update

* fix: update

* fix: types

* fix: chatbot not required

* fix: testing

* fix: rm bun.lock

* fix: clean up

* fix: update

* fix(masterbots.ai): temp freezing next version

---------

Co-authored-by: Roberto Lucas <[email protected]>

* [masterbots.ai] feat: email verification (#289)

* feat: email verification

* feat: email verification

* feat: email verification

* upt:build

* feat: handle error redirection

* chore:cron task

* upt: cron blocking instead erasing

* feat(hasura): create social following table. (#292)

* feat(db): create social following table.

* create user following and followers relationships.

* fix(db): ensure users can only manage their own follow relationships.

* feat(db): social following and user table permissions improvements.

* feat(db): improving social following table with  timestamp and idx.

* impr(db): permissions and tracked object relationships.

* impr(db): avoid self follow.

* chore(masterbots.ai): guard WordWare for prod routing

* [masterbots.ai] fix: public/private tag bg on dark mode  (#294)

* fix: tag bg

* fix: text color

* fix: browse page error

* fix: debugging

* fix: debugging

* fix: debugging

* fix: added func to generate short link

* fix(hasura): upt user permissions (#296)

* update user permission

* fix: reverse the following table

* fix(hasura): build error (#297)

* fix: error build

* fix: reverse select perm

* [masterbots.ai] feat: thread list display + components comments for ai (#299)

* merged from develop

* feat:add new ui-thread-representation-browse

* feat:add comments for ai - C

* feat:add comments for ai - b/p

* feat:add comments for ai - b/p

* feat:add comments for ai - b/p

* feat:add app theme colors effects

* feat:add comments for ai - b/p

* [masterbots.ai] feat: chatbot search tool v0.1a (#295)

* wip: chatbot search tool

* wip(impr): ww api + chat ui tweaks

* fix: init sidebar load state

* fix: nesting layout

* fix: thread-popup ui header

* wip(impr): chatbot tooling

* impr: loading state + debug chatbot tools

* wip(fix): nodejs context

* fix(temp): rm edge runtime api config

* [masterbots.ai] feat: reorganize navigation menu for mobile view (#298)

* feat: reorganize navigation menu for mobile view

* UI: add sideBar style

* feat: add link profile and logout icon

* Update profile-sidebar.tsx

Tailwind class fix

* [masterbots.ai] feat: UI + Logic Improvements (#301)

* feat:impr responsive

* feat:impr password strenght checker

* feat:impr responsive

* upt-build

* feat:respomsive tweask

* feat:back arrow aria label

* fix:chat mobile layout

* fix:code section

* fix:chat pannel

* fix:chatBot redirection

* feat:restore appConfig header

* [masterbots.ai] fix: restore desktop navigation link - browse section (#303)

* fix:restore desktop navigation link - browse

* fix:formating

* feat:yellow combobox btn (JUN-REQUEST)

* glowing effect variant

* upt:removed /b navigation as original v

* feat:powerup mode + provider

* [masterbots.ai] fix(impr): browse and chat content search (#304)

* feat:browse title and content search

* feat:browse title and content search

* fix:typo

* impr:reusable non result component

* feat:skeletons

* feat:guard

* fix:skeletons

* fix:chat searching

* fix: add accent colour

---------

Co-authored-by: Roberto Lucas <[email protected]>

* [masterbots.ai] impr: seo sitemap (#306)

* chore: sitemap creation

* chore: add description based on category

* chore: update queries in services

* chore: truncate text

* impr: upt (browse)/[category]/[threadId]/sitemap.ts

coderabbitai code suggestion.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [masterbots.ai] impr: ai tools (#302)

* wip: ai tools

* fix: WW json regexp

* impr: simplifying main ai call

* wip(fix): chat component re-render + cleanup

* impr(refactor): chat hooks

* fix: ts build

* fix: ts build

* fix: ts typo

* fix: typo

* impr: ai feedbacks

* [masterbots.ai] wip(impr): web search (#309)

* impr: web search tool call

* fix: colour values

* fix: typo

* impr: code suggestions

* fix: class name typo

* wip(fix): web search false positive response + webSearch context

* fix: web search callback

* fix: typo

* feat: profile page (#300)

* feat: user card

* fix: update

* merge develop && update

* feat: user generate bio & favourite  topic

* fix: update user card

* feat: added profile sidebar

* fix: update

* update

* update

* update

* fix: fetch approved and public threads

* fix: fetch approved and public threads

* update

* fix: clean up and update

* update

* make fetch user work with bio

* update

* update

* design updating

* update

* update

* fix: few changes

* update

* fix: design update

* fix: footer in layout

* fix: update

* fix:  resercation

* update

* profile upload

* feat: move the cloudinary key to env

* fix: layout

* fix: layout update

* [masterbots.ai] fix: shallow routing for category & chatbots for  chat & profile page  (#313)

* update

* feat: added shallow link to the sidebar link

* update'

* fix: routing and content fetching

* fix:update on  routing

* fix:update

* update

* update

* update

* fix: clean up

* update

* update

* [masterbots.ai] feat: update ChatChatbotDetails (#314)

* feat: new bot profile - chat

* chore: dev comments

* chore: white bg bot avatar

* feat: add skeleton bot profile

* [masterbots.ai] feat: include custom settings options (#317)

* feat:relocation of theme switch(jun)

* feat: create font-size accessibility provider(jun)

* feat: r-sidebar theme switcher relocation + skeleton

* feat: impr add rem instead px

* [masterbots.ai] feat: integrate drizzle ORM (#320)

* feat: create mb-drizzle package initial structure

* feat:(masterbots.ai) add drizzle endpoint + service

* chore: include database url

* chore: upt mb-drizzle

* feat: refactor drizzle config + generations

* chore: impr migrate

* chore: add working drizzle connection + migrations

* feat: add centralized actions

* chore: add ai review recomendations

* chore: webSearch feature flag + use cloudinary upload preset

* fix: responsive sidebar fix

* fix: ts chk build

* fix: sidebar async call

* fix: ts build

* chore: typo

* [masterbots.ai] fix: browse category navigation (#316)

* update

* fix: rm category

* update

* fix: pop up on the user threads

* update

* update clean up

* update

* fix: clean up

* fix:  clean up and update

* fix: update

* fix: popup on navigation

* fix: update

* update

* update

* update

* clean up

* update

* merge

* fix: hasura thread delete + user dup permissions (#330)

* [masterbots.ai] feat: onboarding bot profile variants  (#324)

* add chatbot-details and browse-details variants

* feat: add bio generation

* feat: chat profile bg

* chore: update bot profile designs

* chore: remove internal padding from cardHeader component

* impr: iconography + border thickness

* fix: numberShortener util fn

---------

Co-authored-by: Roberto Lucas <[email protected]>

* feat: user following  (#319)

* update

* added follow user

* update

* fix: upt hasura metadata databases, public_social_following.yaml

coderabbitai code suggestion.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix: upt masterbots.ai lib, utils.ts

coderabbitai suggestion.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix: user card

* update

* fix: permission

* update

* fix: added more column for chatbot followee

* fix:foloow chatbot implementation

* update

* threads by following user/bots

* update

* update

* update

* update

* update

* update

* update

* update

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [masterbots.ai] impr: new sonner (#334)

* chore: add new icons

* feat: Sonner custom hooks and setup

* feat: use useSonner hook throughout the app

* fix: overflow of the width of the sonner

* chore: add new icons

* feat: Sonner custom hooks and setup

* feat: use useSonner hook throughout the app

* chore: use hook sonner

* refactor: changes according to coderabbitai

* refactor: update use of sonner

* chore:remove icons and use lucide icons

* chore: Using Lucide Icons

* chore: bun pkg mngr upt

* Standardize url building using urlbuilders utility (#341)

* fix: update url

* fix: url update

* update

* [masterbots.ai] impr: og Image api dynamic to be useful without thread ID (#335)

* update

* fix: make OG image use default

* fix: update

* fix: update

* fix: obs

* fix: update

* fix: added og to browse and chat

* update

* update

* update

* fix: provider types error

* fix: updfate UUID

* fix: update UUID

* [masterbots.ai] docs: hook useSonner (#343)

* chore: document hook useSonner

* refactor: document hook useSonner, according coderabbit

* impr: web search response (#310)

* impr: web search response

* refactor: extracting clickable generation logic

* refactor: extracting clickable generation logic

* fix: webSearch clickable text + reference links

* chore: fix build

* feat:(impr) stable version link to references format step 1

* feat:(impr) stable version link to references format step 2

---------

Co-authored-by: Bran18 <[email protected]>

* [masterbots.ai] refactor: prelaunch ux/ui changes (#336)

* refactor: replicate tooltip effect in desktop bot chatbot details

* fix: add guard and removed re-render

* fix: refactor mobile bot chatbot details

* refactor: make chatPannel bigger

* chore:add new bot card design + sidebar hover color

* chore: delete public and private sw + icons

* chore: include public + delete extra actions

* chore: add sidebar bg

* add sidebar new styles + lib fn

* feat: add select bot

* chore: cleaning

* fix: build - removing BotMessageSquareIcon

* fix: types/node version + node min ver req

---------

Co-authored-by: sheriffjimoh <[email protected]>
Co-authored-by: Roberto Lucas <[email protected]>

---------

Co-authored-by: Gabo Esquivel <[email protected]>
Co-authored-by: Jimoh sherifdeen <[email protected]>
Co-authored-by: Nathanael Liu <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Brandon Fernández <[email protected]>
Co-authored-by: Anouk Rímola <[email protected]>
Co-authored-by: Trivium <[email protected]>
Co-authored-by: Leandro Gavidia Santamaria <[email protected]>
Co-authored-by: Jun Dam <[email protected]>
Co-authored-by: Luis Carrión <[email protected]>
Co-authored-by: Marco Ledezma <[email protected]>
Co-authored-by: Bran18 <[email protected]>
Co-authored-by: sheriffjimoh <[email protected]>
AndlerRL added a commit that referenced this pull request Feb 19, 2025
* devops: force deploy

* devops: trigger automated build

* devops: trigger automated build

* devops: trigger automated build

* devops: trigger automated build

* devops: trigger automated build

* devops: trigger automated build

* devops: trigger automated build

* impr(masterbots.ai): add return to browse on bot thread page view (#204)

* ✨ Added back button to thread details page

* ⚡️  changed char to svg

* feat: ai gen 404 image for custom 404 error page  (#210)

* ⚡️ added custom  error page

* ⚡️  clean up

* fix(masterbots.ai): terms page visibility and access

* feat(masterbots.ai): consistent og image style design and dynamic metadata  (#215)

* feat: added og api endpoint

* feat: design og image for dark mode

* fix: file formated

* fix: amend  og image to pick current theme color and adapt

* feat: added custom metadata to thread page

* feat: added custom metadata to bot page

* fix: clean up

* fix: move bg to a component

* fix: move og-image design  to a component

* fix: use variable for URL

* fix: to slug func

* ⚡️ Move and clean up UrlToSlug

* fix(masterbots.ai): zod dependecy

* fix: type error

* fix: type error for metadata

* fix: clean and build fix

---------

Co-authored-by: Roberto Lucas <[email protected]>

* fix(masterbots.ai): OG not redering   (#224)

* fix: og to render first letter of username if there's no avatar

* fix: clean up

* fix: clean up

* fix(masterbots.ai): share function (#225)

* feat: create action.ts

* fix: upt share button

* fix: add axios module

* fix: add resend module

* fix: update vercel env config

* fix: split share function

* fix: update share component

* [coderabbitai] style: upt thread-user-actions condition

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat(hasura): update user db schema for pro users (#227)

* feat: add get_free_month column to user table

* feat: create referral table

* feat: add is_blocked column to user table

* feat: add pro_user_subscription_id  column to user table

* fix: upt metadata

* fix: update relationship name

* feat(hasura): add Ai Model Tracker To Threads (#229)

* feat: create 'models' table AI models

* fix: add 'model' column to 'thread' table with foreign key constraint

* feat: add model_value into models

* [masterbots.ai] feat: multi AI models integration (#228)

* [masterbots.ai]feat:(multimodels-integration)add actions - helpers - routes

* [masterbots.ai]feat:(multimodels-integration)add NextTopLoader

* [masterbots.ai]feat:(multimodels-integration)add NextTopLoaders

* [masterbots.ai]feat:(multimodels-integration)add new chat components

* [masterbots.ai]chore:next version

* [masterbots.ai]feat:(multimodels-integration)update use context

* [masterbots.ai]feat:(multimodels-integration)icons update

* [masterbots.ai]chore:command ui

* [masterbots.ai]refactor:moving chat componets to folder

* [masterbots.ai]feat:env checker

* [masterbots.ai]feat:env guard

* docs: site map diagram

* [masterbots.ai] fix: multi AI models guard (#235)

* fix-guards + dom warning

* fix-rename env var - vercel name

* chore(masterbots.ai): update payment terms & conditions (#233)

* fix: update terms

* fix:  building error

* fix: update terms content

* fix: rm the older part at the bottom

* feat(masterbots.ai): pro subscription payment + wizard (#226)

* feat: added free card

* feat: added animation to the plan card

* feat: added more plan card and referral code link

* fix: clean up

* wip: wizard

* feat: wizard & modal

* feat: plan Design theme and modal Header and Footer

* feat: plan clean up

* update

* clean up

* fix: rm plan comp on browse page

* fix: wizard clean up

* feat: succes & error modal

* feat: loading comp

* feat: added checkout comp

* feat: set up stripe and context

* wip: implementing subscription

* feat: implementing subscription

* feat: payment reciept

* fix: clean up receipt

* fix: modal not showing & shallow routing

* fix: small fix

* fix: receipt comp

* fix: clean up

* fix: shallow rerouting

* feat: check if user has an active subscription

* fix: coderabbit ob

* fix: coderabbit ob

* fix: coderabbit clean up update

* fix: coderabbit clean up update

* fix: coderabbit clean up update

* fix: clean up

* fix: clean up

* fix: page restructuring and status on the receipt

* fix: revamp receipt and structure

* fix: rm unused file

* fix: clean up

* fix: update & clean up

* fix: update

* fix: rm the svg

* fix: revamp formatSystemPrompts

* fix: revamp msg to formatSystemPrompts

* fix:  update

* fix:  refactor the receipt page

* fix: rm public key

* fix: update

* fix: update

* fix: update

* fix: code refactor for error and loading rendering

* ref: calling  secret keys from server

* ref: receipt page and small fix

* fix: rm file

* fix(impr): subs & flow ux + cleanup

* fix(masterbots.ai): OG not redering   (#224)

* fix: og to render first letter of username if there's no avatar

* fix: clean up

* fix: clean up

* fix(masterbots.ai): share function (#225)

* feat: create action.ts

* fix: upt share button

* fix: add axios module

* fix: add resend module

* fix: update vercel env config

* fix: split share function

* fix: update share component

* [coderabbitai] style: upt thread-user-actions condition

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat(hasura): update user db schema for pro users (#227)

* feat: add get_free_month column to user table

* feat: create referral table

* feat: add is_blocked column to user table

* feat: add pro_user_subscription_id  column to user table

* fix: upt metadata

* fix: update relationship name

* feat(hasura): add Ai Model Tracker To Threads (#229)

* feat: create 'models' table AI models

* fix: add 'model' column to 'thread' table with foreign key constraint

* feat: add model_value into models

* [masterbots.ai] feat: multi AI models integration (#228)

* [masterbots.ai]feat:(multimodels-integration)add actions - helpers - routes

* [masterbots.ai]feat:(multimodels-integration)add NextTopLoader

* [masterbots.ai]feat:(multimodels-integration)add NextTopLoaders

* [masterbots.ai]feat:(multimodels-integration)add new chat components

* [masterbots.ai]chore:next version

* [masterbots.ai]feat:(multimodels-integration)update use context

* [masterbots.ai]feat:(multimodels-integration)icons update

* [masterbots.ai]chore:command ui

* [masterbots.ai]refactor:moving chat componets to folder

* [masterbots.ai]feat:env checker

* [masterbots.ai]feat:env guard

* docs: site map diagram

* feat: set up stripe and context

* wip: implementing subscription

* fix: rm the svg

* fix: replace secret with variable

* fix: chat restructure

* fix(update): chat restructure

* fix(deployment error): can't find an  icon or not exported

* fix: deployment issues

* fix: deployment issues

* fix: deployment issues

* fix: adjust design

* fix: clean up

* fix: clean up

* fix: color var updaye

* [coderabbitai] impr: update apps/masterbots.ai/components/stripe-element.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [coderabitai] impr: update apps/masterbots.ai/components/succes-content.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix: success close button

* fix: bg image for yearly card

* fix: move func to util

* ref: receipt page function to use reac-use

* fix: move depencies to the app

* fix: clean up

* ref: wizard to use radix dialog components

* update

* fix: coderabitai update

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: Nathanael Liu <[email protected]>
Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Brandon Fernández <[email protected]>

* [masterbots.ai] fix: llama3 models  (#236)

* fix-guards + dom warning

* fix-rename env var - vercel name

* fix-changed PERPLEXITY-LLama model

* [masterbots.ai] impr(fix): ui tweaks (#237)

* fix(UI):varius UI fixes

* fix(UI):varius UI fixes

* fix(UI): Tailwind class corrections, conflict resolution, text alignent to the left

* fix(UI):update

* fix(masterbots.ai): payment feedbacks (#240)

* fix: make the dialog content responsive

* fix: free plan card adjusted

* fix: update

* fix: update receipt styles

* fix: build error

* fix: build error

* fix: build error update

* fix: update

* fix: observation

* fix(masterbots.ai): update env variable (#244)

* feat: sitemap (#238)

* feat: add redirection rules

* fix: update all links with new shorten urls

* fix: update all links with new shorten urls

* feat: make folder structure according to sitemap

* [coderabbitai] impr(masterbots.ai): update app/c/page.tsx error handling

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [coderabbitai] impr(masterbots.ai): update app/c/[category]/[chatbot]/page.tsx error handling

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix: build error

* [coderabbitai] impr(masterbots.ai): update app/c/[category]/[chatbot]/page.tsx error handling

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat: add sitemap and metagraph

* fix: use original generateMetadata

* fix: update page links

* fix: show only filtered threads on page reload

* fix: build error

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix(masterbots.ai): show first question & answer in thread list (#246)

* feat: add 'disabled' state to ChatAccordion

* fix: show default question's answer in thread list

* fix: use braces and create explicit statement blocks

* fix: subscription mobile responsive tweaks (#245)

* update

* fix: update

* fix: responsiveness

* fix: update

* fix: few clean up

* fix: rm unused image

* fix: rm unused image

* fix(impr): models enum table migrations (#247)

* impr(hasura): db tables

* impr(hasura): db tables

* fix(hasura): user permissions

* impr(hasura): sql models enum migration

* fix(hasura): models_enum pk

* fix(hasura): ci/cd default regional log bucket

* docs: bun to requirements (#250)

Co-authored-by: b <b>

* feat: next auth, email/pw strategy (#249)

* (masterbots.ia)-chore-auth-dependencies

* (masterbots.ia)-feat-webauth-nextauth

* wip(masterbots.ai): email/pw login + signup

* feat-login ui

* feat-login-component+page

* feat-login-component+page

* feat-auth-middleware.ts

* feat-auth-nextauth + googleauth

* feat-auth-coderabit-feedback

* feat-auth-callback + elements added

* wip(webapp): email/pw login+signup

* feat:add toke storage for webauth

* feat:updates webauth

* feat:updates webauth

* fix(masterbots.ai): blankBot fetch

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: Roberto Romero Lucas <[email protected]>

* docs: mb sytem diagram v1.0a

* feat(impr): next auth environment helper function (#251)

* (masterbots.ia)-chore-auth-dependencies

* (masterbots.ia)-feat-webauth-nextauth

* wip(masterbots.ai): email/pw login + signup

* feat-login ui

* feat-login-component+page

* feat-login-component+page

* feat-auth-middleware.ts

* feat-auth-nextauth + googleauth

* feat-auth-coderabit-feedback

* feat-auth-callback + elements added

* wip(webapp): email/pw login+signup

* feat:add toke storage for webauth

* feat:updates webauth

* feat:updates webauth

* fix(masterbots.ai): blankBot fetch

* feat:protecting env

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: Roberto Romero Lucas <[email protected]>

* impr(masterbots.ai): sign up form + sign in session data

* docs: claude3 project knowledge docs

* fix(masterbots.ai): devMode conditional

* chore(masterbots.ai): rm console.log

* chore: upt default hardcoded gpt model

* fix: toSlug imports

* fix: typo

* fix(hasura): seeds

* chore(impr): MB seeds update and upgrade (#253)

* wip: upt seeds

* chore: rm alter and table creations

* chore(impr): MB seeds update and upgrade

* fix: set thread to private by default

* fix: prompt row typo

* chore(hasura): seeds update default thread publicity

* fix(masterbots.ai): adjust arrow direction in thread list (#255)

* feat(impr): Vercel AI SDK Update (#256)

* chore:ai version upt

* chore:ai version upt

* upt-ai delete

* upt-ai versions

* upt-sdk-actions

* upt-complete-sdk-3.3 + dev notes

* upt-@anthropic-ai/sdk + MessageParam

* Delete apps/masterbots.ai/apps/masterbots.ai/package.json

* Delete apps/masterbots.ai/apps/masterbots.ai/package-lock.json

* impr-convertToCoreMessages ternary

* Leandro/develop (#257)

* chore: create thread-component to avoid to become thread list into a client component

* refactor: remove unnecesary hooks from thread component

* refactor: remove unnecesary hooks on thread componen

* impr(masterbots): components folder structur (#259)

* impr:refactor components folders + names + imports

* hotfix:chat-list useEffect dependency removal

* fix(masterbots): google signIn (#260)

* fix(masterbots.ai): fix thread-component loop (#261)

* fix:(masterbots.ai) add useScroll hook (#263)

* fix:introducing Two-phase scroll

* impr: new hook to handle scrolling

* impr: useScroll + respo

* feat(masterbots.ai): chat sidebar filtering (#264)

* sidebar refactor with ai

* fix: sidebar AI V - Prev Jun (#262)

* fix:semistable

* fix:stable v

* impr:delete nonused component

* fix: upt category filtering

* fix typo

---------

Co-authored-by: Roberto Lucas <[email protected]>

* feat: sidebar state

* fix(masterbots.ai): logic typo

* fix(masterbots.ai): ts typo

---------

Co-authored-by: Jun Dam <[email protected]>
Co-authored-by: Brandon Fernández <[email protected]>

* fix(masterbots.ai): bot button redirect change (#265)

* wip(masterbots.ai): seo data impr (#267)

* wip: seo data impr

* impr(chore): ga tags

* feat: add chat publicity trigger (#258)

* update

* feat: design thread visibilty

* fix: added the backend

* fix: added the backend

* fix: rm files

* fix: few clean up

* fix(masterbots): google signIn (#260)

* feat: design thread visibilty

* fix: added the backend

* fix: few clean up

* Leandro/develop (#257)

* chore: create thread-component to avoid to become thread list into a client component

* refactor: remove unnecesary hooks from thread component

* refactor: remove unnecesary hooks on thread componen

* impr(masterbots): components folder structur (#259)

* impr:refactor components folders + names + imports

* hotfix:chat-list useEffect dependency removal

* feat: design thread visibilty

* fix: added the backend

* fix: few clean up

* fix: update

* fix: add permission

* fix: update query

* fix(masterbots.ai): fix thread-component loop (#261)

* feat: design thread visibilty

* fix: added the backend

* fix: few clean up

* feat: design thread visibilty

* fix: added the backend

* fix: few clean up

* Leandro/develop (#257)

* chore: create thread-component to avoid to become thread list into a client component

* refactor: remove unnecesary hooks from thread component

* refactor: remove unnecesary hooks on thread componen

* impr(masterbots): components folder structur (#259)

* impr:refactor components folders + names + imports

* hotfix:chat-list useEffect dependency removal

* feat: design thread visibilty

* fix: added the backend

* fix: few clean up

* update

* fix: update

* fix: publicity toggle

* fix: error catch in the functions

* fix: observations

* fix: design impr

* fix: thread pop-up height

* chore(masterbots.ai): log rm & app version upt

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: Leandro Gavidia Santamaria <[email protected]>
Co-authored-by: Brandon Fernández <[email protected]>
Co-authored-by: Roberto Lucas <[email protected]>

* feat(masterbots.ai): user messages ai refactor (#266)

* feat:userMessages refactor + hooks and utils

* upt:rm console.log

* fix:rollback useAiChat hook

* fix:rollback - actions

* fix(masterbots.ai): sidebar trigger

* chore(hasura: s

---------

Co-authored-by: Roberto Lucas <[email protected]>

* wip: browse sidebar

* impr(masterbots.ai): browse sidebar (#270)

* fix: browse layout

* feat(masterbots.ai): browse sidebar

* fix: browse sidebar link condition

* chore: upt signup default profile pic

* chore: seeds upt (#269)

* wip: seeds upt

* chore(hasura): seeds review

* feat(hasura): add "is_approved" thread field + seeds

* chore: mb-genql upt

* fix(hasura): thread param permission

* fix(masterbots.ai): typo

* fix(masterbots.ai): allow svg content-type

* fix: chat + browse layout

* style: clean up

* Seo data (#273)

* fix: build error

* feat: Add SEO data to the chat page

* feat: add default image, if not found

* feat: Add SEO data to the browse page

* fix: generates the image with error, in api/og

* Update route.tsx

fix: generates the image with error, in api/og

* impr(masterbots.ai): title impr prompt

* impr(masterbots.ai): improve current features v2 (#274)

* add-impr-chat-prompt-footer-header-disclaimer

* add-impr-chat-prompt-footer-header-disclaimer

* add-UI-upt

* add-UI-upt

* add-action-prompt

* add-clickable-upt

* add-clickable-upt

* Masterbots/fix redirects (#275)

* fix:avatar-redirects

* fix:avatar-redirect

* fix(masterbots.ai): upt components/ui/button.tsx

Coderabbitai suggestion.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix:URL correction

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [masterbots.ai] feat: wordware api (#276)

* feat: add wordware api + vercel sdk strategy

* feat: add wordware api + vercel sdk

* wordware describe feat

* wordware run + interface

* impr(masterbots.ai): upt /api/wordware/describe/route.ts

coderabbitai code suggestion.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* impr(masterbots.ai): upt /api/wordware/describe/route.ts

coderabbitai code suggestion.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix(masterbots.ai): typo /api/wordware/describe/route.ts

coderabbitai code suggestion.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* doc: mb system diagram upt

* wip: icl calls integrations

* impr(masterbots.ai): permission for thread & user action mode (#281)

* update

* feat: added permissions & new column

* fix: rm unnessecary files

* fix: rm permission check

* feat(masterbots.ai): create password recovery (#282)

* feat:add-recovery-strategy

* chore:add nodeemailer

* upt:hasura

* upt:hasura

* upt:gmail service

* feat(hasura): otp, token table + junction w/user + mb-genql gen

* feat:add recovery password API

* fix:ai suggestion + UX

* feat:improve ux show password feat

* chore:env sample

* chore:useSetState

* chore:roles

---------

Co-authored-by: Roberto Lucas <[email protected]>

* [masterbots.ai] impr: WW API sanitize and keep alive (#284)

* keep-alive + API sanitize + timeOut guard

* impr streamAndValidateResponse fn

* wip(masterbots.ai): impr createImprovementPrompt

* style(masterbots.ai): chat loading states comments

* feat(masterbots.ai): add admin mode to approve thread (#283)

* feat:added mode toggle and approve btn

* feat: added migration for user role

* feat: user role flow implet

* fix: impr admin approve process

* fix: clean up

* fix: toggle CTA changed

* fix: update

* fix: update

* fix: observ

* fix: obs clean up

* fix: update

* fix: clean up

* impr(masterbots.ai): alpha metadata chatbot labels (#288)

* wip: metadata chatbot labels

* wip(masterbots.ai): chatbot metadata labels

* impr(masterbots.ai): gen chatMetadata

* impr: simplifying prompt defitions + biome.json base config

* impr(masterbots.ai): recursive improved text prompt

* style: code comments + eslint chk

* impr: biome.json config

* fix(masterbots.ai): conflicts typo fix

* style(impr): cleanPrompt + followingQuestionsPrompt relocation & cleanup

* doc: map system (simplified)

* fix(masterbots.ai): sideBar updating URL (#286)

* fix:sideBar updating URL

* feat: coderabbit-ai suggestions

* fix: Implement auto-expanding sidebar categories and chatbot highlighting based on URL

* feat: optimize sidebar navigation with Link

* feat: thread options (#287)

* feat: added verified and label to the options

* usethreadvisibility as context

* feat: added option design  and functions

* fix: clean up

* fix: update

* fix: update

* fix: obsv

* fix: merge and update

* fix: update the delete popup

* fix: observ

* fix: update

* fix: delete thread flow

* update

* fix: update

* fix: types

* fix: chatbot not required

* fix: testing

* fix: rm bun.lock

* fix: clean up

* fix: update

* fix(masterbots.ai): temp freezing next version

---------

Co-authored-by: Roberto Lucas <[email protected]>

* [masterbots.ai] feat: email verification (#289)

* feat: email verification

* feat: email verification

* feat: email verification

* upt:build

* feat: handle error redirection

* chore:cron task

* upt: cron blocking instead erasing

* feat(hasura): create social following table. (#292)

* feat(db): create social following table.

* create user following and followers relationships.

* fix(db): ensure users can only manage their own follow relationships.

* feat(db): social following and user table permissions improvements.

* feat(db): improving social following table with  timestamp and idx.

* impr(db): permissions and tracked object relationships.

* impr(db): avoid self follow.

* chore(masterbots.ai): guard WordWare for prod routing

* [masterbots.ai] fix: public/private tag bg on dark mode  (#294)

* fix: tag bg

* fix: text color

* fix: browse page error

* fix: debugging

* fix: debugging

* fix: debugging

* fix: added func to generate short link

* fix(hasura): upt user permissions (#296)

* update user permission

* fix: reverse the following table

* fix(hasura): build error (#297)

* fix: error build

* fix: reverse select perm

* [masterbots.ai] feat: thread list display + components comments for ai (#299)

* merged from develop

* feat:add new ui-thread-representation-browse

* feat:add comments for ai - C

* feat:add comments for ai - b/p

* feat:add comments for ai - b/p

* feat:add comments for ai - b/p

* feat:add app theme colors effects

* feat:add comments for ai - b/p

* [masterbots.ai] feat: chatbot search tool v0.1a (#295)

* wip: chatbot search tool

* wip(impr): ww api + chat ui tweaks

* fix: init sidebar load state

* fix: nesting layout

* fix: thread-popup ui header

* wip(impr): chatbot tooling

* impr: loading state + debug chatbot tools

* wip(fix): nodejs context

* fix(temp): rm edge runtime api config

* [masterbots.ai] feat: reorganize navigation menu for mobile view (#298)

* feat: reorganize navigation menu for mobile view

* UI: add sideBar style

* feat: add link profile and logout icon

* Update profile-sidebar.tsx

Tailwind class fix

* [masterbots.ai] feat: UI + Logic Improvements (#301)

* feat:impr responsive

* feat:impr password strenght checker

* feat:impr responsive

* upt-build

* feat:respomsive tweask

* feat:back arrow aria label

* fix:chat mobile layout

* fix:code section

* fix:chat pannel

* fix:chatBot redirection

* feat:restore appConfig header

* [masterbots.ai] fix: restore desktop navigation link - browse section (#303)

* fix:restore desktop navigation link - browse

* fix:formating

* feat:yellow combobox btn (JUN-REQUEST)

* glowing effect variant

* upt:removed /b navigation as original v

* feat:powerup mode + provider

* [masterbots.ai] fix(impr): browse and chat content search (#304)

* feat:browse title and content search

* feat:browse title and content search

* fix:typo

* impr:reusable non result component

* feat:skeletons

* feat:guard

* fix:skeletons

* fix:chat searching

* fix: add accent colour

---------

Co-authored-by: Roberto Lucas <[email protected]>

* [masterbots.ai] impr: seo sitemap (#306)

* chore: sitemap creation

* chore: add description based on category

* chore: update queries in services

* chore: truncate text

* impr: upt (browse)/[category]/[threadId]/sitemap.ts

coderabbitai code suggestion.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [masterbots.ai] impr: ai tools (#302)

* wip: ai tools

* fix: WW json regexp

* impr: simplifying main ai call

* wip(fix): chat component re-render + cleanup

* impr(refactor): chat hooks

* fix: ts build

* fix: ts build

* fix: ts typo

* fix: typo

* impr: ai feedbacks

* [masterbots.ai] wip(impr): web search (#309)

* impr: web search tool call

* fix: colour values

* fix: typo

* impr: code suggestions

* fix: class name typo

* wip(fix): web search false positive response + webSearch context

* fix: web search callback

* fix: typo

* feat: profile page (#300)

* feat: user card

* fix: update

* merge develop && update

* feat: user generate bio & favourite  topic

* fix: update user card

* feat: added profile sidebar

* fix: update

* update

* update

* update

* fix: fetch approved and public threads

* fix: fetch approved and public threads

* update

* fix: clean up and update

* update

* make fetch user work with bio

* update

* update

* design updating

* update

* update

* fix: few changes

* update

* fix: design update

* fix: footer in layout

* fix: update

* fix:  resercation

* update

* profile upload

* feat: move the cloudinary key to env

* fix: layout

* fix: layout update

* [masterbots.ai] fix: shallow routing for category & chatbots for  chat & profile page  (#313)

* update

* feat: added shallow link to the sidebar link

* update'

* fix: routing and content fetching

* fix:update on  routing

* fix:update

* update

* update

* update

* fix: clean up

* update

* update

* [masterbots.ai] feat: update ChatChatbotDetails (#314)

* feat: new bot profile - chat

* chore: dev comments

* chore: white bg bot avatar

* feat: add skeleton bot profile

* [masterbots.ai] feat: include custom settings options (#317)

* feat:relocation of theme switch(jun)

* feat: create font-size accessibility provider(jun)

* feat: r-sidebar theme switcher relocation + skeleton

* feat: impr add rem instead px

* [masterbots.ai] feat: integrate drizzle ORM (#320)

* feat: create mb-drizzle package initial structure

* feat:(masterbots.ai) add drizzle endpoint + service

* chore: include database url

* chore: upt mb-drizzle

* feat: refactor drizzle config + generations

* chore: impr migrate

* chore: add working drizzle connection + migrations

* feat: add centralized actions

* chore: add ai review recomendations

* chore: webSearch feature flag + use cloudinary upload preset

* fix: responsive sidebar fix

* fix: ts chk build

* fix: sidebar async call

* fix: ts build

* chore: typo

* [masterbots.ai] fix: browse category navigation (#316)

* update

* fix: rm category

* update

* fix: pop up on the user threads

* update

* update clean up

* update

* fix: clean up

* fix:  clean up and update

* fix: update

* fix: popup on navigation

* fix: update

* update

* update

* update

* clean up

* update

* merge

* fix: hasura thread delete + user dup permissions (#330)

* [masterbots.ai] feat: onboarding bot profile variants  (#324)

* add chatbot-details and browse-details variants

* feat: add bio generation

* feat: chat profile bg

* chore: update bot profile designs

* chore: remove internal padding from cardHeader component

* impr: iconography + border thickness

* fix: numberShortener util fn

---------

Co-authored-by: Roberto Lucas <[email protected]>

* feat: user following  (#319)

* update

* added follow user

* update

* fix: upt hasura metadata databases, public_social_following.yaml

coderabbitai code suggestion.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix: upt masterbots.ai lib, utils.ts

coderabbitai suggestion.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix: user card

* update

* fix: permission

* update

* fix: added more column for chatbot followee

* fix:foloow chatbot implementation

* update

* threads by following user/bots

* update

* update

* update

* update

* update

* update

* update

* update

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* [masterbots.ai] impr: new sonner (#334)

* chore: add new icons

* feat: Sonner custom hooks and setup

* feat: use useSonner hook throughout the app

* fix: overflow of the width of the sonner

* chore: add new icons

* feat: Sonner custom hooks and setup

* feat: use useSonner hook throughout the app

* chore: use hook sonner

* refactor: changes according to coderabbitai

* refactor: update use of sonner

* chore:remove icons and use lucide icons

* chore: Using Lucide Icons

* chore: bun pkg mngr upt

* Standardize url building using urlbuilders utility (#341)

* fix: update url

* fix: url update

* update

* [masterbots.ai] impr: og Image api dynamic to be useful without thread ID (#335)

* update

* fix: make OG image use default

* fix: update

* fix: update

* fix: obs

* fix: update

* fix: added og to browse and chat

* update

* update

* update

* fix: provider types error

* fix: updfate UUID

* fix: update UUID

* [masterbots.ai] docs: hook useSonner (#343)

* chore: document hook useSonner

* refactor: document hook useSonner, according coderabbit

* impr: web search response (#310)

* impr: web search response

* refactor: extracting clickable generation logic

* refactor: extracting clickable generation logic

* fix: webSearch clickable text + reference links

* chore: fix build

* feat:(impr) stable version link to references format step 1

* feat:(impr) stable version link to references format step 2

---------

Co-authored-by: Bran18 <[email protected]>

* [masterbots.ai] refactor: prelaunch ux/ui changes (#336)

* refactor: replicate tooltip effect in desktop bot chatbot details

* fix: add guard and removed re-render

* fix: refactor mobile bot chatbot details

* refactor: make chatPannel bigger

* chore:add new bot card design + sidebar hover color

* chore: delete public and private sw + icons

* chore: include public + delete extra actions

* chore: add sidebar bg

* add sidebar new styles + lib fn

* feat: add select bot

* chore: cleaning

* fix: build - removing BotMessageSquareIcon

* fix: types/node version + node min ver req

---------

Co-authored-by: sheriffjimoh <[email protected]>
Co-authored-by: Roberto Lucas <[email protected]>

* [masterbots.ai] feat: continuous thread ui functionality (#340)

* wip: continuos thread logic and functionality.

* feat: updating parent thread functionality.

* feat: continuous thread UI and finalize functionality.

* fix: lowering resolveThreadId logic complexity.

* Update apps/hasura/migrations/masterbots/1736934906237_set_fk_public_thread_parent_thread/down.sql

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update apps/masterbots.ai/lib/hooks/use-mb-chat.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix: ts build

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Roberto Lucas <[email protected]>

* [masterbots.ai] fix: refactored components - pre icl v3 (#348)

* chore: add refactored components - pre icl v3

* chore: add navigation color + text-input color

* fix: type

* wip: header active state

* fix: them toggle

---------

Co-authored-by: Roberto Lucas <[email protected]>

* feat: icl v1a (#344)

* wip: vercel ai sdk upt

* wip: icl web feature

* chore: icl hasura migrations, metadata and seeds

* chore: genql gen

* impr: chat opt separator render

* impr: accordion chevron pos

* impr: chat-list space

* Fix observations from Jun (#353)

* update

* fix: update

* fix: added empty state

* fix: rm favourt and added card empty state

* fix: hide sibe category without threads on user profile

* fix: update

* fix: update

* [masterbots.ai] fix: reduce prompt input validation

* fix: hasura moderator augmentedFrom msg prop

* impr: ai prompt examples flow

* fix: hasura moderator role thread upt permissions

* [masterbots.ai] feat: chatbot following + thread highlight + bot thread page to blog  (#337)

* update

* feat: added chatbot follow function to other component

* update profile thread

* thread highligh

* thread highligh update

* update

* fix: thread blog

* fix: follow chat bot

* update

* fix: observations

* fix provider types issue

* fix provider update

* feat: update blog template

* fix: rm p tag from list items

* fix: merge

* fix: rm parentid and continiue reading

* update

* update

* merge

* fix: generated types

* update

* updatd

* update code

* impr: profile page layout

* fix: mg-genql gen ts

---------

Co-authored-by: Roberto Lucas <[email protected]>
Co-authored-by: Roberto Lucas <[email protected]>

* [masterbots.ai] fix: init threads render + icl init cleanup (#354)

* wip: fix init threads render + icl cleanup

This fixes the following issues:

1. Reduced the amount of re-renders when sending the new data.
2. Clean up the ICL functions and types.
3. State management for the user-thread-panel.
4. Debug the re-rendering uissue that is replacing the main thread content.
5. Debug opening a new thread with the new ICL system. They show in the list but not returning the messages when opening it up.
6. Few code clean ups.

* impr: thread list re-render in chat page

* fix: initialMessages in useChat

* fix: hasura moderator role thread upt permissions

* impr: thread list re-render

* fix: markdown pkg ts

* fix: markdown pkg ts

* fix: downgrade react-markdown (#358)

* fix: downgrade react-markdown

* fix: downgrade react-markdown

* fix: markdown dep version + layout thread list ui

* impr: gray-ish overlay bg rm

* chore: console log rm

---------

Co-authored-by: Roberto Lucas <[email protected]>

* refactor: icl seeds v2 (#357)

* chore: upt hasura icl seeds

* chore: chat legacy table rm

* chore(wip): icl seeds curation

* chore: upt icl init seed pt2

* chore: upt icl init seed pt3

* chore: upt icl init seed pt3

* chore: upt icl init seed pt4

* fix: cat + chatbot seeds revision

* chore: tag seeds note upt

* fix: drop and create chatbot_domain table (#360)

* fix: drop and create chatbot_domain table

* fix: chatbot_domain permissions

* fix: SQL typo

* [masterbots.ai] feat: improve common components and features (#356)

* fix: sidebar

* feat: add DeepSeek integration

* chore: wip accordions

* fix: include popup accordion

* chore: add shared accordion to thread list

* fix: extra space

* fix: extra space

* chore: add tabs effect

* chore: add colors based on routes

* chore: add colors based on routes

---------

Co-authored-by: Roberto Lucas <[email protected]>

* fix: useRouter import

* [masterbots.ai] fix: sidebar category render (#362)

* fix: sidebar category render

* docs: toggleChatbotSelection

* [hasura] chore: label + label_chatbot_category_domain dropping tables migration (#361)

* fix: fetch chatbotDomain

* [hasura] chore: rm wip example seed part

* chore: rm legacy tables  + fix getChatbotMetadata props (#363)

* chore: rm legacy tables

* fix: getChatbotMetadata

* fix: chatbotMetadata ts

* wip(refactor): icl init tags & categories fetch

* chore: bun.lockb upt

* fix: hotfix build error

* impr: icl metadata requests v1 (#365)

* wip: icl fetch + meta prompt impr

* impr: sidebar paddings

* wip: icl fetch + meta prompt impr

* wip: icl fetch + meta prompt impr

* impr: icl metadata request v2 (#366)

* wip: icl fetch + meta prompt impr

* fix: icl fetch + meta prompt impr

* impr: icl output + prompts

* chore: console.log rm

* chore: console.log icl metadata devMode

* [masterbots.ai] test: sytem prompt as user role

* fix: show sidebar in profile (#364)

* chore: clickable responses update

* [masterbots.ai] refactor: use chat hook context + state management perf (#369)

* chore: system prompt as system role

* refactor: use-mb-chat to context

* fix: mbchat provider location

* impr: profile page scroll & footer position (#367)

* update

* fix: update

* update

* update

* fix: profile page scroll and footer positioning

* fix: profile sidebar

* update

* update

* Revert "update"

This reverts commit ef7ee8c.

* Revert "Revert "update""

This reverts commit 553f82f.

* Revert "Revert "Revert "update"""

This reverts commit c645eca.

* fix: profile page  footer positioning

* fix: visitor should be  able to scroll through the categories

* fix: profile page side bar

* fix: rm loading when user not logged in

* fix: update

* [masterbots.ai] fix: clickable text feature (#372)

* fix: accordion arrow

* fix: clickable text formating

* wip: fix thread load (#373)

* wip: fix thread-list load

* fix: continuous system prompt context

* fix: render flickr + followup question logic impr

* impr: prompt tags segmentation

* chore: impr following question prompt

* feat: public continue thread (#375)

* refactor: integrating chatPannelHeader into chatPannel

* chore: update browse-chat-message with shared accordion

* chore: continue conversation + full conversations fix

* fix: left align text

* [masterbots.ai] fix: show appropriate bot cards in the user thread list (#368)

* update

* fix: update

* update

* update

* fix: filter category & chatbot by userId on profile page

* fix: hide empty chatbots

* fix: followee permission error as moderator to follow and unfollow (#374)

* update

* fix: update

* update

* update

* fix: permission issue for moderator when following other user

* fix: shift on user card when loading or empty

* update

* [masterbots.ai] fix: isNewChat guard + continuous thread messages + power up prompts (#377)

* fix: thread render at pop-up close

* impr: getRouteType + chat layout

* wip: isNewChat state

* impr: prompt tags segmentation

* fix: chat messages list render + open last according by default on new responses

* impr: thread list render guard

* feat(wip): isPowerUp mode

* impr: memoizing getChatbotMetadata

* fix: grabbing previous messages, continous chat

* chore: add todo comment

* impr: previous thread ui + coderabbitai observations

* fix: previous conversation re-render

* doc: useEffect biome-ignore

* impr: deep obj compare for msg pairs

* fix: ts build

* fix: ts build

* [masterbots.ai] refactor: useScroll hook (#376)

* chore: refactor useScroll

* chore: refactor useScroll

* chore: refactor useScroll

* Delete apps/masterbots.ai/lib/context/thread-context.tsx

* chore: test commit

* fix: import type

* chore: add clearTimeout

* chore: add destructuring

* feat: update use-mb-scroll

* feat: update thread component

---------

Co-authored-by: Brandon fernandez <[email protected]>

* [masterbots.ai] fix: chat stream render (#380)

* fix: chat stream render

* fix: typo

* chore: chatbot prompts init config + active thread hotfixes (#378)

* wip: chatbot prompts init config

* wip: upt init config seeds, adding prompt configs

* chore: upt init config seeds

* fix: resetActiveThread guard

* impr(wip): masterbot config prompt

* chore: icl data curation, domain + category + sub-category

* chore: init domain seeds curation

* fix: moderator + user role table selection

* impr: web prompt config + fix thread list render + code comments

* fix: coderabbitai observations

* [hasura] chore: upt user insert rows seed

* fix: conflict fix

---------

Co-authored-by: Gabo Esquivel <[email protected]>
Co-authored-by: Jimoh sherifdeen <[email protected]>
Co-authored-by: Nathanael Liu <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Brandon Fernández <[email protected]>
Co-authored-by: Anouk Rímola <[email protected]>
Co-authored-by: Trivium <[email protected]>
Co-authored-by: Leandro Gavidia Santamaria <[email protected]>
Co-authored-by: Jun Dam <[email protected]>
Co-authored-by: Luis Carrión <[email protected]>
Co-authored-by: Marco Ledezma <[email protected]>
Co-authored-by: Bran18 <[email protected]>
Co-authored-by: sheriffjimoh <[email protected]>
Co-authored-by: Brandon fernandez <[email protected]>
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.

3 participants