diff --git a/client/src/components/Admin/AddonSetupDialog.tsx b/client/src/components/Admin/AddonSetupDialog.tsx index 133ed1cfb..1870e5c9a 100644 --- a/client/src/components/Admin/AddonSetupDialog.tsx +++ b/client/src/components/Admin/AddonSetupDialog.tsx @@ -28,7 +28,7 @@ export default function AddonSetupDialog({ icon: ReactNode; eyebrow: string; title: string; - sub: string; + sub?: string; onClose: () => void; /** A confirmation stacked on top holds the dialog while it is open. */ blocked?: boolean; diff --git a/client/src/components/Admin/AdminPluginsPanel.tsx b/client/src/components/Admin/AdminPluginsPanel.tsx index 2ad00c294..6751a7d9a 100644 --- a/client/src/components/Admin/AdminPluginsPanel.tsx +++ b/client/src/components/Admin/AdminPluginsPanel.tsx @@ -1,5 +1,5 @@ import { useState, type ReactNode } from 'react' -import { +import { Wrench, Link, Info, Blocks, AlertTriangle, RefreshCw, Trash2, Download, Bug, ShieldCheck, UploadCloud, ArrowUpCircle, ExternalLink, Check, Search, Link2, KeyRound, ShieldAlert, SlidersHorizontal, CircleDot, Database, @@ -711,7 +711,7 @@ function InstanceSettingsDialog({ settings, t }: { settings: ReturnType 0 && ( - + {!form.active && {t('admin.plugins.actions.inactive')}} {form.actions.map(a => { @@ -826,7 +826,7 @@ function PluginDetailModal({ item, installed, busy, onInstall, onClose, t, local )} {manifest && ( - + {access.length === 0 && !permissions.includes('db:own') ? ( {t('admin.plugins.noAccess')} ) : ( @@ -847,7 +847,7 @@ function PluginDetailModal({ item, installed, busy, onInstall, onClose, t, local this dialog shows it. An admin approving the grant should read the names and descriptions first, not discover them in a chat. */} {manifest && (manifest.capabilities?.mcpTools?.length ?? 0) > 0 && ( - + {(manifest.capabilities?.mcpTools ?? []).map(tool => ( }> @@ -869,7 +869,7 @@ function PluginDetailModal({ item, installed, busy, onInstall, onClose, t, local itemClassName="text-content-secondary text-[length:calc(13px*var(--fs-scale-body,1))]" /> {manifest && (egress.length > 0 || manifest.operatorEgress) && ( - +
{egress.map(h => ( {h} @@ -887,7 +887,7 @@ function PluginDetailModal({ item, installed, busy, onInstall, onClose, t, local )} {manifest && settings.length > 0 && ( - + {settings.map(s => ( )} - +
{item.latest && } {sizeKb !== null && } @@ -923,7 +923,7 @@ function PluginDetailModal({ item, installed, busy, onInstall, onClose, t, local {/* Every published version, installable individually. The compat verdict per version is SERVER-computed — an incompatible one is explained, never offered. */} {(detail?.versions?.length ?? 0) > 1 && ( - + {detail!.versions!.map(v => ( }>{t('admin.plugins.sig.consentUnsigned')}} {data.newPermissions.length > 0 && ( - + {data.newPermissions.map(perm => ( }> @@ -1114,7 +1114,7 @@ function UpdateConsentDialog({ data, unsigned, t, onApprove, onLater }: { )} {data.newEgress.length > 0 && ( - +
{data.newEgress.map(host => ( {host} diff --git a/client/src/components/Admin/CategoryManager.tsx b/client/src/components/Admin/CategoryManager.tsx index 2913785f3..127fcdf31 100644 --- a/client/src/components/Admin/CategoryManager.tsx +++ b/client/src/components/Admin/CategoryManager.tsx @@ -1,5 +1,5 @@ import { useId } from 'react' -import { Plus, Pencil, Trash2, Pipette, Tags, Loader2 } from 'lucide-react' +import { Shapes, Palette, Eye, Plus, Pencil, Trash2, Pipette, Tags, Loader2 } from 'lucide-react' import { DialogButton, DialogFooter, DialogHeader, DialogSection, DialogShell, DialogTile, FooterSpacer, NEUTRAL_TINT, fs } from '../shared/DialogShell' import { Tooltip } from '../shared/Tooltip' import ConfirmDialog from '../shared/ConfirmDialog' @@ -52,7 +52,7 @@ export default function CategoryManager() { } > - +
{ICON_NAMES.map(name => { @@ -79,7 +79,7 @@ export default function CategoryManager() {
- +
{PRESET_COLORS.map(color => (
- +
diff --git a/client/src/components/Admin/PermissionsPanel.tsx b/client/src/components/Admin/PermissionsPanel.tsx index 105bf5873..1099d2a75 100644 --- a/client/src/components/Admin/PermissionsPanel.tsx +++ b/client/src/components/Admin/PermissionsPanel.tsx @@ -50,7 +50,7 @@ export default function PermissionsPanel(): React.ReactElement { >
{CATEGORIES.map(cat => ( - + {cat.keys.map(key => { const entry = entryMap.get(key) diff --git a/client/src/components/Admin/addons/AiAdminConfig.tsx b/client/src/components/Admin/addons/AiAdminConfig.tsx index e648c93be..62ce59202 100644 --- a/client/src/components/Admin/addons/AiAdminConfig.tsx +++ b/client/src/components/Admin/addons/AiAdminConfig.tsx @@ -1,4 +1,4 @@ -import { Check, Loader2, Sparkles } from 'lucide-react'; +import { Check, CreditCard, Loader2, Settings2, Sparkles, Unplug } from 'lucide-react'; import React, { useId, useState } from 'react'; import { useTranslation } from '../../../i18n'; import ToggleSwitch from '../../Settings/ToggleSwitch'; @@ -11,6 +11,7 @@ import { DialogButton, DialogFooter, DialogHeader, + DialogSection, DialogShell, DialogTile, FooterSpacer, @@ -25,17 +26,12 @@ import { POLICY_CHOICES, useAiAdminConfig } from './useAiAdminConfig'; type AiAdmin = ReturnType; -const EYEBROW = 'font-geist font-bold uppercase tracking-[.08em] text-content-faint'; - -/** Who pays, as three rows to pick one from: the labels are too long for a segmented track in a shelf. */ +/** The instance's payment policy, with room for each translated option. */ function PolicyChoice({ A }: { A: AiAdmin }) { const { t } = useTranslation(); return ( -
- - {t('assistant.admin.policy')} - -
+ +
{POLICY_CHOICES.map((choice) => { const on = A.policy === choice.value; return ( @@ -45,7 +41,7 @@ function PolicyChoice({ A }: { A: AiAdmin }) { role="radio" aria-checked={on} onClick={() => A.setPolicy(choice.value)} - className={`flex items-center gap-2 rounded-[10px] border px-3 py-2 text-start transition-colors ${on ? 'border-[color:var(--text-primary)] bg-surface-card shadow-sm' : 'border-edge bg-surface-card hover:border-edge-secondary'}`} + className={`flex min-h-11 items-center gap-2 rounded-xl border bg-surface-input px-3 py-2 text-start transition-colors ${on ? 'border-[color:var(--text-primary)]' : 'border-edge-faint hover:bg-surface-hover'}`} > - {A.policyHintKey && {t(A.policyHintKey)}} -
+ {A.policyHintKey && {t(A.policyHintKey)}} +
); } @@ -71,7 +67,7 @@ function LiveConnection({ A }: { A: AiAdmin }) { const status = CONNECTION_STATUS[live.status]; return (
@@ -114,21 +110,20 @@ function InstanceConnection({ A }: { A: AiAdmin }) { const { t } = useTranslation(); const { live, connection, replacing, cancelReplace, onConnected } = A.instance; return ( -
- - {t('assistant.admin.connection')} - - {!replacing && } - {!live && {t('assistant.admin.connectionNone')}} - {A.showPanel && ( - - )} - {replacing && ( - - )} -
+ {t('assistant.admin.connectionNone')}}> +
+ {!replacing && } + {A.showPanel && ( + + )} + {replacing && ( + + )} +
+
); } @@ -229,8 +224,6 @@ export default function AiSettingsDialog({ labelId={labelId} eyebrow={t('admin.addons.ai.name')} title={t('admin.addons.ai.setup')} - sub={t('admin.addons.ai.dialogSub')} - subWraps onClose={onClose} /> } @@ -258,7 +251,11 @@ export default function AiSettingsDialog({ {A.instancePays && }
)} - {shown === 'assistant' && } + {shown === 'assistant' && ( + + + + )} {shown === 'parsing' && parsing && ( setTab('connection')} /> )} diff --git a/client/src/components/Admin/addons/ParsingSettings.tsx b/client/src/components/Admin/addons/ParsingSettings.tsx index 871140362..556fce98f 100644 --- a/client/src/components/Admin/addons/ParsingSettings.tsx +++ b/client/src/components/Admin/addons/ParsingSettings.tsx @@ -1,5 +1,5 @@ import { asLlmVision, LLM_VISION_MODES, type LlmVision } from '@trek/shared'; -import { Check, RefreshCw } from 'lucide-react'; +import { Bot, Image, Check, RefreshCw } from 'lucide-react'; import React, { useId } from 'react'; import { useTranslation } from '../../../i18n'; import { ProviderMark } from '../../Settings/ai/AiConnectPanel'; @@ -313,15 +313,15 @@ export default function ParsingSettings({ (P.ownConnection ? P.savedProvider : A.instance.live?.kind === 'custom' ? 'local' : 'cloud') === 'local'; return (
- + {P.formOpen && ( - + )} - + label={t('settings.aiParsing.multimodal')} value={P.vision} diff --git a/client/src/components/Admin/paddle/PaddleAutoLoadParts.tsx b/client/src/components/Admin/paddle/PaddleAutoLoadParts.tsx index 4bec7cf0a..ba9e1001f 100644 --- a/client/src/components/Admin/paddle/PaddleAutoLoadParts.tsx +++ b/client/src/components/Admin/paddle/PaddleAutoLoadParts.tsx @@ -1,11 +1,11 @@ import type { PaddleRegionAutoMode, PaddleRegionPending } from '@trek/shared'; -import { Ban, CloudDownload, Hand, Loader2, Power, Sparkles } from 'lucide-react'; +import { Ban, CloudDownload, Hand, Inbox, Loader2, Power, Sparkles } from 'lucide-react'; import { useDateFormat } from '../../../hooks/useDateFormat'; import { useTranslation } from '../../../i18n'; import { formatDisplayDate } from '../../../utils/dateFormat'; import { ChoiceChips, SettingRows, SETTINGS_BUTTON, SettingsHint, StatusPill } from '../../Settings/settingsKit'; import { LABEL, Segmented } from '../../shared/dialogParts'; -import { fs } from '../../shared/DialogShell'; +import { DialogSection, fs } from '../../shared/DialogShell'; import { Tooltip } from '../../shared/Tooltip'; import { AUTO_LOAD_MODES, autoLoadSizes, formatMegabytes } from './paddleRegionsModel'; import type { usePaddleRegionsAdmin } from './usePaddleRegionsAdmin'; @@ -33,39 +33,42 @@ export function AutoLoadSettings({ admin }: { admin: Admin }) { if (!settings) return null; const sizes = autoLoadSizes(settings.max_mb); return ( -
-
- {t('admin.paddleRegions.auto.title')} -
- - value={settings.mode} - onChange={(mode) => void save({ mode })} - label={t('admin.paddleRegions.auto.title')} - fill - options={AUTO_LOAD_MODES.map((mode) => { - const Icon = MODE_ICONS[mode]; - return { - value: mode, - label: t(`admin.paddleRegions.auto.mode.${mode}`), - icon:
- {t(`admin.paddleRegions.auto.modeHint.${settings.mode}`)} -
- {settings.mode === 'auto' && ( -
- {t('admin.paddleRegions.auto.maxSize')} - - value={String(settings.max_mb)} - label={t('admin.paddleRegions.auto.maxSize')} - onChange={(value) => void save({ max_mb: Number(value) })} - options={sizes.map((mb) => ({ value: String(mb), label: megabytes(mb) }))} - /> - {t('admin.paddleRegions.auto.maxSizeHint')} -
- )} +
+ +
+
+
+ + value={settings.mode} + onChange={(mode) => void save({ mode })} + label={t('admin.paddleRegions.auto.title')} + fill + options={AUTO_LOAD_MODES.map((mode) => { + const Icon = MODE_ICONS[mode]; + return { + value: mode, + label: t(`admin.paddleRegions.auto.mode.${mode}`), + icon:
+ {t(`admin.paddleRegions.auto.modeHint.${settings.mode}`)} +
+ {settings.mode === 'auto' && ( +
+ {t('admin.paddleRegions.auto.maxSize')} + + value={String(settings.max_mb)} + label={t('admin.paddleRegions.auto.maxSize')} + onChange={(value) => void save({ max_mb: Number(value) })} + options={sizes.map((mb) => ({ value: String(mb), label: megabytes(mb) }))} + /> + {t('admin.paddleRegions.auto.maxSizeHint')} +
+ )} +
+
); } @@ -132,16 +135,15 @@ export function RequestList({ admin }: { admin: Admin }) { const ordered = [...admin.requests].sort((a, b) => Number(a.declined) - Number(b.declined)); const open = admin.requests.filter((request) => !request.declined).length; return ( -
- - {t('admin.paddleRegions.requests.title')} - {open > 0 && {open}} - - - {ordered.map((request) => ( - - ))} - +
+ 0 && {open}}> + + {ordered.map((request) => ( + + ))} + +
); } diff --git a/client/src/components/Admin/paddle/PaddleRegionsPanel.tsx b/client/src/components/Admin/paddle/PaddleRegionsPanel.tsx index 200d2d585..661729b5a 100644 --- a/client/src/components/Admin/paddle/PaddleRegionsPanel.tsx +++ b/client/src/components/Admin/paddle/PaddleRegionsPanel.tsx @@ -1,6 +1,6 @@ import type { PaddleRegion, PaddleRegionCatalogEntry } from '@trek/shared'; -import { Check, ChevronRight, Loader2, Plus, RefreshCw, Search, Trash2, Waves, WifiOff } from 'lucide-react'; -import { useId, useState } from 'react'; +import { Check, ChevronRight, Info, Loader2, MapPin, Plus, RefreshCw, Search, Trash2, Waves, WifiOff } from 'lucide-react'; +import { useState } from 'react'; import { useDateFormat } from '../../../hooks/useDateFormat'; import { useTranslation } from '../../../i18n'; import { formatDisplayDate } from '../../../utils/dateFormat'; @@ -12,8 +12,8 @@ import { StatusPill, } from '../../Settings/settingsKit'; import ConfirmDialog from '../../shared/ConfirmDialog'; -import { EditorField, INPUT } from '../../shared/dialogParts'; -import { fs } from '../../shared/DialogShell'; +import { INPUT } from '../../shared/dialogParts'; +import { DialogSection, fs } from '../../shared/DialogShell'; import ErrorBoundary from '../../shared/ErrorBoundary'; import { Tooltip } from '../../shared/Tooltip'; import AddonSetupDialog from '../AddonSetupDialog'; @@ -64,7 +64,6 @@ function Panel() { icon={} eyebrow={t('admin.addons.catalog.tours.name')} title={title} - sub={t('admin.paddleRegions.hint')} onClose={close} blocked={admin.removing !== null} > @@ -105,10 +104,20 @@ function PanelBody({ admin }: { admin: Admin }) {
- - + +
+ + +
+
- {t('admin.paddleRegions.attribution')} +
+ +
+ {t('admin.paddleRegions.hint')} + {t('admin.paddleRegions.attribution')} +
+
- -
-
-
+
+
{search.searching && (

@@ -219,7 +225,7 @@ function RegionList({ admin }: { admin: Admin }) { } if (admin.regions.length === 0) { return ( -

+
{t('admin.paddleRegions.empty')}
); diff --git a/client/src/components/Admin/storage/AdminStoragePanel.tsx b/client/src/components/Admin/storage/AdminStoragePanel.tsx index 922283619..4d5d96734 100644 --- a/client/src/components/Admin/storage/AdminStoragePanel.tsx +++ b/client/src/components/Admin/storage/AdminStoragePanel.tsx @@ -27,7 +27,7 @@ import { relativeTime } from '../../../utils/relativeTime' import ConfirmDialog from '../../shared/ConfirmDialog' import CustomSelect from '../../shared/CustomSelect' import { Tooltip } from '../../shared/Tooltip' -import { NEUTRAL_TINT, fs } from '../../shared/DialogShell' +import { DialogButton, FooterSpacer, NEUTRAL_TINT, fs } from '../../shared/DialogShell' import Section from '../../Settings/Section' import { SETTINGS_BUTTON, SETTINGS_BUTTON_PRIMARY, SETTINGS_ICON_BUTTON, SettingRows, SettingsHint, StatusPill, SettingsColumns } from '../../Settings/settingsKit' import BackendForm from './BackendForm' @@ -588,26 +588,11 @@ export default function AdminStoragePanel(): React.ReactElement {

))}
-
- - - - +
+ {t('storage.migrate.promptCancel')} + + void routeOnlySave()}>{t('storage.migrate.routeOnly')} + void moveAndSave()}>{t('storage.migrate.move')}
)} diff --git a/client/src/components/Admin/storage/BackendForm.tsx b/client/src/components/Admin/storage/BackendForm.tsx index e05e13f12..e302b5547 100644 --- a/client/src/components/Admin/storage/BackendForm.tsx +++ b/client/src/components/Admin/storage/BackendForm.tsx @@ -1,5 +1,5 @@ import React, { useId } from 'react' -import { HardDrive } from 'lucide-react' +import { Server, HardDrive } from 'lucide-react' import { STORAGE_BACKEND_TYPE_IDS, type StorageBackend, @@ -199,7 +199,7 @@ export default function BackendForm({ {fields.length > 0 &&
{fields.map(renderField)}
} {mirror && ( - +

{t('storage.mirror.targetsHelp')}

{visibleCandidates.length > 0 && (
diff --git a/client/src/components/Assistant/AssistantMemoryDialog.tsx b/client/src/components/Assistant/AssistantMemoryDialog.tsx index 080aad3f9..bf69e5ab6 100644 --- a/client/src/components/Assistant/AssistantMemoryDialog.tsx +++ b/client/src/components/Assistant/AssistantMemoryDialog.tsx @@ -1,4 +1,4 @@ -import { NotebookPen, Plus } from 'lucide-react'; +import { Zap, NotebookPen, Plus } from 'lucide-react'; import { useId, useState } from 'react'; import { useTranslation } from '../../i18n'; @@ -75,7 +75,7 @@ export default function AssistantMemoryDialog({ tripId, onClose }: { tripId: num } > - +
{QUICK.map((key, i) => { const line = t(`assistant.memory.quick.${key}`); @@ -96,7 +96,7 @@ export default function AssistantMemoryDialog({ tripId, onClose }: { tripId: num })}
- +