The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): add dismiss affordance to the failed install footer
chelsealong6f8dd59620e7
diff --git a/apps/desktop/src/components/desktop-install-overlay.test.tsx b/apps/desktop/src/components/desktop-install-overlay.test.tsxindex 44fa21ff30e..1039e6e4ace 100644--- a/apps/desktop/src/components/desktop-install-overlay.test.tsx+++ b/apps/desktop/src/components/desktop-install-overlay.test.tsx@@ -33,6 +33,7 @@ function installDesktopMock(state: DesktopBootstrapState) {return () => bootstrapListeners.delete(listener)}),continueBootstrapLocal: vi.fn().mockResolvedValue({ ok: true }),+ resetBootstrap: vi.fn().mockResolvedValue({ ok: true }),probeConnectionConfig: vi.fn(),testConnectionConfig: vi.fn(),applyConnectionConfig: vi.fn(),@@ -545,6 +546,31 @@ describe('DesktopInstallOverlay first-run setup', () => {await waitFor(() => expect(screen.queryByText('Gateway URL')).toBeNull())expect(screen.queryByText('Hermes needs a one-time install')).toBeNull()})++ it('dismisses a cancelled/failed install via the footer Close button, without reloading or resetting bootstrap', async () => {+ const desktop = installDesktopMock(bootstrapState({ error: 'cancelled by user' }))++ render(<DesktopInstallOverlay />)++ expect(await screen.findByText('Installation failed')).toBeTruthy()++ fireEvent.click(screen.getByText('Close'))++ await waitFor(() => expect(screen.queryByText('Installation failed')).toBeNull())+ expect(desktop.resetBootstrap).not.toHaveBeenCalled()+ })++ it('dismisses a failed install on Escape', async () => {+ installDesktopMock(bootstrapState({ error: 'cancelled by user' }))++ render(<DesktopInstallOverlay />)++ expect(await screen.findByText('Installation failed')).toBeTruthy()++ fireEvent.keyDown(window, { key: 'Escape' })++ await waitFor(() => expect(screen.queryByText('Installation failed')).toBeNull())+ })})it.each([diff --git a/apps/desktop/src/components/desktop-install-overlay.tsx b/apps/desktop/src/components/desktop-install-overlay.tsxindex 0ac53fa9156..128f6cd05cb 100644--- a/apps/desktop/src/components/desktop-install-overlay.tsx+++ b/apps/desktop/src/components/desktop-install-overlay.tsx@@ -367,6 +367,25 @@ export function DesktopInstallOverlay({ enabled = true }: DesktopInstallOverlayP}}, [state.error])+ // Escape dismisses a failed install the same way the footer's Close button+ // does -- local-only, no resetBootstrap + reload. Scoped to the failed+ // state so a running install is still only cancellable via its own button.+ useEffect(() => {+ if (!state.error) {+ return+ }++ const onKeyDown = (event: KeyboardEvent) => {+ if (event.key === 'Escape') {+ setState(EMPTY_STATE)+ }+ }++ window.addEventListener('keydown', onKeyDown)++ return () => window.removeEventListener('keydown', onKeyDown)+ }, [state.error])+// The choice remains mounted while main hands off to local bootstrap. Once// a manifest/failure takes ownership (or a later repair presents a fresh// choice), this transient button state must not leak across phases — so it@@ -712,6 +731,9 @@ export function DesktopInstallOverlay({ enabled = true }: DesktopInstallOverlayP<code className="font-mono text-(--ui-text-secondary)">%LOCALAPPDATA%\hermes\logs\</code></span><div className="flex gap-2">+ <Button onClick={() => setState(EMPTY_STATE)} size="sm" variant="ghost">+ {t.common.close}+ </Button><ButtononClick={() => void window.hermesDesktop?.revealLogs?.().catch(() => undefined)}size="sm"