This commit is contained in:
cte 2025-03-24 13:34:42 -07:00
parent 201313a71e
commit d0fc151f7e
8 changed files with 23 additions and 12 deletions

View file

@ -135,6 +135,7 @@
}
body {
@apply bg-background text-foreground;
scrollbar-color: var(--color-background) transparent; /* Firefox */
scrollbar-color: rgba(0, 0, 0, 0.2) transparent; /* Firefox */
scrollbar-width: thin;
}
}

View file

@ -16,7 +16,7 @@ export function Home({ runs }: { runs: (Run & { taskMetrics: TaskMetrics | null
return (
<>
<Table className="border">
<Table className="border border-t-0">
<TableHeader>
<TableRow>
<TableHead>ID</TableHead>

View file

@ -20,11 +20,11 @@ export default function RootLayout({
}>) {
return (
<html lang="en">
<body className={`${fontSans.variable} ${fontMono.variable} font-sans antialiased`}>
<body className={`${fontSans.variable} ${fontMono.variable} font-sans antialiased pb-12`}>
<ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange>
<ReactQueryProvider>
<Header />
<div className="max-w-3xl mx-auto pb-12">{children}</div>
{children}
</ReactQueryProvider>
</ThemeProvider>
</body>

View file

@ -5,5 +5,10 @@ import { Run } from "./run"
export default async function Page({ params }: { params: Promise<{ id: string }> }) {
const { id } = await params
const run = await findRun(Number(id))
return <Run run={run} />
return (
<div className="max-w-3xl mx-auto px-12 p-12">
<Run run={run} />
</div>
)
}

View file

@ -1,6 +1,6 @@
"use client"
import { useCallback, useEffect, useRef, useState } from "react"
import { useCallback, useRef, useState } from "react"
import { useRouter } from "next/navigation"
import { useForm, FormProvider } from "react-hook-form"
import { zodResolver } from "@hookform/resolvers/zod"
@ -151,7 +151,6 @@ export function NewRun() {
</Command>
</PopoverContent>
</Popover>
<FormMessage />
</FormItem>
)}
@ -189,6 +188,7 @@ export function NewRun() {
variant="inverted"
maxCount={4}
/>
<FormMessage />
</FormItem>
)}
/>

View file

@ -1,5 +1,9 @@
import { NewRun } from "./new-run"
export default async function Page() {
return <NewRun />
export default function Page() {
return (
<div className="max-w-3xl mx-auto px-12 p-12">
<NewRun />
</div>
)
}

View file

@ -1,7 +1,7 @@
import { HoppingLogo } from "./logo"
export const Header = () => (
<div className="flex items-center justify-between border-b px-12 py-6 mb-12">
<div className="flex items-center justify-between border-b px-12 py-6">
<HoppingLogo />
</div>
)

View file

@ -6,13 +6,14 @@ import { z } from "zod"
export const createRunSchema = z
.object({
model: z.string().min(1),
model: z.string().min(1, { message: "Model is required." }),
description: z.string().optional(),
suite: z.enum(["full", "partial"]),
exercises: z.array(z.string()).optional(),
})
.refine((data) => data.suite === "full" || (data.exercises || []).length > 0, {
message: "Exercises are required for partial suite.",
message: "Exercises are required when running a partial suite.",
path: ["exercises"],
})
export type CreateRun = z.infer<typeof createRunSchema>