From df2913d0fb64dbbdc95c8063dc840a7547f7ee87 Mon Sep 17 00:00:00 2001 From: Donald Silveira Date: Wed, 30 Sep 2026 12:06:13 -0300 Subject: [PATCH] feat(web): improve default profile controls --- .../components/settings/settingsLayout.tsx | 4 ++++ .../src/profileScope/EnvironmentProfiles.tsx | 20 +++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/apps/web/src/components/settings/settingsLayout.tsx b/apps/web/src/components/settings/settingsLayout.tsx index 0794553cb8fba..7f8a777a50acc 100644 --- a/apps/web/src/components/settings/settingsLayout.tsx +++ b/apps/web/src/components/settings/settingsLayout.tsx @@ -172,6 +172,7 @@ export function SettingsSection({ title, hideTitle = false, icon, + badge, headerAction, variant = "grouped", children, @@ -181,6 +182,8 @@ export function SettingsSection({ title: string; hideTitle?: boolean; icon?: ReactNode; + /** Status shown right after the title, e.g. which profile is the default. */ + badge?: ReactNode; headerAction?: ReactNode; variant?: "grouped" | "plain"; children: ReactNode; @@ -205,6 +208,7 @@ export function SettingsSection({

{icon} {title} + {badge}

{headerAction}
diff --git a/apps/web/src/profileScope/EnvironmentProfiles.tsx b/apps/web/src/profileScope/EnvironmentProfiles.tsx index 52e5ad3fd9556..235eef56ce01e 100644 --- a/apps/web/src/profileScope/EnvironmentProfiles.tsx +++ b/apps/web/src/profileScope/EnvironmentProfiles.tsx @@ -149,27 +149,25 @@ export function EnvironmentProfiles({ key={id} title={profile.name} icon={} + badge={isDefault ? Default : null} headerAction={ - {isDefault ? ( - - Default - - ) : null} {readOnly ? null : isDefault ? ( - updateSettings({ providerProfileId: null })} > Unset default - + ) : ( - updateSettings({ providerProfileId: id })} > Make default - + )} {readOnly ? null : (