W11-C4: Retry button in chart error panel fires no network request; functionally dead #177

Closed
opened 2026-05-21 13:16:46 +00:00 by totdking · 12 comments
totdking commented 2026-05-21 13:16:46 +00:00 (Migrated from gitlab.com)
No description provided.
totdking commented 2026-05-21 13:20:20 +00:00 (Migrated from gitlab.com)

Issue Summary

When the indexer returns an error for a pair (e.g. a 404 for an invalid address), the chart panel shows the humanized error message and a Retry button. Clicking Retry produces no observable effect: no request fires to the indexer, no loading state appears, and the panel stays in its error state. The only recovery path is a full browser reload, which is not communicated anywhere in the UI.


Reproduction Steps

  1. Start the app (VITE_NETWORK=local npm run dev) with LocalTerra running
  2. Navigate to http://localhost:3000/trade/terra1damThat'scrazy
  3. Wait for the chart panel to show the error message and Retry button
  4. Open DevTools → Network tab, set filter to All
  5. Click Retry
  6. Observe the Network tab for any new request to 127.0.0.1:3001

Expected Behavior

Clicking Retry should immediately fire a GET request to http://127.0.0.1:3001/api/v1/pairs/<pairAddr>. The panel should enter a loading state and then either recover (if the pair is now available) or re-show the error message. No full page reload should be required.


Actual Behavior

  • No request fires to the indexer after clicking Retry
  • The only network activity is background LCD polling (localhost:1317/cosmos/base/tendermint/v1beta1/node_info) which fires on its own schedule regardless of user action
  • The chart panel stays in its error state unchanged
  • No loading indicator is shown
  • No feedback of any kind that the button was clicked
  • Full page reload is the only working recovery path, but this is not communicated to the trader

Screen record

Screen Recording 2026-05-21 at 14.18.26.mov{width=900 height=543}


Environment Details

Field Value
OS macOS (Apple M1 Pro, 14-inch)
Browser Google Chrome 148 (desktop)
Viewport ~1440px desktop
Network localterra (local Docker)
Frontend VITE_NETWORK=local npm run dev at localhost:3000
Indexer Running (make indexer-dev)

Wallet / Device Details

  • Wallet: Station browser extension
  • Wallet state: Connected — localterra

Relevant File

frontend-dapp/src/pages/TradePage.tsx:185–187 — onRetry={() => indexerPairQuery.refetch()} is wired in source. Runtime behaviour does not match — refetch does not fire. frontend-dapp/src/components/ui/RetryError.tsx:15 — onClick={onRetry} handler.


Severity / Impact

P2 UX. The Retry button is the sole non-reload recovery path available to a trader after an indexer error. If it does not work, the trader is stuck and has no way to know they need to reload the page. A dead Retry button is a trust failure — the UI implies recovery is possible and then does nothing. Found under W11-C4 (Wrong network deep link — Interactivity and Trader use dimensions).

cc: @PlasticDigits

### Issue Summary When the indexer returns an error for a pair (e.g. a 404 for an invalid address), the chart panel shows the humanized error message and a **Retry** button. Clicking Retry produces no observable effect: no request fires to the indexer, no loading state appears, and the panel stays in its error state. The only recovery path is a full browser reload, which is not communicated anywhere in the UI. --- ### Reproduction Steps 1. Start the app (`VITE_NETWORK=local npm run dev`) with LocalTerra running 2. Navigate to `http://localhost:3000/trade/terra1damThat'scrazy` 3. Wait for the chart panel to show the error message and **Retry** button 4. Open DevTools → Network tab, set filter to **All** 5. Click **Retry** 6. Observe the Network tab for any new request to `127.0.0.1:3001` --- ### Expected Behavior Clicking Retry should immediately fire a GET request to `http://127.0.0.1:3001/api/v1/pairs/<pairAddr>`. The panel should enter a loading state and then either recover (if the pair is now available) or re-show the error message. No full page reload should be required. --- ### Actual Behavior - No request fires to the indexer after clicking Retry - The only network activity is background LCD polling (`localhost:1317/cosmos/base/tendermint/v1beta1/node_info`) which fires on its own schedule regardless of user action - The chart panel stays in its error state unchanged - No loading indicator is shown - No feedback of any kind that the button was clicked - Full page reload is the only working recovery path, but this is not communicated to the trader --- ## Screen record ![Screen Recording 2026-05-21 at 14.18.26.mov](/uploads/05ab945ce81b477d1d242d069c0043b2/Screen_Recording_2026-05-21_at_14.18.26.mov){width=900 height=543} --- ### Environment Details | Field | Value | |-------|-------| | OS | macOS (Apple M1 Pro, 14-inch) | | Browser | Google Chrome 148 (desktop) | | Viewport | \~1440px desktop | | Network | `localterra` (local Docker) | | Frontend | `VITE_NETWORK=local npm run dev` at `localhost:3000` | | Indexer | Running (`make indexer-dev`) | --- ### Wallet / Device Details - **Wallet:** Station browser extension - **Wallet state:** Connected — localterra --- ### Relevant File `frontend-dapp/src/pages/TradePage.tsx:185–187` — `onRetry={() => indexerPairQuery.refetch()}` is wired in source. Runtime behaviour does not match — refetch does not fire. `frontend-dapp/src/components/ui/RetryError.tsx:15` — `onClick={onRetry}` handler. --- ### Severity / Impact **P2 UX.** The Retry button is the sole non-reload recovery path available to a trader after an indexer error. If it does not work, the trader is stuck and has no way to know they need to reload the page. A dead Retry button is a trust failure — the UI implies recovery is possible and then does nothing. Found under **W11-C4** (Wrong network deep link — Interactivity and Trader use dimensions). cc: @PlasticDigits
totdking commented 2026-05-21 15:04:15 +00:00 (Migrated from gitlab.com)

mentioned in issue #116

mentioned in issue #116
PlasticDigits commented 2026-05-22 05:52:11 +00:00 (Migrated from gitlab.com)

mentioned in commit d310e9bb97

mentioned in commit d310e9bb97ff001e73bab11f7b953db7aea313f7
PlasticDigits commented 2026-05-22 05:52:18 +00:00 (Migrated from gitlab.com)

Fix shipped on main (d310e9b)

The Trade chart Retry control on indexer pair errors (e.g. 404 for /trade/terra1damThat'scrazy) was wired to bare refetch() while getPair uses staleTime: 60_000, so traders saw no new network activity or loading feedback.

What changed

Verification checklist

  • VITE_NETWORK=local npm run dev + indexer (make indexer-dev)
  • Open http://localhost:3000/trade/terra1damThat'scrazy (or any unknown terra1… pair)
  • Chart panel shows humanized error + Retry
  • DevTools → Network: click Retry → new GET …/api/v1/pairs/<addr>
  • Skeleton/loading visible during retry; error returns if still 404
  • cd frontend-dapp && npm run test:unit -- src/pages/TradePage.test.tsx -t 177

@totdking — please verify on your M1/Chrome setup when you have a moment. Leaving this issue open until confirmed.

## Fix shipped on `main` (d310e9b) The Trade chart **Retry** control on indexer pair errors (e.g. 404 for `/trade/terra1damThat'scrazy`) was wired to bare `refetch()` while `getPair` uses `staleTime: 60_000`, so traders saw no new network activity or loading feedback. ### What changed - Added [`useQueryManualRetry`](frontend-dapp/src/hooks/useQueryManualRetry.ts): `invalidateQueries` on the exact key, then `refetch({ cancelRefetch: false })`. - [`TradePage`](frontend-dapp/src/pages/TradePage.tsx): chart panel uses the hook; shows skeleton while retrying; `data-testid="trade-chart-retry-error"`. - [`RetryError`](frontend-dapp/src/components/ui/RetryError.tsx): optional `isRetrying`, disabled **Retrying…** button, `retry-error-button` test id. - Docs: [frontend.md § Trade page — chart pair fetch retry](docs/frontend.md#trade-page-chart-retry); agent playbook [`skills/AGENTS_FRONTEND_QUERY_RETRY.md`](skills/AGENTS_FRONTEND_QUERY_RETRY.md) (cross-linked from user-errors + trade-layout skills). - Regression: `TradePage.test.tsx` (404 + Retry), `useQueryManualRetry.test.tsx`. ### Verification checklist - [ ] `VITE_NETWORK=local npm run dev` + indexer (`make indexer-dev`) - [ ] Open `http://localhost:3000/trade/terra1damThat'scrazy` (or any unknown `terra1…` pair) - [ ] Chart panel shows humanized error + **Retry** - [ ] DevTools → Network: click **Retry** → new `GET …/api/v1/pairs/<addr>` - [ ] Skeleton/loading visible during retry; error returns if still 404 - [ ] `cd frontend-dapp && npm run test:unit -- src/pages/TradePage.test.tsx -t 177` @totdking — please verify on your M1/Chrome setup when you have a moment. Leaving this issue **open** until confirmed.
PlasticDigits commented 2026-05-22 05:52:32 +00:00 (Migrated from gitlab.com)

Fix shipped on main (d310e9b)

The Trade chart Retry control on /trade/:pairAddr was wired to indexerPairQuery.refetch() only. For the chart getPair query (staleTime: 60s, retry: false), that could leave traders with no new indexer request and no loading feedback after a 404 or other error.

What changed

  • Added useQueryManualRetry: invalidateQueries on the exact query key, then refetch({ cancelRefetch: false }) so Retry always triggers a fresh GET /api/v1/pairs/<addr>.
  • Trade page chart panels use the hook; while refetching, the chart shows a skeleton instead of a frozen error panel.
  • RetryError: disabled Retrying… state, data-testid="retry-error-button", optional panel data-testid="trade-chart-retry-error".
  • Docs + agent playbooks: docs/frontend.md § Trade page — chart pair fetch retry, skills/AGENTS_FRONTEND_QUERY_RETRY.md (cross-linked from user-errors and trade-layout skills).

Verification checklist

  • VITE_NETWORK=local npm run dev + indexer (make indexer-dev)
  • Open http://localhost:3000/trade/terra1damThat'scrazy (or any pair that 404s from indexer)
  • Confirm humanized error + Retry in chart area
  • DevTools → Network: click Retry → new GET to 127.0.0.1:3001/api/v1/pairs/...
  • Chart skeleton visible during retry; error returns if still 404
  • cd frontend-dapp && npm run test:unit -- src/pages/TradePage.test.tsx -t 177

/cc @totdking — please verify on your W11-C4 repro setup when you can. Leaving this issue open until confirmed.

## Fix shipped on `main` (d310e9b) The Trade chart **Retry** control on `/trade/:pairAddr` was wired to `indexerPairQuery.refetch()` only. For the chart `getPair` query (`staleTime: 60s`, `retry: false`), that could leave traders with no new indexer request and no loading feedback after a 404 or other error. ### What changed - Added [`useQueryManualRetry`](frontend-dapp/src/hooks/useQueryManualRetry.ts): **`invalidateQueries`** on the exact query key, then **`refetch({ cancelRefetch: false })`** so Retry always triggers a fresh `GET /api/v1/pairs/<addr>`. - **Trade page** chart panels use the hook; while refetching, the chart shows a **skeleton** instead of a frozen error panel. - **`RetryError`**: disabled **Retrying…** state, `data-testid="retry-error-button"`, optional panel `data-testid="trade-chart-retry-error"`. - Docs + agent playbooks: [docs/frontend.md § Trade page — chart pair fetch retry](docs/frontend.md#trade-page-chart-retry), [`skills/AGENTS_FRONTEND_QUERY_RETRY.md`](skills/AGENTS_FRONTEND_QUERY_RETRY.md) (cross-linked from user-errors and trade-layout skills). ### Verification checklist - [ ] `VITE_NETWORK=local npm run dev` + indexer (`make indexer-dev`) - [ ] Open `http://localhost:3000/trade/terra1damThat'scrazy` (or any pair that 404s from indexer) - [ ] Confirm humanized error + **Retry** in chart area - [ ] DevTools → Network: click **Retry** → new `GET` to `127.0.0.1:3001/api/v1/pairs/...` - [ ] Chart skeleton visible during retry; error returns if still 404 - [ ] `cd frontend-dapp && npm run test:unit -- src/pages/TradePage.test.tsx -t 177` /cc @totdking — please verify on your W11-C4 repro setup when you can. Leaving this issue **open** until confirmed.
Brouie commented 2026-05-25 01:39:33 +00:00 (Migrated from gitlab.com)

verified d310e9bb on QA stack.

source: new useQueryManualRetry hook (frontend-dapp/src/hooks/useQueryManualRetry.ts) invalidates the exact query key then refetches with cancelRefetch: false. TradePage chart panel uses it via data-testid="trade-chart-retry-error".

tests: useQueryManualRetry.test.tsx 1/1 PASS (forces a second fetch after error even when staleTime keeps the query fresh). TradePage.test.tsx 10/10 PASS covers the integration.

good to close on your side @PlasticDigits

verified `d310e9bb` on QA stack. source: new `useQueryManualRetry` hook (`frontend-dapp/src/hooks/useQueryManualRetry.ts`) invalidates the exact query key then refetches with `cancelRefetch: false`. TradePage chart panel uses it via `data-testid="trade-chart-retry-error"`. tests: `useQueryManualRetry.test.tsx` 1/1 PASS (forces a second fetch after error even when staleTime keeps the query fresh). TradePage.test.tsx 10/10 PASS covers the integration. good to close on your side @PlasticDigits
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-05-25 02:06:34 +00:00
PlasticDigits commented 2026-05-25 04:10:05 +00:00 (Migrated from gitlab.com)

mentioned in issue #175

mentioned in issue #175
PlasticDigits commented 2026-05-29 03:17:55 +00:00 (Migrated from gitlab.com)

mentioned in issue #215

mentioned in issue #215
PlasticDigits commented 2026-05-29 05:35:41 +00:00 (Migrated from gitlab.com)

mentioned in issue #218

mentioned in issue #218
PlasticDigits commented 2026-08-26 03:08:07 +00:00 (Migrated from gitlab.com)

mentioned in issue #657

mentioned in issue #657
PlasticDigits commented 2026-08-26 03:08:10 +00:00 (Migrated from gitlab.com)

marked as related to #657

marked as related to #657
PlasticDigits commented 2026-08-26 04:16:13 +00:00 (Migrated from gitlab.com)

mentioned in issue #665

mentioned in issue #665
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#177
No description provided.