Remove dead frontend modules; add tests, a11y, and ESLint fixes (#321) #477
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!477
Loading…
Reference in a new issue
No description provided.
Delete branch "verify/issue-321-dead-modules-tests-a11y-eslint"
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
Verification for GitLab #321 found the acceptance work was not yet on
main. This MR implements it:TimerHeroLiveBuys.tsx,ArenaBuyModals.tsx, ande2e/arena-live-buys-modals.spec.ts; dropped PlaywrighttestIgnoreand the dedicatedplaywright.arena-ui.config.ts.ArenaWarbowHeroPanel,ArenaCharmCredCard,ArenaSimplePage(smoke),useArenaSaleSession(submit guards), andWalletProfileModal(dialog a11y + XSS guard).aria-labelon buy CTA; wallet profile modal restores focus to opener on close.frontend/src/pages/arena/(hook deps + helper-file refresh rule suppressions).Verification checklist
rg 'TimerHeroLiveBuys|ArenaBuyModals' frontend/cd frontend && npm testArenaWarbowHeroPanel.test.tsx,ArenaCharmCredCard.test.tsx,ArenaSimplePage.test.tsx,useArenaSaleSession.test.ts,WalletProfileModal.test.tsxArenaWarbowHeroPanel.test.tsx+ source (onTargetListKeyDown, rovingtabIndex)npm run lintzero warnings insrc/pages/arena/cd frontend && npx eslint src/pages/arena/cd frontend && npm run typecheckindexerFirstDisplay.test.ts+ CharmCred source testWalletProfileModal.test.tsxFollow-ups
ArenaBuyModalsmentions indocs/frontend/arena-views.mdanddocs/testing/manual-qa-checklists.mdin a docs-only pass.changed the description
changed the description
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit
dfbf2af670. Configure here.Modal close skips focus restore
Medium Severity
Focus restoration on profile modal close never runs for normal dismiss paths. Closing sets
addressto null, the component returns null and unmounts the dialog before the effect can readdialogRefand callreturnFocusRef.current?.focus().Additional Locations (1)
frontend/src/components/WalletProfileModal.tsx#L52-L53Reviewed by Cursor Bugbot for commit
dfbf2af670. Configure here.Security review — MR !477
Commit reviewed:
dfbf2af67046b356cc5f19ae130410f026809ac1Scope: Frontend-only diff — dead arena module removal (
TimerHeroLiveBuys,ArenaBuyModals, Playwright arena-ui config/spec), Vitest/a11y additions (ArenaWarbowHeroPanel,ArenaCharmCredCard,ArenaSimplePage,useArenaSaleSession,WalletProfileModal), ESLint suppressions, anduseArenaSaleSessionhook-deps cleanup (payUsesKumbayablur reconciliation; removal of unusedreferralRegistryAddr).Method: Traced attacker-controlled inputs (indexer wallet addresses, revert/error strings, pay-route labels, WarBow target list indices) to sinks (DOM render,
querySelector, contractsubmitBuypaths). No smart-contract or indexer service code changed in this MR.Outcome: FINDINGS: 0 medium+ vulnerabilities on this diff.
Notes (below severity threshold / out of scope):
WalletProfileModal.tsxis an a11y regression, not a security issue.AddressInline/useWalletStats/explorerAddressUrlretain existingisAddress/ length guards; new XSS regression test documents prior behavior rather than introducing new rendering paths.referralRegistryAddrremoval is dead-code cleanup — it was listed insubmitBuydeps but never referenced in the callback body on the base branch.querySelector(\[data-warbow-target-index="${wrapped}"]`)` uses a computed integer index, not user-controlled selector text.Inline security threads: none
Security review: no medium+ findings on this diff.
mentioned in commit
0cf96cad88added 61 commits
main0cf96cad- Merge origin/main into verify/issue-321-dead-modules-tests-a11y-eslintCompare with previous version
Resolved merge conflicts with
origin/main.Source files: Kept main's WarBow keyboard helper (
warbowTargetListKeyboard), buy-preflight refactor (arenaSaleSessionBuyPreflight), and ESLint comment wording. Merged complementary #321 tests from both sides (WarBow PvP dismiss, CharmCred indexer-first/CRED-unavailable, SimplePage smoke regions, WalletProfile focus-restore + XSS guards).Fixes: Removed duplicate
aria-labelon the ArenaSimplePage buy CTA (auto-merge artifact), dropped duplicatepayUsesKumbayahook dep, and updateduseArenaSaleSession.test.ts/arenaSimplePlaySurface.test.ts/revertMessage.test.tsfor the preflight refactor.Verification:
npm run typecheck,npx eslint src/pages/arena/, andnpm test— 669 tests PASS.resolved all threads
changed the description
Security review — MR !477
Commit reviewed:
0cf96cad8875bf120b8f199cd6071dd46e921891Scope: Re-review after merge-resolution with
origin/main. Frontend-only diff (11 files): Vitest/a11y additions (WalletProfileModal,ArenaWarbowHeroPanel,ArenaCharmCredCard,ArenaSimplePage,useArenaSaleSession, play-surface copy tests),useArenaSaleSessionhook-deps ordering (payUsesKumbayain spend-blur reconciliation), revert-message test expectation, removal of unusedplaywright.arena-ui.config.ts/test:e2e:arena-uiscript.Method: Traced attacker-controlled inputs (indexer wallet addresses, revert/error strings,
payWithtoken selector, WarBowpvpErr) to sinks (DOM render,querySelector, contract submit paths). No smart-contract or indexer service code changed in this MR.Outcome: FINDINGS: 0 medium+ vulnerabilities on this diff.
Notes (below severity threshold / out of scope):
WalletProfileModal.tsxis an a11y regression (earlyreturn nullunmounts<dialog>before the close effect runs), not a security issue.AddressInline/explorerAddressUrl/useWalletStatsretain existingisAddress/0x+42-length guards; new XSS regression tests document prior behavior rather than introducing new rendering paths. Profile open paths flow throughAddressInlineisAddressbeforeonOpenProfile.pvpErrrenders as React text children inStatusMessage(nodangerouslySetInnerHTML); sources are app-controlled copy orfriendlyRevertFromUnknownon chain errors.payUsesKumbayadependency reorder is hook-correctness only (dep was already present).querySelector(\[data-pay-token-value="${payWith}"]`)uses typedPayWithAsset` enum values, not arbitrary user text.Inline security threads: none
Security review: no medium+ findings on this diff.
mentioned in commit
551cdb0681mentioned in issue #321