Show planted-flag silence timer in WarBow viewer summary #362
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#362
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?
Parent
GitLab #360 — User bug report (ui/ux)
Approved item: show the planted-flag silence timer in the WarBow viewer summary (same area as BP / guard), not only inside the Flag subcard.
Current codebase
ArenaWarbowHeroPanelrenders a viewer summary card at the top of the WarBow hero section:When the viewer holds a planted flag, silence / claim state is shown only inside the Flag subcard (
warbow-hero-card--claim-flag):warbow-hero-flag-silence-countdown— “Silence ends in MM:SS” or “Silence complete — claim now…”WarbowClaimFlagButton— claim CTAProps already wired from
ArenaSimplePageviauseArenaSaleSession:showClaimFlagControl(showWarbowClaimFlagButton)canClaimWarBowFlagflagSilenceEndSecledgerNowSec(falls back tow.chainNowSec)Silence math:
warbowClaimFlagSilenceRemainingSecinlib/warbowClaimFlagState.ts; constantWARBOW_FLAG_SILENCE_SEC = 300(5 minutes) inarenaWarbowConstants.ts.Onchain: Flag plant on buy → silence window →
warbowClaimFlagfor +BP; interrupt penalty if another buy clears the slot after silence (warbowHeroSubcardHelpCopy.ts).Why needed
Players watching their BP and guard status cannot see flag silence progress without scanning to the Flag card. #360 asks for the planted-flag timer beside the BP field so high-signal WarBow state lives in one glanceable strip.
Constraints / guardrails
formatCountdown; do not duplicate silence logic.showClaimFlagControl === false), do not show a flag line in the summary.ledgerNowSec/ indexer head time when available (already passed from session).warbow-hero-viewer-summary__linetypography; avoid layout break on narrow mobile (~360px manual QA widths).Relevant files
frontend/src/pages/arena/ArenaWarbowHeroPanel.tsxfrontend/src/lib/warbowClaimFlagState.tsfrontend/src/lib/arenaWarbowConstants.tsfrontend/src/pages/arena/ArenaSimplePage.tsxfrontend/src/pages/arena/useArenaSaleSession.tsfrontend/src/components/WarbowClaimFlagButton.tsxfrontend/src/index.css(.warbow-hero-card--viewer-summary)frontend/src/pages/arena/ArenaWarbowHeroPanel.test.tsxRecommended direction
warbow-hero-card--viewer-summarywhenshowClaimFlagControlis true:FLAG: **MM:SS** until claim(or similar), using existingflagSilenceRemainingSec+formatCountdown.FLAG: **claim now**(short urgency copy; full sentence can remain in Flag card).data-testid="warbow-hero-viewer-summary-flag"for tests.Acceptance criteria
showClaimFlagControl), the viewer summary card shows a flag silence timer (or “claim now” when eligible) alongside BP and GUARD.ledgerNowSec/ chain clock as the Flag subcard (values stay in sync).Test plan
cd frontend && npm test -- ArenaWarbowHeroPanel.test.tsxshowClaimFlagControlcd frontend && npm run typecheckcd frontend && npm run lintcd frontend && npm testAttack / abuse test plan
flagSilenceEndSecand ledger second — no independent timers that diverge.showClaimFlagControlis true (session derives from onchain/indexer flag ownership).WarbowClaimFlagButtonguards remain authoritative.Verification criteria
npm run typecheck && npm run lint && npm testinfrontend/— PASSArenaWarbowHeroPanel.test.tsxcovers viewer-summary flag line for active silence and post-silence statesmentioned in issue #360
mentioned in commit
b58a0c023fmentioned in merge request !532
mentioned in commit
b29ccf0140mentioned in commit
824be4bf42mentioned in merge request !533
mentioned in commit
e7c87b44c7mentioned in merge request !535
mentioned in commit
667f2f370amentioned in commit
2a7ad1d3a9mentioned in merge request !536
Verification — GitLab #362 (PASS)
Verified Show planted-flag silence timer in WarBow viewer summary on
main@667f2f37(mergedissue-362-verify-warbow-flag-supplement).Acceptance criteria
FLAG:timer / claim-now in viewer summary beside BP & GUARD390×844):data-testid="warbow-hero-viewer-summary-flag"→FLAG: 00:04:57 until claim; post-warp →FLAG: claim nowArenaWarbowHeroPanel.test.tsx—omits viewer-summary flag line when no planted flag (#362)00:04:57 until claimmatched subcardSilence ends in 00:04:57; both useflagSilenceEndSec+ledgerNowSecviawarbowClaimFlagSilenceRemainingSecwarbow-hero-flag-silence-countdown+warbow-hero-claim-flag-submitvisible; unit tests for claim CTA after silenceTest plan
cd frontend && npm run typecheckcd frontend && npm run lintcd frontend && npm test -- ArenaWarbowHeroPanel.test.tsxcd frontend && npm teststart-local-anvil-stack.sh(native PG:5433, Anvil:8545, indexer:3100) → level-5 buy withplantWarBowFlag=true→ ViteVITE_E2E_MOCK_WALLET=1→ Playwright on/WarBow tabAttack / abuse checks
flagSilenceRemainingSecmath)showClaimFlagControlderiveWarbowClaimFlagFields)WarbowClaimFlagButtonstill authoritative)Infra notes
GET /v1/arena/timersomits planted-flag fields (expected); frontend supplements viaarenaV2WarbowFlagSupplementContractsonchain reads (#301 / #362).INV-FRONTEND-362-WARBOW-VIEWER-SUMMARY-FLAG.No repo changes required — closing as verified.
mentioned in issue #370