Skip to content

Commit f14571a

Browse files
fix(web): webhook filter rows always stack and the task form never overflows
Fieldsets default to min-width: min-content, so the Schedule segmented control widened the form past a 390px dialog and pushed the filter controls out of view; the fieldset now has min-w-0. Filter rows always stack (path and remove, then test and value) because the dialog stays 574px wide on large windows, and the test select fits "does not equal". Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent e04ca7f commit f14571a

1 file changed

Lines changed: 26 additions & 25 deletions

File tree

‎apps/web/src/components/settings/ScheduledTasksSettings.tsx‎

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -186,27 +186,29 @@ function WebhookFiltersField({
186186
</Button>
187187
</div>
188188
{filters.map((filter, index) => (
189-
// Below md the row stacks: path and remove on one line, test and value on the next.
189+
// Always stacked: the dialog stays narrow on wide windows, so a single line
190+
// would cut off typical paths and values.
190191
// Rows have no identity of their own; removing one re-renders the rest in order.
191192
// oxlint-disable-next-line react/no-array-index-key
192-
<div key={index} className="flex flex-wrap items-center gap-2 md:flex-nowrap">
193-
<Input
194-
aria-label={`Filter ${index + 1} path`}
195-
className="min-w-0 flex-1 md:flex-4"
196-
placeholder="body.action"
197-
value={filter.path}
198-
onChange={(event) => update(index, { path: event.target.value })}
199-
/>
200-
<Button
201-
className="md:order-last"
202-
variant="ghost"
203-
size="icon-sm"
204-
aria-label={`Remove filter ${index + 1}`}
205-
onClick={() => onChange(filters.filter((_, at) => at !== index))}
206-
>
207-
<Trash2Icon />
208-
</Button>
209-
<div className="flex w-full min-w-0 items-center gap-2 md:contents">
193+
<div key={index} className="space-y-2 pt-1">
194+
<div className="flex items-center gap-2">
195+
<Input
196+
aria-label={`Filter ${index + 1} path`}
197+
className="min-w-0 flex-1"
198+
placeholder="body.action"
199+
value={filter.path}
200+
onChange={(event) => update(index, { path: event.target.value })}
201+
/>
202+
<Button
203+
variant="ghost"
204+
size="icon-sm"
205+
aria-label={`Remove filter ${index + 1}`}
206+
onClick={() => onChange(filters.filter((_, at) => at !== index))}
207+
>
208+
<Trash2Icon />
209+
</Button>
210+
</div>
211+
<div className="flex items-center gap-2">
210212
<Select
211213
value={filter.op}
212214
onValueChange={(op) => {
@@ -216,7 +218,7 @@ function WebhookFiltersField({
216218
>
217219
<SelectTrigger
218220
size="sm"
219-
className="w-40 shrink-0"
221+
className="w-44 shrink-0"
220222
aria-label={`Filter ${index + 1} test`}
221223
>
222224
<SelectValue>
@@ -231,12 +233,10 @@ function WebhookFiltersField({
231233
))}
232234
</SelectPopup>
233235
</Select>
234-
{filter.op === "exists" ? (
235-
<div className="min-w-0 flex-1 md:flex-3" />
236-
) : (
236+
{filter.op === "exists" ? null : (
237237
<Input
238238
aria-label={`Filter ${index + 1} value`}
239-
className="min-w-0 flex-1 md:flex-3"
239+
className="min-w-0 flex-1"
240240
placeholder={filter.op === "in" ? "opened, reopened" : "opened"}
241241
value={filter.value}
242242
onChange={(event) => update(index, { value: event.target.value })}
@@ -1286,7 +1286,8 @@ function ScheduledTaskEditorForm({
12861286
</DialogHeader>
12871287

12881288
<DialogPanel>
1289-
<fieldset disabled={saving} className="space-y-5">
1289+
{/* Fieldsets default to min-width: min-content, which lets one wide control widen the form past the dialog. */}
1290+
<fieldset disabled={saving} className="min-w-0 space-y-5">
12901291
{!connected ? (
12911292
<p className="text-sm text-destructive">Reconnect this environment before saving.</p>
12921293
) : null}

0 commit comments

Comments
 (0)