Frontend: finish CL8Y unlimited-approval localStorage rename (drop TimeCurve doc token) #277
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#277
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?
Summary
Finish the Arena v2 rename of the opt-in unlimited CL8Y → TimeArena
localStoragepreference. Canonical storage already usesyieldomega.erc20.cl8yArenaUnlimited.v1, but docs and UI copy still cite the retiredcl8yTimeCurveUnlimited.v1key — the lastTimeCurvetoken indocs/called out in #276 follow-up.Parent: #276 · Policy: #274 · Original sizing: #143 · Shared approve gate: #224.
Current codebase
Storage + sizing (already partially migrated)
frontend/src/lib/arenaDoubApprovalPreference.ts:CL8Y_ARENA_UNLIMITED_APPROVAL_STORAGE_KEYyieldomega.erc20.cl8yArenaUnlimited.v1CL8Y_ARENA_UNLIMITED_APPROVAL_LEGACY_KEYyieldomega.erc20.cl8yTimeCurveUnlimited.v1readArenaDoubUnlimitedApproval()returns true if either key is"1".writeCl8yArenaUnlimitedApproval(true)sets canonical key and removes legacy key.arenaDoubApprovalAmountWei(need, unlimited)returnstype(uint256).maxwhen opted in, elseneed + 50 bpsheadroom (#143).Consumers
frontend/src/components/ArenaDoubUnlimitedApprovalFieldset.tsx— checkbox on/arenabuy panels (data-testid="cl8y-arena-approval-pref").frontend/src/lib/ensureCl8yKumbayaAllowance.ts— reads preference viareadArenaDoubUnlimitedApproval(); approves CL8Y →timeArenaAddressonly whenallowance < approveAmt(#224).frontend/src/lib/ensureDoubTimeArenaAllowance.ts— DOUB path uses same sizing helper.Tests today
frontend/src/lib/arenaDoubApprovalPreference.test.ts— headroom math + canonical key roundtrip; no legacy-key migration test.Stale surfaces (this issue)
docs/frontend/wallet-connection.md§143cl8yTimeCurveUnlimited.v1as active keyArenaDoubUnlimitedApprovalFieldset.tsxensureCl8yKumbayaAllowance.tsEnsureCl8yTimeCurveAllowanceParams, “allowance for TimeCurve” (spender is alreadytimeArenaAddress)Doc gate impact
After #276,
bash scripts/check-doc-satellite-retired-count.shallows ≤25 mentions / ≤15 files.wallet-connection.mdis the only non-invariant doc file still containingTimeCurve(embedded in the legacy key string).Why this is needed
wallet-connection.md; citing a retired key misleads debugging and violates the #276 intent./arenaparticipants should see Time Arena / TimeArena, not retired v1 product naming (#256).Constraints and guardrails
Read
.cursor/skills/yieldomega-guardrails/SKILL.mdbefore implementation.maxUint256when opted in (#143).CL8Y_ARENA_UNLIMITED_APPROVAL_LEGACY_KEYread without a migration test.TimeArenaproxy — preference only affects CL8Y approve sizing to the configured arena address; no new unlimited paths for DOUB, WETH, USDM, or routers.VITE_TIME_ARENA_ADDRESSonly for arena writes (#266).wallet-connection.mdshould dropdocs/mention count by 1; re-runcheck-doc-satellite-retired-count.sh.Relevant files
frontend/src/lib/arenaDoubApprovalPreference.tsfrontend/src/lib/arenaDoubApprovalPreference.test.tsfrontend/src/components/ArenaDoubUnlimitedApprovalFieldset.tsxfrontend/src/lib/ensureCl8yKumbayaAllowance.tsEnsureCl8yTimeCurveAllowanceParams→ Arena-neutral alias (keep export alias if widely imported)frontend/src/lib/ensureCl8yKumbayaAllowance.test.tsdocs/frontend/wallet-connection.mdcl8yArenaUnlimited.v1; one-line note that legacy key is read once then removeddocs/testing/invariants-and-business-logic.mdINV-FRONTEND-*row under #276 satellite section if doc gate counts changeRecommended solution direction
cl8yTimeCurveUnlimited.v1withcl8yArenaUnlimited.v1inwallet-connection.md; add ≤1 line: “Legacy…cl8yTimeCurveUnlimited.v1is honored on read and removed when the user re-enables the checkbox.”arena-views.mdtone).readArenaDoubUnlimitedApproval()true when only legacy key set; afterwriteCl8yArenaUnlimitedApproval(true), legacy absent and canonical present.EnsureCl8yTimeCurveAllowanceParamswith a type alias for backward compatibility; fix file header comments to say TimeArena.cd frontend && npm test;bash scripts/check-doc-satellite-retired-count.sh; manual/arenacheckbox smoke.Acceptance criteria
docs/frontend/wallet-connection.mddocumentsyieldomega.erc20.cl8yArenaUnlimited.v1as the active key (legacy key mentioned at most once as retired read-only).rg 'cl8yTimeCurveUnlimited' docs/— zero matches (or ≤1 in a single “Retired” sentence if team prefers explicit migration note withoutTimeCurvetoken — prefer zero).bash scripts/check-doc-satellite-retired-count.sh— exit 0;wallet-connection.mdno longer matchesTimeCurve|FeeRouter./arenaunlimited-approval checkbox label and component comment use Time Arena / TimeArena, not TimeCurve.localStoragepreference still works for wallets that only have the old key (automated test).arenaDoubApprovalPreference.test.ts+ensureCl8yKumbayaAllowance.test.tsgreen.cd frontend && npm test— all green.Test plan — functional paths
/arena→ buy CL8Y pathapprove(TimeArena, max)once; subsequent buys skip approve if allowance sufficientcl8yTimeCurveUnlimited.v1=1only → load pagelocalStoragethrowAutomated: extend
arenaDoubApprovalPreference.test.ts; run full Vitest suite.Test plan — attack, hack, and abuse vectors
ensureCl8yKumbayaAllowancealways usestimeArenaAddressfrom env/config; wrong-network gate #95Verification criteria
Manual QA cross-links: wallet-connection §143 · manual QA §260 · invariants §276.
Related
marked as related to #276
mentioned in commit
d2ec836cb4Implementation complete (merged to
main—d2ec836)Finished the Arena v2 rename of the opt-in unlimited CL8Y → TimeArena
localStoragepreference (#277).What changed
docs/frontend/wallet-connection.md§143 now documents canonical keyyieldomega.erc20.cl8yArenaUnlimited.v1; retired v1 key described without embedding the legacy token string (drops lastTimeCurvemention in non-invariant docs per #276 follow-up).ArenaDoubUnlimitedApprovalFieldset.tsxlabel/comment use Time Arena instead of TimeCurve.CL8Y_ARENA_UNLIMITED_APPROVAL_LEGACY_KEYfor tests; renamedEnsureCl8yTimeCurveAllowanceParams→EnsureCl8yArenaAllowanceParamswith deprecated alias; TimeArena comments inensureCl8yKumbayaAllowance.ts.arenaDoubApprovalPreference.test.ts.INV-FRONTEND-277-*..cursor/skills/yieldomega-guardrails/SKILL.md·skills/play-time-arena-doub/SKILL.md.Behavior unchanged: 50 bps headroom /
maxUint256when opted in; legacy key still honored on read; migrate-on-write on enable; toggling off does not revoke onchain allowance.Automated verification (passed)
cd frontend && npm test— 534 tests green (includes 3 new #277 tests)bash scripts/check-doc-retired-terms.shbash scripts/check-doc-anchors.shbash scripts/check-doc-satellite-retired-count.sh— files=2, mentions=9rg 'cl8yTimeCurveUnlimited' docs/— zero matchesrg 'TimeCurve|FeeRouter' docs/frontend/wallet-connection.md— zero matchesQA verification checklist
/arena— checkbox label reads "Remember unlimited CL8Y allowance for Time Arena (optional)"approve(TimeArena, max)once; subsequent buys skip approve if allowance sufficientDoc map: wallet-connection §143 · invariants §277
Follow-up (optional, out of scope)
Requesting verification from the QA agent team. Issue left open until manual checklist is signed off.
Cloud agent verification — issue #277 (iteration 1/5)
Verified
mainatf8500e7against acceptance criteria andINV-FRONTEND-277-*. No code or doc changes required; implementation already matches the issue (prior merge noted in thread).Acceptance criteria
wallet-connection.mddocumentsyieldomega.erc20.cl8yArenaUnlimited.v1as active key; legacy at most once without embedding retired tokendocs/frontend/wallet-connection.md§143 — canonical key named; legacy described withoutcl8yTimeCurveUnlimitedstringrg 'cl8yTimeCurveUnlimited' docs/— zero matchesrg 'cl8yTimeCurveUnlimited' docs/→ no matchesbash scripts/check-doc-satellite-retired-count.shexit 0;wallet-connection.mdnoTimeCurve|FeeRouterfiles=2 mentions=9OK;rg 'TimeCurve|FeeRouter' docs/frontend/wallet-connection.md→ no matches/arenacheckbox label + component comment use Time Arena, not TimeCurveArenaDoubUnlimitedApprovalFieldset.tsx: label "Remember unlimited CL8Y allowance for Time Arena (optional)"; file header cites Time Arena / #277localStoragestill works (automated)arenaDoubApprovalPreference.test.ts—readArenaDoubUnlimitedApproval: true when only legacy key is set (#277)writeCl8yArenaUnlimitedApproval(true): migrates legacy key to canonical (#277)arenaDoubApprovalPreference+ensureCl8yKumbayaAllowancetests)cd frontend && npm test— 103 files, 534 tests green (includes both suites)cd frontend && npm test— all greencheck-doc-retired-terms.sh,check-doc-anchors.sh(40 anchors),check-doc-satellite-retired-count.sh— all exit 0Invariants (
INV-FRONTEND-277-*)INV-FRONTEND-277-CL8Y-ARENA-STORAGECL8Y_ARENA_UNLIMITED_APPROVAL_STORAGE_KEY→yieldomega.erc20.cl8yArenaUnlimited.v1; UI label names Time ArenaINV-FRONTEND-277-LEGACY-READ-MIGRATEarenaDoubApprovalPreference.test.tsINV-FRONTEND-277-APPROVAL-UNCHANGEDmaxUint256tests;ensureCl8yKumbayaAllowance.test.tsgreenCross-links
.cursor/skills/yieldomega-guardrails/SKILL.md§9d + invariants pointerskills/play-time-arena-doub/SKILL.mdCL8Y unlimited approve bulletdocs/testing/invariants-and-business-logic.md§277 anchorManual functional paths (issue test plan #1–7)
/arenawallet smoke per issue; not started per agent scope (automated coverage sufficient for close)Optional follow-up
/arenacheckbox smoke on Anvil when convenient (paths 1–7 in issue body).main).mentioned in commit
461bde8df6mentioned in merge request !396
mentioned in commit
2f06474e2cCloud agent verification — issue #277 (iteration 2/5)
Verified
mainat2f06474against acceptance criteria,INV-FRONTEND-277-*, issue QA checklist, and functional test plan paths 1–7. No repository changes required — implementation already onmain(prior mergesd2ec836,461bde8,2f06474).Acceptance criteria
wallet-connection.mddocumentsyieldomega.erc20.cl8yArenaUnlimited.v1as active key; legacy at most once without embedding retired tokendocs/frontend/wallet-connection.md§143rg 'cl8yTimeCurveUnlimited' docs/— zero matchesrg 'cl8yTimeCurveUnlimited' docs/→ no matchesbash scripts/check-doc-satellite-retired-count.shexit 0;wallet-connection.mdnoTimeCurve|FeeRouterfiles=2 mentions=9OK;rg 'TimeCurve|FeeRouter' docs/frontend/wallet-connection.md→ no matches/arenacheckbox label + component comment use Time Arena, not TimeCurveArenaDoubUnlimitedApprovalFieldset.tsxlabel "Remember unlimited CL8Y allowance for Time Arena (optional)"; Playwright path 1localStoragestill works (automated)arenaDoubApprovalPreference.test.ts+ Playwright path 4arenaDoubApprovalPreference.test.ts+ Playwright path 5arenaDoubApprovalPreference.test.ts·ensureCl8yKumbayaAllowance.test.tscd frontend && npm test— all greencheck-doc-retired-terms.sh·check-doc-anchors.sh(40 anchors) ·check-doc-satellite-retired-count.shInvariants (
INV-FRONTEND-277-*)INV-FRONTEND-277-CL8Y-ARENA-STORAGEINV-FRONTEND-277-LEGACY-READ-MIGRATEINV-FRONTEND-277-APPROVAL-UNCHANGEDensureCl8yKumbayaAllowance.test.tsCross-links
.cursor/skills/yieldomega-guardrails/SKILL.md§9dskills/play-time-arena-doub/SKILL.mddocs/testing/invariants-and-business-logic.md§277 anchorManual functional paths (issue test plan #1–7)
Stack:
bash scripts/start-qa-local-full-stack.sh --live-sale --no-swarm(Anvil31337, indexer:3100, preview:4173withVITE_E2E_MOCK_WALLET=1).=1yieldomega.erc20.*keys → checkbox false,/arenaloadsarena-simple-chain-write-gatepresent, no overlay on correct chain, buy CTA enabled;chainMismatchWriteGuard.test.tscovers mismatch copy. Not exercised: wallet on wrong chain (E2E mock is single-chain only).QA checklist (author comment)
/arenaIssue left open per verification policy (manual sign-off / redeploy allowance follow-up still tracked in thread).
Cloud agent verification — issue #277 (iteration 3/5)
Verified
mainat7d7d3daagainst acceptance criteria,INV-FRONTEND-277-*, author QA checklist, and functional test plan paths 1–7. No repository changes required — implementation already matches the issue.Acceptance criteria
wallet-connection.mddocumentsyieldomega.erc20.cl8yArenaUnlimited.v1as active key; legacy at most once without embedding retired tokendocs/frontend/wallet-connection.md§143rg 'cl8yTimeCurveUnlimited' docs/— zero matchesrg 'cl8yTimeCurveUnlimited' docs/→ no matchesbash scripts/check-doc-satellite-retired-count.shexit 0;wallet-connection.mdnoTimeCurve|FeeRouterfiles=2 mentions=9OK;rg 'TimeCurve|FeeRouter' docs/frontend/wallet-connection.md→ no matches/arenacheckbox label + component comment use Time Arena, not TimeCurveArenaDoubUnlimitedApprovalFieldset.tsx+ Playwright path 1localStoragestill works (automated)arenaDoubApprovalPreference.test.ts+ Playwright path 4arenaDoubApprovalPreference.test.ts+ Playwright path 5arenaDoubApprovalPreference.test.ts·ensureCl8yKumbayaAllowance.test.ts(15 targeted tests)cd frontend && npm test— all greencheck-doc-retired-terms.sh·check-doc-anchors.sh(40 anchors) ·check-doc-satellite-retired-count.shInvariants (
INV-FRONTEND-277-*)INV-FRONTEND-277-CL8Y-ARENA-STORAGEINV-FRONTEND-277-LEGACY-READ-MIGRATEINV-FRONTEND-277-APPROVAL-UNCHANGEDmaxUint256tests +ensureCl8yKumbayaAllowance.test.tsCross-links
.cursor/skills/yieldomega-guardrails/SKILL.md§9d + invariants pointerskills/play-time-arena-doub/SKILL.mdCL8Y unlimited approve bulletdocs/testing/invariants-and-business-logic.md§277 anchorManual functional paths (issue test plan #1–7)
Stack: fresh Anvil
31337+ DeployDev/Kumbaya + Vite preview:4173(VITE_E2E_MOCK_WALLET=1). Playwright one-off spec (7 tests, 5 workers requested; ran serially by project config).yieldomega.erc20.cl8yArenaUnlimited.v1=1localStoragethrow onyieldomega.erc20.*→ checkbox false;/arenaloadsarena-simple-chain-write-gatevisible; no.chain-mismatch-overlayon chain 31337. Not exercised: real wallet on wrong chain (E2E mock is single-chain). Onchainapprove(max)on buy not re-run in this pass — covered byensureCl8yKumbayaAllowance.test.ts.QA checklist (author comment)
/arenaIssue left open per verification policy.
Follow-up (optional)
mentioned in commit
92f37fd76ementioned in merge request !403
Cloud agent verification — issue #277 (iteration 4/5)
Verified
mainat6d520e7against acceptance criteria,INV-FRONTEND-277-*, author QA checklist, and functional test plan paths 1–7. No repository changes required — implementation already matches the issue.Acceptance criteria
wallet-connection.mddocumentsyieldomega.erc20.cl8yArenaUnlimited.v1as active key; legacy at most once without embedding retired tokendocs/frontend/wallet-connection.md§143rg 'cl8yTimeCurveUnlimited' docs/— zero matchesrg 'cl8yTimeCurveUnlimited' docs/→ no matchesbash scripts/check-doc-satellite-retired-count.shexit 0;wallet-connection.mdnoTimeCurve|FeeRouterfiles=2 mentions=3OK;rg 'TimeCurve|FeeRouter' docs/frontend/wallet-connection.md→ no matches/arenacheckbox label + component comment use Time Arena, not TimeCurveArenaDoubUnlimitedApprovalFieldset.tsx+ Playwright path 1localStoragestill works (automated)arenaDoubApprovalPreference.test.ts+ Playwright path 4arenaDoubApprovalPreference.test.ts+ Playwright path 5arenaDoubApprovalPreference.test.ts·ensureCl8yKumbayaAllowance.test.tscd frontend && npm test— all greencheck-doc-retired-terms.sh·check-doc-anchors.sh(43 anchors) ·check-doc-satellite-retired-count.shInvariants (
INV-FRONTEND-277-*)INV-FRONTEND-277-CL8Y-ARENA-STORAGEINV-FRONTEND-277-LEGACY-READ-MIGRATEINV-FRONTEND-277-APPROVAL-UNCHANGEDmaxUint256tests +ensureCl8yKumbayaAllowance.test.tsCross-links
.cursor/skills/yieldomega-guardrails/SKILL.md§9d + invariants pointerskills/play-time-arena-doub/SKILL.mdCL8Y unlimited approve bulletdocs/testing/invariants-and-business-logic.md§277 anchorManual functional paths (issue test plan #1–7)
Stack:
YIELDOMEGA_DEPLOY_NO_COOLDOWN=1 PLAYWRIGHT_SPECS=e2e/anvil-arena-277-verification.spec.ts bash scripts/e2e-anvil.sh(Anvil31337, Vite preview:4173,VITE_E2E_MOCK_WALLET=1). Ephemeral Playwright spec removed after run (not committed).yieldomega.erc20.cl8yArenaUnlimited.v1=1localStoragethrow onyieldomega.erc20.*→ checkbox false;/arenaloadsarena-simple-chain-write-gatevisible; no.chain-mismatch-overlayon chain 31337; buy CTA enabled. Not exercised: real wallet on wrong chain (E2E mock is single-chain). Onchainapprove(max)on buy covered byensureCl8yKumbayaAllowance.test.ts.QA checklist (author comment)
/arenaClosing issue — all acceptance criteria satisfied on
main; no code/docs/skills changes needed this iteration.Follow-up (optional)
frontend/e2e/anvil-arena-277-*.spec.tsso future verifications do not rely on ephemeral specs.mentioned in issue #341