From a8c7a5f70f7653104a0bd8fae498545f124e440a Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Fri, 24 Jul 2026 19:16:45 -0500 Subject: [PATCH 1/4] refactor(desktop): add shared Field form-dialog primitive Dialog forms each hand-rolled their own label+control+hint stack (or borrowed the settings-surface ListRow), so gaps and hint styling drifted between the profile, cron, and webhook dialogs. Add a single Field / FieldHint primitive for label-over-control dialog fields and adopt it in the create/rename profile dialogs as the first consumers. --- .../app/profiles/create-profile-dialog.tsx | 29 ++++--------- .../app/profiles/rename-profile-dialog.tsx | 15 +++---- apps/desktop/src/components/ui/field.tsx | 41 +++++++++++++++++++ 3 files changed, 55 insertions(+), 30 deletions(-) create mode 100644 apps/desktop/src/components/ui/field.tsx diff --git a/apps/desktop/src/app/profiles/create-profile-dialog.tsx b/apps/desktop/src/app/profiles/create-profile-dialog.tsx index 602e3aa680e..c5bf60ad8c4 100644 --- a/apps/desktop/src/app/profiles/create-profile-dialog.tsx +++ b/apps/desktop/src/app/profiles/create-profile-dialog.tsx @@ -10,13 +10,13 @@ import { DialogHeader, DialogTitle } from '@/components/ui/dialog' +import { Field, FieldHint } from '@/components/ui/field' import { Input } from '@/components/ui/input' import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select' import { Textarea } from '@/components/ui/textarea' import { createProfile, updateProfileSoul } from '@/hermes' import { useI18n } from '@/i18n' import { AlertTriangle } from '@/lib/icons' -import { cn } from '@/lib/utils' import type { ProfileInfo } from '@/types/hermes' const PROFILE_NAME_RE = /^[a-z0-9][a-z0-9_-]{0,63}$/ @@ -100,10 +100,7 @@ export function CreateProfileDialog({
-
- + -

- {p.nameHint} -

-
+ {p.nameHint} + -
- + -

{p.cloneFromDesc}

-
+ {p.cloneFromDesc} + -
- +