Commit Graph

114 Commits

Author SHA1 Message Date
148766312e fix: use template literal for metadata.name -> ReactNode compat 2026-07-07 20:52:33 -04:00
97ec6ccbae fix: cast metadata.name to string for ReactNode compat 2026-07-07 20:49:54 -04:00
9d32d32d38 fix: TS errors in API queries and session list
- page_size -> size to match API schema
- reverse -> filters.reverse to match SessionGet body type
- session.name -> session.metadata?.name (Session type has no name field)
2026-07-07 20:42:45 -04:00
a8f0828727 "fix-sort-and-display-name" 2026-07-07 20:42:45 -04:00
github-actions[bot]
b250492925 chore(release): 0.16.0 [skip ci]
# [0.16.0](https://github.com/offendingcommit/openconcho/compare/v0.15.0...v0.16.0) (2026-06-10)

### Bug Fixes

* **ci:** replace userEvent.selectOptions with fireEvent.change; bump setup-node to v6 ([1c28cae](1c28cae3f2))
* **dashboard:** guard setMetricsById against same-value calls to end loop ([3b88a41](3b88a41afd))
* **dashboard:** remove lastSeen from metrics useMemo deps to break render loop ([f79cdaf](f79cdafba7))
* **dashboard:** use primitive deps in onMetrics effect to break render loop ([9cc8637](9cc8637dc7))
* **test:** remove unused within import from fleet.test.tsx ([36fb6ee](36fb6ee519))
* **web:** break metricsEqual lastSeen dep-loop; add staleTime to test ([173f096](173f096e33))
* **web:** reset serverFilter when the selected instance is removed ([699ec38](699ec38480))
* **web:** stop Sidebar re-render loop from cache-event subscriber ([7e529c8](7e529c8c44))

### Features

* **web:** merge Fleet into a server-filterable Dashboard ([e66f927](e66f927f89)), closes [#54](https://github.com/offendingcommit/openconcho/issues/54)
* **web:** redirect /fleet to Dashboard; update fleet tests ([da126b2](da126b2e74))
2026-06-10 12:20:29 +00:00
Offending Commit
7e529c8c44 fix(web): stop Sidebar re-render loop from cache-event subscriber
setNow(Date.now()) was called on every query-cache event, including
events dispatched synchronously during ServerWorkspaceRows' render.
On CI, consecutive Date.now() calls cross millisecond boundaries so
each call returns a new value — React always re-renders Sidebar, which
re-renders the layout, which re-renders ServerWorkspaceRows, which
fires more cache events. After ~25 cycles React throws "Maximum update
depth exceeded."

Fix: remove setNow from the cache subscriber. setNow now fires only
from the 30s interval timer, where it correctly refreshes the "X ago"
display text without triggering a render loop.

Also adds a deterministic CI-repro test that mocks Date.now to return
incrementing values and asserts the filter-change path completes without
looping.
2026-06-03 18:11:30 -05:00
Offending Commit
3b88a41afd fix(dashboard): guard setMetricsById against same-value calls to end loop
Even with primitive useEffect deps, TanStack Query or React concurrent
rendering can cause onMetrics to fire with identical values mid-render-cycle.
Add a ref-based equality check in Dashboard.onMetrics: if all five metric
values are unchanged, skip setMetricsById entirely — no state update, no
Dashboard re-render, loop terminates.

Also fixes vi.fn<TFunction>() typing in server-workspace-rows.test.tsx to
satisfy tsc (Vitest 4 single-type-arg signature).
2026-06-03 17:48:22 -05:00
Offending Commit
9cc8637dc7 fix(dashboard): use primitive deps in onMetrics effect to break render loop
Using a metrics object as a useEffect dep causes the loop:
  onMetrics → setMetricsById → Dashboard re-renders → ServerWorkspaceRows
  re-renders → useQueries runs → TanStack Query cache subscriber fires
  (Sidebar's setNow) → query result objects are new references → metrics
  useMemo returns new object → effect dep changed → onMetrics again → ∞

Fix: depend on the five primitive values (workspaceCount, conclusionCount,
queueActive, queuePending, health) directly. React compares primitives by
value, so the effect only fires when actual data changes, not on reference
churn from re-renders.

Also adds server-workspace-rows.test.tsx with three focused unit tests:
correct health:ok report, stability after load (no re-fire), and health
transition coverage.
2026-06-03 17:48:21 -05:00
Offending Commit
e59bfd908a Merge branch 'main' into feat/dashboard-fleet-merge 2026-06-03 17:28:52 -05:00
Offending Commit
3c99af7143 refactor(dashboard): drop unused lastSeen local var after metrics fix 2026-06-03 17:27:55 -05:00
Offending Commit
f79cdafba7 fix(dashboard): remove lastSeen from metrics useMemo deps to break render loop
lastSeen tracked workspacesQ.dataUpdatedAt which updates on every background
refetch, creating a new metrics object reference each cycle. The useEffect
dep on metrics then fired unconditionally, calling onMetrics → setMetricsById
→ Dashboard re-render → another refetch → infinite loop.

computeFleetAggregates never reads lastSeen, so reporting it upward was
pointless. Hardcode null and drop it from the dep array entirely.
2026-06-03 17:27:42 -05:00
Offending Commit
36fb6ee519 fix(test): remove unused within import from fleet.test.tsx 2026-06-03 17:10:32 -05:00
Offending Commit
da126b2e74 feat(web): redirect /fleet to Dashboard; update fleet tests
/fleet now redirects to / so bookmarks and muscle-memory links land on the
unified Dashboard rather than a 404-style dead route. Fleet tests updated
to assert the redirect and the per-instance rows the Dashboard renders.
2026-06-03 17:10:02 -05:00
Offending Commit
699ec38480 fix(web): reset serverFilter when the selected instance is removed
If the user filters to a specific server and that instance is then deleted
(e.g. from Settings), shownInstances becomes [] — empty table, no message.
A useEffect resets the filter to ALL_SERVERS whenever the selected ID
disappears from the instances list.
2026-06-03 17:03:10 -05:00
Offending Commit
173f096e33 fix(web): break metricsEqual lastSeen dep-loop; add staleTime to test
Remove lastSeen from metricsEqual in ServerWorkspaceRows: computeFleetAggregates
never reads lastSeen, so comparing it in metricsEqual causes background TanStack
Query refetches (dataUpdatedAt changes) to trigger spurious onMetrics callbacks,
cascading into a Dashboard → ServerWorkspaceRows render loop that hits React's
100-render limit in CI.

Add staleTime: Infinity to the test QueryClient to prevent background refetches
from interfering with test assertions.
2026-06-03 17:01:19 -05:00
Offending Commit
1c28cae3f2 fix(ci): replace userEvent.selectOptions with fireEvent.change; bump setup-node to v6
userEvent.selectOptions hangs in jsdom when firing pointer + change event
sequences — fireEvent.change fires the React-controlled onChange directly
and is deterministic. Removes userEvent import (no longer used).

Bump actions/setup-node from v4 to v6 to clear the Node.js 20 deprecation
warning on GitHub Actions runners.
2026-06-03 16:41:40 -05:00
github-actions[bot]
2a6ddb9f78 chore(release): 0.15.0 [skip ci]
# [0.15.0](https://github.com/offendingcommit/openconcho/compare/v0.14.0...v0.15.0) (2026-06-03)

### Bug Fixes

* **helm:** guard tmpfs blocks when empty, cap volume names at 63 chars ([d5a65d7](d5a65d73b5))
* **helm:** pdb mutual exclusion, ingress null rules guard, hpa nil utilization guard ([b4939bd](b4939bd57f))
* **helm:** pin busybox:1.36, add -T 10 timeout, use --spider, add activeDeadlineSeconds ([8fac5d0](8fac5d060f))
* **helm:** use http://json-schema.org/draft-07/schema# for Helm compatibility ([8d41455](8d41455e39))

### Features

* **helm:** add _helpers.tpl with name, label, and imageTag partials ([0268275](02682750ab))
* **helm:** add Deployment template with read-only FS, tmpfs, probes ([514e1d4](514e1d46c0))
* **helm:** add NOTES.txt with access instructions and NetworkPolicy/Ingress warning ([ce211df](ce211df48c))
* **helm:** add optional HPA, PDB, and NetworkPolicy templates ([b0b648b](b0b648bdcf))
* **helm:** add optional Ingress template ([9aa106c](9aa106cede))
* **helm:** add Service and ServiceAccount templates ([ee916ea](ee916eabc4))
* **helm:** add test-healthz and test-spa-root helm test jobs ([ee4630e](ee4630e79c))
* **helm:** chart scaffold — Chart.yaml, values, schema ([4112270](411227046a))
2026-06-03 21:37:08 +00:00
Offending Commit
e66f927f89 feat(web): merge Fleet into a server-filterable Dashboard
Implements Phase 1 of the UI navigation rework (docs/superpowers/specs/
2026-06-02-ui-navigation-rework.md): the Dashboard now lists every workspace
across every configured server as <workspace> (<server>), filterable by server,
with cross-server aggregate cards (reusing computeFleetAggregates). Opening a
workspace activates its server then drills into the existing detail route.
Per-server fan-out lives in a ServerWorkspaceRows child (rules-of-hooks safe,
mirrors FleetRow). Fleet removed from the sidebar nav; the /fleet route is left
intact for now (full removal deferred to avoid churning fleet.test.tsx while #54
is open).
2026-06-02 16:41:51 -05:00
Offending Commit
3677575f65 Merge pull request #57 from offendingcommit/chore/deps-consolidated
chore(deps): consolidate Dependabot PRs #34-53 + widen grouping
2026-06-02 15:41:21 -05:00
Offending Commit
85b56ca0f8 chore(deps): consolidate dependency bumps (supersedes #34-53)
npm (lockfile + catalog): tanstack, @tauri-apps/*, turbo 2.9.x, biome, vite,
@vitejs/plugin-react, vitest+coverage-v8 4.1.8 (lockstep), @playwright/test,
and jsdom 26->29 (major). cargo: tauri 2.11.2, tauri-plugin-http 2.5.9,
tauri-build 2.6.2, serde_json. github-actions: docker setup-qemu v4,
setup-buildx v4, build-push v7. Validated: make ci-web, cargo-check, actionlint.
2026-06-02 15:38:22 -05:00
github-actions[bot]
c474767ba1 chore(release): 0.14.0 [skip ci]
# [0.14.0](https://github.com/offendingcommit/openconcho/compare/v0.13.1...v0.14.0) (2026-06-02)

### Bug Fixes

* **docker:** derive nginx resolver from container DNS ([66b299a](66b299a28e))
* **docker:** drop dead HONCHO_UPSTREAM and same-origin default ([a2854ab](a2854ab8ea))
* **web:** enforce upstream allowlist in vite dev proxy ([b4fac95](b4fac95f37))
* **web:** raise connection-test timeout for cold upstreams ([409d7d8](409d7d8be7))
* **web:** strip content-encoding from vite dev proxy responses ([6b602c0](6b602c05bb))

### Features

* **docker:** header-driven /api reverse proxy in nginx ([753c978](753c978f56))
* **docker:** render SSRF allowlist map from env ([0af1ad9](0af1ad923c))
* **docker:** split compose into dev-forward build and prod pull ([c9bd2db](c9bd2db07d))
* **web:** add dispatchFor transport helper for same-origin proxy ([9945e4c](9945e4cf14))
* **web:** dev /api proxy middleware mirroring nginx ([ab8a1ba](ab8a1ba866))
* **web:** route checkConnection and discovery through the proxy ([9893230](9893230cde))
* **web:** route web build through same-origin /api proxy ([0935099](0935099bc2))
2026-06-02 20:20:40 +00:00
Offending Commit
5a2543592a Merge pull request #54 from offendingcommit/feat/web-api-proxy
feat(web): eliminate browser CORS via header-driven /api proxy
2026-06-02 15:19:32 -05:00
Offending Commit
239eb3327a test(web): use a documentation IP instead of a tailnet-range fixture
Swap the 100.x CGNAT example for 192.0.2.10 (RFC 5737 TEST-NET-1) in the
token-transport guard tests — keeps the non-loopback-HTTP assertion, drops an
environment-specific address.
2026-06-02 15:11:17 -05:00
Offending Commit
3ea6a73833 test(web): cover instance store CRUD and legacy migration
Closes the multi-instance coverage gap: add (first becomes active, later adds
don't steal focus, insertion order), switch (incl. unknown-id no-op), delete
(active->first-remaining fallback, non-active unchanged, last clears active),
update (patch + unknown-id no-op), active config, and legacy-key migration.
2026-06-02 14:36:23 -05:00
Offending Commit
96dff8900e refactor(web): use top-level z.url() over deprecated z.string().url()
Zod v4 deprecates the chained .url() in favor of the top-level format validator.
2026-06-02 14:31:40 -05:00
Offending Commit
409d7d8be7 fix(web): raise connection-test timeout for cold upstreams
A cold/idle self-hosted Honcho can take ~5s on its first request (DB pool, tunnel
wake); the hardcoded 5s budget aborted just before the response and reported a
live instance as 'Connection timed out'. Extract CONNECTION_TIMEOUT_MS (15s),
make checkConnection's timeout injectable, and cover the budget behavior.
2026-06-02 14:18:19 -05:00
Offending Commit
6b602c05bb fix(web): strip content-encoding from vite dev proxy responses
undici fetch auto-decompresses the body, so re-sending the upstream
content-encoding/length would cause ERR_CONTENT_DECODING_FAILED if Honcho
gzips. Drop those and hop-by-hop headers when relaying. nginx is unaffected.
2026-06-02 13:28:32 -05:00
Offending Commit
b4fac95f37 fix(web): enforce upstream allowlist in vite dev proxy
Mirrors the nginx allowlist (spec section D) so make dev-web matches prod: when
OPENCONCHO_UPSTREAM_ALLOWLIST is set, non-matching upstreams get 403 +
X-Honcho-Proxy-Reject; unset stays open.
2026-06-02 13:25:12 -05:00
Offending Commit
ab8a1ba866 feat(web): dev /api proxy middleware mirroring nginx 2026-06-02 13:13:48 -05:00
Offending Commit
b29fa240a6 refactor(web): drop same-origin sentinel from runtime config 2026-06-02 11:53:42 -05:00
Offending Commit
9893230cde feat(web): route checkConnection and discovery through the proxy 2026-06-02 11:52:17 -05:00
Offending Commit
0935099bc2 feat(web): route web build through same-origin /api proxy
client.current and createScopedClient resolve transport via dispatchFor:
web -> absolute origin + /api base with an X-Honcho-Upstream header; Tauri ->
absolute instance URL + reqwest. Absolute base (not bare "/api") so openapi-fetch
can construct a Request under node/undici and in the browser alike. Fleet fan-out
is unchanged; fleet.test.tsx now asserts the proxy contract.
2026-06-02 11:48:13 -05:00
Offending Commit
9945e4cf14 feat(web): add dispatchFor transport helper for same-origin proxy 2026-06-02 11:38:58 -05:00
Offending Commit
d4452abcea refactor(web): extract isTauri into a leaf platform module 2026-06-02 11:36:21 -05:00
github-actions[bot]
239d70f2b6 chore(release): 0.13.1 [skip ci]
## [0.13.1](https://github.com/offendingcommit/openconcho/compare/v0.13.0...v0.13.1) (2026-05-29)

### Bug Fixes

* **docker:** make docker-compose runnable standalone ([fde4836](fde483657f))
2026-05-29 16:49:55 +00:00
github-actions[bot]
801555222e chore(release): 0.13.0 [skip ci]
# [0.13.0](https://github.com/offendingcommit/openconcho/compare/v0.12.1...v0.13.0) (2026-05-28)

### Features

* **docker:** full self-hosted Compose support ([282ba1b](282ba1b76c))
* **web:** add Fleet dashboard view for cross-instance observability ([12712bb](12712bb0b0))
* **web:** configurable peer display name ([3de6832](3de6832a5d))
2026-05-28 22:10:34 +00:00
Offending Commit
04104d1f92 Merge pull request #43 from offendingcommit/feat/docker-compose-support
feat(docker): full self-hosted Compose support
2026-05-28 17:09:23 -05:00
Offending Commit
ab69b0045f Merge pull request #42 from offendingcommit/feat/fleet-dashboard
feat(web): add Fleet dashboard for cross-instance observability
2026-05-28 17:08:35 -05:00
Offending Commit
282ba1b76c feat(docker): full self-hosted Compose support
Make the web image drop-in for a Honcho docker-compose stack:
- nginx reverse-proxies /v3 and /health to $HONCHO_UPSTREAM (variable +
  Docker resolver so it starts even before the upstream resolves), giving
  the SPA a same-origin path to Honcho with no browser CORS.
- Runtime config: an entrypoint writes config.js from
  OPENCONCHO_DEFAULT_HONCHO_URL, so one prebuilt image targets any backend
  ("same-origin" | absolute URL | empty). SPA seeds a first-run default
  instance from it (additive; no-op in dev/desktop).
- docker-compose.yml example service + GHCR multi-arch publish workflow on
  release.
- nginx.conf -> envsubst template; docs rewritten.

Closes #21. Closes #31.
2026-05-28 16:06:03 -05:00
Agents
37eb9bdf59 test(web): add E2E for Fleet route nav + per-instance row render
Two focused Playwright tests, mirroring the existing sidebar.spec
pattern (no backend dependency — instances point at unreachable ports
and we only assert on rendered names + row count, not health):

- Fleet link in the sidebar navigates to /fleet
- /fleet renders one row per configured instance under the table role

Also adds a Fleet link assertion to the existing sidebar.spec so the
nav entry is covered on the dashboard route alongside the other top
links. Both new tests run under the existing `pnpm test:e2e` (not
gated in CI by design — matches the current Compare/Dashboard E2E
posture).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 15:57:17 -05:00
Agents
12712bb0b0 feat(web): add Fleet dashboard view for cross-instance observability
Adds a new /fleet route that shows a fleet-wide overview of all
configured Honcho instances. Each row renders per-instance metrics
(workspace count, total conclusions, queue activity, last seen, health)
by fanning out scoped fetches via createScopedClient, and aggregates
into top-level metric cards.

Reuses the Phase 2 scoped-client pattern. Extends compareQueries.ts
with useScopedQueueStatus and useScopedConclusionsCount, plus option
builders so useQueries can fan out per-workspace requests inside
FleetRow without duplicating query logic.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 15:57:17 -05:00
Offending Commit
3de6832a5d feat(web): configurable peer display name
Human peers surface as raw ids (WhatsApp `…-lid`, UUIDs). Read an
optional `display_name` from peer metadata and prefer it over the id in
the peer header and breadcrumb, with the raw id kept as a sub-caption.
An inline edit on the header writes `display_name` via useUpdatePeer
(merging existing metadata); blank clears it. Falls back to the id when
unset.

Closes #32.
2026-05-28 15:56:42 -05:00
github-actions[bot]
dd2edbae99 chore(release): 0.12.1 [skip ci]
## [0.12.1](https://github.com/offendingcommit/openconcho/compare/v0.12.0...v0.12.1) (2026-05-28)

### Bug Fixes

* **ci:** trigger release build on release publish, not tag push ([52a7f09](52a7f09ce6))
2026-05-28 20:33:28 +00:00
github-actions[bot]
5fa894dcd7 chore(release): 0.12.0 [skip ci]
# [0.12.0](https://github.com/offendingcommit/openconcho/compare/v0.11.0...v0.12.0) (2026-05-28)

### Features

* **desktop:** auto-discover Honcho instances on localhost ([#1](https://github.com/offendingcommit/openconcho/issues/1)) ([7355884](7355884051))
* **web:** add dialectic reasoning playground ([2340e65](2340e65028))
* **web:** add Dream Output Viewer ([f318555](f318555c82))
* **web:** add live dream progress panel with adaptive polling ([17f8a5a](17f8a5a7bf))
* **web:** add Peer Card Seed Kits ([650bfd7](650bfd7b28))
* **web:** show sidebar last updated status ([7cf94aa](7cf94aa03f))
2026-05-28 19:27:43 +00:00
Offending Commit
0d86a96560 Merge pull request #28 from offendingcommit/feat/dialectic-playground
feat(web): add dialectic reasoning playground
2026-05-28 14:26:39 -05:00
Offending Commit
f52961a112 Merge pull request #27 from offendingcommit/feat/dream-viewer
feat(web): add dream output viewer
2026-05-28 14:25:45 -05:00
Offending Commit
a17b5776be Merge pull request #20 from offendingcommit/feat/peer-card-seed-kits
feat(web): add peer card seed kits
2026-05-28 14:24:48 -05:00
Offending Commit
7d2f7209ea Merge pull request #29 from offendingcommit/feat/live-dream-progress
feat(web): add live dream progress panel with adaptive polling
2026-05-28 14:23:55 -05:00
Offending Commit
aa46d47fc8 Merge pull request #30 from offendingcommit/feat/desktop-auto-discover
feat(desktop): auto-discover Honcho instances on localhost
2026-05-28 14:23:49 -05:00
Offending Commit
972fd8323a Merge pull request #18 from offendingcommit/feat/sidebar-last-updated
feat(web): show sidebar last-updated status
2026-05-28 14:22:54 -05:00