Repository navigation
feat: restore /usage page (network uptime & reliability) - #49
Merged
Merged
Conversation
- API: /usage/cloud-incidents and /usage/blockchain-incidents routes back the FE. Cloudflare/GCP/Vercel pulled live from official status APIs; AWS/Azure/DO/Oracle merged from curated baselines committed alongside the service. Blockchain RPC providers (Alchemy, Infura, QuickNode, Blockdaemon, Tenderly, Chainstack, GetBlock, Ankr, Helius, Nodies, Dwellir, DRPC) scraped via native fetch + a small htmlToText helper — no axios/cheerio deps. Both routes cached 24h. Vitest suite with mocked fetch covers happy path + partial-upstream failure. Swagger documents response schemas. - Web: /usage page with stat cards, recharts uptime comparison (slim strokes, dot-less cloud lines, dashed blockchain RPCs, Lava on top), and per-service incident stats. Driven by useApi against the new endpoints — no static JSON, no scheduled scraping. - Nav: Usage link added to desktop header (after Chains) and mobile nav. Burn external link added (burn.lavanet.xyz). Mobile nav marks Usage and Burn as external alongside Rewards.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/usagepage in the web app: stat cards, recharts uptime comparison (slim strokes, dashed Blockchain RPCs, Lava on top), and per-service incident cards. Driven byuseApi— no static JSON files, no scheduled scrapers.GET /usage/cloud-incidents— Cloudflare/GCP/Vercel pulled live from official status APIs; AWS/Azure/DigitalOcean/Oracle merged from curated baselines committed inincident-baselines.ts.GET /usage/blockchain-incidents— scrapes 12 RPC-provider status pages (StatusPage, Instatus, BetterStack) in parallel using nativefetch+ a tinyhtmlToTexthelper. No axios/cheerio dep.burn.lavanet.xyzexternal link. Mobile nav marks Usage and Burn as external alongside Rewards.Usagetag with response schemas + descriptions for both routes.Test plan
pnpm typecheckgreen across all 3 packages.pnpm --filter @info/api test routes-usage→ 3/3 (happy path, cloud partial-upstream failure, blockchain all-upstream failure).docker compose -f docker-compose.dev.yml up:curl http://localhost:8080/usage/cloud-incidents→ 388 incidents, 250 from Cloudflare live + baselines.curl http://localhost:8080/usage/blockchain-incidents→ 2562 incidents from 8 active providers (cold ~30s, then 3ms cached).GET http://localhost:3001/usage→ 200, all section headings render SSR, FE confirmed hitting both API routes.