Add post-buy effect toasts on Arena play route (#337) #510
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!510
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-337-post-buy-effect-toasts"
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
Adds post-buy effect toasts on the Arena play route (
/) for GitLab #337.After a successful CHARM buy, the UI shows a compact glass toast per effect line (timer extension, +XP, level-up, WarBow BP, flag, Last Buyer). Copy reuses
buildArenaBuyProjectedEffectLines/buildArenaBuyActualEffectLineswith indexer-first resolution and a preview fallback when the buy row is not indexed yet. Toasts overlay the command console (max 4 visible, ~4s auto-dismiss,prefers-reduced-motionrespected). Optional subduedcharmed_confirmplays on the first toast only.Acceptance checklist
/emits one toast per effectcd frontend && CI=1 npm run test:e2e -- --workers=5 e2e/anvil-arena-03-wallet-writes.spec.ts(test: "DOUB buy shows post-buy effect toasts on /")ArenaEffectToastStack.test.tsxtiming constants + manual Anvil buyposition:absolutestack in.arena-command-console; screenshot reviewcd frontend && npm run typecheck && npm run lint && npm testVerification for third parties
bash scripts/e2e-anvil.shwithPLAYWRIGHT_SPECS=e2e/anvil-arena-03-wallet-writes.spec.ts— expect toast test PASS.bash scripts/start-qa-local-full-stack.sh --live-sale --no-swarm,cd frontend && npm run dev, connect mock wallet, buy CHARM —data-testid="arena-buy-effect-toast"visible.cd frontend && npm test -- arenaBuyEffectToastLines.test.ts ArenaEffectToastStack.test.tsxINV-FRONTEND-337-BUY-EFFECT-TOASTSindocs/testing/invariants-and-business-logic.mdRelated
INV-FRONTEND-337-BUY-EFFECT-TOASTSdocs/frontend/arena-views.md#post-buy-effect-toasts-gitlab-337Security review — MR !510
Commit reviewed:
5d8564c77fc416be0dcaafc9e59ff940ede42e27Branch:
issue-337-post-buy-effect-toasts→mainScope: Post-buy effect toast UI on Arena play route (
ArenaEffectToastStack,useArenaBuyEffectToasts,arenaBuyEffectToastLines,ArenaSimplePageintegration, CSS, docs/tests). No contract, indexer, or auth-layer changes.Method
onBuySuccess→buildArenaBuyProjectedEffectLines/buildArenaBuyActualEffectLines(indexer-first viafindViewerBuyAtHead) →ArenaEffectToastStackrender sink.Outcome
FINDINGS: 0 medium+ vulnerabilities on this diff.
NONE — no
block:securitylabel applied.Notes (informational, below reporting threshold)
{toast.line}), notdangerouslySetInnerHTML; effect strings are produced by existing numeric/format helpers and static labels (formatBuyProjectedXpLine,formatPreviewTimerPill,INDEXED_BP_PILL_LABEL, etc.) — same data path asArenaBuyProjectedEffectsPills.recentBuys[0].buyerto match the connected wallet; no new authz bypass for showing another user’s buy effects.ARENA_BUY_EFFECT_TOAST_MAX_VISIBLE); no unbounded client state from this feature.No inline security threads — nothing met medium+ severity with a plausible exploit path.
mentioned in commit
e1ebea744e