Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: condense repeated shared-config paragraph on provider cards (#10931)
Adam Eivy5d87f933e771
diff --git a/client/src/components/providers/ProviderCard.jsx b/client/src/components/providers/ProviderCard.jsxindex 0869bea590..861bb9f750 100644--- a/client/src/components/providers/ProviderCard.jsx+++ b/client/src/components/providers/ProviderCard.jsx@@ -50,6 +50,9 @@ import ProviderVisionTest from './ProviderVisionTest';// The editor states the same thing in its own inline banner, in prose.const RUNNER_NOT_ALLOWED_HINT = 'This command is not on the CoS Agent Runner’s allowlist, so /spawn and /spawn-tui will refuse it. The provider still works everywhere else (direct spawn, chat, pipeline). The allowlist is curated in the PortOS source, not in this form.';+// Shown once per unified card as a pill's tooltip rather than as body text.+const SHARED_CONFIG_TITLE = 'CLI and TUI share one provider configuration, including the catalog, model defaults, tier pins, effort, fallback, and generation settings. Edit either mode to update it. Arguments, timeouts, TUI timing, and CLI transport consent stay specific to their mode.';+// Card presentation per card state. Exactly ONE border-color utility is// emitted per card — Tailwind resolves same-specificity color utilities by// stylesheet order, not by the order they appear in `className` — so the@@ -417,7 +420,14 @@ export default function ProviderCard({)}{unified && (<div className="text-xs text-gray-400 space-y-1">- <p>CLI and TUI share one provider configuration, including the catalog, model defaults, tier pins, effort, fallback, and generation settings. Edit either mode to update it. Arguments, timeouts, TUI timing, and CLI transport consent stay specific to their mode.</p>+ <span+ tabIndex={0}+ title={SHARED_CONFIG_TITLE}+ aria-label={`Shared CLI/TUI config. ${SHARED_CONFIG_TITLE}`}+ className="inline-block px-2 py-0.5 rounded-full border border-port-border text-gray-300 cursor-help"+ >+ Shared CLI/TUI config+ </span>{modes.filter(mode => mode.id !== provider.id && statuses[mode.id]?.available === false).map(mode => (<p key={mode.id} className="text-port-warning">{mode.type.toUpperCase()} benched: {statuses[mode.id].message || statuses[mode.id].reason}{' '}diff --git a/client/src/components/providers/ProviderCard.test.jsx b/client/src/components/providers/ProviderCard.test.jsxindex 9328be4c25..413886a506 100644--- a/client/src/components/providers/ProviderCard.test.jsx+++ b/client/src/components/providers/ProviderCard.test.jsx@@ -411,3 +411,38 @@ describe('ProviderCard envVars rendering', () => {});});++describe('ProviderCard shared CLI/TUI config', () => {+ const unifiedCard = (props = {}) => {+ const cli = wrapper({ id: 'opencode-cli', name: 'OpenCode CLI', type: 'cli' });+ const tui = wrapper({ id: 'opencode-tui', name: 'OpenCode TUI' });+ renderCard(+ { ...cli, executionModes: [{ id: 'opencode-cli' }, { id: 'opencode-tui' }] },+ null,+ { providersById: { 'opencode-cli': cli, 'opencode-tui': tui }, ...props },+ );+ };++ it('shows the shared-config explanation once, as a pill tooltip rather than body text', () => {+ unifiedCard();+ const pill = screen.getByText('Shared CLI/TUI config');+ expect(pill).toHaveAttribute('title', expect.stringContaining('share one provider configuration'));+ expect(screen.queryByText(/share one provider configuration/)).toBeNull();+ });++ it('keeps a benched mode notice with its retry action on a unified card', () => {+ const onRecover = vi.fn();+ unifiedCard({+ statuses: { 'opencode-tui': { available: false, reason: 'missing binary', message: 'TUI binary not found' } },+ onRecover,+ });+ expect(screen.getByText(/TUI benched: TUI binary not found/)).toBeTruthy();+ fireEvent.click(screen.getByRole('button', { name: 'Retry TUI' }));+ expect(onRecover).toHaveBeenCalledWith('opencode-tui');+ });++ it('shows no shared-config pill on a single-mode card', () => {+ renderCard(wrapper({ id: 'solo-tui', name: 'Solo TUI' }));+ expect(screen.queryByText('Shared CLI/TUI config')).toBeNull();+ });+});