feat: add Honcho Cloud connection preset + sidebar health indicator#11
Merged
Merged
Conversation
Adds a "choose-type" step to the settings flow so users can pick between Honcho Cloud (https://api.honcho.dev, API key required) and Self-Hosted (URL + optional token) when creating a connection. Multi-instance support already exists in the data layer, so cloud and self-hosted instances can coexist. - new HONCHO_CLOUD_URL constant and isCloudInstance helper in config.ts - SettingsForm accepts a preset prop; cloud variant locks the endpoint and enforces an API key - InstancesManager gains a ConnectionTypeChooser entry point and renders a Cloud icon for cloud instances in the list - unit tests for both preset paths and cloud edit-mode detection
Surfaces live connection health for the active instance in the sidebar and probes localhost:8000 on the first-run choose-type screen so users running Honcho locally can connect in one tap. - useHealthStatus hook polls checkConnection every 30s via TanStack Query - HealthDot component renders a colored status dot with tooltip - choose-type screen silently probes http://localhost:8000 once; on success it surfaces a "Detected Honcho at localhost:8000 — tap to connect" banner that opens the self-hosted form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
http://localhost:8000responds, a "Detected Honcho at localhost:8000" banner appears that opens the Self-Hosted form pre-filled.Why
api.honcho.devwas already advertised inopenapi.jsonas the production SaaS server, but the UI only spoke to it via the manual URL form. New users on Cloud now get a one-tap path; users running Honcho locally get the same. Health visibility was previously absent — you had to navigate to Settings and click "Test" to know if the active instance was alive.Implementation notes
HONCHO_CLOUD_URLconstant +isCloudInstance(...)helper inpackages/web/src/lib/config.ts.SettingsFormaccepts apresetprop; cloud variant locks the endpoint and enforces an API key. Edit mode auto-detects the preset from the saved baseUrl.InstancesManagergains achoose-typemode and aConnectionTypeChoosersubcomponent.useHealthStatus()hook (refetchInterval: 30_000,refetchOnWindowFocus: true) andHealthDotcomponent for status visualization.Out of scope (filed as separate issue)
Cross-instance dashboard aggregation — surfaced as a real refactor (parameterize ~20 query hooks, scope query keys by instanceId, add per-instance client factory, sidebar fan-out UI). Tracked separately so it can be reviewed on its own.
Test plan
pnpm --filter @openconcho/web lint— cleanpnpm --filter @openconcho/web typecheck— cleanpnpm --filter @openconcho/web test— 11/11 pass (3 new unit-test files)localStoragecleared → choose-type screen renders → "Honcho Cloud" path blocks save without API key, saves with keyhttps://claude.ai/code/session_016ASFQkNzX1hH1J3SNc5QAq
Generated by Claude Code