Add admin dashboard, per-IP metrics, and ecosystem standardization #6

Closed
mik-tf wants to merge 20 commits from development_mik into development
Owner

Full admin dashboard with 9 content tabs, JSON-RPC/MCP endpoints, and hero_auth integration. Adds per-IP request metrics and aligns with hero ecosystem conventions. Incorporates all review feedback from PR #3.

Changes

  • Admin dashboard UI (merged from development_ui_enhancements branch) — Bootstrap 5.3.3, 9 tabs, dark/light mode, Hero OS embedding support
  • Per-IP request tracking on /api/*, /rpc, /mcp/* with new metrics.get and metrics.detailed RPC methods
  • Dynamic API docs rendered from /openrpc.json (replaces hardcoded JS object)
  • Port 3384 confirmed, Makefile compliance with bun install before build
  • Addressed PR #3 feedback: removed Playwright, removed setup.sh, cleaned Makefile scripting

Testing

  • 43 smoke tests pass (29 basic + 14 auth)

Closes #5


Consolidated from #4 into development_mik branch (includes latest development merged in).

Full admin dashboard with 9 content tabs, JSON-RPC/MCP endpoints, and hero_auth integration. Adds per-IP request metrics and aligns with hero ecosystem conventions. Incorporates all review feedback from PR #3. ## Changes - Admin dashboard UI (merged from `development_ui_enhancements` branch) — Bootstrap 5.3.3, 9 tabs, dark/light mode, Hero OS embedding support - Per-IP request tracking on `/api/*`, `/rpc`, `/mcp/*` with new `metrics.get` and `metrics.detailed` RPC methods - Dynamic API docs rendered from `/openrpc.json` (replaces hardcoded JS object) - Port 3384 confirmed, Makefile compliance with `bun install` before build - Addressed PR #3 feedback: removed Playwright, removed setup.sh, cleaned Makefile scripting ## Testing - 43 smoke tests pass (29 basic + 14 auth) Closes #5 --- Consolidated from #4 into `development_mik` branch (includes latest `development` merged in).
feat: admin dashboard UI overhaul with Bootstrap 5, tests, and CI
Some checks failed
Test / lint (push) Successful in 15s
Test / integration (push) Failing after 37s
31aee2d24b
Tier 1 — UI Overhaul:
- Extract inline HTML from admin.ts into public/ directory
- Add Bootstrap 5.3.3 + Bootstrap Icons via CDN
- Gradient hero header with dark/light mode toggle
- Responsive layout with stat cards, nav pills, table-responsive
- Styled empty states with icons and descriptions

Tier 2 — Dashboard Polish:
- Color-coded badges for channels, roles, safety levels, status
- Usage visualization with CSS bar charts
- Grouped config display (LLM, Agent, Channels sections)
- Toast notifications for real-time SSE events
- Pagination (load more) on Messages and Audit tabs
- Copy-to-clipboard on expandable detail rows

Tier 3 — Testing & CI:
- scripts/smoke-test.sh: 29 tests (16 basic + 13 auth)
- Playwright E2E: 33 tests (navigation, dashboard, API, auth)
- .forgejo/workflows/test.yaml: lint + integration CI pipeline
- buildenv.sh: build environment config
- Enhanced Makefile with test/smoke-test/test-e2e/test-all targets

All 62 tests pass (smoke basic, smoke auth, E2E basic, E2E auth).
feat: admin dashboard UI overhaul with JSON-RPC, MCP, OpenRPC, JWT auth
Some checks failed
Test / lint (push) Successful in 11s
Test / integration (push) Failing after 41s
22d2725793
- Rewrite admin dashboard with Bootstrap 5.3.3 compact UI (9 tabs, sidebar, navbar)
- Add JSON-RPC 2.0 endpoint (POST /rpc) with 15 methods
- Add MCP server (POST /mcp) exposing agent tools + SSE transport
- Add OpenRPC 1.2.6 spec (GET /openrpc.json)
- Add server log capture with circular buffer and API/RPC access
- Add config editing endpoint (POST /api/config) writing to .env
- Add JWT auth via jose alongside existing ADMIN_TOKEN
- Add Hero Auth config (HERO_AUTH_URL, HERO_SECRET)
- Rewrite Makefile following makefile_helper skill pattern
- Add scripts/setup.sh interactive configuration helper
- Rewrite smoke tests: 28 basic + 14 auth mode
- Rewrite Playwright E2E: 80 tests (navigation, dashboard, API, RPC, MCP, logs, auth, broker)
- Update Forgejo CI workflow with lint + integration jobs
- Dark/light mode toggle with localStorage persistence
- SSE connection indicator and toast notifications
- Pagination, empty states, colored status badges
- Request logging for API/RPC/MCP endpoints
feat(ui): align dashboard to hero_embedder visual style
Some checks failed
Test / lint (push) Successful in 17s
Test / integration (push) Failing after 38s
a2af35edd2
- Navbar: flat bg-body-tertiary, no gradient, SSE status text
- Tabs: Bootstrap native nav-tabs with data-bs-toggle
- Sidebar: standard card-header/card-body pattern
- MCP cards: bg-dark border-secondary headers, pre blocks
- Logs: wrapped in card with header controls
- CSS: removed custom classes, added embedder-matching sizing
- JS: Bootstrap shown.bs.tab events, status-dot naming
- Tests: updated selectors for new HTML structure

Smoke: 28/28, Playwright: 66 pass, 15 skip
feat: theme toggle (iframe-aware), hero_auth integration, logout flow
Some checks failed
Test / lint (push) Successful in 15s
Test / integration (push) Failing after 38s
293a52bf12
- Theme toggle: show only when standalone (window.self === window.top),
  listen for postMessage hero-os-theme events when embedded
- Auth: serve static files before auth check, inject HERO_AUTH_URL into HTML,
  redirect to hero_auth on 401/403 with ?logout=true
- Logout: clear localStorage + redirect to hero_auth/login?logout=true
- Smoke tests: send auth token in basic mode when available,
  update auth tests for static-before-auth behavior (42/42 pass)
- Playwright: add fixtures.ts for localStorage token injection,
  add extraHTTPHeaders to config, update auth tests to use
  isolated request contexts (77/77 pass)
feat: add favicon.svg matching navbar tsunami icon
Some checks failed
Test / lint (push) Successful in 15s
Test / integration (push) Failing after 44s
6ce257c7bf
fix(ci): install curl in integration container
All checks were successful
Test / lint (push) Successful in 14s
Test / integration (push) Successful in 1m22s
c716a22662
The oven/bun:1 image (Debian trixie) does not include curl.
Smoke tests and health check loops all depend on curl.
fix: skill compliance — port 3384, snake_case name, update-deps target
All checks were successful
Test / lint (push) Successful in 14s
Test / integration (push) Successful in 1m23s
Test / lint (pull_request) Successful in 13s
Test / integration (pull_request) Successful in 1m23s
2797fb7ed1
- Change default admin port from 3131 to 3384 (hero_ports registry)
- Rename package.json name from hero-shrimp to hero_shrimp (naming convention)
- Add update-deps target to Makefile (makefile_helper compliance)
- Add test-results/ to .gitignore
- Update all references across CI, Dockerfile, buildenv.sh, smoke tests,
  Playwright config, auth tests, README, openrpc.json
- AIBROKER_API_ENDPOINT: localhost:8080 → localhost:3385
- MCP_BROKER_ENDPOINT: localhost:8080/mcp → localhost:3385/mcp
- Add note about auto-discovery via OpenRPC
- Add rpc.discover to RPC dispatcher (returns public/openrpc.json)
- Add rpc.discover method to openrpc.json spec
- Enables automatic service discovery (heroindex pattern)
- Delete env_manager tool (env_secrets violation: wrote .env files)
- Create service_discover tool (scan/discover/health/list via OpenRPC)
- Create src/core/discovery.ts (auto-scan hero_ports, periodic health)
- Update llm_client.ts: use discovered broker if no env var set
- Update mcp.ts: use discovered MCP broker if no env var set
- Remove handleConfigSave (wrote .env) from admin.ts
- Replace config edit modal with discovered services display + rescan
- Add service:discovered and service:status SSE events
- Update getConfigData() to use real health checks
- Update tool_router and _registry for service_discover
- Initialize discovery on startup, cleanup on shutdown
- Smoke test: add rpc.discover RPC method test
- Playwright rpc.spec: add rpc.discover returns OpenRPC spec test
- Playwright dashboard.spec: config tab checks rescanBtn (replaced configEditBtn)
test: add cross-repo integration test script
All checks were successful
Test / lint (push) Successful in 17s
Test / lint (pull_request) Successful in 16s
Test / integration (push) Successful in 1m27s
Test / integration (pull_request) Successful in 1m27s
96753c7c66
- scripts/integration-test.sh: starts both aibroker and hero_shrimp
- Tests: health checks, service discovery, rpc.discover, SSE, openrpc.json
- Auto-cleanup on exit, prerequisite checks
- Not part of CI (requires both repos + API keys)
chore: gitignore entire data/ directory
Some checks are pending
Test / lint (pull_request) Successful in 16s
Test / integration (pull_request) Successful in 1m38s
Test / lint (push) Waiting to run
Test / integration (push) Blocked by required conditions
8de44f5a77
fix: run bun install before build to resolve dependencies
Some checks are pending
Test / lint (push) Waiting to run
Test / integration (push) Blocked by required conditions
Test / lint (pull_request) Waiting to run
Test / integration (pull_request) Blocked by required conditions
e77632e370
fix: Makefile compliance, CI compile job, remove broker tests
Some checks failed
Test / lint (push) Successful in 15s
Test / lint (pull_request) Successful in 13s
Test / build (pull_request) Waiting to run
Test / build (push) Successful in 23s
Test / integration (pull_request) Blocked by required conditions
Test / integration (push) Has been cancelled
6a4516b7a9
Address reviewer feedback from PR #3:
- Makefile: remove all inline scripting, each target is a thin wrapper
- Makefile: source config from buildenv.sh (single source of truth)
- CI: add build job to verify binary compiles (bun build --compile)
- CI: use scripts for smoke/e2e test lifecycle
- Remove broker.spec.ts (belongs in aibroker, not hero_shrimp)
- Remove setup.sh (.env.example is sufficient)
- Add scripts/install.sh with tmp+mv pattern
- Add scripts/status.sh, run-smoke-tests.sh, run-e2e-tests.sh
ci: restrict test triggers to PRs and push to development/main
Some checks failed
Test / build (pull_request) Successful in 14s
Test / lint (pull_request) Successful in 12s
Test / integration (pull_request) Failing after 3h0m0s
baee22677b
Stop triggering test/build workflows on every push to every branch.
Tests now run only on:
- push to development or main (post-merge validation)
- pull_request targeting development or main (pre-merge check)
- manual workflow_dispatch

Per forge_ci skill: Standard Workflow Triggers convention.
fix: use bunx instead of npx in E2E test script
Some checks failed
Test / lint (pull_request) Successful in 15s
Test / build (pull_request) Successful in 11s
Test / integration (pull_request) Has been cancelled
fcfb2ea80a
npx is not available in the oven/bun:1 CI container.
This was causing the integration job to fail in CI.
fix(ci): use PID tracking and curl timeouts in test scripts
All checks were successful
Test / lint (pull_request) Successful in 12s
Test / build (pull_request) Successful in 8s
Test / integration (pull_request) Successful in 1m16s
dfdee0f234
- Replace pkill pattern matching with direct PID tracking ()
  to reliably kill server between test rounds in containers
- Add --max-time 10 to all curl calls to prevent silent hangs
- Use 'wait $PID' instead of bare 'wait' to avoid blocking on orphans
feat: add per-IP metrics tracking and dynamic API docs from OpenRPC spec
Some checks failed
Test / lint (pull_request) Successful in 13s
Test / build (pull_request) Successful in 8s
Test / integration (pull_request) Failing after 1m55s
90f629f874
Metrics:
- Add per-IP request tracking (trackRequest, extractClientIp)
- Track requests on all API routes (/api/*, /rpc, /mcp/*)
- Add metrics.get and metrics.detailed RPC methods
- Add Metrics tab with summary cards and per-IP table

API Docs:
- Replace hardcoded API_METHODS with dynamic fetch from /openrpc.json
- Group methods by prefix (messages.*, audit.*, etc.)
- Add metrics.get and metrics.detailed to openrpc.json spec
- Cache loaded docs to avoid re-fetching on tab switch
fix: update E2E navigation test for new Metrics tab (10 tabs)
All checks were successful
Test / lint (pull_request) Successful in 23s
Test / build (pull_request) Successful in 18s
Test / integration (pull_request) Successful in 1m46s
f551c8a5bd
mik-tf closed this pull request 2026-03-08 00:24:54 +00:00
All checks were successful
Test / lint (pull_request) Successful in 23s
Test / build (pull_request) Successful in 18s
Test / integration (pull_request) Successful in 1m46s

Pull request closed

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_shrimp!6
No description provided.