Skip to content
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
72f7b77
Remove .env file
masterbotai Oct 31, 2023
23e6baf
Remove .env file
masterbotai Oct 31, 2023
7de3c6d
Remove .env file
masterbotai Nov 1, 2023
1c5c7de
update
AndlerRL Jul 29, 2025
6f0edff
fix: update
AndlerRL Aug 7, 2025
09d01d8
update
sheriffjimoh Feb 4, 2025
35c2d7f
update
sheriffjimoh Feb 5, 2025
4bdaf2f
fix: rm breadcrumb on profile page
sheriffjimoh Aug 6, 2025
d4cb4b5
fix: arrow pointed right for closed/collapsed and arrow pointed down …
sheriffjimoh Aug 12, 2025
0cbf5ec
feat: added user profile to preference
sheriffjimoh Aug 12, 2025
dd06648
fix: update
sheriffjimoh Aug 12, 2025
fab64fe
fix: server pages restrictions
sheriffjimoh Aug 13, 2025
b1eae54
fix: verify email ui
sheriffjimoh Aug 19, 2025
568ec33
feat: endpoint route for verify token
sheriffjimoh Aug 20, 2025
2e0fb3f
feat: verify email setup
sheriffjimoh Aug 21, 2025
db14593
fix: updating session and validate username
sheriffjimoh Aug 21, 2025
f3c17fd
fix: username update
sheriffjimoh Aug 22, 2025
86976eb
fix: prefrences updates
sheriffjimoh Aug 25, 2025
6ea5f42
feat: added theme and font-size setting
sheriffjimoh Aug 28, 2025
7ca6583
feat: added theme and font-size setting
sheriffjimoh Aug 28, 2025
baba461
fix: merged develop
sheriffjimoh Aug 29, 2025
520fb8e
fix: update
sheriffjimoh Aug 30, 2025
8383b36
fix: update
sheriffjimoh Aug 30, 2025
1993d31
fix: google language translation updates
sheriffjimoh Sep 9, 2025
2b85da5
fix: app clean up
sheriffjimoh Sep 9, 2025
635d909
fix: update anon permision to see Isverified column
sheriffjimoh Sep 10, 2025
28de615
fix: lint update
sheriffjimoh Sep 10, 2025
4ecbabb
fix: username update func
sheriffjimoh Sep 10, 2025
20456d9
fix: rm bredcrum on pref page
sheriffjimoh Sep 10, 2025
727308a
fix: font icons
sheriffjimoh Sep 11, 2025
5c0a42b
fix: update
sheriffjimoh Sep 11, 2025
0b7e408
fix: build error
sheriffjimoh Sep 11, 2025
6602eaa
fix: error build
sheriffjimoh Sep 11, 2025
d3ebdca
fix: error build
sheriffjimoh Sep 11, 2025
fd6207f
Merge branch 'develop' into feat-profile-settings-clean
AndlerRL Sep 12, 2025
10a36a0
fix: rem master.ai folder
sheriffjimoh Sep 15, 2025
b6776d8
fix: added isUsernameTaken verifycation to username on auth
sheriffjimoh Sep 15, 2025
557ca42
fix: add ts def
sheriffjimoh Sep 16, 2025
dbdde0d
fix: update
sheriffjimoh Sep 16, 2025
84c055c
fix: update font size in gloabl.css
sheriffjimoh Sep 16, 2025
f0c3cc7
Merge branch 'develop' into feat-profile-settings-clean
sheriffjimoh Sep 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ select_permissions:
- role: anonymous
permission:
columns:
- is_pro
- pro_exclusive
- chatbot_id
- avatar
- chatbot_id
- created_by
Expand All @@ -81,8 +78,6 @@ select_permissions:
- role: moderator
permission:
columns:
- is_pro
- pro_exclusive
- avatar
- chatbot_id
- created_by
Expand All @@ -100,8 +95,6 @@ select_permissions:
- role: user
permission:
columns:
- is_pro
- pro_exclusive
- avatar
- chatbot_id
- created_by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ select_permissions:
- deletion_requested_at
- email
- favourite_topic
- is_verified
- last_login
- pro_user_subscription_id
- profile_picture
Expand Down
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
3 changes: 3 additions & 0 deletions apps/hasura/seeds/masterbots/1738179687443_init_tag_enum.sql
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
12 changes: 6 additions & 6 deletions apps/pro-web/app/actions/ai-main-call.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,12 +365,12 @@ export async function createResponseStream(
tools,
temperature: 1,
reasoning_effort: isPowerUp ? 'high' : 'medium',
providerOptions: {
openai: {
reasoningEffort: 'low',
reasoningSummary: 'auto',
},
},
// providerOptions: {
// openai: {
// reasoningEffort: 'low',
// reasoningSummary: 'auto',
// },
// },
}
: ({
temperature: OPEN_AI_ENV_CONFIG.TEMPERATURE,
Expand Down
11 changes: 11 additions & 0 deletions apps/pro-web/app/api/auth/signup/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { insertAdminUserPreferences } from '@/app/actions/admin.actions'
import { sendEmailVerification } from '@/lib/email'
import { generateUsername } from '@/lib/username'
import { delayFetch } from '@/lib/utils'
import { isUsernameTaken } from '@/services/hasura/hasura.service'
import bcryptjs from 'bcryptjs'
import { appConfig } from 'mb-env'
import { getHasuraClient, toSlug } from 'mb-lib'
Expand All @@ -24,6 +25,16 @@ export async function POST(req: NextRequest) {
)
}

if (username) {
const taken = await isUsernameTaken(username)
if (taken) {
return NextResponse.json(
{ error: 'Username is already taken' },
{ status: 409 },
)
}
}
Comment on lines +28 to +36
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Code duplication across web and pro-web signup routes

This entire signup route is nearly identical to apps/web/app/api/auth/signup/route.ts with minor differences in verification handling. This violates DRY principles.

Consider extracting the shared logic into a common service or utility function that both apps can use. Would you like me to help create a shared signup service that both apps can leverage while maintaining their specific configuration differences?

🤖 Prompt for AI Agents
In apps/pro-web/app/api/auth/signup/route.ts lines 28-36, the signup route
duplicates logic found in apps/web/app/api/auth/signup/route.ts; extract the
shared validation and username-checking/creation flow into a common service
(e.g., packages/auth-service or src/lib/auth/signup.ts) that returns
standardized results or throws typed errors, then have each route import that
service and pass in any app-specific hooks or options (such as verification
strategy, extra metadata, response formatting). Move input parsing,
isUsernameTaken call, user creation and common error mapping into the shared
function, and keep only the thin adapter in each route to handle NextResponse
specifics and the differing verification behavior via injected callbacks or an
options object.


const client = getHasuraClient()

try {
Expand Down
1 change: 0 additions & 1 deletion apps/pro-web/app/api/chat/models/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ export enum AIModels {
Gemini_Flash_Lite_Pro = 'gemini-2.0-flash-lite-pro',
Gemini_Flash_Pro = 'gemini-2.5-pro-preview-03-25',
Default = 'gpt-5-mini', //! OpenAI_5
// Default = 'gpt-4o-mini', //! OpenAI_5
}
2 changes: 1 addition & 1 deletion apps/pro-web/app/auth/forgot-password/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function ForgotPasswordPage() {
const logoSrc = getAppLogoPath({ theme: resolvedTheme })
return (
<motion.div
className="flex flex-col min-h-[calc(100vh-4rem)] items-center py-6 sm:py-10"
className="flex flex-col min-h-[calc(100vh-64px)] items-center py-6 sm:py-10"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.3 }}
Expand Down
2 changes: 1 addition & 1 deletion apps/pro-web/app/auth/reset-password/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function ResetPasswordPage(props: {

return (
<motion.div
className="flex flex-col min-h-[calc(100vh-4rem)] items-center py-6 sm:py-10"
className="flex flex-col min-h-[calc(100vh-64px)] items-center py-6 sm:py-10"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.3 }}
Expand Down
2 changes: 1 addition & 1 deletion apps/pro-web/app/auth/signin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function SignInPage() {
const logoSrc = getAppLogoPath({ theme: resolvedTheme })

return (
<div className="flex flex-col min-h-[calc(100vh-4rem)] items-center py-6 sm:py-10">
<div className="flex flex-col min-h-[calc(100vh-64px)] items-center py-6 sm:py-10">
<div className="w-full max-w-[1006px] sm:max-w-[500px] md:max-w-[1006px] relative aspect-[726/200] mb-6 sm:mb-10">
<Image
src={logoSrc}
Expand Down
2 changes: 1 addition & 1 deletion apps/pro-web/app/auth/signup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function SignUpPage() {

return (
<motion.div
className="flex flex-col min-h-[calc(100vh-4rem)] items-center py-6 sm:py-10"
className="flex flex-col min-h-[calc(100vh-64px)] items-center py-6 sm:py-10"
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.3 }}
Expand Down
6 changes: 3 additions & 3 deletions apps/pro-web/app/org/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import BrowseList from '@/components/routes/browse/browse-list'
import HomePage from '@/components/routes/home/home-page'
import { PAGE_SIZE } from '@/lib/constants/hasura'
import { getBrowseThreads } from '@/services/hasura'

export default async function HomePage() {
export default async function Page() {
const { threads, count } = await getBrowseThreads({ limit: PAGE_SIZE })

return <BrowseList initialThreads={threads} initialCount={count} />
return <HomePage initialThreads={threads} initialCount={count} />
}
17 changes: 15 additions & 2 deletions apps/pro-web/app/u/[userSlug]/s/pref/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
import { authOptions } from '@/auth'
import { Preferences } from '@/components/routes/preferences/preferences'
import { ErrorComponent } from '@/components/shared/error'
import type { PageProps } from '@/types/types'
import { getServerSession } from 'next-auth'

export default async function PreferencePage(props: PageProps) {
const params = await props.params
const userSlug = params.userSlug
Copy link

Choose a reason for hiding this comment

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

suggestion (code-quality): Prefer object destructuring when accessing and using properties. (use-object-destructuring)

Suggested change
const userSlug = params.userSlug
const {userSlug} = params


ExplanationObject destructuring can often remove an unnecessary temporary reference, as well as making your code more succinct.

From the Airbnb Javascript Style Guide

const session = await getServerSession(authOptions)
if (!userSlug) return <ErrorComponent message="User slug is required" />
if (!session)
return <ErrorComponent message="You must be logged in to view this page" />
if (!session || !session.user || session.user.slug !== userSlug)
return <ErrorComponent message={`Login as ${userSlug} to view this page`} />
Comment on lines +14 to +15
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Redundant session check

Line 14 has the same redundancy issue - !session is already checked on line 12, making the repeated check unnecessary.

-	if (!session || !session.user || session.user.slug !== userSlug)
+	if (session.user.slug !== userSlug)
📝 Committable suggestion

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

Suggested change
if (!session || !session.user || session.user.slug !== userSlug)
return <ErrorComponent message={`Login as ${userSlug} to view this page`} />
if (session.user.slug !== userSlug)
return <ErrorComponent message={`Login as ${userSlug} to view this page`} />
🤖 Prompt for AI Agents
In apps/pro-web/app/u/[userSlug]/s/pref/page.tsx around lines 14 to 15, the
conditional redundantly checks !session even though session was already
validated earlier; simplify the guard to only verify session.user exists and
that session.user.slug matches userSlug (e.g., remove the repeated !session
check) so the return uses a concise condition like checking session.user &&
session.user.slug !== userSlug or negating session.user or slug mismatch,
keeping the same ErrorComponent return behavior.


export default async function PreferencePage() {
return (
<div className="max-w-screen-xl pb-10 mx-auto w-full py-[120px] px-[58px]">
<div className="max-w-screen-xl pb-10 mx-auto w-full lg:py-[120px] lg:px-[58px] py-[70px] px-[50]">
<Preferences />
</div>
)
Expand Down
15 changes: 14 additions & 1 deletion apps/pro-web/app/u/[userSlug]/s/subs/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
import { authOptions } from '@/auth'
import { SubscriptionPageComponent } from '@/components/routes/subscription/subscription-page'
import { ErrorComponent } from '@/components/shared/error'
import type { PageProps } from '@/types/types'
import { getServerSession } from 'next-auth'

export default async function PreferencePage(props: PageProps) {
const params = await props.params
const userSlug = params.userSlug
Copy link

Choose a reason for hiding this comment

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

suggestion (code-quality): Prefer object destructuring when accessing and using properties. (use-object-destructuring)

Suggested change
const userSlug = params.userSlug
const {userSlug} = params


ExplanationObject destructuring can often remove an unnecessary temporary reference, as well as making your code more succinct.

From the Airbnb Javascript Style Guide

const session = await getServerSession(authOptions)
if (!userSlug) return <ErrorComponent message="User slug is required" />
if (!session)
return <ErrorComponent message="You must be logged in to view this page" />
if (!session || !session.user || session.user.slug !== userSlug)
return <ErrorComponent message={`Login as ${userSlug} to view this page`} />

export default async function PreferencePage() {
return <SubscriptionPageComponent />
}
9 changes: 1 addition & 8 deletions apps/pro-web/app/u/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,10 @@ export default async function ProfilePageLayout({
params,
}: ProfileLayoutProps) {
const session = await getServerSession()
const { userSlug } = await params
const { user } = await getUserBySlug({
slug: userSlug as string,
isSameUser: session?.user.slug === userSlug,
})
return (
// <section className="flex flex-col p-0">
<BrowseProvider>
<ProfileLayoutContent user={user as User}>
{children}
</ProfileLayoutContent>
<ProfileLayoutContent>{children}</ProfileLayoutContent>
</BrowseProvider>
)
}
2 changes: 1 addition & 1 deletion apps/pro-web/app/wordware/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default async function ChatLayout({ children }: ChatLayoutProps) {
}

return (
<main className="relative flex flex-col h-[calc(100vh-4rem)] overflow-hidden">
<main className="relative flex flex-col h-[calc(100vh-64px)] overflow-hidden">
{/* <NextTopLoader color="#1ED761" initialPosition={0.2} /> */}
<ResponsiveSidebar />
<ChatLayoutSection>{children}</ChatLayoutSection>
Expand Down
3 changes: 0 additions & 3 deletions apps/pro-web/components/layout/layout-client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ export default function LayoutClient({
const [mounted, setMounted] = React.useState(false)

// Ensure the theme is mounted before rendering
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
React.useEffect(() => {
setMounted(true)

console.log('Mounted LayoutClient with resolvedTheme:', resolvedTheme)
}, [])

const isAuthPage = pathname.includes('auth/')
Expand Down
1 change: 1 addition & 0 deletions apps/pro-web/components/layout/profile/hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { User } from 'mb-genql'

export function Hero({ user }: { user: User }) {
if (!user) return null

return (
<div className="profile-hero-bg" id="hero-section">
<div className="relative z-[2] md:px-0 px-5">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const UserProfileSidebar = ({
'lg:pl-0 lg:pr-0 max-w-screen-xl mx-auto': !isMainProfilePage,
})}
>
{!isMainProfilePage && (
{/* {!isMainProfilePage && (
<Breadcrumb className="px-4 py-2">
<BreadcrumbList>
<BreadcrumbItem>
Expand All @@ -126,7 +126,7 @@ export const UserProfileSidebar = ({
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>
)}
)} */}
<div className="flex flex-col w-full gap-10 pt-5 mb-10 mx-auto flex-grow ">
{children}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ export function SidebarCategoryGeneral({ page }: { page?: string }) {

if (!filteredCategories.length)
return (
<div className="p-4 min-h-inherit text-center">
No matching categories found
<div className="p-4 text-center min-h-inherit">
Choose topics to get started
</div>
)
return (
<ul className="min-h-inherit space-y-0">
<ul className="space-y-0 min-h-inherit">
{filteredCategories.map((category) => (
<li key={category.categoryId}>
<SidebarLink
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
'use client'

import BrowseChatbotDetails from '@/components/routes/browse/browse-chatbot-details'
import { BrowseSearchInput } from '@/components/routes/browse/browse-search-input'
import { OnboardingMobileView } from '@/components/routes/chat/chat-onboarding-chatbot-mobile'
import { SelectedBotMobileView } from '@/components/routes/chat/chat-selected-chatbot-mobile'
import UserThreadPanel from '@/components/routes/thread/user-thread-panel'
import { OnboardingChatbotCard } from '@/components/shared/onboarding-chatbot-card'
import { useThread } from '@/lib/hooks/use-thread'
Expand Down
Loading