feat: protocol inline Δ% volume priors and UTC daily series (#652) #1152

Merged
PlasticDigits merged 1 commit from feat/652-protocol-stats-inline into main 2026-08-26 01:54:19 +00:00
PlasticDigits commented 2026-08-26 01:48:56 +00:00 (Migrated from gitlab.com)

Summary

  • Add aggregator-only volume_change_{24h,7d,30d}_pct on GET /overview using existing flow_change_pct vs the prior equal trailing window. Live GET still reads the rollup (no 60d swap_events scan).
  • Materialize protocol_daily_volume (35d prune) and GET /api/v1/protocol/volume/daily?days=7|30 (else 400, 60s cache). Protocol catalog, not Llama. Do not add from/to to Llama.
  • /protocol Global stats + Protocol fees: inline Δ% in the same cell; census stays value-only; StatBox variant="flat" (no nested card-glass). UTC-day bar chart default 7d / toggle 30d; hide on 404/501.
  • Invariants P652-1–P652-7 in skills/AGENTS_FRONTEND_PROTOCOL_STATS.md. Rewrote P569-1 / P569-7 / PFee-2. Companion chrome pass remains #653.

Closes #652

Test plan

  • make verify-issue-652 (docs + indexer lib/integration + Protocol RTL + e2e-smoke; first pass + retest)
  • make verify-issue-550 / 569 / 586 / 576 / 577 / 631 still green
  • Old indexer: missing volume_change_* → em-dash Δ%; missing daily route → chart hidden
  • days=1 / 90 / junk → 400; no Llama from/to
  • /protocol 375 + 1280, light + dark: one liquidity cell ($ + % 24h + % 30d); volume/fees USD + inline Δ%; no card-in-card in those two panels
  • Daily chart 7d default / 30d toggle; idle $0; unpriced —; UTC calendar-day copy in aria-label / title
  • Coolify: apply migration then confirm /overview keys + /protocol/volume/daily
## Summary - Add aggregator-only `volume_change_{24h,7d,30d}_pct` on `GET /overview` using existing `flow_change_pct` vs the prior equal trailing window. Live GET still reads the rollup (no 60d `swap_events` scan). - Materialize `protocol_daily_volume` (35d prune) and `GET /api/v1/protocol/volume/daily?days=7|30` (else 400, 60s cache). Protocol catalog, not Llama. Do not add `from`/`to` to Llama. - `/protocol` Global stats + Protocol fees: inline Δ% in the same cell; census stays value-only; `StatBox variant="flat"` (no nested `card-glass`). UTC-day bar chart default 7d / toggle 30d; hide on 404/501. - Invariants **P652-1–P652-7** in `skills/AGENTS_FRONTEND_PROTOCOL_STATS.md`. Rewrote P569-1 / P569-7 / PFee-2. Companion chrome pass remains #653. Closes #652 ## Test plan - [ ] `make verify-issue-652` (docs + indexer lib/integration + Protocol RTL + e2e-smoke; first pass + retest) - [ ] `make verify-issue-550` / `569` / `586` / `576` / `577` / `631` still green - [ ] Old indexer: missing `volume_change_*` → em-dash Δ%; missing daily route → chart hidden - [ ] `days=1` / `90` / junk → 400; no Llama `from`/`to` - [ ] `/protocol` 375 + 1280, light + dark: one liquidity cell (`$` + `% 24h` + `% 30d`); volume/fees USD + inline Δ%; no card-in-card in those two panels - [ ] Daily chart 7d default / 30d toggle; idle `$0`; unpriced `—`; UTC calendar-day copy in `aria-label` / title - [ ] Coolify: apply migration then confirm `/overview` keys + `/protocol/volume/daily`
PlasticDigits commented 2026-08-26 01:54:20 +00:00 (Migrated from gitlab.com)

mentioned in commit 640bb28f36

mentioned in commit 640bb28f36f0357c0a2e8e418dadf7892ce55720
PlasticDigits (Migrated from gitlab.com) merged commit 640bb28f36 into main 2026-08-26 01:54:20 +00:00
PlasticDigits commented 2026-08-26 01:58:32 +00:00 (Migrated from gitlab.com)

mentioned in issue #654

mentioned in issue #654
PlasticDigits commented 2026-08-26 01:58:44 +00:00 (Migrated from gitlab.com)

mentioned in issue #652

mentioned in issue #652
PlasticDigits commented 2026-08-26 01:58:45 +00:00 (Migrated from gitlab.com)

mentioned in issue #653

mentioned in issue #653
Sign in to join this conversation.
No reviewers
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
code/cl8y-dex-terraclassic!1152
No description provided.