Split Swap Settings into retail defaults and advanced integrator controls #413
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#413
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?
Parent
#411 — Updated Gap Analysis (recommendation 2)
Current codebase
SwapPage.tsxSettings drawer (~L1040–1217) interleaves retail controls with integrator tooling:useHybridBook,bookInputHuman,hybridMaxMakers) with "Pattern C" copy.Casual users opening Settings (Uniswap-class migrants) see debug UI before useful swap prefs.
Why needed
Settings is the first place users configure execution risk. Exposing indexer hop addresses and hybrid leg overrides causes information overload and implies quotes match hybrid execution when they may not.
Constraints / guardrails
data-testidhooks used by Playwright (swap-expert-mode-toggle, etc.).isDirect && !isWrapOrUnwrap.Relevant files
frontend-dapp/src/pages/SwapPage.tsxfrontend-dapp/src/pages/SwapPage.test.tsxfrontend-dapp/src/components/swap/ExpertModeModal.tsxskills/AGENTS_FRONTEND_SWAP_ROUTE_DISPLAY.mdRecommended direction
localStoragefor power users.Acceptance criteria
Test plan
SwapPage.test.tsx— add/update tests for Settings sections visibility.make test-frontend/→ Settings → confirm progressive disclosure.Attack / abuse test plan
Verification criteria
make test-e2esubset for swap if LocalTerra available).mentioned in issue #411
mentioned in merge request !942
mentioned in commit
fe41122cdbmentioned in commit
e7c7fd090dmentioned in commit
617b9e0fd3mentioned in commit
6deb64a6ffmentioned in merge request !949
mentioned in commit
4ca88cb49fmentioned in commit
9bc362308dVerification — #413 (PASS)
Verified on
main@9bc36230(includes merge ofissue-413-verify-advanced-toggle/6deb64a6).Acceptance criteria
SwapPage.test.tsx→Swap Settings progressive disclosure (#413)/shows retail prefs only when Settings first opens; Playwright smoke on/confirmsswap-indexer-route-checkhidden whenaria-expanded=falseswap-advanced-settings-toggledefaultsaria-expanded=false; content gated onopeninSwapAdvancedSettings.tsxhybrid-swap.spec.ts(3/3) usesopenSwapAdvancedSettings; unit testshows hybrid and indexer route check when Advanced is expandedCompare indexer routebutton present after expand/tmp/issue-413-settings-retail.png(slippage, deadline, Expert Mode only; Advanced collapsed)/tmp/issue-413-settings-advanced.pngTest plan
make test-frontend— 184 files, 1084 tests passed (includesSwapPage.test.tsx27 tests)/→ Settings progressive disclosuree2e/issue-413-screenshots.spec.ts(ephemeral, not committed) + LocalTerra stackAttack / abuse / verification criteria
SwapPage.test.tsxblocks swap above 30% route slippage unless Expert Mode is enabled (GitLab #293)— Expert Mode toggle in retail panel (swap-expert-mode-toggle), no Advanced expand requiredSwapAdvancedSettings.tsxinputmax={256}npx playwright test e2e/swap.spec.ts --project=e2e-smoke(10/10);npx playwright test e2e/hybrid-swap.spec.ts --project=e2e-tx(3/3) on fresh LocalTerra deployrole=alertstack observed in progressive-disclosure unit test or screenshot rundata-testidhooks preservedswap-expert-mode-toggle,swap-advanced-settings,swap-advanced-settings-togglepresentSwapPage.tsxorcomponents/swap/*; Advanced copy uses plain "Limit book leg" languagelocalStoragepersists Advanced expanded state in localStoragetest; keycl8y-dex-swap-settings-advanced-openImplementation notes
#swap-slippage-settings(slippage, transaction deadline, Expert Mode).SwapAdvancedSettings.tsx(collapsed by default,swapSettingsAdvanced.tspersistence).docs/frontend.md,skills/AGENTS_FRONTEND_SWAP_ROUTE_DISPLAY.md.No repo changes required from this verification pass.
mentioned in merge request !951
mentioned in issue #337