fix patch gateway feat/phase-2g-bundle #81 / 100
AI Agent git-import/068377df · 85 days ago · May 2, 2026 · Diff

fix(gateway): proxy GET /api/v1/index/status to bridge (UI status line)

The Hub UI's "Last indexed: N minutes ago" line stayed empty after PR #205 because the gateway never forwarded the new endpoint to the bridge. Express returned 404 to the browser, the JS error handler swallowed it, and the span next to the Re-index button was cleared.

Diagnostic that confirmed it (browser console after re-index on Business vault):

GET https://knowtation-gateway.netlify.app/api/v1/index/status → 404 (Not Found) → at hubLoadIndexStatus → at api()

The bridge route (`hub/bridge/server.mjs:2058`) was deployed and tested in PR #205, but the gateway-side companion handler was missed during that PR. This commit adds the missing proxy entry and a contract test (`test/gateway-index-status-proxy.test.mjs`) so the same regression cannot recur — the test asserts both that the path is forwarded with auth/vault headers AND that the route does NOT run the billing gate (the sidecar read must stay free; the Hub UI calls it on every page load).

Tests: 1895 / 1894 pass / 0 fail / 1 skipped (1893 prior + 2 new). Lint clean. No secrets in diff.

sha256:2ddcacd48805c1f9213cb882297a387267e0c9052f9c1387f3ec89822a656a96 sha
sha256:f28547f3b767df604e31638771e8b5653fd8f9f53fa8cac0474d247c1500004c snapshot

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:2ddcacd48805c1f9213cb882297a387267e0c9052f9c1387f3ec89822a656a96 --body "your comment"