Skip to content

Commit ef34080

Browse files
authored
Evals web app fixes / tweaks (#7299)
1 parent 4216618 commit ef34080

File tree

4 files changed

+11
-36
lines changed

4 files changed

+11
-36
lines changed

apps/web-evals/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
DATABASE_URL=postgres://postgres:password@localhost:5432/evals_development
1+
DATABASE_URL=postgres://postgres:password@localhost:5433/evals_development

apps/web-evals/scripts/check-services.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ if ! docker info &> /dev/null; then
55
exit 1
66
fi
77

8-
if ! nc -z localhost 5432 2>/dev/null; then
8+
if ! nc -z postgres 5433 2>/dev/null; then
99
echo "❌ PostgreSQL is not running on port 5432"
1010
echo "💡 Start it with: pnpm --filter @roo-code/evals db:up"
1111
exit 1
1212
fi
1313

14-
if ! nc -z localhost 6379 2>/dev/null; then
14+
if ! nc -z redis 6380 2>/dev/null; then
1515
echo "❌ Redis is not running on port 6379"
1616
echo "💡 Start it with: pnpm --filter @roo-code/evals redis:up"
1717
exit 1

apps/web-evals/src/app/runs/new/new-run.tsx

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { useForm, FormProvider } from "react-hook-form"
88
import { zodResolver } from "@hookform/resolvers/zod"
99
import fuzzysort from "fuzzysort"
1010
import { toast } from "sonner"
11-
import { X, Rocket, Check, ChevronsUpDown, SlidersHorizontal, Book, CircleCheck } from "lucide-react"
11+
import { X, Rocket, Check, ChevronsUpDown, SlidersHorizontal, CircleCheck } from "lucide-react"
1212

1313
import { globalSettingsSchema, providerSettingsSchema, EVALS_SETTINGS, getModelId } from "@roo-code/types"
1414

@@ -49,11 +49,8 @@ import {
4949
PopoverContent,
5050
PopoverTrigger,
5151
ScrollArea,
52+
ScrollBar,
5253
Slider,
53-
Dialog,
54-
DialogContent,
55-
DialogTitle,
56-
DialogFooter,
5754
} from "@/components/ui"
5855

5956
import { SettingsDiff } from "./settings-diff"
@@ -93,24 +90,20 @@ export function NewRun() {
9390

9491
const [model, suite, settings] = watch(["model", "suite", "settings", "concurrency"])
9592

96-
const [systemPromptDialogOpen, setSystemPromptDialogOpen] = useState(false)
97-
const [systemPrompt, setSystemPrompt] = useState("")
98-
const systemPromptRef = useRef<HTMLTextAreaElement>(null)
99-
10093
const onSubmit = useCallback(
10194
async (values: CreateRun) => {
10295
try {
10396
if (mode === "openrouter") {
10497
values.settings = { ...(values.settings || {}), openRouterModelId: model }
10598
}
10699

107-
const { id } = await createRun({ ...values, systemPrompt })
100+
const { id } = await createRun(values)
108101
router.push(`/runs/${id}`)
109102
} catch (e) {
110103
toast.error(e instanceof Error ? e.message : "An unknown error occurred.")
111104
}
112105
},
113-
[mode, model, router, systemPrompt],
106+
[mode, model, router],
114107
)
115108

116109
const onFilterModels = useCallback(
@@ -269,29 +262,11 @@ export function NewRun() {
269262
</div>
270263
<SettingsDiff defaultSettings={EVALS_SETTINGS} customSettings={settings} />
271264
</>
265+
<ScrollBar orientation="horizontal" />
272266
</ScrollArea>
273267
)}
274268
<FormMessage />
275269
</FormItem>
276-
277-
<Button type="button" variant="secondary" onClick={() => setSystemPromptDialogOpen(true)}>
278-
<Book />
279-
Override System Prompt
280-
</Button>
281-
282-
<Dialog open={systemPromptDialogOpen} onOpenChange={setSystemPromptDialogOpen}>
283-
<DialogContent>
284-
<DialogTitle>Override System Prompt</DialogTitle>
285-
<Textarea
286-
ref={systemPromptRef}
287-
value={systemPrompt}
288-
onChange={(e) => setSystemPrompt(e.target.value)}
289-
/>
290-
<DialogFooter>
291-
<Button onClick={() => setSystemPromptDialogOpen(false)}>Done</Button>
292-
</DialogFooter>
293-
</DialogContent>
294-
</Dialog>
295270
</div>
296271

297272
<FormField

apps/web-evals/src/app/runs/new/settings-diff.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ type SettingDiffProps = HTMLAttributes<HTMLDivElement> & {
5252
export function SettingDiff({ name, defaultValue, customValue, ...props }: SettingDiffProps) {
5353
return (
5454
<Fragment {...props}>
55-
<div className="overflow-hidden font-mono" title={name}>
55+
<div className="font-mono" title={name}>
5656
{name}
5757
</div>
58-
<pre className="overflow-hidden inline text-rose-500 line-through" title={defaultValue}>
58+
<pre className="inline text-rose-500 line-through" title={defaultValue}>
5959
{defaultValue}
6060
</pre>
61-
<pre className="overflow-hidden inline text-teal-500" title={customValue}>
61+
<pre className="inline text-teal-500" title={customValue}>
6262
{customValue}
6363
</pre>
6464
</Fragment>

0 commit comments

Comments
 (0)