Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Server/app/worker-service/services/review.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ ${arr
md += renderSection("Low severity issues", grouped.low);

md += `\n---\n`;
md += `Generated by ReviewPilot\n`;
md += `Generated by CodeRefyn\n`;

return md;
}
Expand Down
10 changes: 10 additions & 0 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"clsx": "^2.1.1",
"date-fns": "^4.1.0",
"geist": "^1.7.0",
"lucide-react": "^1.18.0",
"next": "^16.2.3",
"next-auth": "^5.0.0-beta.30",
"react": "19.2.4",
Expand Down
4 changes: 2 additions & 2 deletions client/src/app/(auth)/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default async function LoginPage() {
<div className="bg-bg-surface border border-bg-border rounded-2xl p-10 w-full max-w-sm">

<div className="flex flex-col gap-1.5 mb-6">
<span className="font-mono text-base font-medium text-brand">ReviewPilot</span>
<span className="font-mono text-base font-medium text-brand">CodeRefyn</span>
<h1 className="text-2xl font-semibold text-text-primary">Sign in to your account</h1>
<p className="text-sm text-text-secondary leading-relaxed">
Connect your GitHub to start reviewing PRs automatically.
Expand All @@ -25,7 +25,7 @@ export default async function LoginPage() {
<LoginButton />

<p className="mt-4 text-xs text-text-tertiary text-center leading-relaxed">
By continuing, you agree to share your GitHub repository access with ReviewPilot.
By continuing, you agree to share your GitHub repository access with CodeRefyn.
</p>

</div>
Expand Down
3 changes: 3 additions & 0 deletions client/src/app/(dashboard)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client'

import { Sidebar } from '@/components/layout/Sidebar'
import { TakeAction } from '@/components/layout/takeAction'
import { useSession } from 'next-auth/react'
import { useRouter } from 'next/navigation'
import { useEffect } from 'react'
Expand All @@ -21,6 +22,8 @@ export default function DashboardLayout({ children }: { children: React.ReactNod
<div className="flex h-screen overflow-hidden bg-bg-base">
<Sidebar />
<main className="flex-1 overflow-y-auto">
<TakeAction message='Enter your API key and select model to get started' urlOnButton='/ai-usage' buttonLable='here' />

{children}
</main>
</div>
Expand Down
1 change: 1 addition & 0 deletions client/src/app/(dashboard)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { StatCard, Card, SectionLabel, Spinner } from '@/components/ui'
import { Topbar } from '@/components/layout/Topbar'
import {TakeAction} from '@/components/layout/takeAction'
import { useDashboard } from '@/hooks/useDashboard'
import type { fetchDashboardData } from '@/lib/api/dashboard'

Expand Down
2 changes: 1 addition & 1 deletion client/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const geistMono = Geist_Mono({
});

export const metadata: Metadata = {
title: "ReviewPilot",
title: "CodeRefyn",
description: "AI code review for your team",
};

Expand Down
36 changes: 6 additions & 30 deletions client/src/components/layout/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client'

import Link from 'next/link'
import { GitBranch, LayoutDashboard, Sparkles } from 'lucide-react'
import { usePathname } from 'next/navigation'
import { Avatar } from '@/components/ui'
import { useUser } from '@/hooks/useUser'
Expand All @@ -9,42 +10,17 @@ const navItems = [
{
label: 'Dashboard',
href: '/',
icon: (
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
<rect x="1" y="1" width="6" height="6" rx="1" />
<rect x="9" y="1" width="6" height="6" rx="1" />
<rect x="1" y="9" width="6" height="6" rx="1" />
<rect x="9" y="9" width="6" height="6" rx="1" />
</svg>
),
icon: LayoutDashboard,
},
{
label: 'Repos',
href: '/repos',
icon: (
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
<circle cx="8" cy="2" r="1.5" />
<circle cx="3" cy="13" r="1.5" />
<circle cx="13" cy="13" r="1.5" />
<line x1="8" y1="3.5" x2="8" y2="7" />
<line x1="8" y1="7" x2="3" y2="11.5" />
<line x1="8" y1="7" x2="13" y2="11.5" />
</svg>
),
icon: GitBranch,
},
{
label: 'AI Usage',
href: '/ai-usage',
icon: (
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
<circle cx="8" cy="2" r="1.5" />
<circle cx="3" cy="13" r="1.5" />
<circle cx="13" cy="13" r="1.5" />
<line x1="8" y1="3.5" x2="8" y2="7" />
<line x1="8" y1="7" x2="3" y2="11.5" />
<line x1="8" y1="7" x2="13" y2="11.5" />
</svg>
),
icon: Sparkles,
},
]

Expand All @@ -61,7 +37,7 @@ export function Sidebar() {
return (
<aside className="w-56 h-screen bg-bg-surface border-r border-bg-border flex flex-col shrink-0">
<div className="px-5 py-5 border-b border-bg-border">
<span className="font-mono text-sm font-medium text-brand">ReviewPilot</span>
<span className="font-mono text-sm font-medium text-brand">CodeRefyn</span>
</div>

<nav className="flex-1 px-2 py-4 flex flex-col gap-0.5">
Expand All @@ -75,7 +51,7 @@ export function Sidebar() {
: 'text-text-secondary hover:text-text-primary hover:bg-bg-raised border-transparent'
}`}
>
{item.icon}
<item.icon className="shrink-0" size={16} strokeWidth={1.8} />
{item.label}
</Link>
))}
Expand Down
55 changes: 55 additions & 0 deletions client/src/components/layout/takeAction.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import { useState } from "react";
import { X } from "lucide-react";
import { TypingText } from "../ui/TypingText";
import Link from "next/link";

type TakeActionContent = {
message: string;
buttonLable: string;
urlOnButton: string;
};

export function TakeAction({
message,
buttonLable,
urlOnButton,
}: TakeActionContent) {
const [showButton, setShowButton] = useState(false);
const [isDismissed, setIsDismissed] = useState(false);

if (isDismissed) return null;

return (
<div className="bg-black p-4 pb-0">
<div className="flex items-center justify-between font-mono bg-[#917B00] rounded-sm border-b p-2 h-10 pr-4">
<div className="flex gap-2 align-middle margin-auto items-center">
<p className="text-white text-[12px] pl-2">
<TypingText
text={message}
speed={105}
onComplete={() => setShowButton(true)}
/>
</p>

{showButton && (
<Link href={urlOnButton}>
<button
className="rounded-sm text-[12px] flex items-center justify-center text-white border px-2 h-[24px] animate-in fade-in duration-300"
>
{buttonLable}
</button>
</Link>
)}
</div>
<button
aria-label="Close"
className="flex h-6 w-6 shrink-0 items-center justify-center rounded-sm text-white/80 transition-colors hover:bg-white/10 hover:text-white"
type="button"
onClick={() => setIsDismissed(true)}
>
<X size={14} strokeWidth={2} />
</button>
</div>
</div>
);
}
40 changes: 40 additions & 0 deletions client/src/components/ui/TypingText.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { useEffect, useState } from "react";

type TypingTextProps = {
text: string;
speed?: number;
onComplete?: () => void;
};

export function TypingText({
text,
speed = 50,
onComplete,
}: TypingTextProps) {
const [displayedText, setDisplayedText] = useState("");

useEffect(() => {
let currentIndex = 0;

setDisplayedText("");

const interval = setInterval(() => {
setDisplayedText(text.slice(0, currentIndex + 1));
currentIndex++;

if (currentIndex >= text.length) {
clearInterval(interval);
onComplete?.();
}
}, speed);

return () => clearInterval(interval);
}, [text, speed]);

return (
<span>
{displayedText}
<span className="animate-pulse">|</span>
</span>
);
}
3 changes: 2 additions & 1 deletion client/src/lib/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { getSession } from "next-auth/react"
import type { Session } from "next-auth"

const apiClient = axios.create({
baseURL: process.env.NEXT_PUBLIC_API_URL ?? "https://ai-code-reviewer-api-app.fly.dev",
// baseURL: process.env.NEXT_PUBLIC_API_URL ?? "https://ai-code-reviewer-api-app.fly.dev",
baseURL: process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:3001",
})

apiClient.interceptors.request.use(async (config) => {
Expand Down
Loading