From 0d865ddbb1e41cd7c6c7dbac13a124fddb6824c1 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Fri, 24 Jul 2026 19:16:45 -0500 Subject: [PATCH] refactor(desktop): webhooks create form uses shared Field; drop status pill The create dialog used the settings-surface ListRow/ToggleRow inside a modal, which read differently from every other form dialog, and the detail header carried an enabled/disabled pill that rendered as a stray dash. Switch the form to the shared Field primitive (+ Switch) and remove the pill. --- apps/desktop/src/app/webhooks/index.tsx | 169 +++++++++++------------- 1 file changed, 79 insertions(+), 90 deletions(-) diff --git a/apps/desktop/src/app/webhooks/index.tsx b/apps/desktop/src/app/webhooks/index.tsx index 9d03f00e0533..c2f86cb29ede 100644 --- a/apps/desktop/src/app/webhooks/index.tsx +++ b/apps/desktop/src/app/webhooks/index.tsx @@ -15,8 +15,10 @@ import { DialogHeader, DialogTitle } from '@/components/ui/dialog' +import { Field } from '@/components/ui/field' import { Input } from '@/components/ui/input' import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select' +import { Switch } from '@/components/ui/switch' import { Textarea } from '@/components/ui/textarea' import { createWebhook, @@ -50,7 +52,7 @@ import { PanelRowMenu, PanelSectionLabel } from '../overlays/panel' -import { ListRow, ToggleRow } from '../settings/primitives' +import { ListRow } from '../settings/primitives' const DELIVER_OPTIONS: readonly string[] = ['log', 'telegram', 'discord', 'slack', 'email', 'github_comment'] @@ -435,100 +437,90 @@ export function WebhooksView({ onClose }: WebhooksViewProps) { ) : ( -
-
- setName(e.target.value)} - placeholder={w.fieldNamePlaceholder} - value={name} - /> - } - title={} - wide - /> - setDescription(e.target.value)} - placeholder={w.fieldDescriptionPlaceholder} - value={description} - /> - } - title={} - wide - /> -
- setPrompt(e.target.value)} - placeholder={w.fieldPromptPlaceholder} - value={prompt} +
{ + e.preventDefault() + void handleCreate() + }} + > +
+ + setName(e.target.value)} + placeholder={w.fieldNamePlaceholder} + value={name} /> - } - title={} - wide - /> -
- setEvents(e.target.value)} - placeholder={w.fieldEventsPlaceholder} - value={events} - /> - } - title={} - wide - /> - setSkills(e.target.value)} - placeholder={w.fieldSkillsPlaceholder} - value={skills} - /> - } - title={} - wide - /> + + + setDescription(e.target.value)} + placeholder={w.fieldDescriptionPlaceholder} + value={description} + /> +
-
- - - - - - {DELIVER_OPTIONS.map(opt => ( - - {w.deliverOptions[opt] ?? opt} - - ))} - - - } - title={} - wide + + +