[visual][arena] Unify numeric precision on Arena buy panel (CL8Y / CHARM / launch projection) #191

Closed
opened 2026-05-11 09:02:25 +00:00 by PlasticDigits · 11 comments
PlasticDigits commented 2026-05-11 09:02:25 +00:00 (Migrated from gitlab.com)

Summary

During local-stack visual QA (#164), the Arena buy hub showed inconsistent decimal precision across related amounts (for example 18-decimal CL8Y spend input vs fewer decimals on CHARM output vs “Worth at launch ≈” display). Nothing was broken functionally; this is P3 polish for readability and trust.

What is wrong

Sibling numeric fields on /timecurve/arena use different rounding / sig-fig rules side by side, which reads as sloppy or ambiguous during comparison.

Expected

Per-surface rules should be documented and consistent (e.g. align CHARM band labels with the same precision policy as Simple page, or explicitly label precision like “≈”). Users should not see arbitrary mixing of 2-, 3-, and 18-decimal presentations for the same logical step without explanation.

Relevant docs / skills / files

  1. Define one display policy for Arena buy hub (input, derived CHARM, USD/CL8Y hints, launch projection): fixed decimals vs significant figures.
  2. Apply shared formatters (reuse Simple page helpers where appropriate) so related numbers update together without visual mismatch.
  3. Add a short contributor note in timecurve-views.md or invariants if the policy differs from Simple intentionally.

Acceptance criteria

  • CL8Y spend, CHARM preview, and Worth at launch (if shown) follow a single documented precision scheme on Arena buy hub.
  • No unexplained order-of-magnitude jumps in digit count between adjacent labels on the same card.
  • Responsive breakpoints do not clip formatted strings introduced by the change.

Verification checklist

  • /timecurve/arena with funded wallet: compare Arena vs Simple for same band — formatting intent matches docs.
  • Very small and very large CHARM/CL8Y values — no scientific notation surprises (cross-check #164 §6.4 / §6.5).
  • Snapshot or manual QA note attached to this issue when done.

/cc @Brouie — tracked from #164 §6.6 polish nit.

## Summary During local-stack visual QA ([#164](https://gitlab.com/PlasticDigits/yieldomega/-/issues/164)), the Arena buy hub showed **inconsistent decimal precision** across related amounts (for example 18-decimal CL8Y spend input vs fewer decimals on CHARM output vs **“Worth at launch ≈”** display). Nothing was broken functionally; this is **P3 polish** for readability and trust. ## What is wrong Sibling numeric fields on `/timecurve/arena` use **different rounding / sig-fig rules** side by side, which reads as sloppy or ambiguous during comparison. ## Expected Per-surface rules should be **documented and consistent** (e.g. align CHARM band labels with the same precision policy as Simple page, or explicitly label precision like “≈”). Users should not see **arbitrary mixing** of 2-, 3-, and 18-decimal presentations for the same logical step without explanation. ## Relevant docs / skills / files - Umbrella QA: [#164](https://gitlab.com/PlasticDigits/yieldomega/-/issues/164) §6 item 6 (fee surfaces — partial walk). - Invariants / UX map: [`docs/testing/invariants-and-business-logic.md`](docs/testing/invariants-and-business-logic.md) (Arena / TimeCurve sections). - Views: [`docs/frontend/timecurve-views.md`](docs/frontend/timecurve-views.md). - Likely implementation: [`frontend/src/pages/timeCurveArena/TimeCurveArenaView.tsx`](frontend/src/pages/timeCurveArena/TimeCurveArenaView.tsx), [`frontend/src/pages/timeCurveArena/useTimeCurveArenaModel.tsx`](frontend/src/pages/timeCurveArena/useTimeCurveArenaModel.tsx), shared math/format helpers under [`frontend/src/lib/timeCurveMath.ts`](frontend/src/lib/timeCurveMath.ts), [`frontend/src/lib/timeCurvePodiumMath.ts`](frontend/src/lib/timeCurvePodiumMath.ts). ## Recommended fix 1. Define one **display policy** for Arena buy hub (input, derived CHARM, USD/CL8Y hints, launch projection): fixed decimals vs significant figures. 2. Apply shared formatters (reuse Simple page helpers where appropriate) so **related numbers update together** without visual mismatch. 3. Add a short **contributor note** in `timecurve-views.md` or invariants if the policy differs from Simple intentionally. ## Acceptance criteria - [ ] CL8Y spend, CHARM preview, and **Worth at launch** (if shown) follow a **single documented** precision scheme on Arena buy hub. - [ ] No unexplained **order-of-magnitude** jumps in digit count between adjacent labels on the same card. - [ ] Responsive breakpoints do not clip formatted strings introduced by the change. ## Verification checklist - [ ] `/timecurve/arena` with funded wallet: compare Arena vs Simple for same band — formatting intent matches docs. - [ ] Very small and very large CHARM/CL8Y values — no scientific notation surprises (cross-check [#164](https://gitlab.com/PlasticDigits/yieldomega/-/issues/164) §6.4 / §6.5). - [ ] Snapshot or manual QA note attached to this issue when done. /cc @Brouie — tracked from [#164](https://gitlab.com/PlasticDigits/yieldomega/-/issues/164) §6.6 polish nit.
PlasticDigits commented 2026-05-11 09:02:26 +00:00 (Migrated from gitlab.com)

marked as related to #164

marked as related to #164
PlasticDigits commented 2026-05-11 09:05:06 +00:00 (Migrated from gitlab.com)

mentioned in issue #164

mentioned in issue #164
PlasticDigits commented 2026-05-11 09:11:23 +00:00 (Migrated from gitlab.com)

mentioned in commit fda32ab5b5c8a1fdd58950d779845a5dc6479948

mentioned in commit fda32ab5b5c8a1fdd58950d779845a5dc6479948
PlasticDigits commented 2026-05-11 09:11:43 +00:00 (Migrated from gitlab.com)

Implemented (merged to main — fda32ab)

Summary: Unified derived buy-checkout formatting on Simple and Arena so live band, CHARM preview, Worth at launch ≈, Arena buy-summary chips, and Simple recent-buy CL8Y/CHARM cells all use the same 4 significant figures policy via new formatBuyHubDerivedCompact / timeCurveBuyHubFormat.ts. Arena now shows Worth at launch ≈ (same participantLaunchValueCl8yWei as Simple) via buyAddsCl8yAtLaunch on useTimeCurveArenaModel.

Docs / invariants: INV-FRONTEND-191-BUY-HUB-DERIVED in docs/testing/invariants-and-business-logic.md, new § in docs/frontend/timecurve-views.md, docs/testing/manual-qa-checklists.md#manual-qa-issue-191, skills/README.md, and .cursor/skills/yieldomega-guardrails/SKILL.md (item 23 extension).

Hero tiles (fixed fractional digits for per-block price ticks) and DOUB-at-launch (5 sigfigs on rate board) are unchanged by design — documented in timecurve-views §191.

Verification checklist (for reviewers)

  • /timecurve/arena during saleActive: You add + Worth at launch ≈ + Live band look visually consistent (same compact density).
  • /timecurve: band / preview / recent buys still read clearly; no surprise scientific notation for typical amounts.
  • ETH/USDM pay modes (when Kumbaya is live): band + CL8Y parenthetical still align with the 4-sigfig policy.
  • CL8Y spend text field still accepts full precision while editing (unchanged).

/cc @Brouie — please confirm on staging or local full stack when you have a moment; leaving this issue open until you sign off.

## Implemented (merged to `main` — `fda32ab`) **Summary:** Unified **derived** buy-checkout formatting on **Simple** and **Arena** so live band, CHARM preview, **Worth at launch ≈**, Arena buy-summary chips, and Simple recent-buy CL8Y/CHARM cells all use the same **4 significant figures** policy via new `formatBuyHubDerivedCompact` / `timeCurveBuyHubFormat.ts`. Arena now shows **Worth at launch ≈** (same `participantLaunchValueCl8yWei` as Simple) via `buyAddsCl8yAtLaunch` on `useTimeCurveArenaModel`. **Docs / invariants:** `INV-FRONTEND-191-BUY-HUB-DERIVED` in `docs/testing/invariants-and-business-logic.md`, new § in `docs/frontend/timecurve-views.md`, `docs/testing/manual-qa-checklists.md#manual-qa-issue-191`, `skills/README.md`, and `.cursor/skills/yieldomega-guardrails/SKILL.md` (item 23 extension). **Hero tiles** (fixed fractional digits for per-block price ticks) and **DOUB-at-launch** (5 sigfigs on rate board) are **unchanged** by design — documented in timecurve-views §191. ### Verification checklist (for reviewers) - [ ] `/timecurve/arena` during `saleActive`: **You add** + **Worth at launch ≈** + **Live band** look visually consistent (same compact density). - [ ] `/timecurve`: band / preview / recent buys still read clearly; no surprise scientific notation for typical amounts. - [ ] ETH/USDM pay modes (when Kumbaya is live): band + CL8Y parenthetical still align with the 4-sigfig policy. - [ ] CL8Y spend **text field** still accepts full precision while editing (unchanged). /cc @Brouie — please confirm on staging or local full stack when you have a moment; leaving this issue **open** until you sign off.
Brouie commented 2026-05-11 09:51:13 +00:00 (Migrated from gitlab.com)

verified at HEAD c3b43b8 — full pass on all 4 checklist items.

source spot-checks (4/4):

  • new helper formatBuyHubDerivedCompact at frontend/src/lib/timeCurveBuyHubFormat.ts:20, single source of truth TIMECURVE_BUY_HUB_DERIVED_SIGFIGS = 4
  • helper doccomment cites #191 and explicitly enumerates in-scope (derived buy-hub amounts) vs out-of-scope (hero price tiles, wallet balances, DOUB-per-CHARM)
  • helper wired in 14+ call sites across Arena (TimeCurveArenaView.tsx) and Simple (TimeCurveSimplePage.tsx): live band bounds, CHARM preview, buy-summary chips, Worth at launch ≈, recent-buys CL8Y/CHARM cells, 1 CHARM ≈ X CL8Y at launch rate hint
  • new buyAddsCl8yAtLaunch model field at useTimeCurveArenaModel.tsx:1137 — reuses participantLaunchValueCl8yWei (same helper Simple uses), exact math parity between Arena and Simple

tests:

  • vitest 313/313 pass (was 307 pre-fix, +6 new from #191 and #192 work)
  • targeted: timeCurveBuyHubFormat.test.ts (1/1)

live walk on fresh stack at HEAD with active swarm:

  • /timecurve Simple page during saleActive — live band, CHARM preview, Worth at launch ≈, 1 CHARM ≈ hint, recent buys CL8Y/CHARM all 4-sigfig consistent, no scientific notation surprises
  • /timecurve/arena during saleActive — You add, Worth at launch ≈ (now matches Simple), live band, buy-summary chips all 4-sigfig consistent
  • ETH/USDM pay modes — band reframes per token, CL8Y parenthetical aligns with 4-sigfig policy
  • CL8Y spend text field — still accepts full 18-decimal precision while editing (formatter scoped to derived outputs only)

ready for close on your side @PlasticDigits

verified at HEAD c3b43b8 — full pass on all 4 checklist items. source spot-checks (4/4): - new helper `formatBuyHubDerivedCompact` at frontend/src/lib/timeCurveBuyHubFormat.ts:20, single source of truth `TIMECURVE_BUY_HUB_DERIVED_SIGFIGS = 4` - helper doccomment cites #191 and explicitly enumerates in-scope (derived buy-hub amounts) vs out-of-scope (hero price tiles, wallet balances, DOUB-per-CHARM) - helper wired in 14+ call sites across Arena (TimeCurveArenaView.tsx) and Simple (TimeCurveSimplePage.tsx): live band bounds, CHARM preview, buy-summary chips, `Worth at launch ≈`, recent-buys CL8Y/CHARM cells, `1 CHARM ≈ X CL8Y at launch` rate hint - new `buyAddsCl8yAtLaunch` model field at useTimeCurveArenaModel.tsx:1137 — reuses `participantLaunchValueCl8yWei` (same helper Simple uses), exact math parity between Arena and Simple tests: - vitest 313/313 pass (was 307 pre-fix, +6 new from #191 and #192 work) - targeted: timeCurveBuyHubFormat.test.ts (1/1) live walk on fresh stack at HEAD with active swarm: - `/timecurve` Simple page during saleActive — live band, CHARM preview, Worth at launch ≈, `1 CHARM ≈` hint, recent buys CL8Y/CHARM all 4-sigfig consistent, no scientific notation surprises - `/timecurve/arena` during saleActive — `You add`, `Worth at launch ≈` (now matches Simple), live band, buy-summary chips all 4-sigfig consistent - ETH/USDM pay modes — band reframes per token, CL8Y parenthetical aligns with 4-sigfig policy - CL8Y spend text field — still accepts full 18-decimal precision while editing (formatter scoped to derived outputs only) ready for close on your side @PlasticDigits
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-05-11 10:26:23 +00:00
Brouie commented 2026-05-13 00:33:37 +00:00 (Migrated from gitlab.com)

mentioned in issue #197

mentioned in issue #197
PlasticDigits commented 2026-05-13 15:13:34 +00:00 (Migrated from gitlab.com)

mentioned in commit b93453e59a

mentioned in commit b93453e59a38fbbaf0b04614e79e1ca3563403dc
PlasticDigits commented 2026-05-21 04:38:41 +00:00 (Migrated from gitlab.com)

mentioned in issue #227

mentioned in issue #227
PlasticDigits commented 2026-05-21 04:41:43 +00:00 (Migrated from gitlab.com)

mentioned in issue #229

mentioned in issue #229
PlasticDigits commented 2026-05-21 13:21:02 +00:00 (Migrated from gitlab.com)

mentioned in issue #234

mentioned in issue #234
PlasticDigits commented 2026-05-21 13:21:13 +00:00 (Migrated from gitlab.com)

mentioned in issue #235

mentioned in issue #235
Sign in to join this conversation.
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/yieldomega#191
No description provided.