Frontend: Swap page outage banner and simQuery error handling (M1) #241
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#241
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?
Reference
Gap analysis:
gaps/GAP_1780200149.md— finding M1.Current codebase
Market-data routes (Pool, Charts, Limits, Portfolio, Protocol, Trader, Trade) render
MarketDataServiceOutageBannerwhen indexer/LCD queries fail withisIndexerUnavailableError, and show humanized retry copy viahumanizeUserFacingError/indexerTradeOutageCopy.Swap page gaps (
frontend-dapp/src/pages/SwapPage.tsx):MarketDataServiceOutageBannerimport or usage (~1277 LOC).simQueryhas noisErrorbranch — stale/empty quotes shown silently when simulation fails.swapMutation.isErrorfor tx failures but not quote/sim failures.postRouteSolve/ pair sim paths that depend on indexer + LCD availability.Contrast:
PoolPage.tsx:1051-1060,TradePage.tsx:351,ChartsPage.tsx:180.Why this is needed
Swap is a primary retail entry point. Silent sim failures mislead users into thinking quotes are valid, risking failed txs or wrong slippage expectations. Inconsistent outage UX across routes erodes trust during indexer/LCD incidents.
Constraints / guardrails
MarketDataServiceOutageBannerandisIndexerUnavailableErrorutilities — no new outage components.skills/AGENTS_FRONTEND_QUERY_RETRY.mdretry semantics if applicable.Relevant files
frontend-dapp/src/pages/SwapPage.tsxfrontend-dapp/src/pages/TradePage.tsxfrontend-dapp/src/pages/PoolPage.tsxfrontend-dapp/src/components/common/MarketDataServiceOutageBanner.tsxfrontend-dapp/src/utils/humanizeOffChainError.tsfrontend-dapp/src/utils/indexerTradeOutageCopy.tsfrontend-dapp/e2e/charts-indexer-outage.spec.tsfrontend-dapp/e2e/swap.spec.tsRecommended direction
indexerOutagefromsimQuery, route-solve queries, and pair list queries (same predicates as other pages).MarketDataServiceOutageBannerat top of swap card when outage detected.simQuery.isErrorUI: humanized message + retry; hide quote details and disable swap button./swap.Acceptance criteria
Test plan — all paths
Run:
make test-frontend; Playwright outage project if available.Test plan — attack / abuse vectors
Verification criteria
/swapshows banner.mentioned in commit
bd2cd7047eImplementation complete (GitLab #241)
Merged to
mainin commitbd2cd70.Summary
The Swap page (
/and/swap) now matches Trade/Pool/Limits outage UX:MarketDataServiceOutageBanner(swap-market-data-outage-banner) when indexer transport fails during quote (detectSwapIndexerOutageonsimQuery+indexerTransportFailedpool-fallback flag).simQuery.isError; humanized copy + retry; CTA shows Quote unavailable and stays disabled until a fresh sim succeeds.Docs / agent cross-links
skills/AGENTS_FRONTEND_MARKET_DATA_OUTAGE.mdskills/AGENTS_E2E_INDEXER_OUTAGE.mdVerification checklist
swap-market-data-outage-bannervisible; noVITE_INDEXER_URLin DOMnpm run test:run -- src/pages/SwapPage.test.tsx src/utils/swapIndexerOutage.test.tsmake test-e2e-indexer-outageincludesswap-indexer-outage.spec.ts@brouie — please verify on local/staging when you have a moment. Leaving issue open until QA sign-off.
QA verification complete (agent, worktree
verify/issue-241)Verified commit
bd2cd70onmain(841c321HEAD at time of test). No code changes required — all acceptance and verification criteria pass.Work performed
../cl8y-dex-terraclassic-verify-241@verify/issue-241, synced withorigin/mainnpm run test:run -- src/pages/SwapPage.test.tsx src/utils/swapIndexerOutage.test.tsscripts/test-e2e-indexer-outage.sh): 4/4 pass includinge2e/swap-indexer-outage.spec.tsChecklist (all pass)
Closing — implementation matches Trade/Pool outage UX per gap M1.
mentioned in merge request !800
mentioned in issue #326