diff --git a/apps/rowboat/app/actions/auth_actions.ts b/apps/rowboat/app/actions/auth_actions.ts index 4fa6ecfc..14b483e4 100644 --- a/apps/rowboat/app/actions/auth_actions.ts +++ b/apps/rowboat/app/actions/auth_actions.ts @@ -1,5 +1,5 @@ "use server"; -import { getSession } from "@auth0/nextjs-auth0"; +import { auth0 } from "../lib/auth0"; import { USE_AUTH } from "../lib/feature_flags"; import { WithStringId, User } from "../lib/types/types"; import { getUserFromSessionId, GUEST_DB_USER } from "../lib/auth"; @@ -12,7 +12,7 @@ export async function authCheck(): Promise>> { return GUEST_DB_USER; } - const { user } = await getSession() || {}; + const { user } = await auth0.getSession() || {}; if (!user) { throw new Error('User not authenticated'); } diff --git a/apps/rowboat/app/actions/klavis_actions.ts b/apps/rowboat/app/actions/klavis_actions.ts index 66d86a66..2036ab53 100644 --- a/apps/rowboat/app/actions/klavis_actions.ts +++ b/apps/rowboat/app/actions/klavis_actions.ts @@ -777,7 +777,7 @@ export async function generateServerAuthUrl( await projectAuthCheck(projectId); // Get the origin from request headers - const headersList = headers(); + const headersList = await headers(); const host = headersList.get('host') || ''; const protocol = headersList.get('x-forwarded-proto') || 'http'; const origin = `${protocol}://${host}`; diff --git a/apps/rowboat/app/api/auth/[auth0]/route.ts b/apps/rowboat/app/api/auth/[auth0]/route.ts deleted file mode 100644 index d74b427c..00000000 --- a/apps/rowboat/app/api/auth/[auth0]/route.ts +++ /dev/null @@ -1,10 +0,0 @@ -// pages/api/auth/[auth0].js -import { handleAuth, handleLogin } from '@auth0/nextjs-auth0'; - -export const GET = handleAuth({ - login: handleLogin({ - authorizationParams: { - prompt: 'login' - } - }) -}); \ No newline at end of file diff --git a/apps/rowboat/app/api/copilot-stream-response/[streamId]/route.ts b/apps/rowboat/app/api/copilot-stream-response/[streamId]/route.ts index 5bdd10a5..99444480 100644 --- a/apps/rowboat/app/api/copilot-stream-response/[streamId]/route.ts +++ b/apps/rowboat/app/api/copilot-stream-response/[streamId]/route.ts @@ -3,7 +3,8 @@ import { USE_BILLING } from "@/app/lib/feature_flags"; import { redisClient } from "@/app/lib/redis"; import { CopilotAPIRequest } from "@/app/lib/types/copilot_types"; -export async function GET(request: Request, { params }: { params: { streamId: string } }) { +export async function GET(request: Request, props: { params: Promise<{ streamId: string }> }) { + const params = await props.params; // get the payload from redis const payload = await redisClient.get(`copilot-stream-${params.streamId}`); if (!payload) { diff --git a/apps/rowboat/app/api/stream-response/[streamId]/route.ts b/apps/rowboat/app/api/stream-response/[streamId]/route.ts index f42cd328..2f5e7f6d 100644 --- a/apps/rowboat/app/api/stream-response/[streamId]/route.ts +++ b/apps/rowboat/app/api/stream-response/[streamId]/route.ts @@ -4,7 +4,8 @@ import { redisClient } from "@/app/lib/redis"; import { AgenticAPIChatMessage, AgenticAPIChatRequest, convertFromAgenticAPIChatMessages } from "@/app/lib/types/agents_api_types"; import { createParser, type EventSourceMessage } from 'eventsource-parser'; -export async function GET(request: Request, { params }: { params: { streamId: string } }) { +export async function GET(request: Request, props: { params: Promise<{ streamId: string }> }) { + const params = await props.params; // get the payload from redis const payload = await redisClient.get(`chat-stream-${params.streamId}`); if (!payload) { diff --git a/apps/rowboat/app/api/uploads/[fileId]/route.ts b/apps/rowboat/app/api/uploads/[fileId]/route.ts index eef03da7..1e76223e 100644 --- a/apps/rowboat/app/api/uploads/[fileId]/route.ts +++ b/apps/rowboat/app/api/uploads/[fileId]/route.ts @@ -8,10 +8,8 @@ import { ObjectId } from 'mongodb'; const UPLOADS_DIR = process.env.RAG_UPLOADS_DIR || '/uploads'; // PUT endpoint to handle file uploads -export async function PUT( - request: NextRequest, - { params }: { params: { fileId: string } } -) { +export async function PUT(request: NextRequest, props: { params: Promise<{ fileId: string }> }) { + const params = await props.params; const fileId = params.fileId; if (!fileId) { return NextResponse.json({ error: 'Missing file ID' }, { status: 400 }); @@ -34,10 +32,8 @@ export async function PUT( } // GET endpoint to handle file downloads -export async function GET( - request: NextRequest, - { params }: { params: { fileId: string } } -) { +export async function GET(request: NextRequest, props: { params: Promise<{ fileId: string }> }) { + const params = await props.params; const fileId = params.fileId; if (!fileId) { return NextResponse.json({ error: 'Missing file ID' }, { status: 400 }); diff --git a/apps/rowboat/app/api/widget/v1/chats/[chatId]/close/route.ts b/apps/rowboat/app/api/widget/v1/chats/[chatId]/close/route.ts index d62a4423..e64f347f 100644 --- a/apps/rowboat/app/api/widget/v1/chats/[chatId]/close/route.ts +++ b/apps/rowboat/app/api/widget/v1/chats/[chatId]/close/route.ts @@ -3,10 +3,8 @@ import { chatsCollection } from "../../../../../../lib/mongodb"; import { ObjectId } from "mongodb"; import { authCheck } from "../../../utils"; -export async function POST( - request: NextRequest, - { params }: { params: { chatId: string } } -): Promise { +export async function POST(request: NextRequest, props: { params: Promise<{ chatId: string }> }): Promise { + const params = await props.params; return await authCheck(request, async (session) => { const { chatId } = params; diff --git a/apps/rowboat/app/api/widget/v1/chats/[chatId]/messages/route.ts b/apps/rowboat/app/api/widget/v1/chats/[chatId]/messages/route.ts index 0ce24e49..fb05ffb6 100644 --- a/apps/rowboat/app/api/widget/v1/chats/[chatId]/messages/route.ts +++ b/apps/rowboat/app/api/widget/v1/chats/[chatId]/messages/route.ts @@ -6,10 +6,8 @@ import { Filter, ObjectId } from "mongodb"; import { authCheck } from "../../../utils"; // list messages -export async function GET( - req: NextRequest, - { params }: { params: { chatId: string } } -): Promise { +export async function GET(req: NextRequest, props: { params: Promise<{ chatId: string }> }): Promise { + const params = await props.params; return await authCheck(req, async (session) => { const { chatId } = params; diff --git a/apps/rowboat/app/app.tsx b/apps/rowboat/app/app.tsx index 549d8637..ef2458ea 100644 --- a/apps/rowboat/app/app.tsx +++ b/apps/rowboat/app/app.tsx @@ -1,23 +1,21 @@ 'use client'; -import { TypewriterEffect } from "./lib/components/typewriter"; import Image from 'next/image'; import logo from "@/public/logo.png"; -import { useUser } from "@auth0/nextjs-auth0/client"; +import { useUser } from "@auth0/nextjs-auth0"; import { useRouter } from "next/navigation"; import { Spinner } from "@heroui/react"; -import { LogInIcon } from "lucide-react"; export function App() { const router = useRouter(); - const { user, error, isLoading } = useUser(); + const { user, isLoading } = useUser(); if (user) { router.push("/projects"); } // Add auto-redirect for non-authenticated users - if (!isLoading && !user && !error) { - router.push("/api/auth/login"); + if (!isLoading && !user) { + router.push("/auth/login"); } return ( @@ -30,8 +28,7 @@ export function App() { alt="RowBoat Logo" height={40} /> - {(isLoading || (!user && !error)) && } - {error &&
{error.message}
} + {(isLoading || !user) && } {user &&
Welcome, {user.name}
diff --git a/apps/rowboat/app/billing/callback/page.tsx b/apps/rowboat/app/billing/callback/page.tsx index b5b3bf2a..eae1fa02 100644 --- a/apps/rowboat/app/billing/callback/page.tsx +++ b/apps/rowboat/app/billing/callback/page.tsx @@ -4,13 +4,14 @@ import { redirect } from "next/navigation"; export const dynamic = 'force-dynamic'; -export default async function Page({ - searchParams, -}: { - searchParams: { - redirect: string; +export default async function Page( + props: { + searchParams: Promise<{ + redirect: string; + }> } -}) { +) { + const searchParams = await props.searchParams; const customer = await requireBillingCustomer(); await syncWithStripe(customer._id); const redirectUrl = searchParams.redirect as string; diff --git a/apps/rowboat/app/globals.css b/apps/rowboat/app/globals.css index 359e21ab..fc5740fe 100644 --- a/apps/rowboat/app/globals.css +++ b/apps/rowboat/app/globals.css @@ -1,7 +1,13 @@ +@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap'); +@import 'tailwindcss'; @import './styles/quill-mentions.css'; -@tailwind base; -@tailwind components; -@tailwind utilities; + +@plugin './hero.ts'; + +@source '../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}'; +@custom-variant dark (&:is(.dark *)); + +@reference 'tailwindcss'; @layer utilities { .text-balance { @@ -106,74 +112,16 @@ html, body { input, textarea, select { @apply rounded-lg border-[#E5E7EB] dark:border-[#2E2E30] bg-[#F3F4F6] dark:bg-[#2A2A2D] - focus:ring-2 focus:ring-indigo-500 focus:ring-opacity-50 + focus:ring-2 focus:ring-indigo-500/50 transition-all duration-200; } } -@layer base { - * { - @apply border-border; - } - body { - @apply bg-background text-foreground; - } - - .card-shadow { - @apply shadow-sm dark:shadow-none dark:border-border; - } - - .hover-effect { - @apply hover:bg-accent/10 dark:hover:bg-accent/20 transition-colors; - } - - .border-subtle { - @apply border-border dark:border-border/50; - } - - /* Apply rounded corners to common interactive elements by default */ - button, - input, - textarea, - select, - [role="button"], - .card, - .input, - .select, - .textarea, - .button { - @apply !rounded-lg; - } -} - -* { - -webkit-transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, opacity 0.2s ease-in-out !important; - transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, opacity 0.2s ease-in-out !important; -} - -* { - @apply transition-colors duration-200; -} - -/* Add Inter font */ -@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap'); - -/* Set base font */ html { font-family: 'Inter', system-ui, -apple-system, sans-serif; } -@keyframes slideUpAndFade { - from { - opacity: 0; - transform: translateY(10px); - } - to { - opacity: 1; - transform: translateY(0); - } +body { + background: var(--background); + color: var(--foreground); } - -.animate-slideUpAndFade { - animation: slideUpAndFade 0.2s ease-out forwards; -} \ No newline at end of file diff --git a/apps/rowboat/app/hero.ts b/apps/rowboat/app/hero.ts new file mode 100644 index 00000000..6dbf0712 --- /dev/null +++ b/apps/rowboat/app/hero.ts @@ -0,0 +1,3 @@ +// hero.ts +import { heroui } from "@heroui/react"; +export default heroui(); \ No newline at end of file diff --git a/apps/rowboat/app/layout.tsx b/apps/rowboat/app/layout.tsx index 8946741a..1f0130bf 100644 --- a/apps/rowboat/app/layout.tsx +++ b/apps/rowboat/app/layout.tsx @@ -1,10 +1,10 @@ import "./globals.css"; import { ThemeProvider } from "./providers/theme-provider"; -import { UserProvider } from '@auth0/nextjs-auth0/client'; import { Inter } from "next/font/google"; import { Providers } from "./providers"; import { Metadata } from "next"; import { HelpModalProvider } from "./providers/help-modal-provider"; +import { Auth0Provider } from "@auth0/nextjs-auth0"; const inter = Inter({ subsets: ["latin"] }); @@ -21,7 +21,7 @@ export default function RootLayout({ children: React.ReactNode; }>) { return - + @@ -31,6 +31,6 @@ export default function RootLayout({ - + ; } diff --git a/apps/rowboat/app/lib/auth.ts b/apps/rowboat/app/lib/auth.ts index 009b8e3c..6dd6bdf2 100644 --- a/apps/rowboat/app/lib/auth.ts +++ b/apps/rowboat/app/lib/auth.ts @@ -1,13 +1,12 @@ import { z } from "zod"; -import { Claims } from "@auth0/nextjs-auth0"; import { ObjectId } from "mongodb"; import { usersCollection, projectsCollection, projectMembersCollection } from "./mongodb"; -import { getSession } from "@auth0/nextjs-auth0"; +import { auth0 } from "./auth0"; import { User, WithStringId } from "./types/types"; import { USE_AUTH } from "./feature_flags"; import { redirect } from "next/navigation"; -export const GUEST_SESSION: Claims = { +export const GUEST_SESSION = { email: "guest@rowboatlabs.com", email_verified: true, sub: "guest_user", @@ -39,9 +38,9 @@ export async function requireAuth(): Promise>> return GUEST_DB_USER; } - const { user } = await getSession() || {}; + const { user } = await auth0.getSession() || {}; if (!user) { - redirect('/api/auth/login'); + redirect('/auth/login'); } // fetch db user diff --git a/apps/rowboat/app/lib/auth0.ts b/apps/rowboat/app/lib/auth0.ts new file mode 100644 index 00000000..cefb6ae0 --- /dev/null +++ b/apps/rowboat/app/lib/auth0.ts @@ -0,0 +1,21 @@ +// lib/auth0.js + +import { Auth0Client } from "@auth0/nextjs-auth0/server"; + +// Initialize the Auth0 client +export const auth0 = new Auth0Client({ + // Options are loaded from environment variables by default + // Ensure necessary environment variables are properly set + domain: process.env.AUTH0_ISSUER_BASE_URL, + clientId: process.env.AUTH0_CLIENT_ID, + clientSecret: process.env.AUTH0_CLIENT_SECRET, + appBaseUrl: process.env.AUTH0_BASE_URL, + secret: process.env.AUTH0_SECRET, + + authorizationParameters: { + // In v4, the AUTH0_SCOPE and AUTH0_AUDIENCE environment variables for API authorized applications are no longer automatically picked up by the SDK. + // Instead, we need to provide the values explicitly. + scope: process.env.AUTH0_SCOPE, + audience: process.env.AUTH0_AUDIENCE, + } +}); \ No newline at end of file diff --git a/apps/rowboat/app/lib/billing.ts b/apps/rowboat/app/lib/billing.ts index f99e3400..dd7140ac 100644 --- a/apps/rowboat/app/lib/billing.ts +++ b/apps/rowboat/app/lib/billing.ts @@ -3,7 +3,6 @@ import { z } from 'zod'; import { Customer, AuthorizeRequest, AuthorizeResponse, LogUsageRequest, UsageResponse, CustomerPortalSessionResponse, PricesResponse, UpdateSubscriptionPlanRequest, UpdateSubscriptionPlanResponse, ModelsResponse } from './types/billing_types'; import { ObjectId } from 'mongodb'; import { projectsCollection, usersCollection } from './mongodb'; -import { getSession } from '@auth0/nextjs-auth0'; import { redirect } from 'next/navigation'; import { getUserFromSessionId, requireAuth } from './auth'; import { USE_BILLING } from './feature_flags'; diff --git a/apps/rowboat/app/lib/components/markdown-content.tsx b/apps/rowboat/app/lib/components/markdown-content.tsx index e59597ba..ad4c54ac 100644 --- a/apps/rowboat/app/lib/components/markdown-content.tsx +++ b/apps/rowboat/app/lib/components/markdown-content.tsx @@ -9,103 +9,104 @@ export default function MarkdownContent({ content: string; atValues?: Match[]; }) { - return {children} - }, - h2({ children }) { - return

{children}

- }, - h3({ children }) { - return

{children}

- }, - h4({ children }) { - return

{children}

- }, - h5({ children }) { - return
{children}
- }, - h6({ children }) { - return
{children}
- }, - strong({ children }) { - return {children} - }, - p({ children }) { - return

{children}

- }, - ul({ children }) { - return
    {children}
- }, - ol({ children }) { - return
    {children}
- }, - table({ children }) { - return {children}
- }, - th({ children }) { - return {children} - }, - td({ children }) { - return {children} - }, - blockquote({ children }) { - return
{children}
; - }, - a(props) { - const { children, href, className, node, ...rest } = props; + return
+ {children} + }, + h2({ children }) { + return

{children}

+ }, + h3({ children }) { + return

{children}

+ }, + h4({ children }) { + return

{children}

+ }, + h5({ children }) { + return
{children}
+ }, + h6({ children }) { + return
{children}
+ }, + strong({ children }) { + return {children} + }, + p({ children }) { + return

{children}

+ }, + ul({ children }) { + return
    {children}
+ }, + ol({ children }) { + return
    {children}
+ }, + table({ children }) { + return {children}
+ }, + th({ children }) { + return {children} + }, + td({ children }) { + return {children} + }, + blockquote({ children }) { + return
{children}
; + }, + a(props) { + const { children, href, className, node, ...rest } = props; - // If this is a mention link, render it with mention styling - if (href === '#mention') { - let label: string = ''; - // Check if children is an array and get the first text element - if (Array.isArray(children) && children.length > 0) { - const text = children[0]; - if (typeof text === 'string') { - const parts = text.split('@'); + // If this is a mention link, render it with mention styling + if (href === '#mention') { + let label: string = ''; + // Check if children is an array and get the first text element + if (Array.isArray(children) && children.length > 0) { + const text = children[0]; + if (typeof text === 'string') { + const parts = text.split('@'); + if (parts.length === 2) { + label = parts[1]; + } + } + } else if (typeof children === 'string') { + // Fallback for direct string children + const parts = children.split('@'); if (parts.length === 2) { label = parts[1]; } } - } else if (typeof children === 'string') { - // Fallback for direct string children - const parts = children.split('@'); - if (parts.length === 2) { - label = parts[1]; - } - } - // check if the the mention is valid - const invalid = !atValues.some(atValue => atValue.id === label); - if (atValues.length > 0 && invalid) { + // check if the the mention is valid + const invalid = !atValues.some(atValue => atValue.id === label); + if (atValues.length > 0 && invalid) { + return ( + + @{label} (!) + + ); + } return ( - - @{label} (!) + + @{label} ); } - return ( - - @{label} - - ); - } - // Otherwise render normal link (your existing link component) - return - - {children} - - - - }, - }} - > - {content} -
; + // Otherwise render normal link (your existing link component) + return + + {children} + + + + }, + }} + > + {content} + +
; } \ No newline at end of file diff --git a/apps/rowboat/app/lib/components/mentions-editor.css b/apps/rowboat/app/lib/components/mentions-editor.css index 8a4eb524..c0e9f994 100644 --- a/apps/rowboat/app/lib/components/mentions-editor.css +++ b/apps/rowboat/app/lib/components/mentions-editor.css @@ -1,3 +1,5 @@ +@import "../../globals.css"; + /* Target both edit mode and view mode mentions */ .mention, .ql-editor p span[class*="bg-[#e"], /* Matches both #e8f2fe and #e0f2fe */ @@ -15,12 +17,12 @@ span[class*="bg-[#e"] { /* For view mode */ } /* Handle Next.js dark mode class if needed */ -:global(.dark) .mention, +/* :global(.dark) .mention, :global(.dark) .ql-editor p span[class*="bg-[#e"], :global(.dark) span[class*="bg-[#e"] { background-color: rgb(31 41 55) !important; color: rgb(243 244 246) !important; -} +} */ /* Override the inline styles */ .ql-editor p span[class*="bg-[#e0f2fe]"], diff --git a/apps/rowboat/app/lib/components/structured-list.tsx b/apps/rowboat/app/lib/components/structured-list.tsx index 5bb9e0f6..a816cb1f 100644 --- a/apps/rowboat/app/lib/components/structured-list.tsx +++ b/apps/rowboat/app/lib/components/structured-list.tsx @@ -26,7 +26,7 @@ export function ListItem({ onClick: () => void; disabled?: boolean; rightElement?: React.ReactNode; - selectedRef?: React.RefObject; + selectedRef?: React.RefObject; icon?: React.ReactNode; }) { return ( diff --git a/apps/rowboat/app/lib/components/user_button.tsx b/apps/rowboat/app/lib/components/user_button.tsx index ee3846ea..69527d08 100644 --- a/apps/rowboat/app/lib/components/user_button.tsx +++ b/apps/rowboat/app/lib/components/user_button.tsx @@ -1,5 +1,5 @@ 'use client'; -import { useUser } from '@auth0/nextjs-auth0/client'; +import { useUser } from '@auth0/nextjs-auth0'; import { Avatar, Dropdown, DropdownItem, DropdownSection, DropdownTrigger, DropdownMenu } from "@heroui/react"; import { useRouter } from 'next/navigation'; import Link from 'next/link'; diff --git a/apps/rowboat/app/loading.tsx b/apps/rowboat/app/loading.tsx index 973384f3..ea100014 100644 --- a/apps/rowboat/app/loading.tsx +++ b/apps/rowboat/app/loading.tsx @@ -1,3 +1,4 @@ +'use client'; import { Spinner } from "@heroui/react"; export default function Loading() { diff --git a/apps/rowboat/app/projects/[projectId]/config/app.tsx b/apps/rowboat/app/projects/[projectId]/config/app.tsx index a81ca4fb..6e8b7c96 100644 --- a/apps/rowboat/app/projects/[projectId]/config/app.tsx +++ b/apps/rowboat/app/projects/[projectId]/config/app.tsx @@ -27,8 +27,8 @@ export function Section({ title: string; children: React.ReactNode; }) { - return
-

{title}

+ return
+

{title}

{children}
; } @@ -198,9 +198,9 @@ export function ApiKeysSection({ {loading && } - {!loading &&
-
-
API Key
+ {!loading &&
+
+
API Key
Created
Last Used
@@ -216,8 +216,8 @@ export function ApiKeysSection({
}
{keys.map((key) => ( -
-
+
+
diff --git a/apps/rowboat/app/projects/[projectId]/config/page.tsx b/apps/rowboat/app/projects/[projectId]/config/page.tsx index a85caa05..d5154550 100644 --- a/apps/rowboat/app/projects/[projectId]/config/page.tsx +++ b/apps/rowboat/app/projects/[projectId]/config/page.tsx @@ -7,13 +7,14 @@ export const metadata: Metadata = { title: "Project config", }; -export default async function Page({ - params, -}: { - params: { - projectId: string; - }; -}) { +export default async function Page( + props: { + params: Promise<{ + projectId: string; + }>; + } +) { + const params = await props.params; await requireActiveBillingSubscription(); return children: React.ReactNode }) { return children; diff --git a/apps/rowboat/app/projects/[projectId]/page.tsx b/apps/rowboat/app/projects/[projectId]/page.tsx index e128af9a..43d26473 100644 --- a/apps/rowboat/app/projects/[projectId]/page.tsx +++ b/apps/rowboat/app/projects/[projectId]/page.tsx @@ -1,11 +1,12 @@ import { redirect } from "next/navigation"; import { requireActiveBillingSubscription } from '@/app/lib/billing'; -export default async function Page({ - params -}: { - params: { projectId: string } -}) { +export default async function Page( + props: { + params: Promise<{ projectId: string }> + } +) { + const params = await props.params; await requireActiveBillingSubscription(); redirect(`/projects/${params.projectId}/workflow`); } \ No newline at end of file diff --git a/apps/rowboat/app/projects/[projectId]/sources/[sourceId]/page.tsx b/apps/rowboat/app/projects/[projectId]/sources/[sourceId]/page.tsx index 40c1aa3e..207b2f38 100644 --- a/apps/rowboat/app/projects/[projectId]/sources/[sourceId]/page.tsx +++ b/apps/rowboat/app/projects/[projectId]/sources/[sourceId]/page.tsx @@ -1,14 +1,15 @@ import { SourcePage } from "./source-page"; import { requireActiveBillingSubscription } from '@/app/lib/billing'; -export default async function Page({ - params, -}: { - params: { - projectId: string, - sourceId: string +export default async function Page( + props: { + params: Promise<{ + projectId: string, + sourceId: string + }> } -}) { +) { + const params = await props.params; await requireActiveBillingSubscription(); return ; } \ No newline at end of file diff --git a/apps/rowboat/app/projects/[projectId]/sources/components/section.tsx b/apps/rowboat/app/projects/[projectId]/sources/components/section.tsx index 024514eb..3cb463a9 100644 --- a/apps/rowboat/app/projects/[projectId]/sources/components/section.tsx +++ b/apps/rowboat/app/projects/[projectId]/sources/components/section.tsx @@ -37,7 +37,7 @@ export function SectionRow({ children, className }: { children: ReactNode; class export function SectionLabel({ children, className }: { children: ReactNode; className?: string }) { return ( -
+
{children}
); diff --git a/apps/rowboat/app/projects/[projectId]/sources/components/source-status.tsx b/apps/rowboat/app/projects/[projectId]/sources/components/source-status.tsx index 5b01b508..e2dc7789 100644 --- a/apps/rowboat/app/projects/[projectId]/sources/components/source-status.tsx +++ b/apps/rowboat/app/projects/[projectId]/sources/components/source-status.tsx @@ -28,7 +28,7 @@ export function SourceStatus({ {status === 'pending' && ( <> -
+
diff --git a/apps/rowboat/app/projects/[projectId]/sources/components/toggle-source.tsx b/apps/rowboat/app/projects/[projectId]/sources/components/toggle-source.tsx index 0760a66d..172fd8ab 100644 --- a/apps/rowboat/app/projects/[projectId]/sources/components/toggle-source.tsx +++ b/apps/rowboat/app/projects/[projectId]/sources/components/toggle-source.tsx @@ -36,7 +36,7 @@ export function ToggleSource({ onClick={handleToggle} disabled={loading} className={` - relative inline-flex h-5 w-9 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent + relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-indigo-500/20 ${isActive ? 'bg-indigo-500' : 'bg-gray-200 dark:bg-gray-700'} disabled:opacity-50 disabled:cursor-not-allowed diff --git a/apps/rowboat/app/projects/[projectId]/sources/new/page.tsx b/apps/rowboat/app/projects/[projectId]/sources/new/page.tsx index 3e205497..41dbf138 100644 --- a/apps/rowboat/app/projects/[projectId]/sources/new/page.tsx +++ b/apps/rowboat/app/projects/[projectId]/sources/new/page.tsx @@ -8,11 +8,12 @@ export const metadata: Metadata = { title: "Add data source" } -export default async function Page({ - params -}: { - params: { projectId: string } -}) { +export default async function Page( + props: { + params: Promise<{ projectId: string }> + } +) { + const params = await props.params; await requireActiveBillingSubscription(); if (!USE_RAG) { redirect(`/projects/${params.projectId}`); diff --git a/apps/rowboat/app/projects/[projectId]/sources/page.tsx b/apps/rowboat/app/projects/[projectId]/sources/page.tsx index 5b17b79b..dcb6fd5c 100644 --- a/apps/rowboat/app/projects/[projectId]/sources/page.tsx +++ b/apps/rowboat/app/projects/[projectId]/sources/page.tsx @@ -6,11 +6,12 @@ export const metadata: Metadata = { title: "Data sources", } -export default async function Page({ - params, -}: { - params: { projectId: string } -}) { +export default async function Page( + props: { + params: Promise<{ projectId: string }> + } +) { + const params = await props.params; await requireActiveBillingSubscription(); return ; + formRef: React.RefObject; handleSubmit: (formData: FormData) => Promise; onCancel: () => void; submitButtonText: string; diff --git a/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/scenario-form.tsx b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/scenario-form.tsx index e281e043..54d58dd2 100644 --- a/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/scenario-form.tsx +++ b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/scenario-form.tsx @@ -2,7 +2,7 @@ import { FormStatusButton } from "@/app/lib/components/form-status-button"; import { Button, Input, Textarea } from "@heroui/react"; interface ScenarioFormProps { - formRef: React.RefObject; + formRef: React.RefObject; handleSubmit: (formData: FormData) => Promise; onCancel: () => void; submitButtonText: string; diff --git a/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/simulation-form.tsx b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/simulation-form.tsx index 97f4fb7b..3c5e6756 100644 --- a/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/simulation-form.tsx +++ b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/components/simulation-form.tsx @@ -7,7 +7,7 @@ import { ProfileSelector } from "@/app/projects/[projectId]/test/[[...slug]]/com import { z } from "zod"; interface SimulationFormProps { - formRef: React.RefObject; + formRef: React.RefObject; handleSubmit: (formData: FormData) => Promise; scenario: WithStringId> | null; setScenario: (scenario: WithStringId> | null) => void; diff --git a/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/page.tsx b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/page.tsx index a4547c73..2d38de9b 100644 --- a/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/page.tsx +++ b/apps/rowboat/app/projects/[projectId]/test/[[...slug]]/page.tsx @@ -6,11 +6,12 @@ import { RunsApp } from "./runs_app"; import { TestingMenu } from "./testing_menu"; import { requireActiveBillingSubscription } from '@/app/lib/billing'; -export default async function TestPage({ params }: { params: { projectId: string; slug?: string[] } }) { +export default async function TestPage(props: { params: Promise<{ projectId: string; slug?: string[] }> }) { + const params = await props.params; await requireActiveBillingSubscription(); const { projectId, slug = [] } = params; let app: "scenarios" | "simulations" | "profiles" | "runs" = "runs"; - + if (slug[0] === "scenarios") { app = "scenarios"; } else if (slug[0] === "simulations") { diff --git a/apps/rowboat/app/projects/[projectId]/tools/components/CustomServers.tsx b/apps/rowboat/app/projects/[projectId]/tools/components/CustomServers.tsx index 49f56f44..366e58d2 100644 --- a/apps/rowboat/app/projects/[projectId]/tools/components/CustomServers.tsx +++ b/apps/rowboat/app/projects/[projectId]/tools/components/CustomServers.tsx @@ -295,7 +295,7 @@ export function CustomServers() {
-
+

diff --git a/apps/rowboat/app/projects/[projectId]/tools/components/HostedServers.tsx b/apps/rowboat/app/projects/[projectId]/tools/components/HostedServers.tsx index fd5e4a54..175c7b69 100644 --- a/apps/rowboat/app/projects/[projectId]/tools/components/HostedServers.tsx +++ b/apps/rowboat/app/projects/[projectId]/tools/components/HostedServers.tsx @@ -578,7 +578,7 @@ export function HostedServers({ onSwitchTab }: HostedServersProps) {

-
+

diff --git a/apps/rowboat/app/projects/[projectId]/tools/components/TestToolModal.tsx b/apps/rowboat/app/projects/[projectId]/tools/components/TestToolModal.tsx index 03ce9fc0..39198c11 100644 --- a/apps/rowboat/app/projects/[projectId]/tools/components/TestToolModal.tsx +++ b/apps/rowboat/app/projects/[projectId]/tools/components/TestToolModal.tsx @@ -193,7 +193,7 @@ export function TestToolModal({ isOpen, onClose, tool, server }: TestToolModalPr value={item || ''} onChange={(e) => handleArrayItemChange(index, e.target.value)} placeholder="Enter value" - className="focus:ring-0 focus:ring-offset-0 !ring-0 !ring-offset-0 focus:outline-none" + className="focus:ring-0 focus:ring-offset-0 ring-0! ring-offset-0! focus:outline-none" /> ) : itemSchema.type === 'number' || itemSchema.type === 'integer' ? ( ) : itemSchema.type === 'boolean' ? (

@@ -284,7 +284,7 @@ export function TestToolModal({ isOpen, onClose, tool, server }: TestToolModalPr className="w-full px-3 py-2 text-sm border border-gray-200 dark:border-gray-700 rounded-md bg-white dark:bg-gray-900 text-gray-900 dark:text-gray-100 focus:outline-none hover:border-gray-300 dark:hover:border-gray-600 - focus:ring-0 focus:ring-offset-0 !ring-0 !ring-offset-0" + focus:ring-0 focus:ring-offset-0 ring-0! ring-offset-0!" > {schema.enum.map((opt: string) => ( @@ -299,7 +299,7 @@ export function TestToolModal({ isOpen, onClose, tool, server }: TestToolModalPr type="datetime-local" value={value} onChange={(e) => handleParameterChange(paramName, e.target.value)} - className="focus:ring-0 focus:ring-offset-0 !ring-0 !ring-offset-0 focus:outline-none" + className="focus:ring-0 focus:ring-offset-0 ring-0! ring-offset-0! focus:outline-none" /> ); } @@ -309,7 +309,7 @@ export function TestToolModal({ isOpen, onClose, tool, server }: TestToolModalPr type="date" value={value} onChange={(e) => handleParameterChange(paramName, e.target.value)} - className="focus:ring-0 focus:ring-offset-0 !ring-0 !ring-offset-0 focus:outline-none" + className="focus:ring-0 focus:ring-offset-0 ring-0! ring-offset-0! focus:outline-none" /> ); } @@ -319,7 +319,7 @@ export function TestToolModal({ isOpen, onClose, tool, server }: TestToolModalPr type="time" value={value} onChange={(e) => handleParameterChange(paramName, e.target.value)} - className="focus:ring-0 focus:ring-offset-0 !ring-0 !ring-offset-0 focus:outline-none" + className="focus:ring-0 focus:ring-offset-0 ring-0! ring-offset-0! focus:outline-none" /> ); } @@ -329,7 +329,7 @@ export function TestToolModal({ isOpen, onClose, tool, server }: TestToolModalPr value={value} onChange={(e) => handleParameterChange(paramName, e.target.value)} placeholder={`Enter ${paramName}`} - className="focus:ring-0 focus:ring-offset-0 !ring-0 !ring-offset-0 focus:outline-none" + className="focus:ring-0 focus:ring-offset-0 ring-0! ring-offset-0! focus:outline-none" /> ); @@ -349,7 +349,7 @@ export function TestToolModal({ isOpen, onClose, tool, server }: TestToolModalPr handleParameterChange(paramName, isNaN(val) ? '' : val); }} placeholder={`Enter ${paramName}`} - className="focus:ring-0 focus:ring-offset-0 !ring-0 !ring-offset-0 focus:outline-none" + className="focus:ring-0 focus:ring-offset-0 ring-0! ring-offset-0! focus:outline-none" /> ); @@ -377,7 +377,7 @@ export function TestToolModal({ isOpen, onClose, tool, server }: TestToolModalPr value={value} onChange={(e) => handleParameterChange(paramName, e.target.value)} placeholder={`Enter ${paramName}`} - className="focus:ring-0 focus:ring-offset-0 !ring-0 !ring-offset-0 focus:outline-none" + className="focus:ring-0 focus:ring-offset-0 ring-0! ring-offset-0! focus:outline-none" /> ); } diff --git a/apps/rowboat/app/projects/[projectId]/tools/components/ToolsConfig.tsx b/apps/rowboat/app/projects/[projectId]/tools/components/ToolsConfig.tsx index fa74ff31..2fd34a47 100644 --- a/apps/rowboat/app/projects/[projectId]/tools/components/ToolsConfig.tsx +++ b/apps/rowboat/app/projects/[projectId]/tools/components/ToolsConfig.tsx @@ -26,7 +26,7 @@ export function ToolsConfig() { Tools Library - + BETA
diff --git a/apps/rowboat/app/projects/[projectId]/tools/components/WebhookConfig.tsx b/apps/rowboat/app/projects/[projectId]/tools/components/WebhookConfig.tsx index 3729d062..6c562365 100644 --- a/apps/rowboat/app/projects/[projectId]/tools/components/WebhookConfig.tsx +++ b/apps/rowboat/app/projects/[projectId]/tools/components/WebhookConfig.tsx @@ -32,7 +32,7 @@ function Section({ title, children, description }: { export function WebhookConfig() { const params = useParams(); - const projectId = typeof params.projectId === 'string' ? params.projectId : params.projectId[0]; + const projectId = params.projectId ? (typeof params.projectId === 'string' ? params.projectId : params.projectId[0]) : ''; const [loading, setLoading] = useState(true); const [webhookUrl, setWebhookUrl] = useState(null); diff --git a/apps/rowboat/app/projects/[projectId]/workflow/entity_list.tsx b/apps/rowboat/app/projects/[projectId]/workflow/entity_list.tsx index b5659b6b..ff06d5d4 100644 --- a/apps/rowboat/app/projects/[projectId]/workflow/entity_list.tsx +++ b/apps/rowboat/app/projects/[projectId]/workflow/entity_list.tsx @@ -80,7 +80,7 @@ const ListItemWithMenu = ({ isSelected?: boolean; onClick?: () => void; disabled?: boolean; - selectedRef?: React.RefObject; + selectedRef?: React.RefObject; menuContent: React.ReactNode; statusLabel?: React.ReactNode; icon?: React.ReactNode; @@ -111,7 +111,7 @@ const ListItemWithMenu = ({ }} disabled={disabled} > -
+
{mcpServerName ? ( void; onDeleteTool: (name: string) => void; - selectedRef: React.RefObject; + selectedRef: React.RefObject; } const ServerCard = ({ @@ -343,7 +343,7 @@ export function EntityList({ tourTarget="entity-agents" className={clsx( "h-full overflow-hidden", - !expandedPanels.agents && "!h-[53px]" + !expandedPanels.agents && "h-[53px]!" )} title={
} {view === 'markdown' &&
{oldValue !== undefined &&
-
Old
+
Old
- {oldValue !== undefined &&
New
} + {oldValue !== undefined &&
New
}
| "*"; }) { - const [state, dispatch] = useReducer>(reducer, { + const [state, dispatch] = useReducer(reducer, { patches: [], inversePatches: [], currentIndex: 0, diff --git a/apps/rowboat/app/projects/layout/components/menu-item.tsx b/apps/rowboat/app/projects/layout/components/menu-item.tsx index 052eac3e..c4cd1c4c 100644 --- a/apps/rowboat/app/projects/layout/components/menu-item.tsx +++ b/apps/rowboat/app/projects/layout/components/menu-item.tsx @@ -1,26 +1,20 @@ -import Link from "next/link"; import { LucideIcon } from "lucide-react"; interface MenuItemProps { - href?: string; icon: LucideIcon; selected?: boolean; collapsed?: boolean; - onClick?: () => void; children?: React.ReactNode; } export default function MenuItem({ - href, icon: Icon, selected = false, collapsed = false, - onClick, children }: MenuItemProps) { - const ButtonContent = ( - +
); - - if (href) { - return {ButtonContent}; - } - - return ButtonContent; } \ No newline at end of file diff --git a/apps/rowboat/app/projects/layout/components/sidebar.tsx b/apps/rowboat/app/projects/layout/components/sidebar.tsx index 9db43885..99de1d24 100644 --- a/apps/rowboat/app/projects/layout/components/sidebar.tsx +++ b/apps/rowboat/app/projects/layout/components/sidebar.tsx @@ -98,7 +98,7 @@ export default function Sidebar({ projectId, useRag, useAuth, collapsed = false, return ( <>