Add /rpc proxy with batch support for HeroIndex Admin UI #2

Merged
mik-tf merged 1 commit from development_mik11 into development 2026-03-12 12:23:08 +00:00
Owner

Summary

  • Add /rpc proxy endpoint forwarding JSON-RPC to hero_indexer_server via Unix socket
  • Batch mode: JSON arrays sent on single connection, preserving db.select session state
  • JS helpers rpcBatch() / rpcWithDb() for stateful operations (query, perf test, docs)
  • Logs tab converted from broken REST /api/logs to RPC server.logs with graceful fallback
  • Added serde_json, bytes, tokio io-util deps

Test plan

  • Verified on herodev2: dashboard Online, Perf Test 100k docs @ 1,075 docs/sec
  • Query tab with database selection works
  • Documents tab batch add works
  • Logs tab shows graceful message

Ref: lhumina_code/home#23

## Summary - Add `/rpc` proxy endpoint forwarding JSON-RPC to `hero_indexer_server` via Unix socket - Batch mode: JSON arrays sent on single connection, preserving `db.select` session state - JS helpers `rpcBatch()` / `rpcWithDb()` for stateful operations (query, perf test, docs) - Logs tab converted from broken REST `/api/logs` to RPC `server.logs` with graceful fallback - Added `serde_json`, `bytes`, `tokio io-util` deps ## Test plan - [x] Verified on herodev2: dashboard Online, Perf Test 100k docs @ 1,075 docs/sec - [x] Query tab with database selection works - [x] Documents tab batch add works - [x] Logs tab shows graceful message Ref: https://forge.ourworld.tf/lhumina_code/home/issues/23
- src/main.rs: /rpc endpoint forwarding JSON-RPC to hero_indexer_server
  via Unix socket. Batch mode sends JSON arrays on one connection,
  preserving db.select session state across calls.
- templates/base.html: rpcBatch() and rpcWithDb() JS helpers
- templates/index.html: convert db.select + operation sequences to
  rpcWithDb(), fix Logs tab from broken REST to RPC with fallback
- Cargo.toml: add serde_json, bytes, tokio io-util deps

Ref: lhumina_code/home#23

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
mik-tf merged commit 2877dde499 into development 2026-03-12 12:23:08 +00:00
mik-tf deleted branch development_mik11 2026-03-12 12:23:09 +00:00
Sign in to join this conversation.
No reviewers
No labels
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_indexer_ui!2
No description provided.