Frontend: /limits market-data outage alignment (P2, #215 follow-up) #218

Closed
opened 2026-05-29 05:35:40 +00:00 by PlasticDigits · 6 comments
PlasticDigits commented 2026-05-29 05:35:40 +00:00 (Migrated from gitlab.com)

Summary

Extend market-data loading & outage UX to the standalone /limits route so it matches /trade behavior 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; /limits was explicitly P2 / out of scope in that issue.

Tracked in gap analysis: gaps/GAP_1780023683.md §4 (Loading / indexer down — improved but /limits not fully aligned).

Parent / related: #215 (global banners), #164, #165, #166, #174, #177, #180.


Current codebase

/trade (reference — do not regress)

Piece Role
TradePage.tsx detectTradeIndexerOutage(indexerPairQuery, tradesQuery) → MarketDataServiceOutageBanner (trade-indexer-outage-banner); TradePairSwitchStatus during workspace fetch
OrderBookPanel.tsx Per-side trade-book-unavailable-* via TradeMarketDataUnavailableNotice + TRADE_PANEL_BOOK_UNAVAILABLE when book infinite query errors
TradeRecentTradesSection.tsx trade-tape-unavailable when tape down
PriceChart.tsx trade-chart-unavailable when candles down
indexerTradeOutageCopy.ts Trade banner lead/tail (#166 limit reference exception) + panel strings
docs/frontend.md § Market data loading & outage Global invariants

Unit: TradePage.test.tsx (banner, 404 vs outage, pair-switch loading).

/limits (gap)

Piece Current behavior Gap
LimitOrdersPage.tsx Factory pairs via LCD (getAllPairsPaginated); indexer getPair, getTrades, getPairLimitPlacements; mounts shared OrderBookPanel No page-level MarketDataServiceOutageBanner; no detectMarketDataOutage on workspace queries
OrderBookPanel on /limits Book fetch errors already show trade-book-unavailable-* copy (trade testids) Book panel degrades, but no global banner; limits-specific data-testid optional for E2E clarity
Limit price reference useLimitOrderPriceRefBundle — tape + pool LCD fallback (#166) Outage must not bypass submit gate; banner tail from trade may or may not apply on /limits (product decision)
Pair switch Instant setPairAddr on MenuSelect No MarketDataLoadingStatus / pair-switch loading affordance (#180)
Tests e2e/limit-orders.spec.ts, e2e/limit-orders-tx.spec.ts No Vitest outage coverage for LimitOrdersPage; E2E does not assert market-data-down

E2E: 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

  1. Consistency: Traders using /limits for book-first limit workflow see the same market data service vocabulary and degradation as /trade (#174, #215).
  2. Safety: Without a page-level banner, users may assume place/cancel still have full book context while indexer book pages are down (#164).
  3. Test gap: Regressions on /limits outage UX are invisible in CI until this route is covered in Vitest (and optionally opt-in E2E).
  4. Agent/docs: Skills reference trade-only paths; /limits should cross-link to the same global invariants.

Constraints and guardrails

  • Do not regress /trade testids or copy: trade-indexer-outage-banner, trade-pair-switch-loading, trade-book-unavailable-*, etc.
  • 404 vs outage: Unknown pair / indexer 404 → logical retry or empty state, not global outage banner (#177).
  • LCD vs market data: LcdConnectivityBanner / factory LcdQueryGate on limits page remain chain concerns — do not conflate with indexer outage.
  • Retail copy: No VITE_INDEXER_URL, hostnames, or “indexer” jargon (#174).
  • Limit reference (#166): If trade banner tail is shown on /limits, it must remain the narrow pool-reserve exception only — does not restore book depth or placements list from indexer.
  • No silent LCD book fallback for depth rows when indexer is down (#164).
  • Pair switch: Do not use placeholderData: keepPreviousData on pair-keyed indexer reads (#180).
  • Shared components: Prefer reusing MarketDataServiceOutageBanner, detectMarketDataOutage, marketDataServiceCopy — add LIMITS_MARKET_DATA_OUTAGE_LEAD if needed.
  • Order book row actions: Preserve /limits wiring for useLimitOrderCancelMutation and LimitBookTicketDraft prefill (docs/frontend.md § Limit orders page — order book row actions).

Relevant files

Implement / extend

Docs / skills


  1. Detection on /limits: detectMarketDataOutage(indexerPairQuery, tradesForLimitQuery) — include placementsQuery only if transport failures should trigger banner (not logical empty lists).
  2. Page banner: MarketDataServiceOutageBanner with data-testid="limits-market-data-outage-banner" and limits-specific lead from marketDataServiceCopy.ts. Decide whether to include trade tail (#166) or a shorter limits-only lead.
  3. Loading (optional P2.1): While pair-keyed indexer queries fetch after pair change, show MarketDataLoadingStatus (or thin wrapper) above book/ticket — mirror #180 patterns without duplicating trade prefetch unless needed.
  4. Book panel: Keep OrderBookPanel panel-level trade-book-unavailable-* unless product wants limits-book-unavailable-* aliases; document shared testids in limits E2E scope.
  5. Place gate: Ensure evaluateLimitOrderPricePlaceGate still blocks unsafe submit when reference cannot resolve during outage (existing #166 behavior).
  6. Tests: Vitest with mocked 502 on getPair / getTrades; 404 must not show banner. Optional opt-in Playwright limits-indexer-outage.spec.ts with E2E_INDEXER_OUTAGE=1.

Acceptance criteria

  • /limits shows limits-market-data-outage-banner (or agreed testid) with market data service retail copy when workspace indexer queries fail with isIndexerUnavailableError.
  • No VITE_INDEXER_URL / hostnames in retail DOM on /limits outage paths.
  • Indexer 404 for pair does not show global outage banner.
  • /trade outage tests and testids unchanged unless dual assertions are explicitly migrated.
  • OrderBookPanel continues to show panel-level unavailable copy on book transport errors.
  • docs/frontend.md + skills/AGENTS_FRONTEND_MARKET_DATA_OUTAGE.md updated with /limits invariants.
  • New LimitOrdersPage.test.tsx (or equivalent) covers outage + 404 paths.

Test plan (functional paths)

Path Layer Action Expected
Limits indexer transport down Vitest Mock getPair + getTrades 502 with pair selected limits-market-data-outage-banner; book shows trade-book-unavailable-* or limits-scoped ids; no env URLs
Limits pair OK, book only 502 Vitest getPair OK, book pages 502 Banner + bid/ask unavailable panels
Limits 404 pair Vitest getPair 404 No outage banner; appropriate empty/retry UX
Limits healthy Vitest + E2E limit-orders.spec.ts Indexer up No outage banner; place form renders
Limits place gate under outage Vitest Outage + typed limit price Submit blocked with explicit copy (#166)
Limits pair switch (if loading added) Vitest Change pair while queries in flight Loading status visible; no stale book via keepPreviousData
Trade regression Vitest TradePage.test.tsx — All existing outage tests pass
Opt-in E2E (if added) E2E_INDEXER_OUTAGE=1 Stop indexer, open /limits Retail banner visible

Run: cd frontend-dapp && npm run test:run; E2E: document in docs/testing.md.


Test plan (attack vectors / misuse)

Vector Test Expected guard
False outage on 404 Mock indexer 404 for pair Not-found UX, not global banner
Place limit while book down Outage + attempt submit Gate blocks or warns; no implied full book
Env URL leak DOM scan in outage tests No VITE_INDEXER_URL, 127.0.0.1 in retail nodes
Stale pair book on switch Switch pair mid-fetch No previous pair depth via keepPreviousData
LCD conflated with indexer LCD fail + indexer up LCD banner/gate only
Misleading pool fallback copy Outage banner text Must not claim full book/tape on-chain (#164)
Cancel still works? Product decision + test Document whether on-chain cancel remains available when indexer down (LCD path)

Verification criteria

  • npm run test:run green in frontend-dapp.
  • Manual: make qa-up → /limits with indexer up (normal) and stopped (banner + degraded book).
  • Manual: /trade and /limits side-by-side — outage copy consistent; LCD banner distinct.
  • Grep: no Indexer unavailable or VITE_INDEXER_URL in LimitOrdersPage.tsx retail branches.
  • Docs/skills cross-linked from docs/frontend.md#market-data-loading-outage.
## Summary Extend **market-data loading & outage** UX to the standalone **`/limits`** route so it matches `/trade` behavior 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; **`/limits` was explicitly P2 / out of scope** in that issue. Tracked in gap analysis: `gaps/GAP_1780023683.md` §4 (Loading / indexer down — improved but `/limits` not fully aligned). **Parent / related:** [#215](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/215) (global banners), [#164](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/164), [#165](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/165), [#166](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/166), [#174](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/174), [#177](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/177), [#180](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/180). --- ## Current codebase ### `/trade` (reference — do not regress) | Piece | Role | |-------|------| | [`TradePage.tsx`](frontend-dapp/src/pages/TradePage.tsx) | `detectTradeIndexerOutage(indexerPairQuery, tradesQuery)` → `MarketDataServiceOutageBanner` (`trade-indexer-outage-banner`); `TradePairSwitchStatus` during workspace fetch | | [`OrderBookPanel.tsx`](frontend-dapp/src/components/trade/OrderBookPanel.tsx) | Per-side `trade-book-unavailable-*` via `TradeMarketDataUnavailableNotice` + `TRADE_PANEL_BOOK_UNAVAILABLE` when book infinite query errors | | [`TradeRecentTradesSection.tsx`](frontend-dapp/src/components/trade/TradeRecentTradesSection.tsx) | `trade-tape-unavailable` when tape down | | [`PriceChart.tsx`](frontend-dapp/src/components/charts/PriceChart.tsx) | `trade-chart-unavailable` when candles down | | [`indexerTradeOutageCopy.ts`](frontend-dapp/src/utils/indexerTradeOutageCopy.ts) | Trade banner lead/tail (#166 limit reference exception) + panel strings | | [`docs/frontend.md` § Market data loading & outage](docs/frontend.md#market-data-loading-outage) | Global invariants | **Unit:** [`TradePage.test.tsx`](frontend-dapp/src/pages/TradePage.test.tsx) (banner, 404 vs outage, pair-switch loading). ### `/limits` (gap) | Piece | Current behavior | Gap | |-------|------------------|-----| | [`LimitOrdersPage.tsx`](frontend-dapp/src/pages/LimitOrdersPage.tsx) | Factory pairs via LCD (`getAllPairsPaginated`); indexer `getPair`, `getTrades`, `getPairLimitPlacements`; mounts shared [`OrderBookPanel`](frontend-dapp/src/components/trade/OrderBookPanel.tsx) | **No** page-level `MarketDataServiceOutageBanner`; **no** `detectMarketDataOutage` on workspace queries | | `OrderBookPanel` on `/limits` | Book fetch errors already show `trade-book-unavailable-*` copy (trade testids) | Book panel degrades, but **no global banner**; limits-specific `data-testid` optional for E2E clarity | | Limit price reference | [`useLimitOrderPriceRefBundle`](frontend-dapp/src/hooks/useLimitOrderPriceRefBundle.ts) — tape + pool LCD fallback (#166) | Outage must **not** bypass submit gate; banner tail from trade may or may not apply on `/limits` (product decision) | | Pair switch | Instant `setPairAddr` on `MenuSelect` | **No** `MarketDataLoadingStatus` / pair-switch loading affordance (#180) | | Tests | [`e2e/limit-orders.spec.ts`](frontend-dapp/e2e/limit-orders.spec.ts), [`e2e/limit-orders-tx.spec.ts`](frontend-dapp/e2e/limit-orders-tx.spec.ts) | **No** Vitest outage coverage for `LimitOrdersPage`; E2E does not assert market-data-down | **E2E:** 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 1. **Consistency:** Traders using `/limits` for book-first limit workflow see the same **market data service** vocabulary and degradation as `/trade` ([#174](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/174), [#215](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/215)). 2. **Safety:** Without a page-level banner, users may assume place/cancel still have full book context while indexer book pages are down ([#164](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/164)). 3. **Test gap:** Regressions on `/limits` outage UX are invisible in CI until this route is covered in Vitest (and optionally opt-in E2E). 4. **Agent/docs:** Skills reference trade-only paths; `/limits` should cross-link to the same global invariants. --- ## Constraints and guardrails - **Do not regress `/trade`** testids or copy: `trade-indexer-outage-banner`, `trade-pair-switch-loading`, `trade-book-unavailable-*`, etc. - **404 vs outage:** Unknown pair / indexer 404 → logical retry or empty state, **not** global outage banner ([#177](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/177)). - **LCD vs market data:** [`LcdConnectivityBanner`](frontend-dapp/src/components/common/LcdConnectivityBanner.tsx) / factory `LcdQueryGate` on limits page remain **chain** concerns — do not conflate with indexer outage. - **Retail copy:** No `VITE_INDEXER_URL`, hostnames, or “indexer” jargon ([#174](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/174)). - **Limit reference (#166):** If trade banner **tail** is shown on `/limits`, it must remain the **narrow** pool-reserve exception only — does not restore book depth or placements list from indexer. - **No silent LCD book fallback** for depth rows when indexer is down ([#164](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/164)). - **Pair switch:** Do not use `placeholderData: keepPreviousData` on pair-keyed indexer reads ([#180](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/180)). - **Shared components:** Prefer reusing `MarketDataServiceOutageBanner`, `detectMarketDataOutage`, `marketDataServiceCopy` — add `LIMITS_MARKET_DATA_OUTAGE_LEAD` if needed. - **Order book row actions:** Preserve `/limits` wiring for `useLimitOrderCancelMutation` and `LimitBookTicketDraft` prefill ([docs/frontend.md § Limit orders page — order book row actions](docs/frontend.md#limits-page-order-book-row-actions)). --- ## Relevant files **Implement / extend** - [`LimitOrdersPage.tsx`](frontend-dapp/src/pages/LimitOrdersPage.tsx) - [`marketDataServiceCopy.ts`](frontend-dapp/src/utils/marketDataServiceCopy.ts) (limits-specific lead) - [`marketDataOutage.ts`](frontend-dapp/src/utils/marketDataOutage.ts) - [`MarketDataServiceOutageBanner.tsx`](frontend-dapp/src/components/common/MarketDataServiceOutageBanner.tsx) - [`MarketDataLoadingStatus.tsx`](frontend-dapp/src/components/common/MarketDataLoadingStatus.tsx) (optional pair-switch on limits) - [`OrderBookPanel.tsx`](frontend-dapp/src/components/trade/OrderBookPanel.tsx) (only if adding limits-scoped testids or props — prefer page-level banner first) - [`useLimitOrderPriceRefBundle.ts`](frontend-dapp/src/hooks/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`](docs/frontend.md) — extend [§ Market data loading & outage](docs/frontend.md#market-data-loading-outage) with `/limits` row - [`skills/AGENTS_FRONTEND_MARKET_DATA_OUTAGE.md`](skills/AGENTS_FRONTEND_MARKET_DATA_OUTAGE.md) - [`skills/AGENTS_FRONTEND_ORDER_BOOK_ROW_ACTIONS.md`](skills/AGENTS_FRONTEND_ORDER_BOOK_ROW_ACTIONS.md) (if testids change) --- ## Recommended direction 1. **Detection on `/limits`:** `detectMarketDataOutage(indexerPairQuery, tradesForLimitQuery)` — include `placementsQuery` only if transport failures should trigger banner (not logical empty lists). 2. **Page banner:** `MarketDataServiceOutageBanner` with `data-testid="limits-market-data-outage-banner"` and limits-specific lead from `marketDataServiceCopy.ts`. Decide whether to include trade **tail** (#166) or a shorter limits-only lead. 3. **Loading (optional P2.1):** While pair-keyed indexer queries fetch after pair change, show `MarketDataLoadingStatus` (or thin wrapper) above book/ticket — mirror #180 patterns without duplicating trade prefetch unless needed. 4. **Book panel:** Keep `OrderBookPanel` panel-level `trade-book-unavailable-*` unless product wants `limits-book-unavailable-*` aliases; document shared testids in limits E2E scope. 5. **Place gate:** Ensure `evaluateLimitOrderPricePlaceGate` still blocks unsafe submit when reference cannot resolve during outage (existing #166 behavior). 6. **Tests:** Vitest with mocked 502 on `getPair` / `getTrades`; 404 must not show banner. Optional opt-in Playwright `limits-indexer-outage.spec.ts` with `E2E_INDEXER_OUTAGE=1`. --- ## Acceptance criteria - [ ] `/limits` shows `limits-market-data-outage-banner` (or agreed testid) with **market data service** retail copy when workspace indexer queries fail with `isIndexerUnavailableError`. - [ ] No `VITE_INDEXER_URL` / hostnames in retail DOM on `/limits` outage paths. - [ ] Indexer **404** for pair does not show global outage banner. - [ ] `/trade` outage tests and testids unchanged unless dual assertions are explicitly migrated. - [ ] `OrderBookPanel` continues to show panel-level unavailable copy on book transport errors. - [ ] `docs/frontend.md` + `skills/AGENTS_FRONTEND_MARKET_DATA_OUTAGE.md` updated with `/limits` invariants. - [ ] New `LimitOrdersPage.test.tsx` (or equivalent) covers outage + 404 paths. --- ## Test plan (functional paths) | Path | Layer | Action | Expected | |------|-------|--------|----------| | Limits indexer transport down | Vitest | Mock `getPair` + `getTrades` 502 with pair selected | `limits-market-data-outage-banner`; book shows `trade-book-unavailable-*` or limits-scoped ids; no env URLs | | Limits pair OK, book only 502 | Vitest | `getPair` OK, book pages 502 | Banner + bid/ask unavailable panels | | Limits 404 pair | Vitest | `getPair` 404 | No outage banner; appropriate empty/retry UX | | Limits healthy | Vitest + E2E `limit-orders.spec.ts` | Indexer up | No outage banner; place form renders | | Limits place gate under outage | Vitest | Outage + typed limit price | Submit blocked with explicit copy (#166) | | Limits pair switch (if loading added) | Vitest | Change pair while queries in flight | Loading status visible; no stale book via `keepPreviousData` | | Trade regression | Vitest `TradePage.test.tsx` | — | All existing outage tests pass | | Opt-in E2E (if added) | `E2E_INDEXER_OUTAGE=1` | Stop indexer, open `/limits` | Retail banner visible | Run: `cd frontend-dapp && npm run test:run`; E2E: document in `docs/testing.md`. --- ## Test plan (attack vectors / misuse) | Vector | Test | Expected guard | |--------|------|----------------| | **False outage on 404** | Mock indexer 404 for pair | Not-found UX, not global banner | | **Place limit while book down** | Outage + attempt submit | Gate blocks or warns; no implied full book | | **Env URL leak** | DOM scan in outage tests | No `VITE_INDEXER_URL`, `127.0.0.1` in retail nodes | | **Stale pair book on switch** | Switch pair mid-fetch | No previous pair depth via `keepPreviousData` | | **LCD conflated with indexer** | LCD fail + indexer up | LCD banner/gate only | | **Misleading pool fallback copy** | Outage banner text | Must not claim full book/tape on-chain ([#164](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/164)) | | **Cancel still works?** | Product decision + test | Document whether on-chain cancel remains available when indexer down (LCD path) | --- ## Verification criteria - [ ] `npm run test:run` green in `frontend-dapp`. - [ ] Manual: `make qa-up` → `/limits` with indexer up (normal) and stopped (banner + degraded book). - [ ] Manual: `/trade` and `/limits` side-by-side — outage copy consistent; LCD banner distinct. - [ ] Grep: no `Indexer unavailable` or `VITE_INDEXER_URL` in `LimitOrdersPage.tsx` retail branches. - [ ] Docs/skills cross-linked from `docs/frontend.md#market-data-loading-outage`.
PlasticDigits commented 2026-05-29 05:35:41 +00:00 (Migrated from gitlab.com)

marked as related to #215

marked as related to #215
PlasticDigits commented 2026-05-29 06:47:02 +00:00 (Migrated from gitlab.com)

mentioned in commit 632089c676

mentioned in commit 632089c676314f73dccd560b5b33ee2f996e0547
PlasticDigits commented 2026-05-29 06:47:52 +00:00 (Migrated from gitlab.com)

Implementation (merged to main — 632089c)

Aligned standalone /limits with the market-data outage UX from #215 / /trade:

  • Detection: detectMarketDataOutage(indexerPairQuery, tradesForLimitQuery) — placements query excluded (logical empty lists OK).
  • Page banner: limits-market-data-outage-banner with LIMITS_MARKET_DATA_OUTAGE_LEAD + trade #166 limit-reference tail (pool-reserve exception only).
  • Pair switch: limits-pair-switch-loading via MarketDataLoadingStatus while indexer-pair-limit-orders / pair-trades-limit-orders fetch.
  • Tests: LimitOrdersPage.test.tsx (502 banner, tape-only 502, 404 no banner, place gate, pair-switch loading); opt-in e2e/limits-indexer-outage.spec.ts.
  • Docs/skills: docs/frontend.md § Limit orders page — market data outage, global table updated; skills/AGENTS_FRONTEND_MARKET_DATA_OUTAGE.md + order-book row actions cross-link.

/trade testids and TradePage.test.tsx unchanged.


@brouie — please verify when you have a moment:

  • cd frontend-dapp && npm run test:run — LimitOrdersPage.test.tsx + TradePage.test.tsx green
  • make qa-up → /limits with indexer up: no limits-market-data-outage-banner; book + place form normal
  • Stop indexer → /limits with pair selected: banner visible; retail copy (no VITE_INDEXER_URL / hostnames); trade-book-unavailable-* on bid/ask
  • Indexer 404 for pair (if reproducible): no global outage banner
  • /trade and /limits side-by-side during outage: consistent vocabulary; LCD banner still distinct
  • Optional: E2E_INDEXER_OUTAGE=1 npx playwright test e2e/limits-indexer-outage.spec.ts (indexer stopped)

Leaving this issue open until sign-off.

## Implementation (merged to `main` — 632089c) Aligned standalone **`/limits`** with the market-data outage UX from **#215** / `/trade`: - **Detection:** `detectMarketDataOutage(indexerPairQuery, tradesForLimitQuery)` — placements query excluded (logical empty lists OK). - **Page banner:** `limits-market-data-outage-banner` with `LIMITS_MARKET_DATA_OUTAGE_LEAD` + trade **#166** limit-reference tail (pool-reserve exception only). - **Pair switch:** `limits-pair-switch-loading` via `MarketDataLoadingStatus` while `indexer-pair-limit-orders` / `pair-trades-limit-orders` fetch. - **Tests:** `LimitOrdersPage.test.tsx` (502 banner, tape-only 502, 404 no banner, place gate, pair-switch loading); opt-in `e2e/limits-indexer-outage.spec.ts`. - **Docs/skills:** [docs/frontend.md § Limit orders page — market data outage](docs/frontend.md#limits-page-market-data-outage), global table updated; `skills/AGENTS_FRONTEND_MARKET_DATA_OUTAGE.md` + order-book row actions cross-link. `/trade` testids and `TradePage.test.tsx` unchanged. --- @brouie — please verify when you have a moment: - [ ] `cd frontend-dapp && npm run test:run` — `LimitOrdersPage.test.tsx` + `TradePage.test.tsx` green - [ ] `make qa-up` → `/limits` with indexer **up**: no `limits-market-data-outage-banner`; book + place form normal - [ ] Stop indexer → `/limits` with pair selected: banner visible; retail copy (no `VITE_INDEXER_URL` / hostnames); `trade-book-unavailable-*` on bid/ask - [ ] Indexer **404** for pair (if reproducible): no global outage banner - [ ] `/trade` and `/limits` side-by-side during outage: consistent vocabulary; LCD banner still distinct - [ ] Optional: `E2E_INDEXER_OUTAGE=1 npx playwright test e2e/limits-indexer-outage.spec.ts` (indexer stopped) Leaving this issue **open** until sign-off.
PlasticDigits commented 2026-05-29 06:49:48 +00:00 (Migrated from gitlab.com)

mentioned in issue #219

mentioned in issue #219
PlasticDigits commented 2026-05-29 15:45:37 +00:00 (Migrated from gitlab.com)

mentioned in issue #215

mentioned in issue #215
PlasticDigits commented 2026-05-30 06:11:13 +00:00 (Migrated from gitlab.com)

Verification complete (agent — verify/issue-218 worktree @ 13fef65)

Verified GitLab #218 — /limits market-data outage alignment with #215 / /trade. No code changes required; implementation on main meets all acceptance and verification criteria.

What was checked

Area Result
Vitest npm run test:run — 710/710 green; targeted LimitOrdersPage.test.tsx (5) + TradePage.test.tsx (17) — all pass
Detection detectMarketDataOutage(indexerPairQuery, tradesForLimitQuery) in LimitOrdersPage.tsx; placements excluded
Banner limits-market-data-outage-banner with LIMITS_MARKET_DATA_OUTAGE_LEAD + trade #166 tail; retail copy only
404 vs outage Vitest: 404 on getPair → no global banner
Place gate Vitest: outage blocks submit with explicit guard copy
Pair switch Vitest: limits-pair-switch-loading while workspace queries fetch
Trade regression All existing TradePage.test.tsx outage tests pass; trade testids unchanged
Grep No Indexer unavailable / VITE_INDEXER_URL in LimitOrdersPage.tsx retail branches
Docs/skills docs/frontend.md#limits-page-market-data-outage, #market-data-loading-outage, skills/AGENTS_FRONTEND_MARKET_DATA_OUTAGE.md, order-book row actions cross-links present

Manual QA (LocalTerra + .env.local, indexer toggled — infra not reset)

  • Indexer up → /limits, pair selected: no limits-market-data-outage-banner; order book + place form render
  • Indexer stopped → /limits, pair selected: limits-market-data-outage-banner visible; retail “market data service unavailable” copy; no VITE_INDEXER_URL / hostnames in DOM
  • /trade with indexer down: trade-indexer-outage-banner uses same vocabulary + #166 tail; distinct from LCD connectivity messaging when both appear
  • Opt-in E2E spec present: e2e/limits-indexer-outage.spec.ts (documented in docs/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:run
  • make qa-up → /limits indexer up: normal UX
  • Stop indexer → /limits: banner + degraded book panels
  • Side-by-side /trade + /limits during outage: consistent copy; LCD banner distinct
  • Optional: E2E_INDEXER_OUTAGE=1 npx playwright test e2e/limits-indexer-outage.spec.ts

Closing — all issue acceptance criteria and verification criteria pass.

## Verification complete (agent — `verify/issue-218` worktree @ `13fef65`) Verified GitLab **#218** — `/limits` market-data outage alignment with **#215** / `/trade`. No code changes required; implementation on `main` meets all acceptance and verification criteria. ### What was checked | Area | Result | |------|--------| | **Vitest** | `npm run test:run` — **710/710** green; targeted `LimitOrdersPage.test.tsx` (5) + `TradePage.test.tsx` (17) — all pass | | **Detection** | `detectMarketDataOutage(indexerPairQuery, tradesForLimitQuery)` in `LimitOrdersPage.tsx`; placements excluded | | **Banner** | `limits-market-data-outage-banner` with `LIMITS_MARKET_DATA_OUTAGE_LEAD` + trade **#166** tail; retail copy only | | **404 vs outage** | Vitest: 404 on `getPair` → no global banner | | **Place gate** | Vitest: outage blocks submit with explicit guard copy | | **Pair switch** | Vitest: `limits-pair-switch-loading` while workspace queries fetch | | **Trade regression** | All existing `TradePage.test.tsx` outage tests pass; trade testids unchanged | | **Grep** | No `Indexer unavailable` / `VITE_INDEXER_URL` in `LimitOrdersPage.tsx` retail branches | | **Docs/skills** | `docs/frontend.md#limits-page-market-data-outage`, `#market-data-loading-outage`, `skills/AGENTS_FRONTEND_MARKET_DATA_OUTAGE.md`, order-book row actions cross-links present | ### Manual QA (LocalTerra + `.env.local`, indexer toggled — infra not reset) - [x] Indexer **up** → `/limits`, pair selected: **no** `limits-market-data-outage-banner`; order book + place form render - [x] Indexer **stopped** → `/limits`, pair selected: `limits-market-data-outage-banner` visible; retail “market data service unavailable” copy; **no** `VITE_INDEXER_URL` / hostnames in DOM - [x] `/trade` with indexer down: `trade-indexer-outage-banner` uses same vocabulary + **#166** tail; distinct from LCD connectivity messaging when both appear - [x] Opt-in E2E spec present: `e2e/limits-indexer-outage.spec.ts` (documented in `docs/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:run` - [ ] `make qa-up` → `/limits` indexer up: normal UX - [ ] Stop indexer → `/limits`: banner + degraded book panels - [ ] Side-by-side `/trade` + `/limits` during outage: consistent copy; LCD banner distinct - [ ] Optional: `E2E_INDEXER_OUTAGE=1 npx playwright test e2e/limits-indexer-outage.spec.ts` Closing — all issue acceptance criteria and verification criteria pass.
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-05-30 06:11:16 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic#218
No description provided.