Frontend: /limits market-data outage alignment (P2, #215 follow-up) #218
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#218
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
Extend market-data loading & outage UX to the standalone
/limitsroute so it matches/tradebehavior for shared indexer reads (order book, pair metadata, tape-driven limit price reference). GitLab #215 delivered shared primitives (MarketDataServiceOutageBanner,detectMarketDataOutage, retail copy) for Charts/Trader/Pool/Protocol;/limitswas explicitly P2 / out of scope in that issue.Tracked in gap analysis:
gaps/GAP_1780023683.md§4 (Loading / indexer down — improved but/limitsnot fully aligned).Parent / related: #215 (global banners), #164, #165, #166, #174, #177, #180.
Current codebase
/trade(reference — do not regress)TradePage.tsxdetectTradeIndexerOutage(indexerPairQuery, tradesQuery)→MarketDataServiceOutageBanner(trade-indexer-outage-banner);TradePairSwitchStatusduring workspace fetchOrderBookPanel.tsxtrade-book-unavailable-*viaTradeMarketDataUnavailableNotice+TRADE_PANEL_BOOK_UNAVAILABLEwhen book infinite query errorsTradeRecentTradesSection.tsxtrade-tape-unavailablewhen tape downPriceChart.tsxtrade-chart-unavailablewhen candles downindexerTradeOutageCopy.tsdocs/frontend.md§ Market data loading & outageUnit:
TradePage.test.tsx(banner, 404 vs outage, pair-switch loading)./limits(gap)LimitOrdersPage.tsxgetAllPairsPaginated); indexergetPair,getTrades,getPairLimitPlacements; mounts sharedOrderBookPanelMarketDataServiceOutageBanner; nodetectMarketDataOutageon workspace queriesOrderBookPanelon/limitstrade-book-unavailable-*copy (trade testids)data-testidoptional for E2E clarityuseLimitOrderPriceRefBundle— tape + pool LCD fallback (#166)/limits(product decision)setPairAddronMenuSelectMarketDataLoadingStatus/ pair-switch loading affordance (#180)e2e/limit-orders.spec.ts,e2e/limit-orders-tx.spec.tsLimitOrdersPage; E2E does not assert market-data-downE2E: No opt-in limits outage spec (trade/charts only:
e2e/trade-indexer-outage.spec.ts,e2e/charts-indexer-outage.spec.ts).Why this is needed
/limitsfor book-first limit workflow see the same market data service vocabulary and degradation as/trade(#174, #215)./limitsoutage UX are invisible in CI until this route is covered in Vitest (and optionally opt-in E2E)./limitsshould cross-link to the same global invariants.Constraints and guardrails
/tradetestids or copy:trade-indexer-outage-banner,trade-pair-switch-loading,trade-book-unavailable-*, etc.LcdConnectivityBanner/ factoryLcdQueryGateon limits page remain chain concerns — do not conflate with indexer outage.VITE_INDEXER_URL, hostnames, or “indexer” jargon (#174)./limits, it must remain the narrow pool-reserve exception only — does not restore book depth or placements list from indexer.placeholderData: keepPreviousDataon pair-keyed indexer reads (#180).MarketDataServiceOutageBanner,detectMarketDataOutage,marketDataServiceCopy— addLIMITS_MARKET_DATA_OUTAGE_LEADif needed./limitswiring foruseLimitOrderCancelMutationandLimitBookTicketDraftprefill (docs/frontend.md § Limit orders page — order book row actions).Relevant files
Implement / extend
LimitOrdersPage.tsxmarketDataServiceCopy.ts(limits-specific lead)marketDataOutage.tsMarketDataServiceOutageBanner.tsxMarketDataLoadingStatus.tsx(optional pair-switch on limits)OrderBookPanel.tsx(only if adding limits-scoped testids or props — prefer page-level banner first)useLimitOrderPriceRefBundle.ts(gate behavior under outage)frontend-dapp/src/pages/LimitOrdersPage.test.tsx(new)frontend-dapp/e2e/limits-indexer-outage.spec.ts(optional opt-in, mirrors charts)Docs / skills
docs/frontend.md— extend § Market data loading & outage with/limitsrowskills/AGENTS_FRONTEND_MARKET_DATA_OUTAGE.mdskills/AGENTS_FRONTEND_ORDER_BOOK_ROW_ACTIONS.md(if testids change)Recommended direction
/limits:detectMarketDataOutage(indexerPairQuery, tradesForLimitQuery)— includeplacementsQueryonly if transport failures should trigger banner (not logical empty lists).MarketDataServiceOutageBannerwithdata-testid="limits-market-data-outage-banner"and limits-specific lead frommarketDataServiceCopy.ts. Decide whether to include trade tail (#166) or a shorter limits-only lead.MarketDataLoadingStatus(or thin wrapper) above book/ticket — mirror #180 patterns without duplicating trade prefetch unless needed.OrderBookPanelpanel-leveltrade-book-unavailable-*unless product wantslimits-book-unavailable-*aliases; document shared testids in limits E2E scope.evaluateLimitOrderPricePlaceGatestill blocks unsafe submit when reference cannot resolve during outage (existing #166 behavior).getPair/getTrades; 404 must not show banner. Optional opt-in Playwrightlimits-indexer-outage.spec.tswithE2E_INDEXER_OUTAGE=1.Acceptance criteria
/limitsshowslimits-market-data-outage-banner(or agreed testid) with market data service retail copy when workspace indexer queries fail withisIndexerUnavailableError.VITE_INDEXER_URL/ hostnames in retail DOM on/limitsoutage paths./tradeoutage tests and testids unchanged unless dual assertions are explicitly migrated.OrderBookPanelcontinues to show panel-level unavailable copy on book transport errors.docs/frontend.md+skills/AGENTS_FRONTEND_MARKET_DATA_OUTAGE.mdupdated with/limitsinvariants.LimitOrdersPage.test.tsx(or equivalent) covers outage + 404 paths.Test plan (functional paths)
getPair+getTrades502 with pair selectedlimits-market-data-outage-banner; book showstrade-book-unavailable-*or limits-scoped ids; no env URLsgetPairOK, book pages 502getPair404limit-orders.spec.tskeepPreviousDataTradePage.test.tsxE2E_INDEXER_OUTAGE=1/limitsRun:
cd frontend-dapp && npm run test:run; E2E: document indocs/testing.md.Test plan (attack vectors / misuse)
VITE_INDEXER_URL,127.0.0.1in retail nodeskeepPreviousDataVerification criteria
npm run test:rungreen infrontend-dapp.make qa-up→/limitswith indexer up (normal) and stopped (banner + degraded book)./tradeand/limitsside-by-side — outage copy consistent; LCD banner distinct.Indexer unavailableorVITE_INDEXER_URLinLimitOrdersPage.tsxretail branches.docs/frontend.md#market-data-loading-outage.marked as related to #215
mentioned in commit
632089c676Implementation (merged to
main—632089c)Aligned standalone
/limitswith the market-data outage UX from #215 //trade:detectMarketDataOutage(indexerPairQuery, tradesForLimitQuery)— placements query excluded (logical empty lists OK).limits-market-data-outage-bannerwithLIMITS_MARKET_DATA_OUTAGE_LEAD+ trade #166 limit-reference tail (pool-reserve exception only).limits-pair-switch-loadingviaMarketDataLoadingStatuswhileindexer-pair-limit-orders/pair-trades-limit-ordersfetch.LimitOrdersPage.test.tsx(502 banner, tape-only 502, 404 no banner, place gate, pair-switch loading); opt-ine2e/limits-indexer-outage.spec.ts.skills/AGENTS_FRONTEND_MARKET_DATA_OUTAGE.md+ order-book row actions cross-link./tradetestids andTradePage.test.tsxunchanged.@brouie — please verify when you have a moment:
cd frontend-dapp && npm run test:run—LimitOrdersPage.test.tsx+TradePage.test.tsxgreenmake qa-up→/limitswith indexer up: nolimits-market-data-outage-banner; book + place form normal/limitswith pair selected: banner visible; retail copy (noVITE_INDEXER_URL/ hostnames);trade-book-unavailable-*on bid/ask/tradeand/limitsside-by-side during outage: consistent vocabulary; LCD banner still distinctE2E_INDEXER_OUTAGE=1 npx playwright test e2e/limits-indexer-outage.spec.ts(indexer stopped)Leaving this issue open until sign-off.
mentioned in issue #219
mentioned in issue #215
Verification complete (agent —
verify/issue-218worktree @13fef65)Verified GitLab #218 —
/limitsmarket-data outage alignment with #215 //trade. No code changes required; implementation onmainmeets all acceptance and verification criteria.What was checked
npm run test:run— 710/710 green; targetedLimitOrdersPage.test.tsx(5) +TradePage.test.tsx(17) — all passdetectMarketDataOutage(indexerPairQuery, tradesForLimitQuery)inLimitOrdersPage.tsx; placements excludedlimits-market-data-outage-bannerwithLIMITS_MARKET_DATA_OUTAGE_LEAD+ trade #166 tail; retail copy onlygetPair→ no global bannerlimits-pair-switch-loadingwhile workspace queries fetchTradePage.test.tsxoutage tests pass; trade testids unchangedIndexer unavailable/VITE_INDEXER_URLinLimitOrdersPage.tsxretail branchesdocs/frontend.md#limits-page-market-data-outage,#market-data-loading-outage,skills/AGENTS_FRONTEND_MARKET_DATA_OUTAGE.md, order-book row actions cross-links presentManual QA (LocalTerra +
.env.local, indexer toggled — infra not reset)/limits, pair selected: nolimits-market-data-outage-banner; order book + place form render/limits, pair selected:limits-market-data-outage-bannervisible; retail “market data service unavailable” copy; noVITE_INDEXER_URL/ hostnames in DOM/tradewith indexer down:trade-indexer-outage-banneruses same vocabulary + #166 tail; distinct from LCD connectivity messaging when both appeare2e/limits-indexer-outage.spec.ts(documented indocs/testing.md)Indexer restarted after outage test; verification frontend dev server shut down per runbook.
Sign-off checklist (for @brouie spot-check)
cd frontend-dapp && npm run test:runmake qa-up→/limitsindexer up: normal UX/limits: banner + degraded book panels/trade+/limitsduring outage: consistent copy; LCD banner distinctE2E_INDEXER_OUTAGE=1 npx playwright test e2e/limits-indexer-outage.spec.tsClosing — all issue acceptance criteria and verification criteria pass.