bug(frontend): /pool Manage must expose provide, withdraw, zap add, and zap withdraw as peer actions #660
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#660
Loading…
Add table
Add a link
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
/poolpage-level Add / Withdraw are one-sided zap (#533), but the labels look like ordinary LP. Two-sided Provide Liquidity / Withdraw Liquidity live only under pair Manage → Advanced. Retail users cannot tell which action they are taking and cannot find two-sided provide/withdraw.Ship one pair-scoped Manage IA: four peer actions on the expanded row — Provide Liquidity, Withdraw Liquidity, 1-side zap add, 1-side zap withdraw. Do not leave zap as page chrome. Do not hide two-sided behind Advanced.
Related (do not reopen mechanics): #533 (Z533 zap math), #559 (Z559 floors), #531 (how-to H531-3), #547 (table + Manage expand), #489 (copy), #653 (one chrome layer), #462 (pre-sign), #201 (tab vs submit name collision).
Current codebase
#533 made page-level zap the default retail surface and parked two-sided under Advanced. That IA is now the bug.
PoolPage.tsxOneSidedAddCard+OneSidedWithdrawCard(md:grid-cols-2). Headings are Add / Withdraw (ONE_SIDED_ADD_TITLE/ONE_SIDED_WITHDRAW_TITLE). Each card has its own pair / LP picker — not scoped to a table row.PoolPairsTable.tsxexpandedAddrand mounts onePoolAdvancedManage(pool-row-manage-panel). Default table paint does notgetPool/getPairFeeConfig(P547-9).PoolAdvancedManage.tsxshell-panel-strong. Two-sided provide/withdraw tabs live inside<details data-testid="pool-card-advanced" open>whose summary is Advanced (ONE_SIDED_ADVANCED_LABEL). Tabs: Provide Liquidity / Withdraw Liquidity. Native wrap checkboxes, ratio warning, IL, gas gate, pre-sign stay here.OneSidedAddCard: Token (wallet> 0) + Pair (factory) + Amount.OneSidedWithdrawCard: LP (wallet LP> 0) + Withdraw as + Amount. Quote/submit:quoteOneSidedAdd/oneSidedLiquidityTx(wrap → pool-only swap → provide, or withdraw → swap → unwrap). Empty pool:Empty pool. Use Advanced.(ONE_SIDED_EMPTY_POOL_ERROR).POOL_LP_HOWTO_TWO_SIDEDsay retail Add is one-sided and two-sided is Advanced.docs/user-lunc-liquidity.mdanddocs/frontend.md§ Z533 / P547-8 repeat that. Design-system glossary still says “Both tokens required” / wrap checkbox.pool-one-sided-add/pool-one-sided-withdraw. Two-sided paths useopenPoolCardAdvanced(e2e/helpers/pool-ui.ts) which expands Manage and the Advanced<details>.PoolPage.test.tsxU1/U2 assume zap cards exist without opening Manage.pool-card-advancedisopenby default after Manage expand, so two-sided tabs are not fully collapsed — they are still labeled and grouped as Advanced, and the primary Add/Withdraw on the page are zap. That is the confusion.Why this is needed
/poolsee Add/Withdraw first. Those flows swap to ratio (and may wrap). They are not two-sidedprovide_liquidity/ pro-rata withdraw. Pre-sign and IL exist, but the page chrome does not say zap.MINIMUM_LIQUIDITY/ Z533-5). Hiding it under Advanced (and teaching “use Advanced”) makes the only valid first-deposit path look optional.Constraints / guardrails
Zapexecute).<details>): Provide Liquidity, Withdraw Liquidity, 1-side zap add, 1-side zap withdraw. #489: labels ≤ ~5 words. If “1-side zap add” wraps badly at 375px, Zap Add / Zap Withdraw are acceptable synonyms — the word zap (or one-sided) must remain so this is not confused with two-sided.md:grid-cols-2Add/Withdraw block fromPoolPage. Search, how-to, outage banners, and the table stay.getPool/ fee config (P547-9). NevergetPoolon every table row.PoolAdvancedManageis alreadyshell-panel-strong. Do not drop anothershell-panel*/ page-level zap card inside it (C653-1). Forms are typography + existing providecard-glasswells, not a second panel.first/lastor distinct accessible names / testids). Do not reuseProvide Liquidityfor both a zap tab and a two-sided submit.poolLpHowtoCopy.ts,oneSidedLiquidityCopy.ts,ONE_SIDED_EMPTY_POOL_ERROR,docs/frontend.md(Z533 / P547-8 / P547-9),docs/user-lunc-liquidity.md, design-system glossary (stale “Both tokens required”),AGENTS_FRONTEND_POOL_*skills. How-to stays opt-in / dismissible (H531-7).pool-card-advanced. UpdateopenPoolCardAdvancedor replace it; do not leave a dead Advanced disclosure for tests to click.Relevant files
frontend-dapp/src/pages/PoolPage.tsxfrontend-dapp/src/components/pool/PoolPairsTable.tsxfrontend-dapp/src/components/pool/PoolAdvancedManage.tsxfrontend-dapp/src/components/pool/OneSidedAddCard.tsxfrontend-dapp/src/components/pool/OneSidedWithdrawCard.tsxfrontend-dapp/src/utils/oneSidedLiquidityCopy.tsfrontend-dapp/src/utils/oneSidedLiquidityQuote.tsEmpty pool. Use Advanced.frontend-dapp/src/utils/poolLpHowtoCopy.tsfrontend-dapp/src/pages/PoolPage.test.tsxfrontend-dapp/e2e/helpers/pool-ui.tsopenPoolCardAdvancedfrontend-dapp/e2e/pool-one-sided-533.spec.ts/pool-one-sided-533-tx.spec.tsfrontend-dapp/e2e/pool-table-547.spec.ts/pool-lp-howto-531.spec.ts/wrap-pool.spec.ts/pool-tx.spec.tsdocs/frontend.mddocs/user-lunc-liquidity.mddocs/design-system.mdskills/AGENTS_FRONTEND_POOL_ONE_SIDED.mdskills/AGENTS_FRONTEND_POOL_TABLE.mdskills/AGENTS_FRONTEND_POOL_LP_HOWTO.mdRecommended direction
PoolAdvancedManageas the pair manage panel. Replace the Advanced<details>with a single tab row of four actions (wrap on narrow). Default selected tab: none, or last-used in-session — do not auto-open a signable form until the user picks an action.pair: PairInfo(and factory set only for off-pair token routing). Delete page-level pair/LP pickers.make verify-issue-531/533/547/559expectations and addmake verify-issue-660for the new IA. Playwright smoke: 5 workers. Tx: 1 worker.Acceptance criteria
/pooldefault paint has no page-level Add/Withdraw zap cards (pool-one-sided-add/pool-one-sided-withdraware absent until a row Manage is expanded and a zap action is selected).pool-card-advancedAdvanced disclosure wrapping two-sided provide/withdraw.ONE_SIDED_ADVANCED_LABELis unused on/pool.user-lunc-liquidity.md+frontend.md+ design-system glossary + pool skills no longer say “two-sided is Advanced” or “Use Advanced.” They describe Manage → four actions.shell-panel*inside the manageshell-panel-strong.make verify-issue-653still passes.make verify-issue-531,533,547,559pass after helper/copy updates. Newmake verify-issue-660covers M1–M11.Test plan (all paths)
/pooldisconnected, no ManageMINIMUM_LIQUIDITY).expandedAddrclears (already does). Manage does not stick to the wrong pair.#lp-howto/pool. Optional: deep-link a pair later — not required.No route.Pair remains the Manage row.pool-card-advanceddependency.PoolPage.test.tsxU1/U2 move to Manage+tab. Copy tests reject leftover “Advanced” pool IA.Test plan (attack, hack, abuse)
pool-card-advancedreturns.innerHTML/ third-party URLsshell-paneloverlay / clickjack managecheck_chrome_nesting.py.Verification criteria
Done when:
/pool, expand Manage on a factory pair, and use all four actions without an Advanced disclosure or page-level Add/Withdraw cards.make verify-issue-531make verify-issue-533make verify-issue-547make verify-issue-559make verify-issue-653and the newmake verify-issue-660pass.make test-frontend(scoped Pool + howto + oneSided copy) is green.Out of scope: new on-chain Zap message, APR/farm chrome, changing zap split/floors, pair math, wrap fees, catalog rank, Portfolio pair deep-link (nice-to-have).
marked as related to #533
marked as related to #531
marked as related to #547
marked as related to #559
marked as related to #489
marked as related to #653
changed the description
changed the description
mentioned in merge request !1175
mentioned in commit
4608b451e5Implementation is in !1175.
Acceptance (M1–M12) — done in this change:
pool-card-advanced;ONE_SIDED_ADVANCED_LABELunusedEmpty pool. Use Provide Liquidity.card-glasswells;make verify-issue-653passedmake verify-issue-531/533/547/559/653/660Test plan
PoolPage.test.tsx)pool-card-advancedclick)Not in this MR (issue out of scope or optional):
/pool; pair deep-link not addedmentioned in commit
29ed0bdad3mentioned in issue #661
Merged to
mainvia !1175 after resolving onto currentmain. Four peer Manage tabs kept; #661 name/symbol + wrap default re-applied on Provide. E2E helpers must not extra-click Provide (that toggles the tab closed).Leftover:
/poolManage four tabs, no page-level zap cards, no Advanced disclosure.make verify-issue-660(Playwright when LocalTerra is up).mentioned in issue #673