Skip to content

feat: add Honcho Cloud connection preset + sidebar health indicator#11

Merged
offendingcommit merged 2 commits into
mainfrom
claude/add-honcho-cloud-option-vk93o
May 15, 2026
Merged

feat: add Honcho Cloud connection preset + sidebar health indicator#11
offendingcommit merged 2 commits into
mainfrom
claude/add-honcho-cloud-option-vk93o

Conversation

@offendingcommit
Copy link
Copy Markdown
Owner

Summary

  • Adds a choose-type step to the settings flow so users can pick Honcho Cloud (https://api.honcho.dev, API key required) or Self-Hosted (URL + optional token) when creating a connection. Multi-instance support is already in the data layer, so cloud and self-hosted instances coexist freely.
  • Adds a sidebar health dot that polls the active instance every 30s via TanStack Query and shows a colored status badge (green = ok, amber = auth-required, red = unreachable, pulsing = checking).
  • Adds a one-shot localhost auto-detect probe on the first-run choose-type screen; if http://localhost:8000 responds, a "Detected Honcho at localhost:8000" banner appears that opens the Self-Hosted form pre-filled.

Why

api.honcho.dev was already advertised in openapi.json as 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_URL constant + isCloudInstance(...) helper in packages/web/src/lib/config.ts.
  • SettingsForm accepts a preset prop; cloud variant locks the endpoint and enforces an API key. Edit mode auto-detects the preset from the saved baseUrl.
  • InstancesManager gains a choose-type mode and a ConnectionTypeChooser subcomponent.
  • useHealthStatus() hook (refetchInterval: 30_000, refetchOnWindowFocus: true) and HealthDot component for status visualization.
  • The instance list renders a Cloud icon for cloud instances; URL is hidden in favor of "Honcho Cloud" label.

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 — clean
  • pnpm --filter @openconcho/web typecheck — clean
  • pnpm --filter @openconcho/web test — 11/11 pass (3 new unit-test files)
  • Manual: first-run with localStorage cleared → choose-type screen renders → "Honcho Cloud" path blocks save without API key, saves with key
  • Manual: Self-Hosted path renders editable URL, token optional, can save without token
  • Manual: edit a cloud instance → URL is locked, API key required
  • Manual: with a Honcho dev server on localhost:8000, first-run banner appears
  • Manual: sidebar dot polls and reflects status changes (kill the server, expect red within 30s)

https://claude.ai/code/session_016ASFQkNzX1hH1J3SNc5QAq


Generated by Claude Code

claude added 2 commits May 14, 2026 23:21
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
@offendingcommit offendingcommit marked this pull request as ready for review May 15, 2026 03:06
@offendingcommit offendingcommit merged commit 403ee48 into main May 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants