[hero_planner admin/web] live RPC posts bare /api/rpc; spec mandates /api/{domain}/rpc #19

Closed
opened 2026-06-14 15:00:45 +00:00 by sameh-farouk · 1 comment
Member

The admin "Live peer call" and the connection-status indicator post JSON-RPC to bare /api/rpc (shared window.rpc, rpc_url = {base}/api/rpc). The backend serves the single domain at /api/main/rpc (per hero_sockets.md the scheme is /api/{domain}/rpc). Live calls return -32000 Backend unavailable and the UI shows "backend down" (screenshot).

Follow-on to the earlier rpc_url fix (which moved it off the dead /rpc-peer): the value is now /api/rpc but still not domain-scoped. Planner can set its own rpc_url to the resolved /api/main/rpc, but the shared admin panes (api_docs/jobs/logs) also hardcode bare /api/rpc — see the hero_lib issue.

screenshot

The admin "Live peer call" and the connection-status indicator post JSON-RPC to bare `/api/rpc` (shared `window.rpc`, `rpc_url = {base}/api/rpc`). The backend serves the single domain at `/api/main/rpc` (per `hero_sockets.md` the scheme is `/api/{domain}/rpc`). Live calls return `-32000 Backend unavailable` and the UI shows "backend down" (screenshot). Follow-on to the earlier `rpc_url` fix (which moved it off the dead `/rpc-peer`): the value is now `/api/rpc` but still not domain-scoped. Planner can set its own `rpc_url` to the resolved `/api/main/rpc`, but the shared admin panes (api_docs/jobs/logs) also hardcode bare `/api/rpc` — see the hero_lib issue. ![screenshot](https://forge.ourworld.tf/attachments/eb9858e1-dba8-4717-920c-3c4493aac8af)
Author
Member

Fixed on development in 7456769.

The admin now derives rpc_url from the resolved domain ({base}/api/main/rpc), matching hero_sockets.md's /api/{domain}/rpc scheme, instead of the bare /api/rpc. Live RPC — the overview "Call ping" and the connection-status indicator — now succeed.

Verified via the hero_router tunnel: indicator green, live Call ping -> true, 0 console errors.

Remaining (separate): the shared api-docs "Try" button still posts bare /api/rpc — that's the shared hero_lifecycle component, tracked in #151 (hero_lib).

Fixed on `development` in `7456769`. The admin now derives `rpc_url` from the resolved domain (`{base}/api/main/rpc`), matching `hero_sockets.md`'s `/api/{domain}/rpc` scheme, instead of the bare `/api/rpc`. Live RPC — the overview "Call ping" and the connection-status indicator — now succeed. Verified via the hero_router tunnel: indicator green, live `Call ping` -> `true`, 0 console errors. **Remaining (separate):** the shared api-docs "Try" button still posts bare `/api/rpc` — that's the shared `hero_lifecycle` component, tracked in #151 (hero_lib).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_planner#19
No description provided.