WarBow steal daily-cap UX: UTC reset in summary and inline cap warning (#361) #533
No reviewers
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!533
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-361-warbow-steal-cap-ux"
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
Implements GitLab #361 (parent #360): WarBow play surface now surfaces UTC-day steal quota and pre-submit cap warnings.
STEAL QUOTA: X / 3 · resets in HH:MM:SSusing onchainstealsCommittedByAttackerOnDayandwarbowUtcDayResetSec(matchesTimeArenafloor division).describeStealPreflightrenders directly above Steal when a victim is selected; Steal disabled on preflighterror; submit path reads fresh attacker + victim cap counts.INV-FRONTEND-361-WARBOW-STEAL-CAP-UX, arena-views §361,play-time-arena-warbowskill.Acceptance checklist
X/3+ UTC-day reset countdowncd frontend && npm test -- ArenaWarbowHeroPanel.test.tsdescribeStealPreflightcd frontend && npm test -- ArenaWarbowHeroPanel.test.ts timeArenaUx.test.tsuseArenaWarbowHerostealPreflightuseMemo+ contract reads; unit testscd frontend && npm test -- indexerFirstDisplay.test.tsnpm run typecheck && npm run lint && npm test(frontend)cd frontend && npm run typecheck && npm run lint— PASS;npm test— 7 pre-existing failures inArenaSimplePage.test.tsx(useQuerymock); issue-targeted suites PASS/quota + inline warningindexerFirstDisplay.test.tsBlockers: Full
npm teststill has unrelatedArenaSimplePage.test.tsxreact-query mock failures onmain; issue-specific suites pass.Third-party verification
Manual (Anvil stack):
At
/with a connected wallet: viewer summary shows STEAL QUOTA + countdown; select a capped victim with bypass off → warning appears above Steal before submit.Bugbot is not enabled for your account, so this pull request was not reviewed.
Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.
Security review — MR !533
Commit reviewed:
78f57e5fccc3c80496075f1dded250ab1f2c083dBase:
7623e590c5da80c37eefc47998da41ed48345ad9Scope
Frontend-only WarBow steal daily-cap UX (#361): UTC-day reset countdown, inline
describeStealPreflightwarnings, targeted onchainstealsCommittedByAttackerOnDay/stealsReceivedOnDayreads, and submit-time fresh attacker cap read inreadFreshWarbowStealSubmitPreflight. No contract, indexer API, or dependency changes.Method
warbowTargetsBP,chainNowSec) to sinks (React render,eth_callargs,warbowStealsubmit).errortone before allowance/tx; cap enforcement remains onchain inTimeArena.StatusMessagetext children;describeStealPreflightuses static copy +shortAddresson validated0xaddresses).Outcome
FINDINGS: 0 (no medium, high, or critical issues on this diff)
Security review: no medium+ findings on this diff.
Inline threads: none.
Notes (informational, below threshold)
VITE_INDEXER_URLis set is unchanged from #301; submit still uses fresh onchain victim BP/caps/guard. Stale indexer data may mislead UI but does not bypass onchain checks.error;warning(daily cap) still allows submit — intentional, with onchain revert if bypass not selected.added 3 commits
main824be4bf- Merge origin/main into issue-361-warbow-steal-cap-uxCompare with previous version
Bugbot is not enabled for your account, so this pull request was not reviewed.
Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.
Resolved merge conflicts with
mainby keeping both viewer-summary features:STEAL QUOTAline (warbow-hero-steal-quota-summary) with UTC-day reset countdownFLAG:line (warbow-hero-viewer-summary-flag) when the viewer holds a planted flagskills/play-time-arena-warbow/SKILL.mddocuments both invariants. Sanity:npm run typecheckand targeted tests (ArenaWarbowHeroPanel,warbowUtcDayReset,timeArenaUx,indexerFirstDisplay) — all PASS.Security review — MR !533
Commit reviewed:
824be4bf42221c9ce87e8e745c8a48cbca9989d0Base:
b29ccf014063701fa055d87fc64d01e705089718Scope
Frontend-only WarBow steal daily-cap UX (#361): UTC-day reset countdown in viewer summary, inline
describeStealPreflightwarnings above Steal, targeted onchainstealsCommittedByAttackerOnDay/stealsReceivedOnDayreads, and submit-time fresh attacker cap read inreadFreshWarbowStealSubmitPreflight. Merge commit also retains #362 viewer-summary FLAG: line from conflict resolution. No contract, indexer API, or dependency changes.Method
warbowTargets.battlePoints, indexerchainNowSec) to sinks (React render viaStatusMessage,eth_callargs on fixedTimeArenaaddress,warbowStealsubmit).isAddressbefore contract reads; narrative copy usesshortAddresson validated0xaddresses (React text children, nodangerouslySetInnerHTML).errortone before allowance/tx; daily-cap enforcement remains onchain inTimeArena.warbowSteal(stealsReceivedOnDay/stealsCommittedByAttackerOnDaywithblock.timestamp / SECONDS_PER_DAY).78f57e5f: findings still do not apply; merge delta (#362 FLAG summary line) is static copy +formatCountdown(number)only.Outcome
FINDINGS: 0 (no medium, high, or critical issues on this diff)
Security review: no medium+ findings on this diff.
Inline threads: none.
Notes (informational, below threshold)
VITE_INDEXER_URLis set follows existing #301 pattern; submit still uses fresh onchain victim BP/caps/guard. Stale indexer data may mislead UI but cannot bypass onchain checks.error;warning(daily cap) still allows submit — intentional, with onchain revert if bypass not selected.utcDayIdin submit preflight is derived from cachedchainNowSec; day-boundary skew may affect warning accuracy but not cap enforcement onchain.mentioned in commit
6550fe97a0