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
fix(ui): restore Model Hub fidelity to the design (#1526)
Call White2c16c96af745
diff --git a/ui/src/components/settings/models/AgentCard.tsx b/ui/src/components/settings/models/AgentCard.tsxindex 5228590af..0d2f03a5f 100644--- a/ui/src/components/settings/models/AgentCard.tsx+++ b/ui/src/components/settings/models/AgentCard.tsx@@ -145,9 +145,9 @@ const AgentModelCard: React.FC<{</Badge></span></div>- {agent.mode === 'hub' ? <div className="flex shrink-0 flex-wrap gap-2"><Button variant="secondary" size="sm" className="h-auto rounded-lg px-3 py-[9px] text-[11.5px] font-bold" onClick={() => onOpenOrder(agent)} disabled={pending}>{t('settings.models.gateway.sourceOrder')}</Button><Button variant="outline" size="sm" className="h-auto rounded-lg px-3 py-[9px] text-[11.5px] font-bold" onClick={() => onSwitchDirect(agent)} disabled={pending}>{t(switchFailed ? 'settings.models.gateway.retry' : 'settings.models.gateway.switchToDirect')}</Button></div> : <Button variant="secondary" size="sm" className="h-auto shrink-0 self-start rounded-lg px-3 py-[9px] text-[11.5px] font-bold sm:self-auto" onClick={() => onConnectHub(agent)} disabled={connecting}>{t('settings.models.gateway.switchToGateway')}</Button>}+ {agent.mode === 'hub' ? <div className="flex shrink-0 flex-wrap gap-2"><Button variant="secondary" size="sm" className="model-hub-agent-head-action rounded-lg px-3 text-[11.5px] font-bold" onClick={() => onOpenOrder(agent)} disabled={pending}>{t('settings.models.gateway.sourceOrder')}</Button><Button variant="outline" size="sm" className="model-hub-agent-head-action rounded-lg px-3 text-[11.5px] font-bold" onClick={() => onSwitchDirect(agent)} disabled={pending}>{t(switchFailed ? 'settings.models.gateway.retry' : 'settings.models.gateway.switchToDirect')}</Button></div> : <Button variant="secondary" size="sm" className="model-hub-agent-head-action shrink-0 self-start rounded-lg px-3 text-[11.5px] font-bold sm:self-auto" onClick={() => onConnectHub(agent)} disabled={connecting}>{t('settings.models.gateway.switchToGateway')}</Button>}</div>- <span className={cn('flex items-center gap-1.5 text-[11px] font-semibold sm:ml-[42px]', statusClass)}>+ <span className={cn('model-hub-agent-head-status flex items-center gap-1.5 text-[11px] font-semibold sm:ml-[42px]', statusClass)}><span className={cn('size-[5px] shrink-0 rounded-full', statusDot)} />{switchFailed ? t('settings.models.gateway.fail.switchToDirect') : subtitle}<ModelHubInfoHint label={switchFailed ? t('settings.models.gateway.fail.switchToDirect') : subtitle} content={switchFailed ? t('settings.models.gateway.fail.switchToDirect') : subtitle} className="model-hub-overview-info size-[13px]" />diff --git a/ui/src/components/settings/models/RouteChainDialog.tsx b/ui/src/components/settings/models/RouteChainDialog.tsxindex f81055fbe..1a3c13e80 100644--- a/ui/src/components/settings/models/RouteChainDialog.tsx+++ b/ui/src/components/settings/models/RouteChainDialog.tsx@@ -985,9 +985,14 @@ export const RouteChainDialog: React.FC<{{t("settings.models.routeDialog.addHop")}</button></PopoverTrigger>+ {/* `collisionPadding` plus the class's available-height bound keep the+ whole panel — not just its list — inside the viewport; without+ them a source with many models opened a panel that ran past the+ dialog and clipped its own last row. */}<PopoverContentalign="start"sideOffset={6}+ collisionPadding={16}className="model-hub-route-selector flex w-[var(--radix-popover-trigger-width)] max-w-[calc(100vw-64px)] flex-col gap-2 rounded-lg border border-border bg-background p-2"onOpenAutoFocus={(event) => {event.preventDefault();@@ -998,55 +1003,48 @@ export const RouteChainDialog: React.FC<{addButtonRef.current?.focus();}}>- <div className="model-hub-route-selector-label grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-2">- <span>{t("settings.models.routeDialog.add.source")}</span>- <span>{t("settings.models.routeDialog.add.model")}</span>- </div>- <div className="flex max-h-52 flex-col gap-2 overflow-auto">+ <div className="model-hub-route-selector-list flex flex-col gap-2">{candidateGroups.map((group) => (<sectionkey={group.source.id}aria-label={group.source.display_name}className="flex flex-col gap-1">- {group.items.map(- ({ candidate: item, index }, groupIndex) => (- <button- ref={(node) => {- candidateRefs.current[index] = node;- }}- key={`${item.hop.source_id}:${item.hop.model_id}`}- type="button"- aria-pressed={Boolean(- candidate &&- equalHopIdentity(candidate.hop, item.hop),- )}- tabIndex={- candidate &&- equalHopIdentity(candidate.hop, item.hop)- ? 0- : -1- }- onClick={() => chooseCandidate(item)}- onKeyDown={(event) =>- onCandidateKeyDown(event, index)- }- className="model-hub-route-candidate grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)] gap-2 rounded-md px-2 py-1 text-left text-xs text-foreground"- >- <span className="truncate">- {groupIndex === 0 ? group.source.display_name : ""}- </span>- <span className="truncate font-mono text-muted">- {item.hop.model_id}- </span>- </button>- ),- )}+ <p className="model-hub-route-selector-label truncate px-2">+ {group.source.display_name}+ </p>+ {group.items.map(({ candidate: item, index }) => (+ <button+ ref={(node) => {+ candidateRefs.current[index] = node;+ }}+ key={`${item.hop.source_id}:${item.hop.model_id}`}+ type="button"+ aria-pressed={Boolean(+ candidate &&+ equalHopIdentity(candidate.hop, item.hop),+ )}+ tabIndex={+ candidate &&+ equalHopIdentity(candidate.hop, item.hop)+ ? 0+ : -1+ }+ onClick={() => chooseCandidate(item)}+ onKeyDown={(event) => onCandidateKeyDown(event, index)}+ className="model-hub-route-candidate flex items-center rounded-md px-2 py-1 text-left text-xs text-foreground"+ >+ <span className="model-hub-route-candidate-model truncate font-mono text-muted">+ {item.hop.model_id}+ </span>+ </button>+ ))}</section>))}</div><Buttontype="button"+ className="model-hub-route-selector-confirm shrink-0 self-end px-4"disabled={!candidate}onClick={addCandidate}>diff --git a/ui/src/components/settings/models/SourceDetailPanel.tsx b/ui/src/components/settings/models/SourceDetailPanel.tsxindex 48df14d46..056f477d0 100644--- a/ui/src/components/settings/models/SourceDetailPanel.tsx+++ b/ui/src/components/settings/models/SourceDetailPanel.tsx@@ -206,16 +206,16 @@ const TierEditor: React.FC<{onClick={() => { setFailedNext(null); setEditing(true); }}>{tiers.length > 0 ? tiers.map((tier) => (- <span key={tier} className="model-hub-source-tier model-hub-source-tier-chip inline-flex rounded-full border border-border text-foreground">{tier}</span>- )) : <span className="model-hub-source-tier text-muted">{t('settings.models.sourceDetail.tiers.empty')}</span>}- <span className="model-hub-source-tier model-hub-ink-mint font-semibold">{t(tiers.length > 0 ? 'settings.models.sourceDetail.tiers.add' : 'settings.models.sourceDetail.tiers.addFirst')}</span>+ <span key={tier} className="model-hub-source-tier model-hub-source-tier-chip inline-flex rounded-full border border-border font-mono text-foreground">{tier}</span>+ )) : <span className="model-hub-source-tier-empty">{t('settings.models.sourceDetail.tiers.empty')}</span>}+ <span className="model-hub-source-tier model-hub-source-tier-add inline-flex rounded-full border font-semibold">{t(tiers.length > 0 ? 'settings.models.sourceDetail.tiers.add' : 'settings.models.sourceDetail.tiers.addFirst')}</span></button>);}return (<div className="flex min-w-0 flex-wrap items-center gap-1.5">{tiers.map((tier) => (- <span key={tier} className="model-hub-source-tier model-hub-source-tier-chip inline-flex items-center gap-1 rounded-full border border-border text-foreground">+ <span key={tier} className="model-hub-source-tier model-hub-source-tier-chip inline-flex items-center gap-1 rounded-full border border-border font-mono text-foreground">{tier}<button type="button" disabled={saving} onMouseDown={(event) => event.preventDefault()} onClick={() => void commit({ kind: 'remove', tier })} aria-label={t('settings.models.sourceDetail.tiers.remove', { tier }) as string} className="text-muted hover:text-foreground disabled:opacity-50"><X className="size-2.5" />@@ -257,7 +257,7 @@ const DraftTiers: React.FC<{return (<div className="flex min-w-0 flex-wrap items-center gap-1.5">{tiers.map((tier) => (- <span key={tier} className="model-hub-source-tier model-hub-source-tier-chip inline-flex items-center gap-1 rounded-full border border-border text-foreground">+ <span key={tier} className="model-hub-source-tier model-hub-source-tier-chip inline-flex items-center gap-1 rounded-full border border-border font-mono text-foreground">{tier}<button type="button" onClick={() => onChange(tiers.filter((item) => item !== tier))} aria-label={t('settings.models.sourceDetail.tiers.remove', { tier }) as string} className="text-muted hover:text-foreground"><X className="size-2.5" /></button></span>@@ -758,13 +758,18 @@ export const SourceDetailPanel: React.FC<{<div className="model-hub-source-detail"><section className="model-hub-source-bar flex flex-col border border-border bg-surface sm:flex-row sm:items-center"><span className={cn('model-hub-source-tile flex shrink-0 items-center justify-center', ACCENT_TILE[accent])}><Icon className={cn('size-[18px]', ACCENT_ICON[accent])} /></span>- <div className="min-w-0 flex-1">- <h2 ref={headingRef} tabIndex={-1} className="model-hub-source-title truncate font-bold text-foreground">{source.display_name}</h2>- {(state.key || source.last_discovered_at) && <p className={cn('mt-1 flex flex-wrap items-center gap-x-2 gap-y-1', state.textClass)}>- {state.key && <span className="model-hub-source-state flex items-center gap-1.5"><span className={cn('size-[5px] rounded-full', state.dotClass)} />{t(state.key, state.values)}</span>}+ {/* Two lines inside a 64px bar, as the design draws it: identity and+ state share the first, and the mono endpoint summary owns the+ second. The name leads line one rather than taking a line of its own+ — the design omits it entirely, but a subscription source has no+ host to fall back on and would be unidentifiable without it. */}+ <div className="model-hub-source-copy flex min-w-0 flex-1 flex-col">+ <div className={cn('model-hub-source-line flex min-w-0 flex-wrap items-center gap-x-2', state.textClass)}>+ <h2 ref={headingRef} tabIndex={-1} className="model-hub-source-title truncate font-bold text-foreground">{source.display_name}</h2>+ {state.key && <span className="model-hub-source-state flex items-center gap-1.5"><span className={cn('size-[5px] shrink-0 rounded-full', state.dotClass)} />{t(state.key, state.values)}</span>}{source.last_discovered_at && <span className="model-hub-source-age text-muted">{t('settings.models.sourceDetail.status.listUpdated', { time: formatRelativeTime(source.last_discovered_at, t) })}</span>}- </p>}- <p className="model-hub-source-summary mt-1 truncate font-mono">{t(host ? 'settings.models.sourceDetail.summary' : 'settings.models.gateway.modelCount', { host, count: source.models.length })}</p>+ </div>+ <p className="model-hub-source-summary truncate font-mono">{t(host ? 'settings.models.sourceDetail.summary' : 'settings.models.gateway.modelCount', { host, count: source.models.length })}</p></div><div className="flex shrink-0 gap-2">{repairDestination === 'reauth_dialog' && <Button size="sm" className="model-hub-source-action" data-repair-kind={repair} data-repair-destination={repairDestination} disabled={busy} onClick={() => setConfirmingReauth(true)}><LogIn />{t(REPAIR_LABEL_KEY.reauth)}</Button>}@@ -780,12 +785,12 @@ export const SourceDetailPanel: React.FC<{{manageStage.kind === 'delete_failed' && <p data-manage-failure="delete" data-manage-retry-read={String(manageStage.retryRead)} className="rounded-lg border border-destructive/25 bg-destructive/[0.08] px-3 py-2 text-[11.5px] text-destructive-ink">{t(manageStage.retryRead ? 'settings.models.sourceDetail.fail.verifyDeleteSource' : 'settings.models.sourceDetail.fail.deleteSource')} <button type="button" disabled={busy} onClick={retryDelete} className="font-semibold underline underline-offset-2">{t('settings.models.sourceDetail.retry')}</button> <button type="button" disabled={busy} onClick={manageStage.retryRead ? dismissUnresolvedManage : cancelManage} className="font-semibold underline underline-offset-2">{t(manageStage.retryRead ? 'settings.models.sourceDetail.dismissUnverified' : 'common.cancel')}</button></p>}<section className="model-hub-source-table overflow-hidden border border-border bg-surface"><div className="model-hub-source-table-head hidden border-b border-border font-semibold md:grid">- <span>{t('settings.models.sourceDetail.col.id')}</span><span>{t('settings.models.sourceDetail.col.entry')}</span><span className="flex items-center gap-1">{t('settings.models.sourceDetail.col.tiers')}<Info className="size-3" /></span><span />+ <span className="truncate">{t('settings.models.sourceDetail.col.id')}</span><span className="truncate">{t('settings.models.sourceDetail.col.entry')}</span><span className="flex min-w-0 items-center gap-1"><span className="truncate">{t('settings.models.sourceDetail.col.tiers')}</span><Info className="model-hub-ink-59 size-[13px] shrink-0" /></span><span /></div>{models.length === 0 && !manualDraft ? <p className="px-5 py-12 text-center text-[12px] text-muted">{t(source.last_discovered_at ? 'settings.models.sourceDetail.empty' : 'settings.models.sourceDetail.emptyNeverFetched')}</p> : models.map((model) => (<div key={model.id} className="model-hub-source-table-row grid gap-3 border-b border-border last:border-b-0 md:items-center md:gap-y-0"><span className="flex min-w-0 items-center gap-2"><span className="model-hub-source-model truncate font-mono text-foreground" title={model.id}>{model.id}</span>{result?.added.includes(model.id) && <span className="model-hub-accent-pill--mint model-hub-source-pill rounded-full border px-2 py-0.5 font-semibold">{t('settings.models.sourceDetail.refetch.added')}</span>}</span>- <span className="model-hub-source-pill model-hub-source-entry-pill w-fit rounded-full border border-border font-semibold text-muted">{t(`settings.models.sourceDetail.entry.${model.origin === 'discovered' ? 'auto' : 'manual'}`)}</span>+ <span className={cn('model-hub-source-pill model-hub-source-entry-pill w-fit rounded-full border font-semibold', model.origin !== 'discovered' && 'model-hub-source-entry-pill--manual')}>{t(`settings.models.sourceDetail.entry.${model.origin === 'discovered' ? 'auto' : 'manual'}`)}</span><TierEditor model={model} onMutating={() => { setResult(null); setRefetchFailed(false); }} trackMutation={trackMutation} /><div className="flex items-center justify-end gap-2">{removeFailure?.modelId === model.id && <span className="model-hub-source-tier text-right text-destructive-ink">{t('settings.models.sourceDetail.fail.removeModel')} <button type="button" disabled={busy} onClick={() => {@@ -809,7 +814,7 @@ export const SourceDetailPanel: React.FC<{placeholder={t('settings.models.sourceDetail.col.id') as string}className="model-hub-source-manual-id model-hub-source-model h-8 font-mono"/>- <span className="model-hub-source-pill model-hub-source-entry-pill w-fit rounded-full border border-border font-semibold text-muted">{t('settings.models.sourceDetail.entry.manual')}</span>+ <span className="model-hub-source-pill model-hub-source-entry-pill model-hub-source-entry-pill--manual w-fit rounded-full border font-semibold">{t('settings.models.sourceDetail.entry.manual')}</span><DraftTiers tiers={manualDraft.tiers} onChange={(tiers) => setManualDraft((current) => current ? { ...current, tiers, failed: false, retryRead: false } : current)} /><div className="flex justify-end gap-2"><Button variant="ghost" size="xs" disabled={busy} onClick={() => setManualDraft(null)}>{t('common.cancel')}</Button>@@ -819,14 +824,17 @@ export const SourceDetailPanel: React.FC<{</div>)}{source.kind === 'api_key' && !manualDraft && (- <button type="button" className="model-hub-source-table-add model-hub-source-model model-hub-ink-mint flex w-full items-center gap-2 border-b border-border text-left font-semibold" onClick={() => setManualDraft({ modelId: '', tiers: [], failed: false, retryRead: false })}>- <Plus className="size-3.5" />+ <button type="button" className="model-hub-source-table-add model-hub-source-model model-hub-ink-mint flex w-full items-center gap-2 text-left font-semibold" onClick={() => setManualDraft({ modelId: '', tiers: [], failed: false, retryRead: false })}>+ <Plus className="size-3.5 shrink-0" />{t('settings.models.sourceDetail.action.addModel')}- <span className="text-[10.5px] font-normal text-muted">{t('settings.models.sourceDetail.addRow.hint')}</span>+ <span className="model-hub-source-add-hint truncate font-mono font-normal">{t('settings.models.sourceDetail.addRow.hint')}</span></button>)}</section>- <p className="model-hub-source-footnote leading-relaxed">{t('settings.models.sourceDetail.footnote')}</p>+ <p className="model-hub-source-footnote flex gap-2 leading-relaxed">+ <Info className="model-hub-ink-59 mt-px size-[13px] shrink-0" aria-hidden="true" />+ <span>{t('settings.models.sourceDetail.footnote')}</span>+ </p>{/* Confirmed before the journey opens, not inside it: `OAuthConnectDialog`POSTs the re-auth as it mounts, and on a native source that call is theirreversible half — `mark_native_irreversible_start` empties everydiff --git a/ui/src/components/settings/models/modelHubStylePolicy.test.ts b/ui/src/components/settings/models/modelHubStylePolicy.test.tsindex 454e1e5a4..aa505aefa 100644--- a/ui/src/components/settings/models/modelHubStylePolicy.test.ts+++ b/ui/src/components/settings/models/modelHubStylePolicy.test.ts@@ -57,11 +57,25 @@ describe('Model Hub visual token policy', () => {const dialog = surfaceCss.match(/\.model-hub-route-dialog\s*\{([^}]*)\}/)?.[1] ?? '';const body = surfaceCss.match(/\.model-hub-route-body\s*\{([^}]*)\}/)?.[1] ?? '';- expect(dialog).toContain('top: min(');+ expect(dialog).toContain('--model-hub-route-offset: min(');expect(dialog).toContain('--model-hub-route-top: 300px');expect(dialog).toContain('var(--model-hub-route-top)');+ expect(dialog).toContain('top: var(--model-hub-route-offset)');expect(dialog).toContain('box-shadow: var(--model-hub-dialog-shadow)');- expect(dialog).toMatch(/max-height:\s*calc\([\s\S]*100dvh - var\(--model-hub-route-viewport-inset\) -[\s\S]*var\(--model-hub-route-viewport-inset\)/);+ // The dialog grows with its chain, so what bounds it is the room below the+ // offset it is anchored at — not the viewport minus two insets.+ expect(dialog).toMatch(/max-height:\s*calc\([\s\S]*100dvh - var\(--model-hub-route-offset\) -[\s\S]*var\(--model-hub-route-viewport-inset\)/);+ expect(body).not.toMatch(/^\s*height:/m);expect(body).toContain('overflow-y: auto');});++ it('bounds the add-hop picker against the space the popover reports', () => {+ const selector = surfaceCss.match(/\.model-hub-route-selector\s*\{([^}]*)\}/)?.[1] ?? '';+ const list = surfaceCss.match(/\.model-hub-route-selector-list\s*\{([^}]*)\}/)?.[1] ?? '';++ expect(selector).toContain('--radix-popover-content-available-height');+ expect(selector).toContain('max-height: min(');+ expect(list).toContain('overflow-y: auto');+ expect(list).toContain('min-height: 0');+ });});diff --git a/ui/src/components/settings/models/modelHubSurface.css b/ui/src/components/settings/models/modelHubSurface.cssindex edffb6d4a..5bdc0c5f3 100644--- a/ui/src/components/settings/models/modelHubSurface.css+++ b/ui/src/components/settings/models/modelHubSurface.css@@ -281,6 +281,9 @@--model-hub-model-current-ink: var(--model-hub-muted-cc);--model-hub-model-collapse-ink: var(--model-hub-ink-59);--model-hub-takeover-current-ink: var(--model-hub-violet-ink);+ --model-hub-agent-head-action-height: 35px;+ --model-hub-agent-head-action-leading: 17px;+ --model-hub-agent-head-status-height: 16px;display: flex;flex-direction: column;gap: 16px;@@ -288,6 +291,16 @@.model-hub-overview-chevron,.model-hub-overview-info { color: var(--model-hub-ink-40); }+/* The agent group head is a fixed 66px band holding a 35px action row and a+ 16px status row with a 7px gap: 58px of content leaves a symmetric 4px inset.+ Both rows have to be pinned, because inherited line-height alone grows them to+ 37px/17px and eats the top inset. */+.model-hub-agent-head-action {+ height: var(--model-hub-agent-head-action-height, 35px);+ padding-block: 0;+ line-height: var(--model-hub-agent-head-action-leading, 17px);+}+.model-hub-agent-head-status { line-height: var(--model-hub-agent-head-status-height, 16px); }.model-hub-upstream-count {border-color: var(--model-hub-wash-14);background: var(--model-hub-wash-0a);@@ -628,7 +641,11 @@--model-hub-route-head-height: 72px;--model-hub-route-title-size: 15px;--model-hub-route-subtitle-size: 10.5px;- --model-hub-route-body-height: 302px;+ /* The design's 302px body is what a two-hop chain measures, not a fixed box:+ pinning it left short chains padded with dead space and long ones scrolling+ inside a dialog that never grew. It survives only as the anchor the top+ offset is computed from, so the resting placement still matches the design. */+ --model-hub-route-body-anchor: 302px;--model-hub-route-body-gap: 14px;--model-hub-route-label-size: 10.5px;--model-hub-route-list-radius: 10px;@@ -648,18 +665,19 @@--model-hub-dialog-action-height: 33px;--model-hub-dialog-action-radius: 7px;--model-hub-dialog-action-size: 12px;- top: min(+ --model-hub-route-offset: min(var(--model-hub-route-top),max(var(--model-hub-route-viewport-inset),calc(100dvh - var(--model-hub-route-head-height) -- var(--model-hub-route-body-height) -+ var(--model-hub-route-body-anchor) -var(--model-hub-dialog-foot-height) -var(--model-hub-route-viewport-inset))));+ top: var(--model-hub-route-offset);width: min(var(--model-hub-route-width),calc(@@ -668,8 +686,11 @@));max-width: var(--model-hub-route-width);+ /* Anchored at `top` rather than centred, so the room left over is what is+ below the offset — subtracting only the two insets would let a long chain+ push the footer off the bottom of the screen. */max-height: calc(- 100dvh - var(--model-hub-route-viewport-inset) -+ 100dvh - var(--model-hub-route-offset) -var(--model-hub-route-viewport-inset));border-radius: var(--model-hub-route-radius);@@ -681,7 +702,7 @@.model-hub-route-close > svg { width: 15px; height: 15px; }.model-hub-route-title { font-size: var(--model-hub-route-title-size); }.model-hub-route-subtitle { font-size: var(--model-hub-route-subtitle-size); }-.model-hub-route-body { height: var(--model-hub-route-body-height); min-height: 0; flex: 1 1 var(--model-hub-route-body-height); overflow-y: auto; padding: 20px; gap: var(--model-hub-route-body-gap); }+.model-hub-route-body { min-height: 0; flex: 0 1 auto; overflow-y: auto; padding: 20px; gap: var(--model-hub-route-body-gap); }.model-hub-route-label { color: var(--model-hub-ink-73); font-size: var(--model-hub-route-label-size); letter-spacing: 1.1px; }.model-hub-route-list { padding: var(--model-hub-route-list-padding); gap: var(--model-hub-route-list-gap); border-color: var(--model-hub-wash-14); border-radius: var(--model-hub-route-list-radius); }.model-hub-route-hop { height: var(--model-hub-route-hop-height); padding-inline: 10px; gap: var(--model-hub-route-hop-gap); border-radius: var(--model-hub-route-hop-radius); }@@ -695,7 +716,32 @@.model-hub-route-invalid,.model-hub-route-invalid-summary { color: var(--destructive-ink); font-size: 10px; line-height: 14px; }.model-hub-route-selector-label { color: var(--model-hub-ink-73); font-size: 10.5px; font-weight: 700; }+/* The picker opens from a button that sits near the bottom of an anchored+ dialog, so it has to bound itself against the space Radix reports instead of+ letting a long model list run past the dialog and off the screen. Its metrics+ live here rather than on `.model-hub-route-dialog` because the popover is+ portalled out of the dialog and inherits nothing from it. */+.model-hub-route-selector {+ --model-hub-route-selector-max: 300px;+ --model-hub-route-selector-confirm-height: 33px;+ --model-hub-route-selector-confirm-size: 12px;+ max-height: min(+ var(--model-hub-route-selector-max),+ var(--radix-popover-content-available-height, var(--model-hub-route-selector-max))+ );+}+.model-hub-route-selector-list { min-height: 0; overflow-y: auto; }.model-hub-route-candidate { min-height: 28px; }+.model-hub-route-candidate:hover { background: var(--model-hub-wash-0a); }+.model-hub-route-candidate[aria-pressed="true"] {+ background: var(--model-hub-mint-1a);+ color: var(--mint-ink);+}+.model-hub-route-candidate[aria-pressed="true"] .model-hub-route-candidate-model { color: inherit; }+.model-hub-route-selector-confirm {+ height: var(--model-hub-route-selector-confirm-height);+ font-size: var(--model-hub-route-selector-confirm-size);+}.model-hub-route-remove { width: 26px; height: 26px; border-radius: 6px; color: var(--foreground); }.model-hub-route-remove > svg { width: 13px; height: 13px; }.model-hub-route-add { height: var(--model-hub-route-add-height); border-radius: var(--model-hub-route-hop-radius); border-color: var(--model-hub-wash-14); font-size: var(--model-hub-route-add-size); }@@ -727,10 +773,13 @@--model-hub-source-table-gap: 16px;--model-hub-source-table-padding-x: 18px;--model-hub-source-table-padding-y: 11px;- --model-hub-source-title-size: 14px;+ --model-hub-source-title-size: 12px;--model-hub-source-state-size: 12px;--model-hub-source-age-size: 11px;--model-hub-source-summary-size: 10.5px;+ --model-hub-source-copy-gap: 4px;+ --model-hub-source-line-height: 17px;+ --model-hub-source-summary-line: 15px;--model-hub-source-label-size: 11px;--model-hub-source-model-size: 12px;--model-hub-source-pill-size: 10px;@@ -744,6 +793,10 @@--model-hub-source-chip-fill: var(--model-hub-wash-0f);--model-hub-source-chip-padding-y: 4px;--model-hub-source-chip-padding-x: 9px;+ --model-hub-source-pill-padding-y: 3px;+ --model-hub-source-pill-padding-x: 8px;+ --model-hub-source-entry-fill: var(--model-hub-wash-0a);+ --model-hub-source-entry-manual-fill: var(--model-hub-wash-14);display: flex;flex-direction: column;gap: var(--model-hub-source-gap);@@ -760,10 +813,16 @@height: var(--model-hub-source-tile-size);border-radius: var(--model-hub-source-tile-radius);}+.model-hub-source-copy { gap: var(--model-hub-source-copy-gap); }+.model-hub-source-line { min-height: var(--model-hub-source-line-height); line-height: var(--model-hub-source-line-height); }.model-hub-source-title { font-size: var(--model-hub-source-title-size); }.model-hub-source-state { font-size: var(--model-hub-source-state-size); }.model-hub-source-age { font-size: var(--model-hub-source-age-size); }-.model-hub-source-summary { color: var(--model-hub-source-summary-ink); font-size: var(--model-hub-source-summary-size); }+.model-hub-source-summary {+ color: var(--model-hub-source-summary-ink);+ font-size: var(--model-hub-source-summary-size);+ line-height: var(--model-hub-source-summary-line);+}.model-hub-source-action {width: var(--model-hub-source-action-width);height: var(--model-hub-source-action-height);@@ -779,9 +838,15 @@}.model-hub-source-table-head {height: var(--model-hub-source-table-head-height);+ /* Grid items stretch by default, so a plain text cell renders its glyphs at+ the top of a 35px box while a `flex items-center` cell centres them. That+ mismatch is what makes the header row look ragged; the design centres every+ column against the 36px band. */+ align-items: center;background: var(--model-hub-source-table-head-fill);color: var(--model-hub-source-label-ink);font-size: var(--model-hub-source-label-size);+ line-height: 16px;}.model-hub-source-table-row {min-height: var(--model-hub-source-table-row-height);@@ -795,15 +860,41 @@min-height: var(--model-hub-source-table-add-height);padding-inline: var(--model-hub-source-table-padding-x);}+.model-hub-source-add-hint {+ color: var(--model-hub-source-summary-ink);+ font-size: var(--model-hub-source-tier-size);+}.model-hub-source-model { font-size: var(--model-hub-source-model-size); }.model-hub-source-manual-id { border-radius: var(--model-hub-source-manual-input-radius); }.model-hub-source-pill { font-size: var(--model-hub-source-pill-size); }.model-hub-source-tier { font-size: var(--model-hub-source-tier-size); }-.model-hub-source-entry-pill,.model-hub-source-tier-chip {background: var(--model-hub-source-chip-fill);padding: var(--model-hub-source-chip-padding-y) var(--model-hub-source-chip-padding-x);}+/* The affordance for adding a tier is a chip too, hollow rather than filled —+ as plain mint text it read as a caption in the middle of a chip row. */+.model-hub-source-tier-add {+ padding: var(--model-hub-source-chip-padding-y) var(--model-hub-source-chip-padding-x);+ border-color: var(--model-hub-wash-24);+ color: var(--muted);+}+.model-hub-source-tier-empty {+ color: var(--model-hub-ink-59);+ font-size: var(--model-hub-source-age-size);+}+/* Entry pills are fills, not outlines, and the two origins differ by weight of+ fill and ink rather than by border. */+.model-hub-source-entry-pill {+ padding: var(--model-hub-source-pill-padding-y) var(--model-hub-source-pill-padding-x);+ border-color: transparent;+ background: var(--model-hub-source-entry-fill);+ color: var(--muted);+}+.model-hub-source-entry-pill--manual {+ background: var(--model-hub-source-entry-manual-fill);+ color: var(--foreground);+}.model-hub-source-footnote {min-height: 17px;color: var(--model-hub-source-footnote-ink);diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.jsonindex 0fb85b1e0..47cbec65a 100644--- a/ui/src/i18n/en.json+++ b/ui/src/i18n/en.json@@ -1016,7 +1016,7 @@"section": "Route chain for this model","removeHop": "Remove hop","addHop": "Add a hop",- "add": { "source": "Source", "model": "Model", "confirm": "Add", "none": "No source/model pair is available to add" },+ "add": { "confirm": "Add", "none": "No source/model pair is available to add" },"sourceMissing": "Source missing","invalidAfterRefresh": "This edited hop is unavailable after the refresh. Remove it before saving.","reorder": {diff --git a/ui/src/i18n/zh.json b/ui/src/i18n/zh.jsonindex eb284443b..dc8d2afd9 100644--- a/ui/src/i18n/zh.json+++ b/ui/src/i18n/zh.json@@ -1016,7 +1016,7 @@"section": "这个型号的路由链","removeHop": "移除这一跳","addHop": "添加一跳",- "add": { "source": "来源", "model": "型号", "confirm": "添加", "none": "没有可添加的来源型号" },+ "add": { "confirm": "添加", "none": "没有可添加的来源型号" },"sourceMissing": "来源不存在","invalidAfterRefresh": "这个已编辑的跳在刷新后的来源中不可用。移除它后再保存。","reorder": {