[webserver-admin] jobs/logs/terminal panes POST data to bare /api/rpc (-32601 on control-plane peers) — #151 gap #155

Closed
opened 2026-06-15 08:20:51 +00:00 by sameh-farouk · 1 comment
Member

Symptom

The shared jobs, logs, and terminal admin panes (hero_lifecycle webserver-admin) hardcode their rpc_url to the bare control-plane /api/rpc:

  • components/jobs/mod.rsJobsPane::from_app
  • components/logs/mod.rsLogsPane::with_prefix
  • components/terminal/mod.rsTerminalPane::from_app

Their web components (<hero-jobs-viewer>, <hero-logs-pane>, <hero-terminal>) POST data methods (job.list, log queries, etc.) to that URL. Post-#151 the bare /api/rpc is the control plane — it answers only ping/discover_domains and returns -32601 Method not found for data. So these panes are broken against any control-plane peer, exactly like the api-docs pane was in #151. They were the panes #151 missed.

Impact

No current consumer mounts these shared panes against a control-plane peer (hero_proc's admin uses its own per-domain rpc-peer wiring), so nothing is broken in practice today — but a future single-domain admin using the shared JobsPane/LogsPane/TerminalPane would hit it. Filing + fixing defensively to close the #151 gap.

Fix

Mirror the #151 api-docs pane fix: resolve the peer's domain via app.openrpc_domains(bp) and scope rpc_url to /api/{domain}/rpc (the admin proxy forwards that verbatim to the peer's rpc.sock, which dispatches data). The three constructors become async (like ApiDocsPane::from_app) and the pane handlers .await them. Falls back to main when no domain is discovered.

## Symptom The shared **jobs**, **logs**, and **terminal** admin panes (`hero_lifecycle` webserver-admin) hardcode their `rpc_url` to the bare control-plane `/api/rpc`: - `components/jobs/mod.rs` — `JobsPane::from_app` - `components/logs/mod.rs` — `LogsPane::with_prefix` - `components/terminal/mod.rs` — `TerminalPane::from_app` Their web components (`<hero-jobs-viewer>`, `<hero-logs-pane>`, `<hero-terminal>`) POST data methods (`job.list`, log queries, etc.) to that URL. Post-#151 the bare `/api/rpc` is the control plane — it answers only `ping`/`discover_domains` and returns `-32601 Method not found` for data. So these panes are broken against any control-plane peer, **exactly like the api-docs pane was in #151**. They were the panes #151 missed. ## Impact No current consumer mounts these shared panes against a control-plane peer (hero_proc's admin uses its own per-domain `rpc-peer` wiring), so nothing is broken in practice today — but a future single-domain admin using the shared `JobsPane`/`LogsPane`/`TerminalPane` would hit it. Filing + fixing defensively to close the #151 gap. ## Fix Mirror the #151 api-docs pane fix: resolve the peer's domain via `app.openrpc_domains(bp)` and scope `rpc_url` to `/api/{domain}/rpc` (the admin proxy forwards that verbatim to the peer's `rpc.sock`, which dispatches data). The three constructors become `async` (like `ApiDocsPane::from_app`) and the pane handlers `.await` them. Falls back to `main` when no domain is discovered.
Author
Member

Fixed on development (squash). The jobs/logs/terminal pane constructors now resolve the peer's domain via app.openrpc_domains(bp) and scope rpc_url to /api/{domain}/rpc — mirroring the #151 api-docs pane fix; the admin proxy forwards that verbatim to the peer's rpc.sock, which dispatches data. The constructors are async now (JobsPane::from_app, LogsPane::with_prefix/from_app, TerminalPane::from_app) and the pane handlers .await them; falls back to main when no domain is discovered.

Verified: hero_lifecycle builds --features webserver-admin; 51/51 lib tests pass serially; the only callers of these constructors are the internal pane handlers (no external callers). No live consumer mounts these shared panes against a control-plane peer today, so this is a defensive close of the gap #151 left.

Fixed on `development` (squash). The jobs/logs/terminal pane constructors now resolve the peer's domain via `app.openrpc_domains(bp)` and scope `rpc_url` to `/api/{domain}/rpc` — mirroring the #151 api-docs pane fix; the admin proxy forwards that verbatim to the peer's `rpc.sock`, which dispatches data. The constructors are `async` now (`JobsPane::from_app`, `LogsPane::with_prefix`/`from_app`, `TerminalPane::from_app`) and the pane handlers `.await` them; falls back to `main` when no domain is discovered. **Verified:** `hero_lifecycle` builds `--features webserver-admin`; 51/51 lib tests pass serially; the only callers of these constructors are the internal pane handlers (no external callers). No live consumer mounts these shared panes against a control-plane peer today, so this is a defensive close of the gap #151 left.
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_lib#155
No description provided.