Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
refactor(ui): consolidate brand buttons onto shared Button primitive
cyha024cb330383
diff --git a/ui/src/components/Dashboard.tsx b/ui/src/components/Dashboard.tsxindex 5c24e5c09..7755f63b3 100644--- a/ui/src/components/Dashboard.tsx+++ b/ui/src/components/Dashboard.tsx@@ -20,6 +20,7 @@ import clsx from 'clsx';import { useApi, type LogEntry } from '@/context/ApiContext';import { useStatus } from '@/context/StatusContext';import { PlatformIcon } from '@/components/visual';+import { Button } from '@/components/ui/button';import { getEnabledPlatforms, getPlatformCatalog, platformSupportsChannels } from '@/lib/platforms';function relativeFromIso(value?: string | null) {@@ -268,41 +269,39 @@ export const Dashboard: React.FC = () => {<div className="flex flex-wrap items-center gap-2">{!isRunning && (- <button+ <Buttontype="button"+ variant="brand"+ size="sm"onClick={() => void handleAction('start')}disabled={loading}- className="inline-flex items-center gap-1.5 rounded-lg bg-mint px-4 py-2.5 text-[13px] font-bold text-[#080812] shadow-[0_0_24px_-6px_rgba(91,255,160,0.44)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50"><Play className="size-3.5" strokeWidth={2.5} />{t('common.start')}- </button>+ </Button>)}{isRunning && (- <button+ <Buttontype="button"+ variant="secondary"+ size="sm"onClick={() => void handleAction('stop')}disabled={loading}- className="inline-flex items-center gap-1.5 rounded-lg border border-border bg-foreground/[0.04] px-4 py-2.5 text-[13px] font-medium text-foreground transition hover:border-border-strong disabled:cursor-not-allowed disabled:opacity-50"><Square className="size-3.5" strokeWidth={2.5} />{t('common.stop')}- </button>+ </Button>)}- <button+ <Buttontype="button"+ variant={isRunning ? 'brand' : 'secondary'}+ size="sm"onClick={() => void handleAction('restart')}disabled={loading}- className={clsx(- 'inline-flex items-center gap-1.5 rounded-lg px-4 py-2.5 text-[13px] font-bold transition disabled:cursor-not-allowed disabled:opacity-50',- isRunning- ? 'bg-mint text-[#080812] shadow-[0_0_24px_-6px_rgba(91,255,160,0.44)] hover:brightness-105'- : 'border border-border bg-foreground/[0.04] text-foreground hover:border-border-strong'- )}><RotateCw className="size-3.5" strokeWidth={2.5} />{t('common.restart')}- </button>+ </Button></div></div>diff --git a/ui/src/components/VersionBadge.tsx b/ui/src/components/VersionBadge.tsxindex 4fa66c562..784056b87 100644--- a/ui/src/components/VersionBadge.tsx+++ b/ui/src/components/VersionBadge.tsx@@ -4,6 +4,7 @@ import { useApi, type VersionInfo, type UpgradeResult } from '../context/ApiContimport { Download, X, RefreshCw, Check, AlertCircle } from 'lucide-react';import clsx from 'clsx';import { ToggleSwitch } from './settings/SettingsPrimitives';+import { Button } from './ui/button';export const VersionBadge: React.FC<{ openUpward?: boolean }> = ({ openUpward = false }) => {const { t } = useTranslation();@@ -232,14 +233,10 @@ export const VersionBadge: React.FC<{ openUpward?: boolean }> = ({ openUpward ={/* Actions */}{hasUpdate && !restarting && (<div className="flex justify-end border-t border-border px-4 py-3">- <button- onClick={handleUpgrade}- disabled={upgrading}- className="inline-flex items-center gap-1.5 rounded-md bg-mint px-3 py-2 text-sm font-semibold text-primary-foreground transition-colors hover:bg-mint/90 disabled:opacity-50"- >+ <Button variant="brand" size="xs" onClick={handleUpgrade} disabled={upgrading}><Download size={14} className={upgrading ? 'animate-bounce' : ''} />{upgrading ? t('dashboard.upgrading') : t('dashboard.upgradeNow')}- </button>+ </Button></div>)}</div>diff --git a/ui/src/components/settings/SettingsPlatformsPage.tsx b/ui/src/components/settings/SettingsPlatformsPage.tsxindex 1f4a371c0..fee6f9f10 100644--- a/ui/src/components/settings/SettingsPlatformsPage.tsx+++ b/ui/src/components/settings/SettingsPlatformsPage.tsx@@ -14,6 +14,7 @@ import { TelegramConfig } from '@/components/steps/TelegramConfig';import { LarkConfig } from '@/components/steps/LarkConfig';import { WeChatConfig } from '@/components/steps/WeChatConfig';import { SettingsPageShell } from './SettingsPageShell';+import { Button } from '@/components/ui/button';const PLATFORM_TILE_STYLES: Record<string, { bg: string; border: string }> = {slack: { bg: 'bg-[#4A154B26]', border: 'border-[#4A154B66]' },@@ -241,15 +242,16 @@ export const SettingsPlatformsPage: React.FC = () => {>{t('common.cancel')}</button>- <button+ <Buttontype="button"+ variant="brand"+ size="xs"onClick={() => void applyEnabled()}disabled={!draftEnabled.length || savingEnabled}- className="inline-flex items-center gap-1.5 rounded-lg bg-mint px-3.5 py-1.5 text-[12px] font-bold text-[#080812] shadow-[0_0_24px_-6px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-none">{savingEnabled ? <RefreshCw size={12} className="animate-spin" /> : <Check size={12} />}{t('platform.apply')}- </button>+ </Button></div></div></CollapseCard>diff --git a/ui/src/components/settings/SettingsServicePage.tsx b/ui/src/components/settings/SettingsServicePage.tsxindex f91c946b4..6b4c01c87 100644--- a/ui/src/components/settings/SettingsServicePage.tsx+++ b/ui/src/components/settings/SettingsServicePage.tsx@@ -9,6 +9,7 @@ import { apiFetch } from '@/lib/apiFetch';import { RemoteAccess } from '@/components/RemoteAccess';import { SettingsPageShell } from './SettingsPageShell';import { CompactField, SettingsPanel, SettingsRow } from './SettingsPrimitives';+import { Button } from '@/components/ui/button';// Mirrors design.pen mHUcm (VR/CM/Service): two cards.// svcSec1: header [16, 20] + value rows [12, 20] with bottom borders.@@ -151,15 +152,16 @@ export const SettingsServicePage: React.FC = () => {control={<div className="flex flex-wrap gap-2">{!isRunning && (- <button+ <Buttontype="button"+ variant="brand"+ size="xs"onClick={() => void handleAction('start')}disabled={loading}- className="inline-flex h-8 items-center gap-1.5 rounded-lg bg-mint px-3 text-[12px] font-bold text-[#080812] shadow-[0_0_18px_-4px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50"><Play className="size-3.5" strokeWidth={2.5} />{t('common.start')}- </button>+ </Button>)}{isRunning && (<buttondiff --git a/ui/src/components/shared/WizardStep.tsx b/ui/src/components/shared/WizardStep.tsxindex 47f7ecbb2..f9d91f5cb 100644--- a/ui/src/components/shared/WizardStep.tsx+++ b/ui/src/components/shared/WizardStep.tsx@@ -45,7 +45,7 @@ export const StepHeader: React.FC<StepHeaderProps> = ({<spanclassName={clsx('flex size-7 items-center justify-center rounded-full text-[12px] font-bold transition-colors',- completed ? 'bg-mint text-[#080812]' : 'bg-cyan/15 text-cyan'+ completed ? 'bg-mint text-primary-foreground' : 'bg-cyan/15 text-cyan')}>{completed ? <Check size={14} /> : step}diff --git a/ui/src/components/steps/AgentDetection.tsx b/ui/src/components/steps/AgentDetection.tsxindex 5691b06a3..a30986deb 100644--- a/ui/src/components/steps/AgentDetection.tsx+++ b/ui/src/components/steps/AgentDetection.tsx@@ -17,6 +17,7 @@ import { useApi } from '../../context/ApiContext';import { BackendIcon, EyebrowBadge, WizardCard } from '../visual';import type { BackendId } from '../visual';import { CompactField, CompactSelect, ToggleSwitch } from '../settings/SettingsPrimitives';+import { Button } from '../ui/button';interface AgentDetectionProps {data: any;@@ -264,10 +265,11 @@ export const AgentDetection: React.FC<AgentDetectionProps> = ({ data, onNext, on<div className="space-y-2 rounded-lg border border-cyan/30 bg-cyan/[0.06] px-3 py-2.5"><p className="text-[11px] text-cyan">{t('agentDetection.installHint')}</p><div className="flex flex-wrap items-center gap-3">- <button+ <Button+ variant="brand-cyan"+ size="xs"onClick={() => installAgent(name)}disabled={isAnyInstalling}- className="inline-flex h-8 items-center gap-2 rounded-lg bg-cyan px-3 text-[12px] font-bold text-[#080812] shadow-[0_0_18px_-4px_rgba(63,224,229,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50">{installingAgents[name] ? (<RefreshCw className="size-3.5 animate-spin" />@@ -275,7 +277,7 @@ export const AgentDetection: React.FC<AgentDetectionProps> = ({ data, onNext, on<Download className="size-3.5" />)}{installingAgents[name] ? t('agentDetection.installing') : t('agentDetection.installAgent')}- </button>+ </Button>{installResults[name]?.message && (<spanclassName={clsx(@@ -310,10 +312,11 @@ export const AgentDetection: React.FC<AgentDetectionProps> = ({ data, onNext, on<div className="rounded-lg border border-gold/30 bg-gold/10 px-3 py-2.5"><p className="mb-2 text-[11px] text-gold">{t('agentDetection.permissionHint')}</p><div className="flex flex-wrap items-center gap-3">- <button+ <Button+ variant="brand-gold"+ size="xs"onClick={setupPermission}disabled={permissionState === 'loading'}- className="inline-flex h-8 items-center gap-2 rounded-lg bg-gold px-3 text-[12px] font-bold text-[#080812] shadow-[0_0_18px_-4px_rgba(255,200,87,0.55)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50">{permissionState === 'loading' ? (<RefreshCw className="size-3.5 animate-spin" />@@ -321,7 +324,7 @@ export const AgentDetection: React.FC<AgentDetectionProps> = ({ data, onNext, on<Settings className="size-3.5" />)}{t('agentDetection.setupPermission')}- </button>+ </Button>{permissionState === 'success' && (<span className="text-[11px] text-mint">{permissionMessage}</span>)}@@ -343,13 +346,9 @@ export const AgentDetection: React.FC<AgentDetectionProps> = ({ data, onNext, on<div className="flex flex-col gap-4">{Inner}<div className="flex justify-end">- <button- onClick={() => void handlePrimaryAction()}- disabled={!canContinue}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-5 py-2.5 text-[13px] font-bold text-[#080812] shadow-[0_0_32px_-6px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-40 disabled:shadow-none"- >+ <Button variant="brand" size="default" onClick={() => void handlePrimaryAction()} disabled={!canContinue}>{t('common.save')}- </button>+ </Button></div></div>);@@ -390,15 +389,16 @@ export const AgentDetection: React.FC<AgentDetectionProps> = ({ data, onNext, on) : (<span />)}- <button+ <Buttontype="button"+ variant="brand"+ size="default"onClick={() => void handlePrimaryAction()}disabled={!canContinue}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-5 py-2.5 text-[13px] font-bold text-[#080812] shadow-[0_0_32px_-6px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-40 disabled:shadow-none">{t('common.continue')}<ArrowRight size={14} strokeWidth={2.25} />- </button>+ </Button></div></WizardCard></div>diff --git a/ui/src/components/steps/ChannelList.tsx b/ui/src/components/steps/ChannelList.tsxindex feacfee8f..b62f166b3 100644--- a/ui/src/components/steps/ChannelList.tsx+++ b/ui/src/components/steps/ChannelList.tsx@@ -24,6 +24,7 @@ import { getEnabledPlatforms, platformSupportsChannels } from '../../lib/platforimport { EyebrowBadge, PlatformIcon, WizardCard } from '../visual';import { RoutingConfigPanel } from '../shared/RoutingConfigPanel';import { CompactSelect, SearchField, ToggleSwitch } from '../settings/SettingsPrimitives';+import { Button } from '../ui/button';const PLATFORM_BRAND_COLORS: Record<string, string> = {slack: '#4A154B',@@ -790,14 +791,15 @@ export const ChannelList: React.FC<ChannelListProps> = ({ data = {}, onNext, onB<ArrowLeft size={14} strokeWidth={2.25} />{t('common.back')}</button>- <button+ <Buttontype="button"+ variant="brand"+ size="default"onClick={() => onNext && onNext({})}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-5 py-2.5 text-[13px] font-bold text-[#080812] shadow-[0_0_32px_-6px_rgba(91,255,160,0.6)] transition hover:brightness-105">{t('common.continue')}<ArrowRight size={14} strokeWidth={2.25} />- </button>+ </Button></div></WizardCard></div>@@ -1608,8 +1610,10 @@ export const ChannelList: React.FC<ChannelListProps> = ({ data = {}, onNext, onB<ArrowLeft size={14} strokeWidth={2.25} />{t('common.back')}</button>- <button+ <Buttontype="button"+ variant="brand"+ size="default"onClick={() => {const discordGuildAllowlist = selectedGuildIds;if (isWizardMultiPlatform) {@@ -1633,11 +1637,10 @@ export const ChannelList: React.FC<ChannelListProps> = ({ data = {}, onNext, onB});}}}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-5 py-2.5 text-[13px] font-bold text-[#080812] shadow-[0_0_32px_-6px_rgba(91,255,160,0.6)] transition hover:brightness-105">{t('common.continue')}<ArrowRight size={14} strokeWidth={2.25} />- </button>+ </Button></div>)}</Wrapper>diff --git a/ui/src/components/steps/DiscordConfig.tsx b/ui/src/components/steps/DiscordConfig.tsxindex ca2cc53d4..e9c17d3a1 100644--- a/ui/src/components/steps/DiscordConfig.tsx+++ b/ui/src/components/steps/DiscordConfig.tsx@@ -21,6 +21,7 @@ import { copyTextToClipboard } from '../../lib/utils';import { EmbeddedConfigShell, EyebrowBadge, WizardCard } from '../visual';import { ProxyUrlField } from '../shared/ProxyUrlField';import { StepHeader, StepShell } from '../shared/WizardStep';+import { Button } from '../ui/button';interface DiscordConfigProps {data: any;@@ -187,13 +188,10 @@ export const DiscordConfig: React.FC<DiscordConfigProps> = ({ data, onNext, onBa<li>{t('discordConfig.step1Item2')}</li><li>{t('discordConfig.step1Item3')}</li></ol>- <button- onClick={openDiscordDeveloperPortal}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-4 py-2 text-[13px] font-bold text-[#080812] shadow-[0_0_24px_-4px_rgba(91,255,160,0.6)] transition hover:brightness-105"- >+ <Button variant="brand" size="sm" onClick={openDiscordDeveloperPortal}><ExternalLink size={14} strokeWidth={2.25} />{t('discordConfig.openDeveloperPortal')}- </button>+ </Button></div>)}</StepShell>@@ -274,14 +272,15 @@ export const DiscordConfig: React.FC<DiscordConfigProps> = ({ data, onNext, onBaclassName="w-full rounded-lg border border-border bg-background px-3 py-2 font-mono text-[11px] text-foreground"/></div>- <button+ <Button+ variant="brand"+ size="sm"onClick={() => inviteUrl && window.open(inviteUrl, '_blank')}disabled={!inviteUrl}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-4 py-2 text-[13px] font-bold text-[#080812] shadow-[0_0_24px_-4px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50"><ExternalLink size={14} strokeWidth={2.25} />{t('discordConfig.openInviteUrl')}- </button>+ </Button><div className="space-y-2 rounded-lg border border-gold/30 bg-gold/10 px-3 py-2.5"><div className="flex items-center gap-2 text-[12px] font-semibold text-gold">@@ -334,14 +333,15 @@ export const DiscordConfig: React.FC<DiscordConfigProps> = ({ data, onNext, onBa<ProxyUrlField value={proxyUrl} onChange={setProxyUrl} /><div className="flex flex-wrap items-center gap-3">- <button+ <Button+ variant="brand"+ size="sm"onClick={runAuthTest}disabled={!botToken || checking}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-4 py-2 text-[13px] font-bold text-[#080812] shadow-[0_0_24px_-4px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50">{checking ? <RefreshCw size={14} className="animate-spin" /> : <Shield size={14} strokeWidth={2.25} />}{t('discordConfig.validateToken')}- </button>+ </Button>{authResult && (<spanclassName={clsx(@@ -476,15 +476,16 @@ export const DiscordConfig: React.FC<DiscordConfigProps> = ({ data, onNext, onBa<ArrowLeft size={14} strokeWidth={2.25} />{t('common.back')}</button>- <button+ <Buttontype="button"+ variant="brand"+ size="default"onClick={() => onNext(buildSubmitData())}disabled={!isValid}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-5 py-2.5 text-[13px] font-bold text-[#080812] shadow-[0_0_32px_-6px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-40 disabled:shadow-none">{t('common.continue')}<ArrowRight size={14} strokeWidth={2.25} />- </button>+ </Button></div></WizardCard></div>diff --git a/ui/src/components/steps/DoctorPanel.tsx b/ui/src/components/steps/DoctorPanel.tsxindex c957e6964..3f3798c7a 100644--- a/ui/src/components/steps/DoctorPanel.tsx+++ b/ui/src/components/steps/DoctorPanel.tsx@@ -15,6 +15,7 @@ import clsx from 'clsx';import { useApi } from '../../context/ApiContext';import { useToast } from '../../context/ToastContext';import { copyTextToClipboard } from '../../lib/utils';+import { Button } from '../ui/button';interface DoctorPanelProps {isPage?: boolean;@@ -128,15 +129,10 @@ export const DoctorPanel: React.FC<DoctorPanelProps> = ({{t('doctor.copyReport')}</button>)}- <button- type="button"- onClick={runDoctor}- disabled={loading}- className="inline-flex h-8 items-center gap-1.5 rounded-lg bg-mint px-3 text-[12px] font-bold text-[#080812] shadow-[0_0_18px_-4px_rgba(91,255,160,0.55)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50"- >+ <Button type="button" variant="brand" size="xs" onClick={runDoctor} disabled={loading}><RefreshCw className={clsx('size-3.5', loading && 'animate-spin')} strokeWidth={2.5} />{t('doctor.runChecks')}- </button>+ </Button></div></div>diff --git a/ui/src/components/steps/LarkConfig.tsx b/ui/src/components/steps/LarkConfig.tsxindex 200aba36c..05d1ee300 100644--- a/ui/src/components/steps/LarkConfig.tsx+++ b/ui/src/components/steps/LarkConfig.tsx@@ -24,16 +24,13 @@ import { copyTextToClipboard } from '../../lib/utils';import { EmbeddedConfigShell, EyebrowBadge, WizardCard } from '../visual';import { ProxyUrlField } from '../shared/ProxyUrlField';import { StepHeader, StepShell } from '../shared/WizardStep';+import { Button } from '../ui/button';const LinkButton: React.FC<{ url: string; label: string }> = ({ url, label }) => (- <button- onClick={() => window.open(url, '_blank')}- disabled={!url}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-4 py-2 text-[13px] font-bold text-[#080812] shadow-[0_0_24px_-4px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50"- >+ <Button variant="brand" size="sm" onClick={() => window.open(url, '_blank')} disabled={!url}><ExternalLink size={14} strokeWidth={2.25} />{label}- </button>+ </Button>);const LARK_PERMISSIONS_JSON = `{@@ -317,14 +314,15 @@ export const LarkConfig: React.FC<LarkConfigProps> = ({ data, onNext, onBack, em/><div className="flex flex-wrap items-center gap-3">- <button+ <Button+ variant="brand"+ size="sm"onClick={runAuthTest}disabled={!appId || !appSecret || checking}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-4 py-2 text-[13px] font-bold text-[#080812] shadow-[0_0_24px_-4px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50">{checking ? <RefreshCw size={14} className="animate-spin" /> : <Shield size={14} strokeWidth={2.25} />}{t('larkConfig.validateCredentials')}- </button>+ </Button>{authResult && (<spanclassName={clsx(@@ -567,18 +565,19 @@ export const LarkConfig: React.FC<LarkConfigProps> = ({ data, onNext, onBack, em<ArrowLeft size={14} strokeWidth={2.25} />{t('common.back')}</button>- <button+ <Buttontype="button"+ variant="brand"+ size="default"onClick={() => {api.larkTempWsStop().catch(() => {});onNext(buildSubmitData());}}disabled={!isValid}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-5 py-2.5 text-[13px] font-bold text-[#080812] shadow-[0_0_32px_-6px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-40 disabled:shadow-none">{t('common.continue')}<ArrowRight size={14} strokeWidth={2.25} />- </button>+ </Button></div></WizardCard></div>diff --git a/ui/src/components/steps/LogsPanel.tsx b/ui/src/components/steps/LogsPanel.tsxindex af08857a6..cbcc4d64e 100644--- a/ui/src/components/steps/LogsPanel.tsx+++ b/ui/src/components/steps/LogsPanel.tsx@@ -12,6 +12,7 @@ import { useTranslation } from 'react-i18next';import clsx from 'clsx';import { useApi, type LogEntry, type LogSource } from '../../context/ApiContext';+import { Button } from '../ui/button';type LogLevel = 'DEBUG' | 'INFO' | 'WARNING' | 'ERROR' | 'ALL';@@ -164,15 +165,17 @@ export const LogsPanel: React.FC<LogsPanelProps> = ({{autoRefresh ? <Pause className="size-3.5" /> : <Play className="size-3.5" />}{autoRefresh ? t('logs.autoRefreshOn') : t('logs.autoRefresh')}</button>- <button+ <Buttontype="button"+ variant="brand"+ size="xs"+ className="h-9"onClick={() => void loadLogs(selectedSource)}disabled={loading}- className="inline-flex h-9 items-center gap-1.5 rounded-lg bg-mint px-3 text-[12px] font-bold text-[#080812] shadow-[0_0_18px_-4px_rgba(91,255,160,0.55)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50"><RefreshCw className={clsx('size-3.5', loading && 'animate-spin')} strokeWidth={2.5} />{t('common.refresh')}- </button>+ </Button></div></div>diff --git a/ui/src/components/steps/PlatformSelection.tsx b/ui/src/components/steps/PlatformSelection.tsxindex 611b21712..d1a9d120a 100644--- a/ui/src/components/steps/PlatformSelection.tsx+++ b/ui/src/components/steps/PlatformSelection.tsx@@ -6,6 +6,7 @@ import { useApi } from '../../context/ApiContext';import { useToast } from '../../context/ToastContext';import { getEnabledPlatforms, getPlatformCatalog, getPrimaryPlatform } from '../../lib/platforms';import { EyebrowBadge, PlatformIcon, WizardCard } from '../visual';+import { Button } from '../ui/button';// Per-platform brand-tinted tile container colors (matches design.pen wT*L// frames: Slack purple-soft, Discord indigo-soft, etc.).@@ -548,15 +549,16 @@ export const PlatformSelection: React.FC<PlatformSelectionProps> = ({ data, onNe<ArrowLeft size={14} strokeWidth={2.25} />{t('common.back')}</button>- <button+ <Buttontype="button"+ variant="brand"+ size="default"onClick={() => void handleContinue()}disabled={!selected.length}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-5 py-2.5 text-[13px] font-bold text-[#080812] shadow-[0_0_32px_-6px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-40 disabled:shadow-none">{t('common.continue')}<ArrowRight size={14} strokeWidth={2.25} />- </button>+ </Button></div></WizardCard></div>diff --git a/ui/src/components/steps/SlackConfig.tsx b/ui/src/components/steps/SlackConfig.tsxindex 2b230a95e..a3a0e35af 100644--- a/ui/src/components/steps/SlackConfig.tsx+++ b/ui/src/components/steps/SlackConfig.tsx@@ -8,6 +8,7 @@ import { copyTextToClipboard } from '../../lib/utils';import { EmbeddedConfigShell, EyebrowBadge, WizardCard } from '../visual';import { ProxyUrlField } from '../shared/ProxyUrlField';import { StepHeader, StepShell } from '../shared/WizardStep';+import { Button } from '../ui/button';interface SlackConfigProps {data: any;@@ -150,14 +151,15 @@ export const SlackConfig: React.FC<SlackConfigProps> = ({ data, onNext, onBack,<div className="space-y-4 border-t border-border px-5 py-4"><p className="text-[13px] leading-[1.55] text-muted">{t('slackConfig.step1Description')}</p><div className="flex flex-wrap items-center gap-3">- <button+ <Button+ variant="brand"+ size="sm"onClick={openSlackCreateApp}disabled={!manifestCompact || manifestLoading}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-4 py-2 text-[13px] font-bold text-[#080812] shadow-[0_0_24px_-4px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50"><ExternalLink size={14} strokeWidth={2.25} />{t('slackConfig.createSlackApp')}- </button>+ </Button>{manifest && (<buttononClick={copyManifest}@@ -290,14 +292,15 @@ export const SlackConfig: React.FC<SlackConfigProps> = ({ data, onNext, onBack,<p className="text-[13px] leading-[1.55] text-muted">{t('slackConfig.step4Description')}</p><ProxyUrlField value={proxyUrl} onChange={setProxyUrl} /><div className="flex flex-wrap items-center gap-3">- <button+ <Button+ variant="brand"+ size="sm"onClick={runAuthTest}disabled={!botToken || !appToken || checking}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-4 py-2 text-[13px] font-bold text-[#080812] shadow-[0_0_24px_-4px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50">{checking ? <RefreshCw size={14} className="animate-spin" /> : <Shield size={14} strokeWidth={2.25} />}{t('slackConfig.validateTokens')}- </button>+ </Button>{authResult && (<spanclassName={clsx(@@ -388,17 +391,18 @@ export const SlackConfig: React.FC<SlackConfigProps> = ({ data, onNext, onBack,<ArrowLeft size={14} strokeWidth={2.25} />{t('common.back')}</button>- <button+ <Buttontype="button"+ variant="brand"+ size="default"onClick={() =>onNext({ slack: { ...data.slack, bot_token: botToken, app_token: appToken, proxy_url: proxyUrl || undefined }, mode: 'self_host' })}disabled={!isValid}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-5 py-2.5 text-[13px] font-bold text-[#080812] shadow-[0_0_32px_-6px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-40 disabled:shadow-none">{t('common.continue')}<ArrowRight size={14} strokeWidth={2.25} />- </button>+ </Button></div></WizardCard></div>diff --git a/ui/src/components/steps/Summary.tsx b/ui/src/components/steps/Summary.tsxindex 2a0ef6522..092a9137f 100644--- a/ui/src/components/steps/Summary.tsx+++ b/ui/src/components/steps/Summary.tsx@@ -20,6 +20,7 @@ import { copyTextToClipboard } from '../../lib/utils';import { getEnabledPlatforms, getPrimaryPlatform } from '../../lib/platforms';import { EyebrowBadge, WizardCard } from '../visual';import { ToggleSwitch } from '../settings/SettingsPrimitives';+import { Button } from '../ui/button';interface SummaryProps {data: any;@@ -225,13 +226,10 @@ export const Summary: React.FC<SummaryProps> = ({ data, onBack }) => {<p className="mt-2 text-[11px] text-mint">{t('summary.bindCodeCopied')}</p>)}</div>- <button- onClick={() => navigate('/dashboard')}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-7 py-3 text-[14px] font-bold text-[#080812] shadow-[0_0_48px_-8px_rgba(91,255,160,0.7)] transition hover:brightness-105"- >+ <Button variant="brand" size="lg" onClick={() => navigate('/dashboard')}>{t('summary.goToDashboard')}<ArrowRight size={16} strokeWidth={2.25} />- </button>+ </Button></WizardCard></div>);@@ -355,15 +353,10 @@ export const Summary: React.FC<SummaryProps> = ({ data, onBack }) => {<ArrowLeft size={14} strokeWidth={2.25} />{t('common.back')}</button>- <button- type="button"- onClick={saveAll}- disabled={saving}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-7 py-3 text-[14px] font-bold text-[#080812] shadow-[0_0_48px_-8px_rgba(91,255,160,0.7)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-none"- >+ <Button type="button" variant="brand" size="lg" onClick={saveAll} disabled={saving}>{saving ? t('common.saving') : t('summary.finishAndStart')}{!saving && <ArrowRight size={16} strokeWidth={2.25} />}- </button>+ </Button></div></WizardCard></div>diff --git a/ui/src/components/steps/TelegramConfig.tsx b/ui/src/components/steps/TelegramConfig.tsxindex 3db867d0d..53a4d9d0c 100644--- a/ui/src/components/steps/TelegramConfig.tsx+++ b/ui/src/components/steps/TelegramConfig.tsx@@ -21,6 +21,7 @@ import { EmbeddedConfigShell, EyebrowBadge, WizardCard } from '../visual';import { ProxyUrlField } from '../shared/ProxyUrlField';import { StepHeader, StepShell } from '../shared/WizardStep';import { ToggleSwitch } from '../settings/SettingsPrimitives';+import { Button } from '../ui/button';interface TelegramConfigProps {data: any;@@ -169,13 +170,10 @@ export const TelegramConfig: React.FC<TelegramConfigProps> = ({ data, onNext, on<li>{t('telegramConfig.step1Item4')}</li></ol><div className="flex flex-wrap gap-2">- <button- onClick={openBotFather}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-4 py-2 text-[13px] font-bold text-[#080812] shadow-[0_0_24px_-4px_rgba(91,255,160,0.6)] transition hover:brightness-105"- >+ <Button variant="brand" size="sm" onClick={openBotFather}><ExternalLink size={14} strokeWidth={2.25} />{t('telegramConfig.openBotFather')}- </button>+ </Button><buttononClick={() => copyCommand('/newbot')}className="inline-flex items-center gap-2 rounded-lg border border-border bg-foreground/[0.04] px-3 py-2 text-[12px] font-medium text-foreground transition hover:border-border-strong"@@ -233,14 +231,15 @@ export const TelegramConfig: React.FC<TelegramConfigProps> = ({ data, onNext, on/><div className="flex flex-wrap items-center gap-3">- <button+ <Button+ variant="brand"+ size="sm"onClick={runAuthTest}disabled={!botToken || checking}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-4 py-2 text-[13px] font-bold text-[#080812] shadow-[0_0_24px_-4px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50">{checking ? <RefreshCw size={14} className="animate-spin" /> : <Shield size={14} strokeWidth={2.25} />}{t('telegramConfig.validateToken')}- </button>+ </Button>{authResult && (<spanclassName={clsx(@@ -440,15 +439,16 @@ export const TelegramConfig: React.FC<TelegramConfigProps> = ({ data, onNext, on<ArrowLeft size={14} strokeWidth={2.25} />{t('common.back')}</button>- <button+ <Buttontype="button"+ variant="brand"+ size="default"onClick={() => onNext(buildSubmitData())}disabled={!isValid}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-5 py-2.5 text-[13px] font-bold text-[#080812] shadow-[0_0_32px_-6px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-40 disabled:shadow-none">{t('common.continue')}<ArrowRight size={14} strokeWidth={2.25} />- </button>+ </Button></div></WizardCard></div>diff --git a/ui/src/components/steps/UserList.tsx b/ui/src/components/steps/UserList.tsxindex aa70281ac..0091f39a0 100644--- a/ui/src/components/steps/UserList.tsx+++ b/ui/src/components/steps/UserList.tsx@@ -22,6 +22,7 @@ import { copyTextToClipboard } from '../../lib/utils';import { PlatformIcon } from '../visual';import { RoutingConfigPanel } from '../shared/RoutingConfigPanel';import { SearchField, ToggleSwitch } from '../settings/SettingsPrimitives';+import { Button } from '../ui/button';interface UserConfig {display_name: string;@@ -228,14 +229,10 @@ const BindCodeCard: React.FC<BindCodeCardProps> = ({ refreshTrigger, onCodesChan{t('bindCode.revoke')}</button>)}- <button- type="button"- onClick={() => setShowFormModal(true)}- className="inline-flex items-center gap-1.5 rounded-md bg-mint px-3.5 py-2 text-[12px] font-bold text-background shadow-[0_0_16px_rgba(91,255,160,0.35)] transition hover:brightness-110"- >+ <Button type="button" variant="brand" size="xs" onClick={() => setShowFormModal(true)}><Plus size={14} strokeWidth={2.4} />{primary ? t('bindCode.newCode') : t('bindCode.createCode')}- </button>+ </Button></div></div>@@ -290,14 +287,15 @@ const BindCodeCard: React.FC<BindCodeCardProps> = ({ refreshTrigger, onCodesChan/></div>)}- <button+ <Buttontype="button"+ variant="brand"+ size="xs"onClick={handleCreate}disabled={loading || (newType === 'expiring' && !newExpiry)}- className="rounded-md bg-mint px-4 py-1.5 text-[12px] font-bold text-background shadow-[0_0_16px_rgba(91,255,160,0.35)] transition hover:brightness-110 disabled:opacity-50">{t('bindCode.generate')}- </button>+ </Button></div></Modal>)}diff --git a/ui/src/components/steps/WeChatConfig.tsx b/ui/src/components/steps/WeChatConfig.tsxindex 46b0010bd..6f2bacd15 100644--- a/ui/src/components/steps/WeChatConfig.tsx+++ b/ui/src/components/steps/WeChatConfig.tsx@@ -16,6 +16,7 @@ import clsx from 'clsx';import { useApi } from '../../context/ApiContext';import { EmbeddedConfigShell, EyebrowBadge, WizardCard } from '../visual';import { ProxyUrlField } from '../shared/ProxyUrlField';+import { Button } from '../ui/button';interface WeChatConfigProps {data: Record<string, any>;@@ -230,7 +231,7 @@ export const WeChatConfig: React.FC<WeChatConfigProps> = ({ data, onNext, onBackclassName={clsx('flex size-7 items-center justify-center rounded-full text-[12px] font-bold transition-colors',isCompleted- ? 'bg-mint text-[#080812]'+ ? 'bg-mint text-primary-foreground': isActive? 'bg-cyan/15 text-cyan': 'bg-foreground/[0.06] text-muted'@@ -369,14 +370,10 @@ export const WeChatConfig: React.FC<WeChatConfigProps> = ({ data, onNext, onBack<h3 className="text-[14px] font-semibold text-foreground">{t('wechatConfig.errorTitle')}</h3><p className="mt-1 text-[12px] text-danger">{message}</p></div>- <button- onClick={startLogin}- disabled={starting}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-4 py-2 text-[13px] font-bold text-[#080812] shadow-[0_0_24px_-4px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50"- >+ <Button variant="brand" size="sm" onClick={startLogin} disabled={starting}><RefreshCw size={14} strokeWidth={2.25} />{t('wechatConfig.retry')}- </button>+ </Button></div></div>)}@@ -446,15 +443,16 @@ export const WeChatConfig: React.FC<WeChatConfigProps> = ({ data, onNext, onBack<ArrowLeft size={14} strokeWidth={2.25} />{t('common.back')}</button>- <button+ <Buttontype="button"+ variant="brand"+ size="default"onClick={() => onNext(buildSubmitData())}disabled={!canProceed}- className="inline-flex items-center gap-2 rounded-lg bg-mint px-5 py-2.5 text-[13px] font-bold text-[#080812] shadow-[0_0_32px_-6px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-40 disabled:shadow-none">{t('common.continue')}<ArrowRight size={14} strokeWidth={2.25} />- </button>+ </Button></div></WizardCard></div>diff --git a/ui/src/components/steps/Welcome.tsx b/ui/src/components/steps/Welcome.tsxindex a967d9ec4..3120bc3f9 100644--- a/ui/src/components/steps/Welcome.tsx+++ b/ui/src/components/steps/Welcome.tsx@@ -2,6 +2,7 @@ import React from 'react';import { ArrowRight, HardDrive, PlugZap, Radio, Sparkles } from 'lucide-react';import { useTranslation } from 'react-i18next';import { WizardCard } from '../visual';+import { Button } from '../ui/button';interface WelcomeProps {onNext: (data: any) => void;@@ -74,14 +75,10 @@ export const Welcome: React.FC<WelcomeProps> = ({ onNext }) => {</div>{/* welStart (a95QY) — large mint pill */}- <button- type="button"- onClick={() => onNext({})}- className="group inline-flex items-center gap-2 rounded-xl bg-mint px-8 py-[14px] text-[15px] font-bold leading-tight text-[#080812] shadow-[0_0_48px_-8px_rgba(91,255,160,0.44)] transition hover:brightness-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mint/60"- >+ <Button type="button" variant="brand" size="hero" onClick={() => onNext({})} className="group">{t('welcome.getStarted')}<ArrowRight className="size-4 transition-transform group-hover:translate-x-0.5" strokeWidth={2.25} />- </button>+ </Button></WizardCard></div>);diff --git a/ui/src/components/ui/button.tsx b/ui/src/components/ui/button.tsxindex 3f4ec41dc..e6c161cdc 100644--- a/ui/src/components/ui/button.tsx+++ b/ui/src/components/ui/button.tsx@@ -5,29 +5,43 @@ import { cva, type VariantProps } from 'class-variance-authority';import { cn } from '@/lib/utils';const buttonVariants = cva(- 'inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md text-sm font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background [&_svg]:size-4 [&_svg]:shrink-0',+ 'inline-flex items-center justify-center whitespace-nowrap rounded-lg font-medium transition disabled:cursor-not-allowed disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background [&_svg]:shrink-0',{variants: {variant: {// Mint primary — flat, no glow shadow (design.pen Button/Default).- default: 'bg-primary text-primary-foreground hover:brightness-110',- secondary: 'border border-border bg-secondary text-secondary-foreground hover:border-border-strong',+ default: 'gap-1.5 bg-primary text-primary-foreground hover:brightness-110',+ // Brand CTA — bright bg + brand-color glow shadow + bold text + brighten on hover.+ // Foreground tokens flip in light mode (--primary/--accent/--gold-foreground).+ brand:+ 'gap-2 bg-mint font-bold text-primary-foreground shadow-[0_0_24px_-4px_rgba(91,255,160,0.6)] hover:brightness-105 disabled:shadow-none',+ 'brand-cyan':+ 'gap-2 bg-cyan font-bold text-accent-foreground shadow-[0_0_24px_-4px_rgba(63,224,229,0.6)] hover:brightness-105 disabled:shadow-none',+ 'brand-gold':+ 'gap-2 bg-gold font-bold text-gold-foreground shadow-[0_0_24px_-4px_rgba(255,200,87,0.55)] hover:brightness-105 disabled:shadow-none',+ secondary: 'gap-1.5 border border-border bg-secondary text-secondary-foreground hover:border-border-strong',// Outline — bg matches page surface so it sits cleanly on glow gradients.outline:- 'border border-border bg-background text-foreground shadow-[0_1px_2px_rgba(0,0,0,0.05)] hover:bg-surface-2',+ 'gap-1.5 border border-border bg-background text-foreground shadow-[0_1px_2px_rgba(0,0,0,0.05)] hover:bg-surface-2',// Cyan outline — for "Read Vibe Remote" / docs style CTAs.'outline-cyan':- 'border border-cyan/40 bg-cyan/[0.06] text-cyan hover:bg-cyan/[0.10]',- ghost: 'text-foreground hover:bg-surface-2',- destructive: 'bg-destructive text-destructive-foreground hover:opacity-90',+ 'gap-1.5 border border-cyan/40 bg-cyan/[0.06] text-cyan hover:bg-cyan/[0.10]',+ ghost: 'gap-1.5 text-foreground hover:bg-surface-2',+ destructive: 'gap-1.5 bg-destructive text-destructive-foreground hover:opacity-90',link: 'text-primary underline-offset-4 hover:underline',- accent: 'border border-cyan/40 bg-cyan-soft text-cyan hover:bg-cyan/15',+ accent: 'gap-1.5 border border-cyan/40 bg-cyan-soft text-cyan hover:bg-cyan/15',},size: {- // Default = design's Large/Default: padding [8, 24].- default: 'h-10 px-6 py-2',- sm: 'h-8 rounded-md px-4 text-xs',- lg: 'h-11 rounded-md px-6 text-sm',+ // h-8 toolbar buttons (LogsPanel/DoctorPanel/SettingsServicePage/AgentDetection toolbar).+ xs: 'h-8 px-3 text-[12px] [&_svg]:size-3.5',+ // h-9 config-inline CTAs (Slack/Discord/Telegram/...).+ sm: 'h-9 px-4 text-[13px] [&_svg]:size-3.5',+ // h-10 wizard "下一步" — most common.+ default: 'h-10 px-5 text-[13px] [&_svg]:size-3.5',+ // h-12 prominent CTAs (Summary main step CTA).+ lg: 'h-12 px-7 text-[14px] [&_svg]:size-4',+ // Welcome-only hero CTA.+ hero: 'h-[52px] rounded-xl px-8 text-[15px] [&_svg]:size-4',icon: 'h-9 w-9',},},diff --git a/ui/src/components/visual/EmbeddedConfigShell.tsx b/ui/src/components/visual/EmbeddedConfigShell.tsxindex 1bfa1ec1b..f8df26baf 100644--- a/ui/src/components/visual/EmbeddedConfigShell.tsx+++ b/ui/src/components/visual/EmbeddedConfigShell.tsx@@ -2,6 +2,7 @@ import React from 'react';import clsx from 'clsx';import { Check, RefreshCw } from 'lucide-react';import { useTranslation } from 'react-i18next';+import { Button } from '../ui/button';interface EmbeddedConfigShellProps {total: number;@@ -45,23 +46,19 @@ export const EmbeddedConfigShell: React.FC<EmbeddedConfigShellProps> = ({</div><div className="flex flex-col gap-3">{children}</div><div className="flex items-center justify-end gap-2 border-t border-border pt-3">- <button- type="button"- onClick={onCancel}- disabled={applying}- className="inline-flex items-center gap-1.5 rounded-lg border border-border bg-foreground/[0.04] px-3 py-1.5 text-[12px] font-medium text-foreground transition hover:border-border-strong disabled:opacity-50"- >+ <Button type="button" variant="secondary" size="xs" onClick={onCancel} disabled={applying}>{t('common.cancel')}- </button>- <button+ </Button>+ <Buttontype="button"+ variant="brand"+ size="xs"onClick={onApply}disabled={!canApply || applying}- className="inline-flex items-center gap-1.5 rounded-lg bg-mint px-3.5 py-1.5 text-[12px] font-bold text-[#080812] shadow-[0_0_24px_-6px_rgba(91,255,160,0.6)] transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50 disabled:shadow-none">{applying ? <RefreshCw size={12} className="animate-spin" /> : <Check size={12} />}{t('platform.apply')}- </button>+ </Button></div></div>);diff --git a/ui/src/index.css b/ui/src/index.cssindex 8f1e28188..798611664 100644--- a/ui/src/index.css+++ b/ui/src/index.css@@ -32,6 +32,7 @@--color-violet: var(--violet);--color-violet-soft: var(--violet-soft);--color-gold: var(--gold);+ --color-gold-foreground: var(--gold-foreground);/* Compatibility aliases for current UI during migration. */--color-bg: var(--background);@@ -96,6 +97,7 @@--violet: #7c5bff;--violet-soft: rgba(124, 91, 255, 0.16);--gold: #ffc857;+ --gold-foreground: #080812;/* Page-family gradients (mirror design.pen 1:1). Layers ordered top-most first. */--gradient-console:@@ -164,6 +166,7 @@--violet: #7c3aed;--violet-soft: rgba(124, 58, 237, 0.14);--gold: #d97706;+ --gold-foreground: #ffffff;/* Light-theme page gradients (softer alphas over light base). */--gradient-console: