Skip to content

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

fix: keep AI provider installers mounted across tabs

Adam Eivy53aaeed79597
diff --git a/client/src/pages/AIProviders.jsx b/client/src/pages/AIProviders.jsx
index 28c9a17c81..e17a6e8af2 100644
--- a/client/src/pages/AIProviders.jsx
+++ b/client/src/pages/AIProviders.jsx
@@ -1233,17 +1233,6 @@ export default function AIProviders() {
onSave={() => { closeForm(); loadData(); }}
/>
)}
- <RuntimeInstallModal
- open={Boolean(installingRuntime)}
- runtime={installingRuntime?.id}
- label={installingRuntime?.label}
- onClose={() => setInstallingRuntime(null)}
- onComplete={handleRuntimeInstallComplete}
- installUrlBase="/api/providers/runtimes/install"
- streamMethod="POST"
- flushMs={250}
- description={`Installing ${installingRuntime?.label} from ${installingRuntime?.method === 'script' ? "the vendor's official install script" : 'its global npm package'}.`}
- />
<ProviderComposePopover
open={composeInitial !== null}
initial={composeInitial}
@@ -1266,10 +1255,25 @@ export default function AIProviders() {
onConfigured={loadData}
/>
)}
- {/* The readiness checklist's one-click fix. Same streaming modal as the
- CLI installer, pointed at the local-daemon setup endpoint — which
- re-derives the runtime and its endpoint from the provider record, so
- `provider` is the only thing that travels. */}
+ </>
+ )}
+ </div>
+
+ {/* These streams can be opened from the Harnesses and Services tabs as
+ well as Presets, so their renderers must outlive the tab fragment. */}
+ <RuntimeInstallModal
+ open={Boolean(installingRuntime)}
+ runtime={installingRuntime?.id}
+ label={installingRuntime?.label}
+ onClose={() => setInstallingRuntime(null)}
+ onComplete={handleRuntimeInstallComplete}
+ installUrlBase="/api/providers/runtimes/install"
+ streamMethod="POST"
+ flushMs={250}
+ description={`Installing ${installingRuntime?.label} from ${installingRuntime?.method === 'script' ? "the vendor's official install script" : 'its global npm package'}.`}
+ />
+ {/* The readiness checklist's one-click fix uses the same streaming modal
+ and re-derives the daemon endpoint from the provider record. */}
<RuntimeInstallModal
open={Boolean(settingUpRuntime)}
runtime={settingUpRuntime?.runtime}
@@ -1285,9 +1289,6 @@ export default function AIProviders() {
? `${settingUpRuntime.actionLabel} — model weights are a multi-gigabyte download, so this can run for a long time.`
: `${settingUpRuntime?.actionLabel || 'Setting up'} — this can take several minutes on a first install.`}
/>
- </>
- )}
- </div>
</div>
);
}
diff --git a/client/src/pages/AIProviders.test.jsx b/client/src/pages/AIProviders.test.jsx
index f537d2b9dd..54c6082afc 100644
--- a/client/src/pages/AIProviders.test.jsx
+++ b/client/src/pages/AIProviders.test.jsx
@@ -36,6 +36,8 @@ const api = vi.hoisted(() => ({
getProviderCatalog: vi.fn().mockResolvedValue({
harnesses: [], services: [], bootstraps: [], compatibility: {}, effortLevels: {}, effortLevelsByModel: {}, presets: [],
}),
+ getProviderBootstraps: vi.fn().mockResolvedValue({ bootstraps: {} }),
+ getHarnesses: vi.fn().mockResolvedValue({ harnesses: [] }),
createProviderPreset: vi.fn(),
// The Services view lists instances; empty by default.
getProviderServices: vi.fn().mockResolvedValue({ services: [] }),
@@ -207,6 +209,40 @@ describe('AIProviders page load error handling', () => {
expect(modal).toHaveAttribute('data-flush-ms', '250');
});
+ it('opens the shared installer when a Harnesses card starts a CLI install', async () => {
+ __resetProviderCatalogCache();
+ api.getProviders.mockResolvedValue({ providers: [], activeProvider: null });
+ api.getProviderRuntimes.mockResolvedValue({
+ runtimes: {
+ pi: {
+ id: 'pi',
+ label: 'Pi Coding Agent CLI',
+ vendor: 'pi',
+ installed: false,
+ installable: true,
+ method: 'npm',
+ },
+ },
+ });
+ api.getProviderCatalog.mockResolvedValue({
+ harnesses: [{ id: 'pi', label: 'Pi', modes: ['cli', 'tui'], enabled: false, source: 'setting', detected: false }],
+ services: [],
+ bootstraps: [],
+ compatibility: {},
+ effortLevels: {},
+ effortLevelsByModel: {},
+ presets: [],
+ });
+
+ await renderPage('/ai/harnesses');
+
+ fireEvent.click(await screen.findByRole('button', { name: 'Install Pi Coding Agent CLI' }));
+ const modal = await screen.findByTestId('runtime-install-modal');
+ expect(modal).toHaveAttribute('data-runtime', 'pi');
+ expect(modal).toHaveAttribute('data-stream-method', 'POST');
+ expect(modal).toHaveAttribute('data-flush-ms', '250');
+ });
+
// An absolute path in `command` is a legitimate config — the widget must
// still find its runtime rather than silently dropping the install button.
it('matches a runtime through a path-qualified command', async () => {