From 98c5341604068d21dc80ae3ebe173d3cc7c20255 Mon Sep 17 00:00:00 2001 From: Khalid Abdi Date: Wed, 3 Jun 2026 18:50:54 +0300 Subject: [PATCH] Fix COSS migration regressions (menu group, dialog padding, destructive button, auth form layout) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - MenuGroupLabel must live inside a MenuGroup (Base UI context) — wrap the label in nav-user, team-switcher, and nav-notifications. Fixes the 'MenuGroupContext is missing' runtime error. - Patient form/detail dialogs: COSS DialogPopup has no inner padding; move the body into DialogPanel (form as 'contents') so fields get p-6 instead of being flush to the edges. - Settings 'Delete' button used the default variant + bg override, keeping a near-white border-primary in dark mode. Use variant='destructive'. - Auth forms: COSS Field is items-start (no stretch). Make the submit button and the password-row/grid w-full, and underline the bottom sign-in/up link. Co-Authored-By: Claude Opus 4.8 --- frontend/components/chat/patient-cards.tsx | 11 ++++--- .../components/chat/patient-form-dialog.tsx | 19 ++++++----- frontend/components/login-form.tsx | 17 ++++++---- .../settings/settings-preferences.tsx | 4 +-- .../sidebar-02/nav-notifications.tsx | 5 ++- frontend/components/sidebar-02/nav-user.tsx | 25 +++++++------- .../components/sidebar-02/team-switcher.tsx | 33 ++++++++++--------- frontend/components/signup-form.tsx | 17 ++++++---- 8 files changed, 76 insertions(+), 55 deletions(-) diff --git a/frontend/components/chat/patient-cards.tsx b/frontend/components/chat/patient-cards.tsx index 8ca51cf..719de94 100644 --- a/frontend/components/chat/patient-cards.tsx +++ b/frontend/components/chat/patient-cards.tsx @@ -14,9 +14,10 @@ import { } from "@/components/ui/card"; import { Dialog, - DialogContent, DialogDescription, DialogHeader, + DialogPanel, + DialogPopup, DialogTitle, DialogTrigger, } from "@/components/ui/dialog"; @@ -180,13 +181,15 @@ function ExpandableCard({ > {children} - + {title} {description ? {description} : null} - {detail} - + + {detail} + + ); } diff --git a/frontend/components/chat/patient-form-dialog.tsx b/frontend/components/chat/patient-form-dialog.tsx index e82db2c..184eb38 100644 --- a/frontend/components/chat/patient-form-dialog.tsx +++ b/frontend/components/chat/patient-form-dialog.tsx @@ -7,10 +7,11 @@ import { Button } from "@/components/ui/button"; import { Dialog, DialogClose, - DialogContent, DialogDescription, DialogFooter, DialogHeader, + DialogPanel, + DialogPopup, DialogTitle, } from "@/components/ui/dialog"; import { Input } from "@/components/ui/input"; @@ -234,7 +235,7 @@ export function PatientFormDialog({ return ( - + {isEdit ? "Edit record" : "Add patient"} @@ -244,11 +245,11 @@ export function PatientFormDialog({ -
-
+ +
@@ -511,7 +512,7 @@ export function PatientFormDialog({ )} rows={visits} /> -
+
{error && ( @@ -525,7 +526,7 @@ export function PatientFormDialog({ - +
); } diff --git a/frontend/components/login-form.tsx b/frontend/components/login-form.tsx index 1ce2ba4..ebba4b1 100644 --- a/frontend/components/login-form.tsx +++ b/frontend/components/login-form.tsx @@ -78,8 +78,8 @@ export function LoginForm({ value={email} /> - -
+ +
{t("auth.login.passwordLabel")} @@ -99,13 +99,18 @@ export function LoginForm({ value={password} /> - - - + {t("auth.login.noAccount")}{" "} - {t("auth.login.signUpLink")} + + {t("auth.login.signUpLink")} +
diff --git a/frontend/components/settings/settings-preferences.tsx b/frontend/components/settings/settings-preferences.tsx index 0f4ca5d..5d9b29c 100644 --- a/frontend/components/settings/settings-preferences.tsx +++ b/frontend/components/settings/settings-preferences.tsx @@ -171,9 +171,7 @@ export function ProfilePanel() { keys. This action cannot be undone.

- + diff --git a/frontend/components/sidebar-02/nav-notifications.tsx b/frontend/components/sidebar-02/nav-notifications.tsx index 620ff61..9989d5d 100644 --- a/frontend/components/sidebar-02/nav-notifications.tsx +++ b/frontend/components/sidebar-02/nav-notifications.tsx @@ -4,6 +4,7 @@ import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Button } from "@/components/ui/button"; import { Menu, + MenuGroup, MenuGroupLabel, MenuItem, MenuPopup, @@ -31,7 +32,9 @@ export function NotificationsPopover({ }> - {t("nav.notifications")} + + {t("nav.notifications")} + {notifications.map(({ id, avatar, fallback, text, time }) => ( diff --git a/frontend/components/sidebar-02/nav-user.tsx b/frontend/components/sidebar-02/nav-user.tsx index c9c1e4f..143cf6f 100644 --- a/frontend/components/sidebar-02/nav-user.tsx +++ b/frontend/components/sidebar-02/nav-user.tsx @@ -7,6 +7,7 @@ import { useRouter } from "next/navigation"; import { Avatar, AvatarFallback } from "@/components/ui/avatar"; import { Menu, + MenuGroup, MenuGroupLabel, MenuItem, MenuPopup, @@ -97,17 +98,19 @@ export function NavUser() { side={isMobile ? "bottom" : isCollapsed ? "right" : "top"} sideOffset={8} > - - - {initials} - -
- {name} - - {email} - -
-
+ + + + {initials} + +
+ {name} + + {email} + +
+
+
}> diff --git a/frontend/components/sidebar-02/team-switcher.tsx b/frontend/components/sidebar-02/team-switcher.tsx index a95d2fd..0810b22 100644 --- a/frontend/components/sidebar-02/team-switcher.tsx +++ b/frontend/components/sidebar-02/team-switcher.tsx @@ -5,6 +5,7 @@ import { useRouter } from "next/navigation"; import { Menu, + MenuGroup, MenuGroupLabel, MenuItem, MenuPopup, @@ -69,21 +70,23 @@ export function OrgSwitcher() { side={isMobile ? "bottom" : isCollapsed ? "right" : "bottom"} sideOffset={4} > - - Clinics - - {(orgs ?? []).map((org) => ( - setActive(org.id)} - > -
- -
- {org.name} -
- ))} + + + Clinics + + {(orgs ?? []).map((org) => ( + setActive(org.id)} + > +
+ +
+ {org.name} +
+ ))} +
- - + + {t("auth.signup.passwordLabel")} @@ -141,15 +141,20 @@ export function SignupForm({ {t("auth.signup.passwordHint", { count: MIN_PASSWORD })} - - - + {t("auth.signup.haveAccount")}{" "} - {t("auth.signup.signInLink")} + + {t("auth.signup.signInLink")} +