Arena: Claim WarBow flag CTA with silence countdown (visible only when user holds pending flag) #218
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#218
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
Users can plant a WarBow pending flag from
/timecurve(Simple buy → ADVANCED → “Plant WarBow flag”), but the shipped UI does not expose a wallet path toclaimWarBowFlag()after the silence window. Arena already implementsrunWarBowClaimFlag,canClaimWarBowFlag, and gas estimation inuseTimeCurveArenaModel, andWarbowSectionhas a Claim flag button — butWarbowSectionis not mounted on/timecurve/arena(hero-onlyWarbowHeroActionsafter #101).Add a Claim flag control with a live hh:mm:ss countdown while silence is active, enabled only when the viewer may claim onchain.
UX requirements
Visibility: Show the control only when the connected wallet is the onchain pending flag holder (
warbowPendingFlagOwner=== viewer,warbowPendingFlagPlantAt > 0). Hide entirely when the viewer does not hold a planted flag.Primary control: Button label Claim flag.
Disabled by default during silence: While
ledgerNow < plantAt + WARBOW_FLAG_SILENCE_SEC, the button stays disabled.Countdown on the control: While disabled, show remaining silence as
Claim flag hh:mm:ss(or equivalent: label + monospace countdown on the same CTA). Countdown must use the same ledger “now” basis as phase / WarBow eligibility (indexer hero timer when available — seeledgerSecIntForPhase/effectiveLedgerSecin Arena), not wall clock alone.Enabled after silence: When
canClaimWarBowFlagis true (sale live + holder + silence elapsed), enable the button and allow submit → existingrunWarBowClaimFlag()→TimeCurve.claimWarBowFlag().Helper copy (below the button): Always show when the block is visible (values from onchain constants; format with
formatLocaleInteger):WARBOW_FLAG_CLAIM_BP)2 × WARBOW_FLAG_CLAIM_BPpenalty viaWarBowFlagPenalized)Optional nuance (muted secondary line or tooltip): if another buyer purchases before silence ends, the pending slot is cleared without the 2× penalty — holder only loses the claim opportunity.
Write barriers: Reuse existing Arena patterns: wrong-network
ChainMismatchWriteBarrier,buyFeeRoutingEnabledpreflight (note:claimWarBowFlaghas no CL8Y leg but sale-live gates still apply onchain),pvpErrfor reverts.Suggested placement
/timecurve/arena: ExtendWarbowHeroActions(or a small sibling card in the hero grid) so claim is discoverable next to Steal / Guard / Revenge — do not rely on remounting the full orphanedWarbowSectionunless product wants the entire detailed section back./timecurveSimple when the session reads show the viewer holds the pending flag (planted from Simple) — out of scope unless cheap to share one component.Onchain reference (authoritative)
From
TimeCurve.sol/docs/product/primitives.md:WARBOW_FLAG_CLAIM_BPWARBOW_FLAG_SILENCE_SECclaimWarBowFlagafter silence, no interrupting buyWarBowFlagClaimed)plantAt + 300s) before claim2 × WARBOW_FLAG_CLAIM_BP,WarBowFlagPenalized)Align with existing plant checkbox copy in
warbowFlagPlantMutedLine.Existing code to reuse
canClaimWarBowFlag,iHoldPlantFlag,flagSilenceEndSecinuseTimeCurveArenaModel.tsxrunWarBowClaimFlag()(already callsclaimWarBowFlag+refetchAll)warbowPendingFlagOwner,warbowPendingFlagPlantAt,WARBOW_FLAG_SILENCE_SEC,WARBOW_FLAG_CLAIM_BPformatCountdown(used for guard timer in hero)Acceptance criteria
warbowPendingFlagOwnersees no Claim flag block on Arena.claimWarBowFlagand refreshes BP / flag reads on receipt.Verification checklist
Related
docs/frontend/timecurve-views.mdstill describesWarbowSectionon Arena — update when this ships.changed the description
Should be component thats only visible when flag planted and at bottom of buy card, And component should also be added to the arena page in the "your rank/your bp" card also at bottom of that card
mentioned in commit
724eea2f76Implementation summary (merged to
main—724eea2)Shipped Claim flag on
/timecurve/arenafor wallets holding the global pending WarBow flag.What changed
WarbowClaimFlagHeroCardin the Arena hero grid (between Guard and Revenge), wired through existinguseTimeCurveArenaModeleligibility (iHoldPlantFlag,canClaimWarBowFlag,runWarBowClaimFlag).warbowPendingFlagOwner=== connected wallet andwarbowPendingFlagPlantAt > 0.Claim flag HH:MM:SSusingeffectiveLedgerSec(same ledger basis as guard / phase); enables to plain Claim flag when silence elapses.WARBOW_FLAG_CLAIM_BPreward line, 2× penalty line, and muted early-interrupt note viawarbowClaimFlagCopy.ts.ChainMismatchWriteBarrier+ existingrunWarBowClaimFlagpreflight (buyFeeRoutingEnabled, wrong chain →pvpErr).INV-FRONTEND-218-WARBOW-CLAIM-FLAG, timecurve-views §218, manual QA #218, guardrails +skills/play-timecurve-warbowcross-links.Automated tests (passing)
warbowClaimFlagCopy.test.tsWarbowClaimFlagHeroCard.test.tsxWarbowHeroActions.test.tsx(visibility + enabled/disabled states)Verification checklist
/timecurve/arena→data-testid="warbow-hero-claim-flag"appears with ~00:05:00 countdown; other wallets see no block.@nullvector_ux — please verify on staging or local Anvil stack when you have a moment. Leaving this issue open until sign-off.
mentioned in commit
8fd08418aeVerification checklist @PlasticDigits
/timecurve/arena→data-testid="warbow-hero-claim-flag"appears with ~00:05:00 countdown; other wallets see no block.Adding the optional penalty path (item 6) from earlier — walked it with two wallets.
Wallet A planted flag, waited past silence, wallet B bought during the post-silence window before A claimed. Confirmed:
WarBowFlagPenalizedeventPenalty path verified working. Full checklist now PASS from QA side.
mentioned in issue #236