Summary
Stellar's Horizon endpoints occasionally experience degraded performance or downtime. When this happens, searches fail with generic error messages that give the user no context. This issue adds a network status indicator that checks Horizon's / root endpoint on mount and displays a warning banner if the response time exceeds a threshold or the request fails entirely.
Task
- Create
src/lib/network-health.ts with a checkHorizonHealth(network) function that makes a lightweight GET request to the Horizon root endpoint and returns "ok" or "degraded" based on whether the response arrives within 3 seconds.
- Run the health check on mount in
src/app/page.tsx and on network toggle.
- If the result is
"degraded", show a dismissible amber banner above the search form with a message such as "Horizon may be experiencing delays. Results could be slower than usual."
- Do not block the form or disable search based on the health result. The banner is informational only.
Acceptance Criteria
Files in Scope
src/lib/network-health.ts (new file)
src/app/page.tsx
Summary
Stellar's Horizon endpoints occasionally experience degraded performance or downtime. When this happens, searches fail with generic error messages that give the user no context. This issue adds a network status indicator that checks Horizon's
/root endpoint on mount and displays a warning banner if the response time exceeds a threshold or the request fails entirely.Task
src/lib/network-health.tswith acheckHorizonHealth(network)function that makes a lightweight GET request to the Horizon root endpoint and returns"ok"or"degraded"based on whether the response arrives within 3 seconds.src/app/page.tsxand on network toggle."degraded", show a dismissible amber banner above the search form with a message such as "Horizon may be experiencing delays. Results could be slower than usual."Acceptance Criteria
Files in Scope
src/lib/network-health.ts(new file)src/app/page.tsx