Add post-buy effect toasts on Arena play route #337
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#337
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
Gap analysis follow-up from #331.
Current codebase
buildArenaBuyProjectedEffectLines(frontend/src/pages/arena/arenaBuyProjectedEffects.ts) — timer extension, XP, level transition, WarBow lines./.ArenaSimplePage.tsxorchestrates buy flow and already tracksbuyFeedRefreshNonce/ session state after successful txs.Why needed
Approved: after a successful buy on the play route, show a toast per effect the buy had (timer extension, +XP, level-up, WarBow flag, etc.), each fading quickly — micro-moment feedback without adding persistent UI chrome.
Constraints / guardrails
prefers-reduced-motion.buildArenaBuyProjectedEffectLines/ post-buy parsed buy row where possible — avoid duplicating XP/timer math.INV-FRONTEND-297).Relevant files
frontend/src/pages/arena/arenaBuyProjectedEffects.tsfrontend/src/pages/arena/ArenaSimplePage.tsxfrontend/src/lib/timeArenaUx.tsfrontend/src/lib/indexerApi.tsBuyItemshapefrontend/src/index.cssRecommended direction
ArenaEffectToastStack(context or local state) with glass styling anddata-testid="arena-buy-effect-toast".ArenaSimplePage); AUDIT optional out-of-scope unless trivial.Acceptance criteria
/emits one toast per effect (timer, XP, level, WarBow as applicable).cd frontend && npm run typecheck && npm run lint && npm testpasses.Test plan
cd frontend && npm run typecheck && npm run lint && npm testarenaBuyProjectedEffects.test.tsintegrationcd frontend && CI=1 npm run test:e2e -- --workers=5 e2e/anvil-arena-03-wallet-writes.spec.tsVitest: mock buy success pushes N toasts; verify dismiss timer; reduced-motion skips enter animation.
Attack / abuse test plan
Verification criteria
mentioned in issue #331
mentioned in commit
5d8564c77fPost-buy effect toast screenshots (implementation verification)
Glass toast stack after a successful DOUB buy on
/(Anvil + mock wallet).Desktop (1280×900)
Tablet (834×1112)
Mobile (390×844)
Captured via Playwright against local Anvil stack (
scripts/start-qa-local-full-stack.sh+npm run dev).mentioned in merge request !510
mentioned in commit
e1ebea744ementioned in commit
a7d3b64ee4mentioned in merge request !511
The toast is not visible in the screenshots. Fix the toast and make sure its working properly while matching our Cyberminimalist Glass System design standards.
mentioned in commit
5448ee6f2dmentioned in merge request !513
Post-buy effect toast fix — verification (#337)
Addressed feedback that toasts were not visible in prior screenshots.
Root cause
position: absoluteat the bottom of the fullarena-command-consolecolumn (often below the viewport after buy).Fix
yieldomega-glass-arena.css).Verification
cd frontend && npm run typecheck && npm run lint && npm testANVIL_E2E=1 E2E_REUSE_PREVIEW=1 npm run test:e2e -- e2e/anvil-arena-03-wallet-writes.spec.tsScreenshots
Desktop (1280×900)
Tablet (834×1112)
Mobile (390×844)
Captured via
frontend/scripts/capture-buy-effect-toast-screenshots.mjsagainst Anvil preview (http://127.0.0.1:4173).MR opened for merge; leaving issue open until MR lands.
mentioned in commit
e9af3f8902mentioned in merge request !514
mentioned in issue #339
Verification — post-buy effect toasts (#337)
Verified on
mainafter merge ofissue-337-post-buy-effect-toast-visibility(commits5d8564c7,5448ee6f).Acceptance criteria
/emits one toast per effect (timer, XP, level, WarBow as applicable)cd frontend && npm run typecheck && npm run lint && npm test(arenaBuyEffectToastLines.test.ts,ArenaEffectToastStack.test.tsx); Playwrighte2e/anvil-arena-03-wallet-writes.spec.ts("DOUB buy shows post-buy effect toasts on /"); screenshot capture after DOUB buy shows+5xp,Timer pending,Last BuyerArenaEffectToastStack.test.tsxasserts dismiss window 3–5s; stack uses per-toastsetTimeoutwith staggerArenaEffectToastStackportals todocument.body;mobileBuyEffectToastLayout.test.ts; mobile/desktop screenshots show overlay above bottom nav / command consolefrontend/scripts/capture-buy-effect-toast-screenshots.mjsagainst Anvil preview (http://127.0.0.1:4173); glass pills visible at 1280×900, 834×1112, 390×844cd frontend && npm run typecheck && npm run lint && npm testAutomated test plan
cd frontend && npm run typecheck && npm run lint && npm testPLAYWRIGHT_SPECS="e2e/anvil-arena-03-wallet-writes.spec.ts" bash scripts/e2e-anvil.shManual / QA checklist (manual-qa §337)
data-testid="arena-buy-effect-toast"; cap at 4 in unit tests: PASSInvariants
INV-FRONTEND-337-BUY-EFFECT-TOASTS— indexer-first preview with upgrade path, sparse chime on first toast (useArenaBuyEffectToasts),prefers-reduced-motionrespected: PASSAttack / abuse
Toast copy is derived from preview/indexer buy rows via existing formatters (
resolveArenaBuyEffectToastLines); no raw onchain HTML injection path observed: PASSClosing — implementation merged and independently verified.
mentioned in merge request !515
mentioned in issue #340
mentioned in issue #365
mentioned in issue #363
mentioned in merge request !536
mentioned in commit
2a7ad1d3a9