Time Booster podium: tiered duration score (seconds · mm:ss · hh:mm:ss · dd:hh:mm:ss) #228
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#228
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
On
/timecurve(Simple reserve podiums) and/timecurve/arena(podium spotlights), Time Booster leaderboard scores render as a raw second count with anssuffix (e.g.Score: 300s added,300 s). Large cumulative values (totalEffectiveTimerSecAdded/ indexerbuyer_total_effective_timer_sec) are hard to scan. They should use tiered clock formatting aligned with existing timer helpers informatTimer.ts.Current behavior
frontend/src/pages/timecurve/timeCurveSimplePodiumScore.tsScore: ${digits}s addedwhencategoryIndex === 3frontend/src/pages/timecurve/podiumFormat.tsviauseTimeCurveArenaModel.tsx${formatLocaleInteger(bi)} swhencategoryIndex === 3Example from
TimeCurveSimplePodiumSection.test.tsx: fixture value300rendersScore: 300s added.Onchain / indexer semantics are unchanged: Time Booster ranks wallets by cumulative effective deadline seconds added (
docs/product/primitives.md—totalEffectiveTimerSecAdded).Expected behavior
Format whole seconds only (floor/clamp negatives to
0) with these tiers:ssuffix and no colons (e.g.45, not45sor00:45)mm:ss(reuseformatMmSsCountdown; both segments zero-padded, minutes may exceed 99)HH:MM:SS(reuseformatCountdown)dd:HH:MM:SS— whole days + remainder clock (same day/remainder split asformatLaunchCountdown, but single string with a:between day count and clock, e.g.2:03:13:07for 2d 3h 13m 7s)Copy: Simple meta can stay
Score: <formatted> added(e.g.Score: 05:00 addedfor 300s,Score: 45 addedfor 45s). Arena spotlight value should use the same formatter (no separatessuffix).Recommended implementation
formatTimeBoosterPodiumSec(totalSec: number | bigint): stringnext toformatTimer.ts(or a thintimeBoosterPodiumFormat.tsthat importsformatMmSsCountdown/formatCountdown/ the day split fromformatLaunchCountdown).formatSimplePodiumScoreLine(category 3)formatPodiumLeaderboardValue(category 3)0,59,60,3599,3600,86399,86400, multi-day samples; clamp-1→0.timeCurveSimplePodiumScore.test.ts(60→Score: 60 addedorScore: 01:00 addedper tier rule at exactly 60)TimeCurveSimplePodiumSection.test.tsx(300→Score: 05:00 added)+Xs time-booster creditintimeCurveBuyProjectedEffects.ts— podium-only unless product wants parity.Do not change indexer/API payloads or onchain reads; this is display-only.
Verification criteria
Automated
npm test -- --run formatTimer(or new module test file) passes tier boundary table.npm test -- --run timeCurveSimplePodiumScoreandTimeCurveSimplePodiumSectionpass updated expectations.Manual (local Anvil + indexer optional)
/timecurve→ Prize podiums → Time Booster.s, no colons).mm:ss(e.g. 300 →05:00).HH:MM:SS.d:HH:MM:SSday prefix./timecurve/arena→ Time Booster spotlight leader value matches the same formatting for the #1 slot raw value.BP, Defended Streak copy).Regression guards
Score: —(or existing empty-winner behavior), notScore: 0 addedunless product explicitly wants zero shown.formatLocaleInteger; colon tiers stay fixed-width numeric segments performatTimerconventions.References
docs/product/primitives.md(Time booster = most effective timer seconds added)frontend/src/pages/timecurve/formatTimer.tsdocs/testing/manual-qa-checklists.md(four categories, issue #113 area)Walked what's walkable pre-ship.
Automated baseline (current code on main @
8fd0841):Full Vitest suite ran clean — 534/534 tests pass across 93 files. That covers all three test files this issue lists in the automated criteria (
formatTimer,timeCurveSimplePodiumScore,TimeCurveSimplePodiumSection). Pre-refactor baseline locked.Current-state baseline (production /timecurve → PRIZE PODIUMS):
Time Booster category leader values currently render with raw
Nnnns addedsuffix as described in the issue. Walked the podium card visually on production — three leader rows showing whole-second integer scores withs addedsuffix, no tier formatting applied.Per the proposed tier rules, the current production leader values all fall in the
1h – 23h 59m 59sband and would render asHH:MM:SSpost-refactor. None of the current leaders happen to be in the sub-60s, mm:ss, or multi-day tiers, so those tier boundaries would need fixture data to demonstrate.Other podium categories (Last Buy "seconds ago", WarBow BP, Defended Streak "sequential buys") render unchanged — confirms the out-of-scope guard from the issue body.
Acceptance criteria items walkable pre-ship:
Items blocked pre-ship (require refactor to ship first):
timeCurveSimplePodiumScore.test.ts/TimeCurveSimplePodiumSection.test.tsxexpectationsItems not exercised in this session:
/timecurve/arenaTime Booster spotlight leader value — not located in the visible Arena layout (STEAL/GUARD/REVENGE surface). Could be sale-state dependent or below the scroll I captured. If it's user-visible somewhere I missed, point me to it and I'll grab.Pre-refactor baseline locked. Ready to re-walk when the refactor lands.
mentioned in commit
472fc892efImplementation complete (main @
472fc89)Tiered Time Booster podium duration formatting is shipped on
/timecurve(Simple reserve podiums) and/timecurve/arena(podium spotlight leader values).What changed
formatTimeBoosterPodiumSec(timeBoosterPodiumFormat.ts) with tier boundaries:ssuffixmm:ssHH:MM:SSd:HH:MM:SS(e.g.2:03:13:07)formatSimplePodiumScoreLine(category 3) andformatPodiumLeaderboardValue(Arena).Score: —(notScore: 0 added).INV-FRONTEND-228-TIMEBOOSTER-FMTin invariants, timecurve-views, manual QA, guardrails, and./skills/index.Display-only — indexer/API/onchain payloads unchanged.
Automated verification (passed)
npm test -- --run timeBoosterPodiumFormat— 12 tier boundary casesnpm test -- --run timeCurveSimplePodiumScore— updated expectations + zero-slot guardnpm test -- --run TimeCurveSimplePodiumSection—300→Score: 05:00 addedManual verification checklist
/timecurve→ Prize podiums → Time Booster: scores use tiered clocks (production leaders in the HH:MM:SS band should no longer show rawNnnns added)sor colons (e.g.Score: 45 added)mm:ss(e.g. 300 s →Score: 05:00 added)HH:MM:SSd:HH:MM:SS/timecurve/arena: Time Booster spotlight leader value matches same formatting (no trailings)Score: —, notScore: 0 addedDocs
@nullvector_ux — please verify on staging/production when convenient. Leaving issue open until manual sign-off.
Manual verification checklist @PlasticDigits
/timecurve→ Prize podiums → Time Booster: scores use tiered clocks (production leaders in the HH:MM:SS band should no longer show rawNnnns added)sor colons (e.g.Score: 45 added)mm:ss(e.g. 300 s →Score: 05:00 added)HH:MM:SSd:HH:MM:SS/timecurve/arena: Time Booster spotlight leader value matches same formatting (no trailings)Score: —, notScore: 0 added