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: prioritize local runtime controls (#6806)
[._.]/ Adam Eivya874065c6f9d
diff --git a/client/src/components/settings/HardwareLlmRecommendation.jsx b/client/src/components/settings/HardwareLlmRecommendation.jsxindex 1ad6ca877b..86c9ed8ca8 100644--- a/client/src/components/settings/HardwareLlmRecommendation.jsx+++ b/client/src/components/settings/HardwareLlmRecommendation.jsx@@ -104,9 +104,34 @@ export function hardwareLlmRecommendation(capabilities) {return APPLE_PROFILES.find((profile) => memory >= profile.minMemoryGb && (profile.maxMemoryGb == null || memory <= profile.maxMemoryGb)) || null;}+function RecommendationBody({ profile }) {+ return (+ <>+ <div className="grid grid-cols-1 sm:grid-cols-3 gap-2 text-xs">+ <div className="bg-port-bg/70 rounded-lg p-2.5 min-w-0"><span className="text-gray-500">Runtime</span><p className="text-gray-200 mt-0.5 font-medium">{profile.runtime}</p></div>+ <div className="bg-port-bg/70 rounded-lg p-2.5 min-w-0"><span className="text-gray-500">Harness</span><p className="text-gray-200 mt-0.5 font-medium">{profile.harness}</p></div>+ <div className="bg-port-bg/70 rounded-lg p-2.5 min-w-0"><span className="text-gray-500">Launch target</span><p className="text-gray-200 mt-0.5 font-medium">{contextLabel(profile.contextTokens)}</p></div>+ </div>++ <div className="text-xs text-gray-300 space-y-1.5 leading-relaxed">+ <p className="flex gap-2"><CheckCircle2 size={14} className="text-port-success shrink-0 mt-0.5" /><span><strong className="text-gray-200">Model:</strong> {profile.model}</span></p>+ <p className="flex gap-2"><Cpu size={14} className="text-gray-500 shrink-0 mt-0.5" /><span>{profile.note}</span></p>+ <p className="text-gray-500">{profile.alternatives}</p>+ </div>++ <div className="flex flex-wrap items-center gap-x-4 gap-y-2 text-xs">+ <Link to="/ai" className="text-port-accent hover:underline">Configure the harness in AI Providers</Link>+ <Link to="/models/performance" className="inline-flex items-center gap-1 text-port-accent hover:underline"><Gauge size={12} /> Validate with a local task check</Link>+ </div>+ </>+ );+}+export default function HardwareLlmRecommendation() {const [capabilities, setCapabilities] = useState(null);const [loaded, setLoaded] = useState(false);+ const [wideViewport, setWideViewport] = useState(() => window.matchMedia?.('(min-width: 640px)').matches ?? false);+ const [mobileExpanded, setMobileExpanded] = useState(false);useEffect(() => {let cancelled = false;@@ -119,6 +144,15 @@ export default function HardwareLlmRecommendation() {return () => { cancelled = true; };}, []);+ useEffect(() => {+ const media = window.matchMedia?.('(min-width: 640px)');+ if (!media) return undefined;+ const syncViewport = () => setWideViewport(media.matches);+ syncViewport();+ media.addEventListener('change', syncViewport);+ return () => media.removeEventListener('change', syncViewport);+ }, []);+const profile = hardwareLlmRecommendation(capabilities);if (!loaded) {return <div className="bg-port-card border border-port-border rounded-xl p-4 text-xs text-gray-500">Checking this machine for a curated coding-agent setup…</div>;@@ -126,8 +160,15 @@ export default function HardwareLlmRecommendation() {if (!profile) return null;return (- <section className="bg-port-accent/5 border border-port-accent/40 rounded-xl p-4 sm:p-5 space-y-3" aria-labelledby="hardware-llm-recommendation-title">- <div className="flex flex-col sm:flex-row sm:items-start justify-between gap-3">+ <details+ className="group bg-port-accent/5 border border-port-accent/40 rounded-xl p-4 sm:p-5"+ open={wideViewport || mobileExpanded}+ onToggle={(event) => { if (!wideViewport) setMobileExpanded(event.currentTarget.open); }}+ >+ <summary+ className="flex cursor-pointer list-none flex-col sm:flex-row sm:cursor-default sm:items-start justify-between gap-3"+ onClick={(event) => { if (wideViewport) event.preventDefault(); }}+ ><div className="min-w-0"><div className="flex items-center gap-2 text-port-accent"><Sparkles size={16} />@@ -136,24 +177,10 @@ export default function HardwareLlmRecommendation() {<p className="text-xs text-gray-400 mt-1">Curated for this machine: {profile.machine}</p></div><span className="text-[11px] px-2 py-1 rounded border border-port-accent/30 text-port-accent shrink-0">Qwen3.8-27B</span>+ </summary>+ <div className="mt-3 space-y-3 group-open:block sm:block">+ <RecommendationBody profile={profile} /></div>-- <div className="grid grid-cols-1 sm:grid-cols-3 gap-2 text-xs">- <div className="bg-port-bg/70 rounded-lg p-2.5 min-w-0"><span className="text-gray-500">Runtime</span><p className="text-gray-200 mt-0.5 font-medium">{profile.runtime}</p></div>- <div className="bg-port-bg/70 rounded-lg p-2.5 min-w-0"><span className="text-gray-500">Harness</span><p className="text-gray-200 mt-0.5 font-medium">{profile.harness}</p></div>- <div className="bg-port-bg/70 rounded-lg p-2.5 min-w-0"><span className="text-gray-500">Launch target</span><p className="text-gray-200 mt-0.5 font-medium">{contextLabel(profile.contextTokens)}</p></div>- </div>-- <div className="text-xs text-gray-300 space-y-1.5 leading-relaxed">- <p className="flex gap-2"><CheckCircle2 size={14} className="text-port-success shrink-0 mt-0.5" /><span><strong className="text-gray-200">Model:</strong> {profile.model}</span></p>- <p className="flex gap-2"><Cpu size={14} className="text-gray-500 shrink-0 mt-0.5" /><span>{profile.note}</span></p>- <p className="text-gray-500">{profile.alternatives}</p>- </div>-- <div className="flex flex-wrap items-center gap-x-4 gap-y-2 text-xs">- <Link to="/ai" className="text-port-accent hover:underline">Configure the harness in AI Providers</Link>- <Link to="/models/performance" className="inline-flex items-center gap-1 text-port-accent hover:underline"><Gauge size={12} /> Validate with a local task check</Link>- </div>- </section>+ </details>);}diff --git a/client/src/components/settings/LocalLlmRuntimesView.jsx b/client/src/components/settings/LocalLlmRuntimesView.jsxindex a23efdacb1..95329cf52c 100644--- a/client/src/components/settings/LocalLlmRuntimesView.jsx+++ b/client/src/components/settings/LocalLlmRuntimesView.jsx@@ -647,8 +647,6 @@ export default function LocalLlmRuntimesView() {return (<section id="llm-management-panel-runtimes" role="tabpanel" aria-labelledby="tab-runtimes" className="space-y-4">- <HardwareLlmRecommendation />- <LocalPersistentMindSetupCard />{/* One start/stop/install surface for every local server PortOS can run */}<RuntimeServersCardstatus={status}@@ -678,6 +676,8 @@ export default function LocalLlmRuntimesView() {onSaveIdleWindow={saveIdleWindow}onToggleKeepLoaded={toggleKeepLoaded}/>+ <LocalPersistentMindSetupCard />+ <HardwareLlmRecommendation />{/* Backends — model catalog, default marker, cross-backend import */}<div className="bg-port-card border border-port-border rounded-xl p-4 sm:p-6 space-y-4">diff --git a/client/src/components/settings/LocalLlmRuntimesView.test.jsx b/client/src/components/settings/LocalLlmRuntimesView.test.jsxindex bd3a145980..4b2521192c 100644--- a/client/src/components/settings/LocalLlmRuntimesView.test.jsx+++ b/client/src/components/settings/LocalLlmRuntimesView.test.jsx@@ -95,6 +95,11 @@ const renderRuntimes = async () => {beforeEach(() => {vi.clearAllMocks();+ window.matchMedia = vi.fn(() => ({+ matches: false,+ addEventListener: vi.fn(),+ removeEventListener: vi.fn(),+ }));getLocalLlmStatus.mockResolvedValue({backend: 'ollama',ollama: {@@ -132,8 +137,25 @@ describe('LocalLlmRuntimesView information architecture', () => {expect(screen.getByRole('heading', { name: 'Local Runtime Servers' })).toBeInTheDocument();expect(screen.queryByRole('heading', { name: 'Models' })).not.toBeInTheDocument();expect(getLocalLlmCatalog).not.toHaveBeenCalled();- expect(await screen.findByRole('heading', { name: 'Recommended coding-agent setup' })).toBeInTheDocument();- expect(screen.getByText('OpenCode MTPLX TUI')).toBeInTheDocument();+ const recommendationHeading = await screen.findByRole('heading', { name: 'Recommended coding-agent setup' });+ const runtimeHeading = screen.getByRole('heading', { name: 'Local Runtime Servers' });+ expect(runtimeHeading.compareDocumentPosition(recommendationHeading) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();+ const recommendation = recommendationHeading.closest('details');+ expect(recommendation).not.toHaveAttribute('open');+ expect(within(recommendation).getByText('OpenCode MTPLX TUI')).toBeInTheDocument();+ fireEvent.click(recommendationHeading.closest('summary'));+ expect(recommendation).toHaveAttribute('open');+ });++ it('keeps the recommendation expanded on desktop', async () => {+ window.matchMedia = vi.fn(() => ({+ matches: true,+ addEventListener: vi.fn(),+ removeEventListener: vi.fn(),+ }));+ await renderRuntimes();++ expect((await screen.findByRole('heading', { name: 'Recommended coding-agent setup' })).closest('details')).toHaveAttribute('open');});// The two views never mount together, so whichever one is on screen must be the