feat(miner-ui): surface claim, event, and governor ledger data - #5574
Conversation
Add a read-only Ledgers view to the miner-ui (JSONbored#4855). A new local dev-server API (vite-ledgers-api.ts) bridges the browser app to the claim/event/governor SQLite ledgers via their existing read exports, aggregating SERVER-SIDE to status/type counts plus a small feed of explicitly-projected safe columns — raw payloads and the free-text claim note never cross the wire (the same no-secret/no-excluded-column invariant the read-only MCP tools enforce). The view is built with the shared gittensory-ui-kit Card/Table components and mirrors the portfolio/run-history 4-state pattern (loading / error / fresh-install empty / populated). Fixes JSONbored#4855
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-07-13 06:34:24 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 5 non-blocking
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
What
Adds a read-only Ledgers view to the miner-ui, surfacing the claim, event, and governor ledgers that had no UI today. Per #4855.
vite-ledgers-api.ts) — sibling of the existingvite-portfolio-queue-api.ts/vite-run-state-api.ts. It bridges the browser app to the threenode:sqliteledgers via their existing read exports, aggregating server-side to:noteand the raw event/governorpayload/payload_jsonare structurally omitted — they never cross the wire (the same no-secret / no-excluded-column invariant the read-only MCP tools enforce). A canary test proves each excluded raw field is absent from the response./ledgersroute (src/routes/ledgers.tsx) built with the shared@jsonbored/gittensory-ui-kitCard/Tablecomponents (per Extract a shared design-system package for gittensory-ui and gittensory-miner-ui #4966/Migrate gittensory-miner-ui onto the shared design system #4967), plus a nav link. Same 4-state pattern as the portfolio/run-history views (loading / error / fresh-install empty / populated), and the same fresh-install rule (the resolved DB path is probed first, so a fresh install is never written to).Tests
src/ledgers.test.tsx(13 tests): the empty summary, all four view states, the client fetch (well-formed / non-2xx / malformed / thrown), and the API handler — correct aggregation, the leakage-invariant canary, the fresh-install no-write path, path/method fall-through, and error→500.Verified locally: 13 tests pass,
tsc --noEmitclean, existing miner-ui suite still green.Fixes #4855