Skip to content

Add Stellar network status banner #20

Description

@grantfox-oss

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

  • A degraded Horizon response (simulated by a slow or failing fetch) triggers the amber banner.
  • The banner can be dismissed by the user.
  • A healthy response shows no banner.
  • The health check re-runs when the user switches networks.
  • The form and search remain fully functional regardless of the health status.

Files in Scope

  • src/lib/network-health.ts (new file)
  • src/app/page.tsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions