Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(desktop): handle missing browser connection in settings panel

Steven Enamakelf785317e8200
diff --git a/app/src/components/desktop/DesktopConnectionPage.tsx b/app/src/components/desktop/DesktopConnectionPage.tsx
index 4a317dd196..9af9401447 100644
--- a/app/src/components/desktop/DesktopConnectionPage.tsx
+++ b/app/src/components/desktop/DesktopConnectionPage.tsx
@@ -281,9 +281,11 @@ export default function DesktopConnectionPage({
const body = (
<div className="space-y-4" data-testid="desktop-connection-page">
- <Alert variant="warning" density="compact" role={undefined}>
- <AlertDescription>{t('connections.earlyAlphaNotice')}</AlertDescription>
- </Alert>
+ {!embedded && (
+ <Alert variant="warning" density="compact" role={undefined}>
+ <AlertDescription>{t('connections.earlyAlphaNotice')}</AlertDescription>
+ </Alert>
+ )}
{loading && !status && <CenteredLoadingState label={t('common.loading')} />}
diff --git a/app/src/components/settings/panels/BrowserConnectionsPanel.tsx b/app/src/components/settings/panels/BrowserConnectionsPanel.tsx
index ca48a03e7d..724a10a445 100644
--- a/app/src/components/settings/panels/BrowserConnectionsPanel.tsx
+++ b/app/src/components/settings/panels/BrowserConnectionsPanel.tsx
@@ -29,11 +29,6 @@ type BrowserSettings = {
profile_path?: string | null;
download_dir?: string | null;
};
-type ModuleStatus = {
- id: string;
- state: 'available' | 'loading' | 'ready' | 'failed' | 'unsupported';
- detail?: string;
-};
const numericBounds = {
viewport_width: [320, 3840],
@@ -65,25 +60,18 @@ export default function BrowserConnectionsPanel({
}: BrowserConnectionsPanelProps = {}) {
const { t } = useT();
const [settings, setSettings] = useState<BrowserSettings>(defaults);
- const [module, setModule] = useState<ModuleStatus | null>(null);
const [chromeReady, setChromeReady] = useState<boolean | null>(null);
- const [billingRoute, setBillingRoute] = useState<'direct_openrouter' | 'hosted' | 'unavailable' | null>(null);
const [allowedDomains, setAllowedDomains] = useState<string[]>([]);
const [busy, setBusy] = useState(false);
const [message, setMessage] = useState('');
const refresh = useCallback(async () => {
- const [configResponse, moduleResponse] = await Promise.all([
- openhumanGetConfig(),
- callCoreRpc<{ result: { modules: ModuleStatus[] } }>({ method: 'openhuman.modules_list' }),
- ]);
+ const configResponse = await openhumanGetConfig();
const config = configResponse.result.config;
const browser = (config.browser ?? {}) as Partial<BrowserSettings>;
setSettings({ ...defaults, ...browser });
- setBillingRoute(configResponse.result.browser_billing_route ?? null);
const httpRequest = (config.http_request ?? {}) as { allowed_domains?: string[] };
setAllowedDomains(httpRequest.allowed_domains ?? []);
- setModule(moduleResponse.result.modules.find(item => item.id === 'tinycomputer') ?? null);
}, []);
useEffect(() => {
@@ -123,23 +111,6 @@ export default function BrowserConnectionsPanel({
}
};
- const testModule = async () => {
- setBusy(true);
- setMessage('');
- try {
- const response = await callCoreRpc<{ result: { module: ModuleStatus } }>({
- method: 'openhuman.modules_load',
- params: { id: 'tinycomputer' },
- });
- setModule(response.result.module);
- setMessage(response.result.module.detail ?? t('connections.browser.moduleChecked'));
- } catch (error) {
- setMessage(error instanceof Error ? error.message : String(error));
- } finally {
- setBusy(false);
- }
- };
-
const testBrowser = async () => {
setBusy(true);
setMessage('');
@@ -148,9 +119,6 @@ export default function BrowserConnectionsPanel({
result: { module_ready: boolean; chrome_ready: boolean; error?: string };
}>({ method: 'openhuman.modules_browser_check_readiness' });
setChromeReady(response.result.chrome_ready);
- if (response.result.module_ready) {
- setModule(current => (current ? { ...current, state: 'ready' } : current));
- }
setMessage(response.result.error ?? t('connections.browser.readinessChecked'));
} catch (error) {
setChromeReady(false);
@@ -179,25 +147,16 @@ export default function BrowserConnectionsPanel({
</div>
);
- const agenticRoute =
- billingRoute === 'direct_openrouter'
- ? t('connections.browser.routeDirect')
- : billingRoute === 'hosted'
- ? t('connections.browser.routeHosted')
- : t('connections.browser.unknown');
-
const body = (
<div className="max-w-5xl space-y-4 text-sm text-content">
- <Alert variant="warning" role={undefined}>
- <AlertDescription>{t('connections.earlyAlphaNotice')}</AlertDescription>
- </Alert>
- <Card title={t('connections.browser.module')} padded divided={false}>
+ {!embedded && (
+ <Alert variant="warning" role={undefined}>
+ <AlertDescription>{t('connections.earlyAlphaNotice')}</AlertDescription>
+ </Alert>
+ )}
+ <Card title={t('connections.browser.chrome')} padded divided={false}>
<div className="flex flex-wrap items-center justify-between gap-4">
<div className="flex flex-wrap items-center gap-3">
- <Badge variant={module?.state === 'ready' ? 'success' : 'neutral'}>
- {module?.state ?? t('connections.browser.unknown')}
- </Badge>
- <span className="text-content-muted">{t('connections.browser.chrome')}</span>
<Badge
variant={
chromeReady === true ? 'success' : chromeReady === false ? 'warning' : 'neutral'
@@ -210,16 +169,12 @@ export default function BrowserConnectionsPanel({
</Badge>
</div>
<div className="flex flex-wrap gap-2">
- <Button variant="secondary" size="sm" disabled={busy} onClick={testModule}>
- {t('connections.browser.testModule')}
- </Button>
<Button variant="secondary" size="sm" disabled={busy} onClick={testBrowser}>
{t('connections.browser.testBrowser')}
</Button>
</div>
</div>
- {module?.detail && <p className="mt-3 text-content-muted">{module.detail}</p>}
- <p className="mt-3 text-xs text-content-muted">{t('connections.browser.localOverride')}</p>
+ <p className="mt-3 text-xs text-content-muted">{t('connections.browser.chromeHint')}</p>
</Card>
<div className="grid gap-4 lg:grid-cols-2">
@@ -297,10 +252,7 @@ export default function BrowserConnectionsPanel({
</div>
<div className="flex flex-wrap items-center justify-between gap-3">
- <p className="text-content-muted">
- {t('connections.browser.jevRoute')}:{' '}
- <span className="font-medium text-content">{agenticRoute}</span>
- </p>
+ <span />
<Button disabled={busy} onClick={save}>
{t('connections.browser.save')}
</Button>