[visual][arena] Unify numeric precision on Arena buy panel (CL8Y / CHARM / launch projection) #191
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega#191
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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/arenause 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
docs/testing/invariants-and-business-logic.md(Arena / TimeCurve sections).docs/frontend/timecurve-views.md.frontend/src/pages/timeCurveArena/TimeCurveArenaView.tsx,frontend/src/pages/timeCurveArena/useTimeCurveArenaModel.tsx, shared math/format helpers underfrontend/src/lib/timeCurveMath.ts,frontend/src/lib/timeCurvePodiumMath.ts.Recommended fix
timecurve-views.mdor invariants if the policy differs from Simple intentionally.Acceptance criteria
Verification checklist
/timecurve/arenawith funded wallet: compare Arena vs Simple for same band — formatting intent matches docs./cc @Brouie — tracked from #164 §6.6 polish nit.
marked as related to #164
mentioned in issue #164
mentioned in commit fda32ab5b5c8a1fdd58950d779845a5dc6479948
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 ≈ (sameparticipantLaunchValueCl8yWeias Simple) viabuyAddsCl8yAtLaunchonuseTimeCurveArenaModel.Docs / invariants:
INV-FRONTEND-191-BUY-HUB-DERIVEDindocs/testing/invariants-and-business-logic.md, new § indocs/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/arenaduringsaleActive: 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./cc @Brouie — please confirm on staging or local full stack when you have a moment; leaving this issue open until you sign off.
verified at HEAD c3b43b8 — full pass on all 4 checklist items.
source spot-checks (4/4):
formatBuyHubDerivedCompactat frontend/src/lib/timeCurveBuyHubFormat.ts:20, single source of truthTIMECURVE_BUY_HUB_DERIVED_SIGFIGS = 4Worth at launch ≈, recent-buys CL8Y/CHARM cells,1 CHARM ≈ X CL8Y at launchrate hintbuyAddsCl8yAtLaunchmodel field at useTimeCurveArenaModel.tsx:1137 — reusesparticipantLaunchValueCl8yWei(same helper Simple uses), exact math parity between Arena and Simpletests:
live walk on fresh stack at HEAD with active swarm:
/timecurveSimple 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/arenaduring saleActive —You add,Worth at launch ≈(now matches Simple), live band, buy-summary chips all 4-sigfig consistentready for close on your side @PlasticDigits
mentioned in issue #197
mentioned in commit
b93453e59amentioned in issue #227
mentioned in issue #229
mentioned in issue #234
mentioned in issue #235