TimeCurve Simple: live podium leaders card above Recent buys / Live ticker #113
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#113
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
Add a single cohesive card/section on the TimeCurve Simple route (
/timecurve) that surfaces all four v1 reserve podium categories (Last Buy, WarBow / Battle Points ladder, Defended Streak, Time Booster), each showing 1st / 2nd / 3rd winners from onchainTimeCurve.podium(category). Place this section immediately above the existing Recent buys block whose section badge reads Live ticker (PageSectionwithbadgeLabel="Live ticker"infrontend/src/pages/TimeCurveSimplePage.tsx).The UI must update in near–real-time as buys and WarBow activity change leaderboard snapshots onchain, and must visually highlight any row/placement where the wallet address matches the connected viewer (same semantics as Arena podium highlighting).
Styling must stay aligned with existing Yieldomega / Blockie Hills arcade surface treatment: reuse established podium copy, typography, ranking chrome, and art cues already used on Arena — no generic dashboard widgets.
Product / protocol alignment
Authoritative podium categories are the four fixed v1 tracks documented in
docs/product/primitives.md(see also guardrail note on legacy category sets). Contract category indices map throughPODIUM_CONTRACT_CATEGORY_INDEX→ UX label orderPODIUM_LABELS.Files likely to change
frontend/src/pages/TimeCurveSimplePage.tsxPageSectionabove the Recent buys section (~lines 1207–1366 today). Wire wallet address + decimals fromuseTimeCurveSaleSession. Subscribe to live updates (see below).frontend/src/index.css.podium-preview,.podium-block,.ranking-list,.spotlight-card) before introducing parallel Simple-only CSS; scope under.timecurve-simple-pageif needed for density or spacing.frontend/e2e/timecurve.spec.tstimecurve simple view does NOT show the dense PvP / podiums sections above the foldintentionally rejects Arena-only H2 headings (Podiums and prizes, WarBow feed, etc.). After this feature, extend or split assertions so Simple may show a compact podium summary without regressing the spirit of issue #40 (no full Arena density above the fold). Use a distinct accessible title for the new section (do not reuse exact Arena Podiums and prizesh2text unless product asks to unify copy).Optional / conditional:
frontend/src/pages/timecurve/(e.g.TimeCurveSimplePodiumSection.tsx)TimeCurveSimplePage.tsxmaintainable — recommended once JSX exceeds a reasonable threshold.docs/frontend/timecurve-views.mddocs/testing/invariants-and-business-logic.mdif maintainers want parity with other TimeCurve UX issues — only if docs updates are requested in the MR.Components / modules to reuse or refactor
Reuse as-is or with thin wrappers
usePodiumReads— BatchTimeCurve.podium(category)via wagmiuseReadContracts; primary data source for winners + raw metric strings per placement.podiumCopy.ts—PODIUM_LABELS,PODIUM_HELP,PODIUM_CONTRACT_CATEGORY_INDEXfor consistent naming with Arena / Protocol narrative.RankingList— Already implements rank glyphs (1st/2nd/3rd),--youhighlight styling viaRankingRow.highlight, and structured rows — matches highlight the user wallet requirement.PodiumAddressExplorerInlinepattern — Today lives insideTimeCurveSections.tsxas a local helper (blockie +AddressInline+ MegaScanner-style explorer link). Prefer extracting it tofrontend/src/pages/timecurve/PodiumAddressExplorerInline.tsx(orcomponents/) so Simple and Arena share one implementation instead of duplicating.formatPodiumLeaderboardValue— Category-aware formatting for onchain podium values (BP vs streak vs seconds vs CL8Y-ish displays). Import from Arena helpers or move tofrontend/src/lib/if coupling Simple →timeCurveArena/feels wrong for layering; goal is one formatter used by both surfaces.Mirror Arena economics (optional CL8Y payout preview)
Arena combines
podiumCategorySlices+podiumPlacementShareswith podium pool CL8Y balance to show approximate reserve payouts per place (useTimeCurveArenaModel.tsxpodiumPayoutPreview). Simple does not currently readpodiumPool()/ ERC20 balance.PodiumsSection— requires wagmi reads for pool address +balanceOf(mirror Arena pattern). Document RPC load vs UX benefit in MR.Realtime updates
Simple already listens for
Buyevents viauseWatchContractEvent(timeCurveBuyEventAbi) to bump indexer polling.Buylog (and optionally WarBow-related events if indexed reads lag), invalidate or refetch podium contract reads — e.g. exposerefetchfromusePodiumReadsor callqueryClient.invalidateQueriesscoped to the multicall batch.refetchIntervalaligned with other TimeCurve polling (respect indexer backoff philosophy where relevant — podium here is RPC/onchain, not indexer).buyFeedRefreshNoncetick if appropriate.Theming / worldbuilding
frontend/public/art/podium_prizes/(referenced infrontend/public/art/README.md) where it matches layout density — same spirit as Arena podium row /spotlight-cardtreatment inTimeCurveArenaView.tsx.docs/frontend/design.mdfor contrast, badges, and arcade panel language; keepPageSectionspotlight / badge tones consistent with adjacent Simple sections (timer, buy panel, stake panel).Tests to add or update
Unit / component (Vitest + Testing Library)
TimeCurveSimplePodiumSection.test.tsx(or equivalent) — Render with mockedusePodiumReads/ mocked rows; assert four categories; assert 1–2–3 labels; asserthighlight/ranking-list__item--youwhenaddressmatches a winner; assert empty / loading copy.PodiumAddressExplorerInlineis extracted, colocate*.test.tsxfor explorer link vs zero address fallback.E2E (Playwright)
frontend/e2e/timecurve.spec.ts: assert new section appears below hub row (timer + buy) and above Recent buys / Live ticker badge (stable selector:data-testidon the newPageSectionwrapper — required for CI resilience).scripts/e2e-anvil.sh,docs/testing/e2e-anvil.md): optional assertion after buys that podium rows non-empty — only if deterministic enough underworkers: 1constraints (issue #87).Documentation / invariant map
docs/testing/invariants-and-business-logic.mdreferencing this issue (follow existing TimeCurve frontend rows).Verification checklist (manual)
/timecurveshows the new podium section above Recent buys / Live ticker badge.podiumCopy.ts.RankingListyou styling or equivalent).useTimecurveHeroTimer/timeCurveSimplePhase.tsguardrails (issue #48).frontend/npm test+ targeted Playwright suites green perdocs/testing/strategy.md.Acceptance criteria (close when)
PageSectioncard inserted above the Recent buys section whose badge label is Live ticker onTimeCurveSimplePage.tsx.PODIUM_LABELSordering (via contract index mapping).Implemented and pushed the fix to
mainin commit6ccaf68(feat(frontend): add Simple live reserve podiums). Leaving this issue open for product verification.What changed:
/timecurveLive reserve podiums section above Recent buys / Live ticker.TimeCurve.podium(category)viaPODIUM_CONTRACT_CATEGORY_INDEX: Last Buy, WarBow, Defended Streak, Time Booster.Buylogs and also uses a light RPC refresh interval for WarBow-only movement.Verified:
pnpm --dir frontend exec vitest run src/pages/timecurve/TimeCurveSimplePodiumSection.test.tsxpnpm --dir frontend run typecheckpnpm --dir frontend run lint(existing warning only:IndexerConnectivityContext.tsxfast-refresh export)pnpm --dir frontend test(254 tests passed)pnpm --dir frontend run buildpnpm --dir frontend exec playwright test e2e/timecurve.spec.ts --workers=5(5 passed)YIELDOMEGA_DEPLOY_NO_COOLDOWN=1 bash scripts/start-qa-local-full-stack.sh --rich-state/v1/status, buys endpoint,make check-frontend-envhttp://127.0.0.1:5173/timecurve: podium section appears above Recent buys, four categories render, onchain rows populate from the QA stack, desktop + narrow viewport checked.@brouie please verify:
/timecurveshows Live reserve podiums above Recent buys / Live ticker.@PlasticDigits — source-side verification PASS on
6ccaf68at HEADe12ddab. live UX walk (your 7-item visual checklist) pending — local stack is dev-blocked on the indexer migration timestamp collision filed as #150 / MR !374. once that lands I'll pull, bring up the full stack, and walk all 7 items + screenshots + mobile viewport.what I confirmed source + automated:
vitest run TimeCurveSimplePodiumSection.test.tsx: 3/3 PASS, 32ms.tsc -btypecheck clean (also from #148 run).TimeCurveSimplePage.tsx: imports at L58-59 (TimeCurveSimplePodiumSection+usePodiumReads+TIMECURVE_PODIUMS_QUERY_KEY), hook invocation at L307 (const podiumReads = usePodiumReads(tc)), render at L1257.badgeLabel="Live ticker". correct ordering.PODIUM_CONTRACT_CATEGORY_INDEXmapping to all four v1 categories (Last Buy, WarBow, Defended Streak, Time Booster) perpodiumCopy.ts, refetches onBuylog + light RPC interval per your commit notes — wired throughTIMECURVE_PODIUMS_QUERY_KEYquery invalidation pattern.what I'll walk live once #150 merges:
/timecurveshows Live reserve podiums above Recent buys / Live ticker badgesource-side ready for sign-off on the implementation shape. live walk caveat above.
@Brouie Live ux walk required
mentioned in issue #164
@PlasticDigits — finishing the live UX walk on this for trail completeness. items 4/5/6 were the outstanding ones, all clean.
watched the Simple page podium for a while with the swarm running. last buy podium re-ranked three times in a row with no reloads — first frame had
0xdf37f8...0913on top at 562, then0xfabb0a...694atook 1st (also 562) and bumped the previous leader down to 3rd, then0x1cbd3b...c9ecjumped to 1st at 563 with0x2546bc...ec30showing up at 2nd. amounts ticking 562→562→563 and 140→140→141 line up with charm-mint progression as total_raised climbs. that is item 4.item 5 — across those same three frames the WarBow column kept the same BP-leaders (
0x02484c...627d,0x5e661b...43f1,0x8626f6...1199) but the prize-pool numbers drifted slightly (351→352, 87.8→87.9). different cadence from last buy, which is what i would expect — WarBow is on its own RPC poll, refreshing in place. Time Booster tracked the same three wallets, looks correct.item 6 — opened DevTools at iPhone 14 Pro Max (430×932). last buy and WarBow stack single-column, full-width cards, no overflow or horizontal scroll. trophies + amounts + addresses readable. caught a fresh buy land while at mobile width and it demoted the previous 1st on the podium without reload, so item 4 cross-confirmed on mobile too. Recent Buys below renders clean — fresh-buy card and big-bite card both fine.
one unrelated thing — saw the floating Rockie Hills chip overlap the Live Reserve Podiums header on mobile first-scroll. looks like the shared-component layout thing nullvector_ux already filed in #163, not flagging separately.
items 1/2/3/7 confirmed earlier via Simple page text dump. all 7 clean.
mentioned in issue #228