fix(frontend): group protocol Δ% chips with their USD headline (#667) #1158

Merged
PlasticDigits merged 2 commits from fix/667-protocol-stat-delta-group into main 2026-08-26 08:11:26 +00:00
PlasticDigits commented 2026-08-26 06:58:01 +00:00 (Migrated from gitlab.com)

Summary

/protocol Global stats and Protocol fees already parent Δ% inside the correct StatBox (#652), but justify-between pinned chips to the cell’s far right so operators read them as the next column’s figure. This MR groups every inline Δ% with its own headline and stops census tiles from rendering integers as 14.00 / 8.000.

  • StatBox: value+Δ% row is .stat-value-row (justify-start / wrap). Headline first; .stat-delta-cluster immediately after. Wrap stays in the same cell. No Protocol-only variant.
  • Census: formatProtocolCount uses locale integers under 1000; compact K only when abs ≥ 1000; missing / non-finite / XSS-like → em-dash.
  • Docs / skills: P667-1–P667-4 in AGENTS_FRONTEND_PROTOCOL_STATS.md; P569-7 / PFee-2 / P652-6 updated; chrome-nesting playbook points at grouping as layout, not a second chrome layer.
  • Verify: make verify-issue-667 (docs + RTL + Playwright geometry @ 5 workers). Related verify-issue-652 / 653 stay green.

Closes #667

Test plan

  • make verify-issue-667 (docs, StatBox no justify-between, formatProtocolCount integers, Protocol RTL, Playwright geometry 390 / 820 / 1280 @ 5 workers)
  • make verify-issue-652 (SKIP_E2E + SKIP_RELATED) and make verify-issue-653
  • Manual /protocol at 390 / 820 / 1280, light + dark: each % reads as belonging to its $ / fee headline
  • Census tiles show 14 not 14.00 when counts are small integers
  • Charts / Trader no-Δ% StatBox tiles still label+value only
  • Old indexer (missing volume_change_*): tiles still render; Δ% em-dash; chart hidden

Acceptance (issue #667)

  • md+ 4-column Global stats: each Δ% chip bbox is inside its own protocol-stat-* tile
  • Liquidity $ + 24h + 30d read as one group (cluster after or wrapped under the $)
  • Volume 24h / 7d / 30d chips sit with that tile’s USD
  • Protocol fees 24h / 7d / 30d same grouping
  • Em-dash Δ% still groups with its headline
  • Phone 390 and tablet 820: wrap OK; chips do not jump into the adjacent tile
  • Census integers without trailing .00; K only if count ≥ 1000
  • Testids, overview keys, trailing-window title / aria-label, UTC-day chart, page order unchanged
  • No nested card-glass in Global stats / fees
  • Old indexer still renders tiles; Δ% em-dash (P652-6)
  • Light + dark visual pass on a live indexer (tones already unit-tested; screenshot QA leftover)
## Summary `/protocol` Global stats and Protocol fees already parent Δ% inside the correct `StatBox` (#652), but `justify-between` pinned chips to the cell’s far right so operators read them as the next column’s figure. This MR groups every inline Δ% with its own headline and stops census tiles from rendering integers as `14.00` / `8.000`. - **StatBox:** value+Δ% row is `.stat-value-row` (`justify-start` / wrap). Headline first; `.stat-delta-cluster` immediately after. Wrap stays in the same cell. No Protocol-only variant. - **Census:** `formatProtocolCount` uses locale integers under 1000; compact `K` only when `abs ≥ 1000`; missing / non-finite / XSS-like → em-dash. - **Docs / skills:** **P667-1–P667-4** in `AGENTS_FRONTEND_PROTOCOL_STATS.md`; P569-7 / PFee-2 / P652-6 updated; chrome-nesting playbook points at grouping as layout, not a second chrome layer. - **Verify:** `make verify-issue-667` (docs + RTL + Playwright geometry @ 5 workers). Related `verify-issue-652` / `653` stay green. Closes #667 ## Test plan - [x] `make verify-issue-667` (docs, StatBox no `justify-between`, `formatProtocolCount` integers, Protocol RTL, Playwright geometry 390 / 820 / 1280 @ 5 workers) - [x] `make verify-issue-652` (SKIP_E2E + SKIP_RELATED) and `make verify-issue-653` - [ ] Manual `/protocol` at 390 / 820 / 1280, light + dark: each % reads as belonging to **its** `$` / fee headline - [ ] Census tiles show `14` not `14.00` when counts are small integers - [ ] Charts / Trader no-Δ% `StatBox` tiles still label+value only - [ ] Old indexer (missing `volume_change_*`): tiles still render; Δ% em-dash; chart hidden ## Acceptance (issue #667) - [x] md+ 4-column Global stats: each Δ% chip bbox is inside its own `protocol-stat-*` tile - [x] Liquidity `$` + 24h + 30d read as one group (cluster after or wrapped under the `$`) - [x] Volume 24h / 7d / 30d chips sit with that tile’s USD - [x] Protocol fees 24h / 7d / 30d same grouping - [x] Em-dash Δ% still groups with its headline - [x] Phone 390 and tablet 820: wrap OK; chips do not jump into the adjacent tile - [x] Census integers without trailing `.00`; `K` only if count ≥ 1000 - [x] Testids, overview keys, trailing-window `title` / `aria-label`, UTC-day chart, page order unchanged - [x] No nested `card-glass` in Global stats / fees - [x] Old indexer still renders tiles; Δ% em-dash (**P652-6**) - [ ] Light + dark visual pass on a live indexer (tones already unit-tested; screenshot QA leftover)
PlasticDigits commented 2026-08-26 06:58:17 +00:00 (Migrated from gitlab.com)

mentioned in issue #667

mentioned in issue #667
PlasticDigits commented 2026-08-26 08:11:18 +00:00 (Migrated from gitlab.com)

mentioned in commit 9b00330092

mentioned in commit 9b003300922b618a66432d8016741ce85ec154a5
PlasticDigits commented 2026-08-26 08:11:19 +00:00 (Migrated from gitlab.com)

added 9 commits

  • e25bbb04...c2a6592d - 8 commits from branch main
  • 9b003300 - Merge origin/main into branch for !1158

Compare with previous version

added 9 commits <ul><li>e25bbb04...c2a6592d - 8 commits from branch <code>main</code></li><li>9b003300 - Merge origin/main into branch for !1158</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/440/diffs?diff_id=1984426259&start_sha=e25bbb04f3ba1c31c9424db4fed7d69d6109e165)
PlasticDigits (Migrated from gitlab.com) merged commit f5ffe9649b into main 2026-08-26 08:11:26 +00:00
PlasticDigits commented 2026-08-26 08:11:27 +00:00 (Migrated from gitlab.com)

mentioned in commit f5ffe9649b

mentioned in commit f5ffe9649ba72d70dd8c45b09a1d8cb24a0f697e
PlasticDigits commented 2026-08-26 09:31:36 +00:00 (Migrated from gitlab.com)

mentioned in issue #673

mentioned in issue #673
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!1158
No description provided.