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: send the fleet host's manage button to the runtimes page, not the catalog
[._.]/ Adam Eivy6288df0079c7
diff --git a/client/src/components/providers/FleetHostSetup.jsx b/client/src/components/providers/FleetHostSetup.jsxindex be3ad04889..eb711f4aa1 100644--- a/client/src/components/providers/FleetHostSetup.jsx+++ b/client/src/components/providers/FleetHostSetup.jsx@@ -8,6 +8,7 @@ import { useAutoRefetch } from '../../hooks/useAutoRefetch';import RuntimeInstallModal from '../install/RuntimeInstallModal';import Banner from '../ui/Banner';import { PORTS } from '../../lib/ports.js';+import { LOCAL_RUNTIME_MANAGE_URLS } from '../../../../server/lib/modelPinMembership.js';// A self-host provider (the auto-created Direct API one from `configure()` in// server/services/fleetLlmHost.js, and the OpenCode one from `?selfHost=1`)@@ -102,6 +103,17 @@ export default function FleetHostSetup({ compact = false, providers = [], onConf</section>);}+ // The banner above names the page that manages the recommended runtime, so+ // this button has to open that same page. It pointed at `/models/llms`+ // because that page WAS the local-server surface; #7414 made it the weights+ // catalog, which has no start/stop control at all — so on an Apple Silicon+ // host the banner said "Models → Runtimes" and the button under it went+ // somewhere with no MTPLX card. vLLM has no PortOS page and an unrecognized+ // host has no recommendation, and both still belong on the runtimes tab:+ // it is where every local server PortOS DOES manage lives.+ const manageHref = LOCAL_RUNTIME_MANAGE_URLS[status?.recommendation?.runtime]+ ?? LOCAL_RUNTIME_MANAGE_URLS.llama;+return (<div className="space-y-4"><Banner tone={status?.serving ? 'success' : 'info'} icon={Server} title={title}>@@ -111,7 +123,7 @@ export default function FleetHostSetup({ compact = false, providers = [], onConf{error && <Banner tone="error">{error}</Banner>}<div className="flex flex-wrap gap-2"><button type="button" onClick={load} className="min-h-[40px] px-3 rounded-lg bg-port-border text-sm">Refresh host status</button>- <Link to="/models/llms" className="min-h-[40px] px-3 py-2 text-sm text-port-accent">Manage loaded models</Link>+ <Link to={manageHref} className="min-h-[40px] px-3 py-2 text-sm text-port-accent">Manage model servers</Link></div>{status && (<>diff --git a/client/src/components/providers/FleetHostSetup.test.jsx b/client/src/components/providers/FleetHostSetup.test.jsxindex 7d11ad2c6c..9d6c155a21 100644--- a/client/src/components/providers/FleetHostSetup.test.jsx+++ b/client/src/components/providers/FleetHostSetup.test.jsx@@ -32,6 +32,23 @@ describe('dedicated model host setup', () => {fireEvent.click(screen.getByRole('button', { name: 'Reveal host API key' }));expect(await screen.findByText('example-private-token')).toBeInTheDocument();});+ // The banner names the page that manages the recommended runtime — on Apple+ // Silicon, "Use the managed MTPLX setup on Models → Runtimes" — so the button+ // under it has to open that page. It pointed at /models/llms, which #7414 left+ // holding the weights catalog and no server controls at all.+ it.each([+ ['mtplx', '/models/llms-runtimes'],+ // vLLM has no PortOS page of its own; the runtimes tab is still where every+ // local server this host CAN manage lives, so the button must not go dead.+ ['vllm', '/models/llms-runtimes'],+ [null, '/models/llms-runtimes'],+ ])('sends "Manage model servers" to the runtime surface for %s', async (runtime, href) => {+ api.getFleetLlmHost.mockResolvedValue({ ...state, recommendation: { ...state.recommendation, runtime } });+ api.getFleetPeerHosts.mockResolvedValue({ hosts: [] });+ render(<MemoryRouter><FleetHostSetup /></MemoryRouter>);+ expect(await screen.findByRole('link', { name: 'Manage model servers' })).toHaveAttribute('href', href);+ });+it('keeps unsupported hardware on a connection path without offering the CUDA installer', async () => {api.getFleetLlmHost.mockResolvedValue({ ...state, recommendation: { supported: false, title: 'Connect to a model host' } });api.getFleetPeerHosts.mockResolvedValue({ hosts: [] });diff --git a/server/lib/localProviderRuntime.test.js b/server/lib/localProviderRuntime.test.jsindex 2a764b78f9..5a01689c20 100644--- a/server/lib/localProviderRuntime.test.js+++ b/server/lib/localProviderRuntime.test.js@@ -186,25 +186,45 @@ describe('localRuntimeForProvider', () => {// is what these guards exist to prevent repeating: a breadcrumb typed into a// runtime row goes stale the next time a page moves, and nothing fails.describe('LOCAL_RUNTIMES — user-facing copy names its page by route, never by literal', () => {- const COPY_FIELDS = ['modelsHint', 'standbyDetail'];+ // Every user-readable string on a row. `setupStateDetail` is a nested+ // state -> prose map, so walk it rather than listing its keys — a runtime that+ // adds a state must inherit the guard, not dodge it.+ const copyStrings = ([id, runtime]) => ['modelsHint', 'standbyDetail', 'setupStateDetail']+ .flatMap((field) => {+ const value = runtime[field];+ if (typeof value === 'string') return [[`${id}.${field}`, value]];+ if (value && typeof value === 'object') {+ return Object.entries(value)+ .filter(([, nested]) => typeof nested === 'string')+ .map(([state, nested]) => [`${id}.${field}.${state}`, nested]);+ }+ return [];+ });const rows = Object.entries(LOCAL_RUNTIMES);+ const allCopy = rows.flatMap(copyStrings);it('writes no breadcrumb into a runtime row', () => {- const offenders = rows.flatMap(([id, runtime]) => COPY_FIELDS- .filter((field) => typeof runtime[field] === 'string' && runtime[field].includes('→'))- .map((field) => `${id}.${field}`));- expect(offenders).toEqual([]);+ expect(allCopy.filter(([, text]) => text.includes('→')).map(([name]) => name)).toEqual([]);});// The token only expands for a runtime that HAS a page; on one with// `manageUrl: null` it would ship as a literal `{page}` or as filler prose.it('uses the {page} token only where a manage route can name a page', () => {- const offenders = rows.flatMap(([id, runtime]) => COPY_FIELDS- .filter((field) => typeof runtime[field] === 'string' && runtime[field].includes('{page}') && !runtime.manageUrl)- .map((field) => `${id}.${field}`));+ const pageless = new Set(rows.filter(([, runtime]) => !runtime.manageUrl).map(([id]) => id));+ const offenders = allCopy+ .filter(([name, text]) => text.includes('{page}') && pageless.has(name.split('.')[0]))+ .map(([name]) => name);expect(offenders).toEqual([]);});+ // The guard above is only as good as its corpus: if `copyStrings` ever stopped+ // finding the fields, both assertions would pass vacuously over an empty list.+ it('actually reads the rows it claims to guard', () => {+ expect(allCopy.length).toBeGreaterThanOrEqual(rows.length);+ expect(allCopy.some(([, text]) => text.includes('{page}'))).toBe(true);+ expect(allCopy.map(([name]) => name)).toContain('vllm.setupStateDetail.empty');+ });+it('takes every manageUrl from the shared map the client reads', () => {expect(Object.fromEntries(rows.map(([id, runtime]) => [id, runtime.manageUrl]))).toEqual(LOCAL_RUNTIME_MANAGE_URLS);diff --git a/server/lib/navManifest.test.js b/server/lib/navManifest.test.jsindex eeb40fb338..b90d9d96d9 100644--- a/server/lib/navManifest.test.js+++ b/server/lib/navManifest.test.js@@ -200,6 +200,20 @@ describe('nav contract — Models → Runtimes', () => {it.each(['llms', 'ollama', 'lm studio'])('leaves %j on the LLMs catalog page', (spoken) => {expect(resolveNavCommand(spoken)?.path).toBe('/models/llms');});++ // Two pages in this section are about "runtimes". Before #7414 a bare+ // "runtimes" landed on the image-to-3D page by suffix match, because nothing+ // else claimed the word; the local model servers are what a user asking for+ // runtimes means, so the exact alias wins it now. The 3D page keeps every+ // qualified form — losing those WOULD be a regression, and the fuzzy matcher+ // makes that a silent one.+ it('gives a bare "runtimes" to the model servers', () => {+ expect(resolveNavCommand('runtimes')?.path).toBe('/models/llms-runtimes');+ });++ it.each(['3d runtimes', 'image to 3d runtimes'])('keeps %j on the image-to-3D page', (spoken) => {+ expect(resolveNavCommand(spoken)?.path).toBe('/models/3d');+ });});// Readiness copy names the page it links to instead of repeating a breadcrumb,