feat(ui): trim the Lens setup search to a taller box without repeated labels

The step already says which runs to review and the placeholder already
shows the filter syntax, so the label and hint are gone. The box grows
to fit the placeholder instead of clipping it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Yujong Lee 2026-10-04 20:39:02 -07:00
parent 774a32f545
commit 235302a4bb

View file

@ -6,34 +6,27 @@ import { RunSearch } from "../../traces/list/runSearch/RunSearch";
import type { InvestigationInput } from "../investigationSchema";
import { useDropPicks, type ScopeOptions } from "../useMatchingActivity";
/** Which runs to review, written in the same search language as the Traces tab. */
/** Which runs to review, written in the same search language as the Traces tab; empty reviews every run. */
export function ScopeFields({ runs, range }: ScopeOptions) {
const { control } = useFormContext<InvestigationInput>();
const dropPicks = useDropPicks();
return (
<div className="grid gap-2">
<span className="text-sm font-medium">Runs to review</span>
<div className="h-9 overflow-hidden rounded-md border border-input shadow-xs focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50 dark:bg-input/30">
<Controller
control={control}
name="selection.q"
render={({ field }) => (
<RunSearch
value={field.value}
onChange={(q) => {
if (q !== field.value) dropPicks();
field.onChange(q);
}}
runs={runs}
range={range}
/>
)}
/>
</div>
<p className="text-xs text-muted-foreground">
Same search as the Traces tab, like <code className="font-mono">agent:researcher status:error</code>. Leave
empty to review every run.
</p>
<div className="min-h-11 rounded-md border border-input py-1 shadow-xs focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50 dark:bg-input/30">
<Controller
control={control}
name="selection.q"
render={({ field }) => (
<RunSearch
value={field.value}
onChange={(q) => {
if (q !== field.value) dropPicks();
field.onChange(q);
}}
runs={runs}
range={range}
/>
)}
/>
</div>
);
}