fix(swap): fit mobile CTA and full route; replace error cards with inline text #1561
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#1561
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?
Problem and desired result
The Swap form wastes enough vertical space on a 375×667 CSS-pixel viewport that the Connect Wallet / Swap action falls below the visible content and behind the fixed bottom navigation. The route is horizontally scrollable and clips its destination on small screens. Errors appear as padded bordered cards with a detached cross above them and unnecessary scrolling.
Bundle these related presentation fixes:
Preserve comfortable interaction targets and readable information. The rough layout demonstrates the vertical budget, not a request for cramped concatenated text or a partly covered button. Desktop density/chrome remains unchanged; the inline-error cleanup applies wherever this Swap status is displayed.
Current codebase and investigation
Inspected main at b7b08736; remote main matched during investigation on 2026-10-19. This issue contains sanitized behavior and source facts, without reporter identities, account/wallet information, conversation text, or attachments.
frontend-dapp/src/pages/SwapPage.tsx: outershell-panel-strong !p-5 sm:!p-6; visible Swap heading andmb-4; Pay/Receive use stacked label/picker headers on mobile,!p-4/ receive!pt-6, andtext-[1.75rem]mobile amount inputs. Connected balance/Max/fraction actions add further height. Settings/Share, the flip seam, DETAILS and CTA must remain functional.swap-quote-statusath-[6em] overflow-y-auto ... mb-3; a separatearia-hiddencross is emitted before most notices. The screenshot cross is consistent with this decorative span, not an actual dismiss button. Child errors are block elements, so the cross occupies a separate line.frontend-dapp/src/components/swap/SwapImpactAside.tsxand multiple status branches use.alert-error;frontend-dapp/src/index.cssdefines it withp-3, an 18px radius, border and tinted background. The global class also serves other pages; avoid silently restyling every consumer.frontend-dapp/src/components/swap/SwapQuoteSummary.tsx: fixedh-12row; Slippage/Fee areshrink-0; route gets remaining width withoverflow-x-auto, while its content isinline-flex ... whitespace-nowrap. Individual symbols already truncate atmax-w-20; a destination can still remain outside the visible route area.frontend-dapp/src/index.css: mobile header has a 4px top margin; main shell adds 14px top padding; shell/card/control spacing accumulates..app-mobile-nav-shellis fixed with safe-area padding and a nominal 72px stack.frontend-dapp/src/components/common/Layout.tsxmeasures the bottom navigation into--app-mobile-nav-stack. Reuse the actual height and visual viewport; padding beneath the page only permits scrolling and does not establish initial CTA visibility.frontend-dapp/src/components/trade/TokenSearchSelect.tsx,components/common/AmountBalanceActions.tsxand token-selector CSS govern shared controls. Scope density overrides to mobile Swap rather than shrinking targets throughout the app.scripts/qa/swap-layout-geometry-1498.cjstests widths 1440/320/390/430 at height 1000 and checks page overflow/stable geometry. It currently expects a focusable scrolling route and visibleNone; it does not establish initial action visibility on 375×667 or absence of route/status scrollbars.scripts/qa/browser-local-quotes-1452.cjssupplies an isolated production-build browser fixture.Relevant policy and tests:
skills/AGENTS_SWAP_LAYOUT.md,skills/AGENTS_FRONTEND_A11Y_CI.md,skills/AGENTS_FRONTEND_A11Y_FOCUS.md,skills/AGENTS_FRONTEND_COPY_COGNITIVE_LOAD.md,docs/design-system.md,docs/qa/issue-1498/README.md,SwapQuoteSummary.test.tsx,SwapImpactAside.test.tsx,SwapPage.test.tsx,SwapPage.acquireGuidance.test.tsx, and the swap picker/seam/route-alignment E2E specs.Source entry points: SwapPage.tsx, SwapQuoteSummary.tsx, index.css.
Why a new implementation is needed
The current implementation deliberately reserves a large status envelope and scrolls the route. Those choices satisfy older layout invariants while making a short-screen trading form harder to use. Redundant containers and labels consume the vertical budget, and the status card makes routine warnings visually dominant. Hiding overflow alone would conceal information; merely adding page bottom padding does not meet the initial-screen action requirement.
Recommended direction and constraints
aria-hidden, no independent dismiss control, no padding/border/background. Use theme tokens with sufficient contrast in both themes, no flashing/aggressive emphasis, and word wrapping for long content. Preserve retry, Expert and other necessary actions and persist errors until resolved. Do not globally strip.alert-errorstyling without auditing its consumers.Acceptance criteria
toBeVisible()or tall-viewport screenshots for these measurements.Test plan: all UI paths
Test plan: attacks, hacks and abuse
Verification criteria
Run updated
make verify-issue-1498andmake verify-issue-1500, frontend types/lint and the relevant Swap component/page/picker/seam/route-alignment tests; runmake verify-issue-1497if shared Trade presentation is touched. Add production-build short-viewport geometry/overflow assertions, not source-class checks alone. Run the critical-routes accessibility scan and keyboard testing on the final revision; include sanitized before/after 375×667 screenshots and numerical CTA/nav bounds for connected and disconnected paths. Extend tests to fail the current oversized/scrolling layout and pass the fix while retaining loading/expiry/signing guards.Run feasible checks before release; explicitly record unavailable physical-device/live/funded checks and do not represent source/synthetic evidence as deployment or settlement. Such unavailable checks do not prevent filing or implementing this issue. Retain executed failures for repair/retest. Publish only sanitized product evidence, with no conversation captures, reporter details, wallet/session identifiers, credentials or private endpoints.
Related work: #1498 stable layout, #1500 distinct order metrics, and #1330 executable-route presentation. This follow-up does not expand route search or replace net-output ranking.
Investigation verification receipts (2026-10-19)
make verify-issue-1500: FAIL overall on the unmodified revision. First and retest each passed 6 independent order-economics tests, 1 manual-split identity test, and 143 frontend tests in 8 files; frontend types and invariant/documentation checks passed.cargo fmt --checkfailed inindexer/src/api/local_quote.rsandindexer/src/db/queries/hub_prices.rsunder rustfmt 1.10.0. This existing formatting failure is retained, not reclassified as a skip or repaired as part of issue filing. Two declared deployed/funded/device scopes remain unverified.scrollWidth/clientWidthwere 215/103px, and status height was 72px. The initial CTA-visibility assertion is FAIL; the page-level horizontal-overflow check passed, demonstrating why page-only checks miss the route bug. At 390×844 the CTA fit but the route still overflowed (215/118px); the 1440×1000 desktop control fit. There were zero provider requests. The fixture used a direct synthetic pair and amount 10000, so it does not certify the reported native route or connected-wallet geometry.make verify-issue-1498: PASS WITH SKIPS, 9 passed / 0 failed / 1 skipped. First/retest each passed 145 frontend tests in 8 files; the production-build geometry fixture passed 9 scenarios at each of 1440/320/390/430 widths with height 1000, including 200% root text, and types/crosslinks/stable-source checks passed. The declared live-artifact/device/funded scope was skipped. These passes do not exercise the missing 375×667 initial-CTA criterion.Implemented and live through PR #1562, with observer/evidence follow-up PR #1563. Deployed frontend
6a5118ffc2a3bf71b4ad638226d48228bd2eb64a, Coolifyqvplhwapjhqfxd2mm8lfnzua.The loop found and repaired two additional keyboard bugs: Escape from Connect Wallet lost invoking focus, and stacked dialogs shared the same accessible-title ID. Thirteen Modal tests and rebuilt production keyboard probes pass. Review also no longer forces a ten-second reading/confirmation window: a real production-build unsigned control retains confirmation 12s with no quote request while the independent producer advances, then revokes it on edit.
Final 1498 runs each pass 160 frontend tests and 1500 each 171; types/lint, required hooks/gitleaks, relevant source/Rust tests and live Swap/Trade previews pass. All test processes were bounded below 60s. Live Swap/Trade axe and runtime-error counts are zero. Deployment logs were inspected privately: 94 entries, 0 unexpected error-level matches, 2 exact expected cleanup messages. New frontend started 04:21:33 UTC, before old removal 04:21:38 UTC; sampled frontend/API serving remained HTTP200. Fresh exact-target monitoring passes; separate indexer-readiness 0 remains explicitly recorded.
The full funded/physical matrix and repository-wide CI are not claimed PASS. The user-authorized merge gate override was used while CI was pending. Keep both issues open. One physical-phone check is assigned in cl8y-pm Inbox, card
3fff415d-9cc2-42b1-b635-37e0be4fd0f7, without transaction signing. Full evidence and remaining scopes.The requested follow-up is implemented and live through PR #1564, with live evidence #1565. Frontend
0941e9105142542009252295bb3ebb9bd2e3f1ca, Coolifyxyidlzlftlxxntlkiyjulc6b.Deployment logs: 71 entries inspected privately, 0 unexpected error-level matches, 2 expected cleanup messages. Live native Swap and wrapped Trade previews pass, fresh exact-target Grafana/Loki/Prometheus checks pass, frontend/API serving sampled HTTP200 and backend source unchanged. No API/database/logging lifecycle change.
Measurements, verification scope and live screenshot. Existing physical/funded/full-CI acceptance remains unverified, so the issue stays open. The existing user-requested workflow-gate override was used; CI is not claimed PASS.
PR #1566 implements both follow-up reports: compact all-device error leading, with inline Expert/Cancel actions that retain 44px hit targets; and direction switching that moves the exact current receive amount into the new pay field. Example: 10 CL8Y → 5.40572 SpaceUSD becomes 5.40572 SpaceUSD input for the reverse quote. Missing/expired output clears rather than carrying the old denomination. Old book budgets/review consent are cleared; signing safeguards stay enforced.
Verification checklist:
Exact 6/18-decimal and >2^53 amounts, original expiry, stale drafts/refresh, receive edits and long-value editing.
186 Swap/layout tests and 171 metric tests on each verifier run, 161 Trade tests; types, focused lint and normal commit hooks.
Source-matched production browser status at 375/768/1440 widths: 16.2px leading on 12px text, 32.4–46.3px tested status heights, actual 44px hit tests, keyboard Expert modal/focus return, zero serious/critical axe findings.
Compact mobile centering/footer/route spacing, connected CTA clearance and 200% text regressions.
Coolify frontend
bd2b4ba508d08bf8632b164c82ae02cff1284be0, deploymentwezykqhxcuhuvdilkmbyogla, finished. Public frontend/API health/serving samples stayed HTTP200; backend unchanged.Live phone/desktop switch: output
0.851568201759174334became new pay, reverse request raw851568201759174334, HTTP200. Compact status leading/minimum 16.2/32.4px; mobile footer hidden, form centered and route flush-right. No runtime errors or serious/critical axe findings; wrapped Trade preview also passed.Deployment logs reviewed: 75 entries, two exact cleanup messages. The conservative checker’s one additional keyword FAIL was the exact public merge subject containing “error spacing”; retained and independently classified, with no remaining error tokens. No unexpected deployment fault found.
Fresh exact DEX Prometheus targets and Loki/Grafana observations, plus monitoring source/config verifier 1544. API serving/quote-readiness up; indexer readiness independently 0, so no recovery or traffic-SLO claim.
Full physical-device/funded/all-states acceptance and full repository CI. The explicit user-authorized CI gate override was used while CI was pending; CI is not claimed PASS. Keep both issues open. Physical reachability remains assigned in PM Inbox, card
3fff415d-9cc2-42b1-b635-37e0be4fd0f7.Relevant #1561 criteria verified in the stated scope: AC1/AC7 numerical initial CTA/nav bounds; AC3 compact persistent error and keyboard action; AC4 real full native route; AC5 geometry/one DETAILS/no horizontal overflow; AC6 covered desktop browser keyboard/200% text/accessibility checks. Physical devices and the full matrix remain incomplete. The #1560 risk thresholds, original quote deadlines, raw amounts, floors and offline/signing protections remain enforced.
Invariants, verification scope, live receipts and screenshots and exact direction amount checklist. Agent guidance crosslinked in SL1498 and QL1499. No backend, database or chain reset needed for this frontend-only follow-up.
Closing the design/layout work following acceptance of the deployed result.
Verification and documented invariants.
Closure records acceptance of the design/layout result. Previously documented physical-device, funded settlement and full repository CI scopes are not newly claimed to have passed. Trading-risk policy acceptance remains separately tracked in #1560.