[visual][arena] WarBow steal-form validation leaks 'Enter a valid victim address' to page level on idle #195
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#195
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
During local-stack visual QA (#164 §7 exploratory), the WarBow PvP steal-form validation message
Enter a valid victim addressrenders at the page level even when the user has not yet attempted a steal action. The error appears to leak out of the form's status area into the broader Arena view.P3 polish — confusing UX (user sees an error referencing an action they never tried), not a functional bug.
What is wrong
On
/timecurve/arena, with WarBow PvP surface visible and the steal-victim address input empty:Enter a valid victim addressrenders at page level even before the user has typed anything or clicked any steal-related CTAExpected
Steal-form validation errors should:
Attempt stealor similar)Relevant docs / skills / files
frontend/src/pages/timeCurveArena/TimeCurveArenaView.tsx— look forsteal/victim/Attempt stealand the validation error stringdocs/testing/invariants-and-business-logic.md(Arena WarBow surfaces)Recommended fix
Enter a valid victim addressstringhasAttemptedSteal), orAcceptance criteria
Enter a valid victim addressmessageVerification checklist
/timecurve/arenawith WarBow surface visible — no error visiblementioned in issue #164
mentioned in commit 6858355d6da3e580fa29aa85a678efe1633cf2a2
Shipped on
main(merge5ad24ba)Summary
pvpErr(hero / post–WarBow section banners). They render only under the steal victim field inWarbowSection(data-testid="warbow-steal-victim-form-status").warbowActionHintStatusMessageso a fresh Arena load does not show steal-field errors above the form.frontend/src/lib/warbowStealVictimInput.ts+ VitestwarbowStealVictimInput.test.ts(INV-FRONTEND-195-WARBOW-STEAL-FORM).Verification checklist for @brouie
/timecurve/arena(wallet connected, live sale): no victim-validation error in the hero error strip or the wide muted hint above the WarBow form when the victim field is empty.0xabc): Enter a valid victim address appears only directly under the victim input (redStatusMessage), not inpvpErrbanners.pvpErr).StatusMessagestill behaves as before; onchain reverts still surface viapvpErrwhere appropriate.Requesting verification from @brouie when convenient. Leaving the issue open as requested.
mentioned in issue #194
verified at HEAD 5ad24ba — full pass on all 5 checklist items.
source spot-checks:
warbowStealVictimInputFormatError(raw)at frontend/src/lib/warbowStealVictimInput.ts returns null for empty input (so a fresh load shows no validation chrome), null for valid 40-hex address, andWARBOW_STEAL_VICTIM_INVALID_ADDRESSfor non-empty invalid input — uses viemisAddressfor proper checksum validationWARBOW_STEAL_VICTIM_INVALID_ADDRESS(Enter a valid victim address) andWARBOW_STEAL_VICTIM_EMPTY_ATTEMPT(Enter a victim address before attempting a steal.) — distinct messages for the two distinct user statesstealVictimInputFormatErrorandarenaWarbowStealFormErrfromuseTimeCurveArenaModelinto the WarBow section so errors render only under the steal-victim input (data-testid="warbow-steal-victim-form-status"), not in heropvpErrbanners or the widewarbowActionHinthint striptests:
warbowStealVictimInput.test.ts(3/3 pass)live walk on fresh stack at HEAD (saleActive, swarm running):
/timecurve/arenawith empty victim field — noEnter a valid victim addressin hero error strip, no leak to wide muted hint above the WarBow form0xabc) — error appears only directly under the victim input, not in pvpErr bannersEnter a victim address before attempting a steal.appears only under the input0xDf37F8...0913, 5500 BP) + ineligible 2x rule preflight — existing preflight StatusMessage continues to behave as before (2x rule not met · ... has 5500 BP vs your 5000 BP, so the steal would revert right now), scoped to the form area not leaking to page-level bannersready for close on your side @PlasticDigits
mentioned in commit
292c608bad