Fix post-buy effect toast visibility on Arena play route (#337) #513
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!513
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-337-post-buy-effect-toast-visibility"
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
Fixes post-buy effect toast visibility on the Arena play route (#337). Prior implementation rendered toasts at the bottom of the full command-console document (often below the fold) and delayed display up to 2.5s waiting for indexer head.
This MR:
ArenaEffectToastStacktodocument.bodywith fixed viewport glass styling (z-index: 110, safe-area insets).Acceptance criteria
/emits one toast per effectANVIL_E2E=1 E2E_REUSE_PREVIEW=1 npm run test:e2e -- e2e/anvil-arena-03-wallet-writes.spec.tsArenaEffectToastStack.test.tsx+ARENA_BUY_EFFECT_TOAST_DISMISS_MS=4000position: fixedoverlay; screenshots belownode scripts/capture-buy-effect-toast-screenshots.mjstypecheck && lint && npm testcd frontend && npm run typecheck && npm run lint && npm testScreenshots (desktop / tablet / mobile)
Third-party verification
bash scripts/start-qa-local-full-stack.sh --live-sale --no-swarm(or reuse running stack).cd frontend && npm run dev→ openhttp://127.0.0.1:5173/.data-testid="arena-buy-effect-toast") with timer/XP/Last Buyer copy.cd frontend && npm run typecheck && npm run lint && npm test.ANVIL_E2E=1 bash scripts/e2e-anvil.shor build preview +ANVIL_E2E=1 E2E_REUSE_PREVIEW=1 npm run test:e2e -- e2e/anvil-arena-03-wallet-writes.spec.ts.Docs: arena-views §337 ·
INV-FRONTEND-337-BUY-EFFECT-TOASTS.Security review
Commit reviewed:
5448ee6f2d81a6096be2b5817de6255fb57a7a8dScope: MR !513 — post-buy effect toast visibility (#337): React portal overlay, immediate preview-to-indexer toast upgrade, E2E Anvil cooldown warp helper, QA screenshot script, docs/invariant updates.
Outcome:
FINDINGS: 0medium+Summary
Reviewed added/modified application code and traced attacker-controlled input to sinks. No exploitable authn/authz bypass, injection, SSRF, XSS, secret leakage, or EVM/on-chain risk introduced by this diff.
{toast.line}); nodangerouslySetInnerHTML. Lines are built from formatted numeric/game-state helpers (buildArenaBuyProjectedEffectLines/buildArenaBuyActualEffectLines), not raw indexer strings.createPortal(..., document.body)withpointer-events: noneon the stack — UI positioning only; no click interception.warpAnvilPastBuyCooldownfetchtoVITE_RPC_URL(default127.0.0.1:8545) with fixed Anvil JSON-RPC methods — test/CI helper only; env-controlled endpoint, not production attack surface.BUY_TOAST_SCREENSHOT_BASE_URL(default localhost) — local dev artifact; out of production deployment path.Prior security-review threads: none on this MR.
Inline findings: none (no medium+ issues to thread on the diff).
Looks good on tablet and desktop.
FIX: On mobile, the toast icons are sometimes behind the mobile bottom nav. Instead, the bottom of the toast icons should be higher up the page, with a small gap above the mobile nav.
added 1 commit
c7680a85- fix(frontend): clear mobile buy-effect toasts above bottom navCompare with previous version
Fix bugfix follow-up
.arena-effect-toast-stackon≤720pxtobottom: calc(max(0.4rem, env(safe-area-inset-bottom, 0px)) + 3.95rem + 0.35rem)— same header clearance as the album dock plus a small gap above the fixed.app-headerbar. Commitc7680a85.mobileBuyEffectToastLayout.test.tsasserting mobile bottom offset parity withMOBILE_ALBUM_DOCK_CLEARANCE_ABOVE_HEADER_REM.Tests:
npm run typecheck && npm run lint && npm test -- --run src/pages/arena/mobileBuyEffectToastLayout.test.ts src/pages/arena/ArenaEffectToastStack.test.tsx— PASS.Thread resolution:
glab mr note resolve 143 420d3ca0e67ad9304bcd3e0e8db8d9c35b0da90breturned 403 withGITLAB_TOKEN(PlasticDigits) — please resolve note3472886050manually if still open.Removed
agent:fix_bugfixlabel.Security review
Commit reviewed:
c7680a851f2f67fa5a89e015493fbc4fdc6058c3Scope: MR !513 — post-buy effect toast visibility (#337): React portal + fixed viewport overlay, immediate preview with indexer batch upgrade, mobile bottom-nav clearance (
c7680a85), E2E Anvil cooldown warp helper, QA screenshot script, docs/invariant updates.Outcome:
FINDINGS: 0medium+Summary
Re-reviewed the full MR diff (including mobile layout follow-up) and traced attacker-controlled input to sinks. No exploitable authn/authz bypass, injection, SSRF, XSS, secret leakage, or EVM/on-chain risk introduced by this diff.
{toast.line}); nodangerouslySetInnerHTML. Lines come frombuildArenaBuyProjectedEffectLines/buildArenaBuyActualEffectLines(formatted numerics + fixed labels), not raw indexer strings.toastToneClassmaps to a fixed CSS class allowlist.createPortal(..., document.body)withpointer-events: noneon the stack — viewport positioning only; no click interception or auth surface.replaceArenaBuyEffectToastBatchswaps client-generatedbatchIdprefixes whenfindViewerBuyAtHeadconfirms the connected wallet owns head buy. Rapid serial buys can mis-associate preview/actual copy for the same wallet (UX integrity); not cross-user or privilege-boundary.c7680a85)bottomcalc + layout regression test only; no new input handling.warpAnvilPastBuyCooldownfetchtoVITE_RPC_URL(default127.0.0.1:8545) with fixed Anvil JSON-RPC methods — test/CI helper; env-controlled endpoint, not production user attack surface.BUY_TOAST_SCREENSHOT_BASE_URL(default localhost) — local dev artifact; out of production deployment path.Prior security-review comment:
5448ee6fthread (note3472629162) — findings unchanged; mobile follow-up adds no new medium+ surface.Inline findings: none (no medium+ issues to thread on the diff).
Security review: no medium+ findings on this diff.
mentioned in commit
e9af3f8902