[hero_planner_web] Web UI broken after oschema cutover — data RPC calls 404 #18

Open
opened 2026-06-14 15:00:43 +00:00 by sameh-farouk · 5 comments
Member

After the oschema-first migration of hero_planner_server/_admin/_sdk, the browser web UI (hero_planner_web) was left on the pre-migration RPC scheme, so the live app at /hero_planner/web/ is unusable.

Observed (screenshot): workspace.list failed Error: HTTP 404; repeated rpc/rpc 404; no data renders; shared widget assets 404.

Root cause:

  • main.rs builds RPC_URL = {svc_base}/rpc/rpc and OPENRPC_URL = {svc_base}/rpc/openrpc.json (pre-migration paths). The server now serves under /api/{domain}/..., so these 404.
  • index.html calls 31 dotted method names (workspace.list, cost.create, comment.add, currency_rate.upsert, ...) that no longer exist; the migrated server exposes underscore names with _set-upsert semantics.
  • widget assets (agent-widget.*, voice-widget.*) are served by hero_orchestrator/hero_voice (not running here) — external, noted for completeness.

Approach note: per dioxus_openrpc_client / hero_admin_dioxus, the hand-rolled JS UI is the legacy pattern; intended replacement is a Dioxus/WASM UI using the typed generated openrpc_client!. Scope (stopgap vs Dioxus rewrite) TBD.

screenshot

After the oschema-first migration of `hero_planner_server`/`_admin`/`_sdk`, the browser web UI (`hero_planner_web`) was left on the pre-migration RPC scheme, so the live app at `/hero_planner/web/` is unusable. **Observed (screenshot):** `workspace.list failed Error: HTTP 404`; repeated `rpc/rpc 404`; no data renders; shared widget assets 404. **Root cause:** - `main.rs` builds `RPC_URL = {svc_base}/rpc/rpc` and `OPENRPC_URL = {svc_base}/rpc/openrpc.json` (pre-migration paths). The server now serves under `/api/{domain}/...`, so these 404. - `index.html` calls **31 dotted method names** (`workspace.list`, `cost.create`, `comment.add`, `currency_rate.upsert`, ...) that no longer exist; the migrated server exposes underscore names with `_set`-upsert semantics. - widget assets (`agent-widget.*`, `voice-widget.*`) are served by hero_orchestrator/hero_voice (not running here) — external, noted for completeness. **Approach note:** per `dioxus_openrpc_client` / `hero_admin_dioxus`, the hand-rolled JS UI is the legacy pattern; intended replacement is a Dioxus/WASM UI using the typed generated `openrpc_client!`. Scope (stopgap vs Dioxus rewrite) TBD. ![screenshot](https://forge.ourworld.tf/attachments/ae4efaf8-fe89-456e-a23e-f41d4e6421f6)
234 KiB
Author
Member

Reconciliation note: integration is pre-oschema-migration but is ahead of development on web features — it has commits development lacks, both touching only hero_planner_web/src/index.html:

  • ceb9640 fix(web): make list search and filter chips actually filter
  • 5ced595 feat(web): add delete-workspace + currency-rate edit buttons

When this migration is done, base it on integration's feature-complete web (re-implement these in the migrated/Dioxus client), not development's stale index.html.

development and integration have forked: dev has the server/admin oschema migration integration lacks; integration has these web features + CI dev lacks — broader reconciliation pending.

Reconciliation note: `integration` is pre-oschema-migration but is **ahead of `development` on web features** — it has commits development lacks, both touching only `hero_planner_web/src/index.html`: - `ceb9640` fix(web): make list search and filter chips actually filter - `5ced595` feat(web): add delete-workspace + currency-rate edit buttons When this migration is done, **base it on integration's feature-complete web** (re-implement these in the migrated/Dioxus client), not development's stale `index.html`. development and integration have forked: dev has the server/admin oschema migration integration lacks; integration has these web features + CI dev lacks — broader reconciliation pending.
Author
Member

Forward-ported integration's web features to development in a8e8445 (delete-workspace, currency-rate edit, filter-chip fix; index.html only, main.rs untouched). This migration now starts from a feature-complete web base.

The features call dotted RPC names (workspace.delete, system.counts, …) and will function once this migration remaps the web client to /api/main/rpc + underscore method names.

Forward-ported integration's web features to `development` in `a8e8445` (delete-workspace, currency-rate edit, filter-chip fix; `index.html` only, `main.rs` untouched). This migration now starts from a **feature-complete** web base. The features call dotted RPC names (`workspace.delete`, `system.counts`, …) and will function once this migration remaps the web client to `/api/main/rpc` + underscore method names.
Author
Member

Chosen path (B -> A):

B - interim remap (first): make the existing feature-complete hand-JS web functional on the new RPC scheme.

  • main.rs: /rpc/rpc -> /rpc/api/main/rpc, /rpc/openrpc.json -> /rpc/api/main/openrpc.json.
  • index.html (~25 dotted calls): map to the new oschema surface — underscore names; create/add/new -> _set{data}; .items -> .value; numeric id -> composite {workspace_sid}:{id} sid; list -> _list_full; pass workspace_sid.
    Verify + browser-verify each feature + merge.

A - Dioxus/WASM rewrite (immediate follow-up): rebuild as a Dioxus app using the typed generated openrpc_client! (per dioxus_openrpc_client / hero_admin_dioxus), modeling on existing Dioxus web apps (hero_biz_app, hero_foundry_web). Starts as soon as B is verified + merged. A planning doc/issue will track A.

(Prerequisite — forward-port of integration's web features to development — done in a8e8445; tracked in #22.)

**Chosen path (B -> A):** **B - interim remap (first):** make the existing feature-complete hand-JS web functional on the new RPC scheme. - `main.rs`: `/rpc/rpc` -> `/rpc/api/main/rpc`, `/rpc/openrpc.json` -> `/rpc/api/main/openrpc.json`. - `index.html` (~25 dotted calls): map to the new oschema surface — underscore names; `create/add/new` -> `_set{data}`; `.items` -> `.value`; numeric `id` -> composite `{workspace_sid}:{id}` sid; list -> `_list_full`; pass `workspace_sid`. Verify + browser-verify each feature + merge. **A - Dioxus/WASM rewrite (immediate follow-up):** rebuild as a Dioxus app using the typed generated `openrpc_client!` (per `dioxus_openrpc_client` / `hero_admin_dioxus`), modeling on existing Dioxus web apps (`hero_biz_app`, `hero_foundry_web`). Starts as soon as B is verified + merged. A planning doc/issue will track A. (Prerequisite — forward-port of integration's web features to development — done in `a8e8445`; tracked in #22.)
Author
Member

B (interim remap) — DONE. Merged to development in 7c510a7.

The hand-JS web now works against the oschema server via a central translation shim in rpc() (dotted->underscore, composite {workspace}:{id} sids, _set{data} with per-entity defaults, flattened bare results, list -> _find + _get, workspace_sid scoping). main.rs paths -> /api/main/rpc + /api/main/openrpc.json.

Verified via the hero_router tunnel: SWOT + Stories lists, detail (links / comments / costs / revenues), system_counts, workspace switching/re-scoping, and create+delete via the UI all work; 0 RPC console errors (only external hero_voice/hero_orchestrator widget 404s remain).

A (Dioxus/WASM rewrite) — next, per the path above; this issue stays open to track A.

Server-side gaps surfaced during B (filed separately): #24 (_list_full empty), #25 (currency_rate delete rowid — data-corruption risk), #26 (system_counts field naming).

**B (interim remap) — DONE.** Merged to `development` in `7c510a7`. The hand-JS web now works against the oschema server via a central translation shim in `rpc()` (dotted->underscore, composite `{workspace}:{id}` sids, `_set{data}` with per-entity defaults, flattened bare results, `list -> _find + _get`, `workspace_sid` scoping). `main.rs` paths -> `/api/main/rpc` + `/api/main/openrpc.json`. **Verified via the hero_router tunnel:** SWOT + Stories lists, detail (links / comments / costs / revenues), `system_counts`, workspace switching/re-scoping, and create+delete via the UI all work; 0 RPC console errors (only external hero_voice/hero_orchestrator widget 404s remain). **A (Dioxus/WASM rewrite) — next**, per the path above; this issue stays open to track A. Server-side gaps surfaced during B (filed separately): #24 (`_list_full` empty), #25 (currency_rate delete rowid — data-corruption risk), #26 (system_counts field naming).
Author
Member

A (Dioxus rewrite) — planned + de-risked, not yet built.

  • Plan committed at docs/superpowers/plans/2026-06-14-hero-planner-dioxus-web-rewrite.md (855 lines): two-crate served-SPA mirroring hero_proc_admin_dx (hero_planner_app_dx WASM on hero_admin_lib_dx + typed openrpc_client!, served via serve_admin_dioxus). Not an island.
  • Toolchain viability CONFIRMED on the build box: installed dioxus-cli 0.7.9 + wasm32-unknown-unknown, and the reference hero_proc_admin_dx_app builds to WASM (dx build exit 0). So the approach is feasible.
  • Acceptance criteria for A (so nothing regresses): the forward-ported web features (delete-workspace, currency-rate edit, filter chips — a8e8445) must survive the rewrite; the interim list -> _find + _get shim and the dotted-name translation must be DROPPED (replaced by the typed client) once on Dioxus; currency uses the real CurrencyRate.id (#25, done).
  • Effort estimate ~11.5–13 days; gated execution as a future focused effort. The interim remap (#19/B) keeps the web functional until then.
**A (Dioxus rewrite) — planned + de-risked, not yet built.** - **Plan** committed at `docs/superpowers/plans/2026-06-14-hero-planner-dioxus-web-rewrite.md` (855 lines): two-crate served-SPA mirroring `hero_proc_admin_dx` (`hero_planner_app_dx` WASM on `hero_admin_lib_dx` + typed `openrpc_client!`, served via `serve_admin_dioxus`). Not an island. - **Toolchain viability CONFIRMED on the build box:** installed `dioxus-cli 0.7.9` + `wasm32-unknown-unknown`, and the **reference `hero_proc_admin_dx_app` builds to WASM** (`dx build` exit 0). So the approach is feasible. - **Acceptance criteria for A** (so nothing regresses): the forward-ported web features (delete-workspace, currency-rate edit, filter chips — `a8e8445`) must survive the rewrite; the interim `list -> _find + _get` shim and the dotted-name translation must be DROPPED (replaced by the typed client) once on Dioxus; currency uses the real `CurrencyRate.id` (#25, done). - Effort estimate ~11.5–13 days; gated execution as a future focused effort. The interim remap (#19/B) keeps the web functional until then.
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#18
No description provided.