feat(provider-dashboard): v2 corrective — preserve v1 top, replace events UI with 4 v2 zones#34
Merged
Merged
Conversation
…ents UI with 4 v2 zones PR-3 of the provider-dashboard v2 redesign. The v1 top section (header chips, OpEx Balance card, 3-up Councils list) stays AS-IS. The v1 events UI (5-column tx flow, tx-detail card, Live/Range toggle, Range Search, date pickers, auto-flip-to-Range) is removed entirely. In the freed space, four always-live zones land per the sketch's visual specs: - Counter strip: 4 boxes — THROUGHPUT (last 15m mean of throughputPerMin), AVG LATENCY (weighted avg avgProcessingMs over last 100 bundles), QUEUE DEPTH (most recent snapshot), ERROR RATE (1h bundlesFailed / terminal-transitions; gracefully "—" until PR-104 lands). - Topology: SVG edges + HTML nodes. MY PP yellow center, council ring, sibling-PP dots from POST /dashboard/council/discover (cached per render). Live edge pulses driven by 10-event-kind WS taxonomy, color per sketch. Council node palette transitions idle → low → high based on rolling-5-min pulse count (≥10 high, ≥3 low, else idle). No click handlers. - Activity feed: right-rail card stack, ≤5 visible, ~8s fade, color-coded per event kind, deposit/withdraw amounts surfaced. No click handler. - Sparklines: rolling 60-min trends for throughput / latency / queue from /dashboard/metrics?rangeMin=60, polled every 60s alongside the counter strip. EventsClient handles WS reconnect on disconnect; no Range fallback, no mode toggle anywhere on the page. Counter + sparkline poll cadence matches the platform MetricsCollector's 60s snapshot interval. api.ts: adds MetricsSnapshot / MetricsResponse / getMetrics. Removes the now-unused listTransactions / getTransactionDetail / getUtxos and their types (sole consumers were the removed 5-column / tx-detail surfaces).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Corrective v2 layout per
redesign-provider-dashboard-3-prompt.md. Closed PR #33 (wrong layout — v1 replacement based on a misread of the sketch wording). This PR is fresh and:Preserves v1 (code paths unchanged)
-3§5)Removes the entire v1 events UI
renderTxDetailmodal +renderUtxoDetail+renderWithdrawDetailsetupDashboardorchestration +classifyTxIntoColumnsapi.tswrappers exclusively serving the removed surfaces:listTransactions,getTransactionDetail,getUtxos+ their typesAdds 4 always-live v2 zones in the freed space
#1971c2outline /#e7f5fffill): THROUGHPUT (last-15m mean ofthroughputPerMin), AVG LATENCY (weighted avgavgProcessingMsover the last 100 bundles), QUEUE DEPTH (most recent snapshot), ERROR RATE (1hbundlesFailed / (completed + failed + expired); gracefully—until PR-104 lands and exposesbundlesFailed).POST /dashboard/council/discover(cached per render, best-effort). Live edge pulses on every relevant WS event with per-kind color per sketch. Council node palette transitionsidle→low→highbased on rolling-5-min pulse count (≥10high,≥3low). Passive — no click handlers anywhere.~8sfade, border-color per event kind, deposit/withdraw amounts surfaced. Passive — no click handler./dashboard/metrics?rangeMin=60, re-fetched every 60s alongside the counter strip.WS reconnect handled by
EventsClient(existing exponential-backoff path). No Range fallback when WS drops, no mode toggle anywhere.ERROR RATE counter gracefully degrades if the platform predates PR-104: when the snapshots don't include
bundlesFailed, the counter shows—. Once PR-104 merges + deploys, the counter starts populating without any further frontend change.MetricsSnapshot.bundlesFailedis typed as optional for that reason.Out of scope (per
-3)provider-platform#104(bundles_failed) stays open as a separate PM-owned merge.Test plan
deno task checkclean (type-check)deno fmt --checkcleandeno lintcleandeno task build(dev + production) succeedsdeno task testgreen (7 passed)-3§6:provider-platform#104separately verified end-to-end once merged + deployed; ERROR RATE counter then populates with real values.Companion file:
PROVIDER_DASHBOARD_NOTES.mdnot added — Phase 0 raw audit dumps from-1still apply unchanged.