Show level locks only on the next unlock tier on play #334
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#334
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
LockedUntilLevel(frontend/src/components/LockedUntilLevel.tsx).FEATURE_UNLOCK_LEVELinfrontend/src/lib/arenaProgression.ts(L1 Last Buy → L5 WarBow flag).ArenaSimplePage.tsx) locks carousel slides, timer panel, and buy surfaces whenrequiredLevel > playerLevel.ArenaPodiumTimerChip.tsx), carousel (ArenaTimerPodiumCarousel.tsx), grid (ArenaSimplePodiumSection.tsx), and wallet card (ArenaCharmCredCard.tsx·lockWalletSurface) each independently show lock overlays for all levels above the player's current level.Why needed
New wallets at Level 1 currently see lock overlays on L2–L5 surfaces simultaneously, increasing visual noise and obscuring the single next action. Approved fix: show locks only on the immediate next level (e.g. at L1, lock L2 targets only; L3–L5 surfaces stay unlocked visually or show without lock chrome).
Constraints / guardrails
INV-FRONTEND-290-CYBER-GLASS-SHELL,docs/frontend/design.md).#299progression gates: mechanics remain locked onchain; only visual lock chrome narrows.LockedUntilLevelas the shared primitive; prefer a single helper likeshouldShowLevelLock(playerLevel, requiredLevel)→requiredLevel === playerLevel + 1(edge: L5 cap, disconnected wallet).Relevant files
frontend/src/lib/arenaProgression.tsfrontend/src/components/LockedUntilLevel.tsxfrontend/src/pages/arena/ArenaSimplePage.tsxfrontend/src/pages/arena/ArenaTimerPodiumCarousel.tsxfrontend/src/pages/arena/ArenaPodiumTimerChip.tsxfrontend/src/pages/arena/ArenaCharmCredCard.tsxfrontend/src/pages/arena/ArenaSimplePodiumSection.tsxfrontend/src/index.cssRecommended direction
nextUnlockLevel(playerLevel): number | null(returnsmin(playerLevel+1, 5)or null at L5).requiredLevel > playerLevellock predicates withrequiredLevel === nextUnlockLevel(playerLevel)across play-route consumers.isFeatureUnlocked).ArenaTimerChips.test.tsx, carousel lock tests) to match new policy.Acceptance criteria
cd frontend && npm run typecheck && npm run lint && npm testpasses.Test plan
cd frontend && npm run typecheck && npm run lint && npm testfrontend/src/lib/arenaProgression.test.ts, carousel/chip lock testscd frontend && CI=1 npm run test:e2e -- --workers=5 e2e/anvil-arena-01-mount.spec.tsfrontend/e2e/Add Vitest cases for
shouldShowLevelLock/ next-level policy at L1–L5 and disconnected wallet.Attack / abuse test plan
isFeatureUnlockedis false (no regression allowing premature WarBow/booster actions).Verification criteria
mentioned in issue #331
mentioned in merge request !507
Verification — issue #334
Verified on branch
issue-334-next-tier-level-locks→ MR !507.Results
/: onlyarena-timer-chip-lock-1(Time Booster / L2) among tier chips; L3/L4 chip locks absentshouldShowLevelLock(4,5)unit test;showWarbowFlagLevelLockinArenaWarbowHeroPanelnextUnlockLevel(5)→ null;shouldShowLevelLock(5,*)→ falsetypecheck/lint/npm testANVIL_E2E=1 CI=1 npm run test:e2e -- --workers=5 e2e/anvil-arena-01-mount.spec.tsNote: Fresh L1 wallets still show two primary-surface activation locks (wallet card + Last Buy chip, both “Locked until Level 1”) until first CHARM buy — unchanged from pre-#334 behavior and separate from the L2–L5 tier-progression noise this issue targets.
Screenshots (L1 connected wallet, play route)
Desktop (1280px)
Tablet (768px)
Mobile (390px)
MR !507 opened for merge; issue left open pending MR merge.
mentioned in commit
3d6d3b217cmentioned in commit
916025477amentioned in merge request !514
mentioned in issue #339
mentioned in merge request !515
mentioned in issue #340
mentioned in commit
0c307de8a5