From bae89a5c778bc1e2c8d5fcd5ab850a2c348b536a Mon Sep 17 00:00:00 2001 From: Bob Lee Date: Mon, 10 Aug 2026 20:47:16 -0700 Subject: [PATCH] fix(settings): streamline copy and align controls --- .../config/components/AIFeaturesConfig.scss | 55 ------------- .../config/components/SessionConfig.tsx | 65 +++++---------- .../components/common/ConfigPageLayout.scss | 16 +++- src/web-ui/src/locales/en-US/settings.json | 2 +- .../locales/en-US/settings/agentic-tools.json | 24 +++--- .../en-US/settings/session-config.json | 78 +++++++++--------- src/web-ui/src/locales/zh-CN/settings.json | 2 +- .../locales/zh-CN/settings/agentic-tools.json | 24 +++--- .../zh-CN/settings/session-config.json | 78 +++++++++--------- src/web-ui/src/locales/zh-TW/settings.json | 2 +- .../locales/zh-TW/settings/agentic-tools.json | 24 +++--- .../zh-TW/settings/session-config.json | 80 ++++++++++--------- 12 files changed, 201 insertions(+), 249 deletions(-) diff --git a/src/web-ui/src/infrastructure/config/components/AIFeaturesConfig.scss b/src/web-ui/src/infrastructure/config/components/AIFeaturesConfig.scss index d83f700783..a617552fa7 100644 --- a/src/web-ui/src/infrastructure/config/components/AIFeaturesConfig.scss +++ b/src/web-ui/src/infrastructure/config/components/AIFeaturesConfig.scss @@ -15,61 +15,6 @@ gap: $size-gap-2; } - &__label-with-tooltip { - display: inline-flex; - align-items: center; - gap: $size-gap-1; - min-width: 0; - } - - &__label-tooltip-icon { - display: inline-flex; - align-items: center; - justify-content: center; - color: var(--bf-appearance-token-color-text-muted); - cursor: help; - } - - &__label-tooltip-icon:hover { - color: var(--bf-appearance-token-color-text-secondary); - } - - &__inline-label { - display: inline-flex; - align-items: center; - gap: $size-gap-1; - min-width: 0; - } - - &__inline-info { - display: inline-flex; - align-items: center; - justify-content: center; - color: var(--bf-appearance-token-color-text-muted); - cursor: help; - flex-shrink: 0; - } - - &__inline-info:hover { - color: var(--bf-appearance-token-color-text-secondary); - } - - &__policy-tooltip { - max-width: min(320px, calc(100vw - 32px)); - display: grid; - gap: 4px; - line-height: var(--bf-appearance-token-line-height-relaxed); - } - - &__policy-tooltip strong { - color: var(--bf-appearance-token-color-text-primary); - font-weight: var(--bf-appearance-token-font-weight-medium); - } - - &__policy-tooltip strong:not(:first-child) { - margin-top: 4px; - } - /** Computer use: authorized status label (Granted / 已授权) */ &__perm-status--granted { color: var(--bf-appearance-token-color-text-muted); diff --git a/src/web-ui/src/infrastructure/config/components/SessionConfig.tsx b/src/web-ui/src/infrastructure/config/components/SessionConfig.tsx index 44f70ed7a3..285025c8e3 100644 --- a/src/web-ui/src/infrastructure/config/components/SessionConfig.tsx +++ b/src/web-ui/src/infrastructure/config/components/SessionConfig.tsx @@ -13,7 +13,6 @@ import { ConfigPageLoading, Modal, Select, - Tooltip, confirmDanger, type SelectOption, } from '@/component-library'; @@ -487,34 +486,15 @@ const SessionSettingsPanels: React.FC = ({ variant } { value: 'safe_only', label: tTools('config.subagentBatchPolicy.safeOnly'), + description: tTools('config.subagentBatchPolicy.safeOnlyDesc'), }, { value: 'force_parallel', label: tTools('config.subagentBatchPolicy.forceParallel'), + description: tTools('config.subagentBatchPolicy.forceParallelDesc'), }, ]; - const subagentBatchPolicyLabel = ( - - {tTools('config.subagentBatchPolicy.label')} - - {tTools('config.subagentBatchPolicy.safeOnly')} - {tTools('config.subagentBatchPolicy.safeOnlyDesc')} - {tTools('config.subagentBatchPolicy.forceParallel')} - {tTools('config.subagentBatchPolicy.forceParallelDesc')} - - } - placement="top" - > - - - - - - ); - const selectedCompanionPetPackage = settings?.agent_companion_pet ? companionPets.find(pet => pet.packagePath === settings.agent_companion_pet?.packagePath) ?? null : null; @@ -920,6 +900,15 @@ const SessionSettingsPanels: React.FC = ({ variant } const computerUseScreenLabel = computerUseStatusLoading ? t('loading.text') : computerUseScreen ? t('computerUse.granted') : t('computerUse.notGranted'); + const computerUsePlatformMessage = computerUsePlatformNote + ? platform === 'macos' + ? t('computerUse.platformNotes.macos') + : platform === 'windows' + ? t('computerUse.platformNotes.windows') + : platform === 'linux' + ? t('computerUse.platformNotes.linux') + : t('computerUse.platformNotes.generic') + : null; // A ready browser is not a failure state: BitFun attaches to it the moment // something needs it, so say that rather than the bare "not connected". const browserStatusLabel = browserCdpAvailable @@ -1254,21 +1243,7 @@ const SessionSettingsPanels: React.FC = ({ variant } description={t('toolExecution.sectionDescription')} > - {tTools('config.executionTimeout')} - - - - - - - )} + label={tTools('config.executionTimeout')} description={tTools('config.executionTimeoutDesc')} align="center" > @@ -1285,7 +1260,11 @@ const SessionSettingsPanels: React.FC = ({ variant } /> - +