[visual][arena] USD-equivalent displays: add staleness / last-updated affordance #192
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#192
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), USD-equivalent figures (e.g. total raise / podium prize hints) were present and plausible, but there was no indication of quote age or oracle/feed freshness. P3 polish — reduces silent-stale trust issues.
What is wrong
Users see USD or ≈ $ amounts with no “as of” context, so a delayed or cached price read looks the same as a live one.
Expected
When USD is derived from an off-chain or secondary feed, the UI should communicate staleness or refresh cadence (subtle text, tooltip, or icon), consistent with product risk appetite — without alarming users on every tick.
Relevant docs / skills / files
docs/frontend/timecurve-views.md,docs/testing/invariants-and-business-logic.md.Recommended fix
Acceptance criteria
/timecurveroutes either shows last-updated context or documents why USD is omitted.Verification checklist
docs/testing/manual-qa-checklists.mdif a repeatable visual check is added./cc @Brouie — tracked from #164 §6.7 polish nit.
marked as related to #164
mentioned in issue #164
mentioned in commit e3d5f2281c4b7c50d1c5ed32de1ddbaf604cf51d
Shipped (GitLab #192 — USD staleness affordance)
Merged to
main(commit onmainincludes INV-FRONTEND-192-USD-AFFORDANCE).What changed
/timecurve/arena, sale live): TOTAL USD block now has atitleexplaining the 1 CL8Y = 1 USD placeholder + ~1s core read poll, plus a muted line CL8Y total seen <relative> · USD is illustrative (1 CL8Y = $1) whentotalRaisedreads succeed.titlefor the static 0.98× CL8Y→USDM display shape; a second footnote states the static rate and Prize CL8Y preview seen … when preview data updates.cl8yUsdEquivalentDisplay.ts,useLastObservedAtForSerializedDep.ts,useRelativeFreshnessLabel.ts(~8s tick, no per-second churn).docs/testing/invariants-and-business-logic.md,docs/frontend/timecurve-views.md,docs/testing/manual-qa-checklists.md,skills/README.md,skills/play-timecurve-doubloon/SKILL.md,.cursor/skills/yieldomega-guardrails/SKILL.md.Verification checklist for @Brouie
podiumPayoutPreviewis wired.npm ci && npx vitest run src/lib/cl8yUsdEquivalentDisplay.test.ts src/pages/timecurve/TimeCurveSimplePodiumSection.test.tsx && npm run typecheckinfrontend/.Issue left open for your sign-off.
/cc @Brouie — please verify when you can.
mentioned in issue #191
verified at HEAD c3b43b8 — full pass on staleness affordance.
source spot-checks (4/4):
cl8yUsdEquivalentDisplay.tswithARENA_TOTAL_USD_EQUIV_TITLE+SIMPLE_PODIUM_USD_EQUIV_TITLEcopy strings explicitly framing the figures as not-live-oracle (1× placeholder for Arena, static 0.98× CL8Y→USDM shape for Simple podium)formatRelativeFreshnessEnglishthresholds non-alarming: <8s=just now, <60s=Xs ago, <60m=Xm ago, <48h=Xh ago, elseXd agouseRelativeFreshnessLabelhook ticks every 8s, skips the interval entirely whenfromMs === undefined, cleans up on unmountuseLastObservedAtForSerializedDephook uses useRef + useLayoutEffect, recordsDate.now()only when serialized dep changes, handles undefined resetwiring confirmed:
totalRaiseCl8yObservedAtMsfrom useTimeCurveArenaModel.tsx:1707)tests:
live walk on fresh stack at HEAD with active swarm:
/timecurve/arenaTotal USD — tooltip on hover shows theARENA_TOTAL_USD_EQUIV_TITLEcopy, freshness label tracks the ~1s contract poll cadence (ticks every ~8s per the hook design)/timecurveSimple podium ≈ USD — tooltip on hover shows theSIMPLE_PODIUM_USD_EQUIV_TITLEcopyready for close on your side @PlasticDigits
mentioned in issue #197
mentioned in commit
4294c9a706mentioned in issue #206
mentioned in merge request !389
mentioned in issue #229
mentioned in issue #235
mentioned in issue #302