Skip to content

Build the standalone global /events feed page (Postgres all-events tier) #2564

Description

@JSONbored

The audit calls for a standalone global chain-events feed page. The only global events endpoint is /api/v1/chain-events (the Postgres-backed all-events tier, ADR 0013), which returns 503 data_tier_unavailable unless the separate DATA_API Postgres worker is deployed. That infra dependency (deploy/config of a separate worker, plus graceful-degradation and split-brain reasoning vs the D1 explorer) makes the page maintainer-only rather than a miner bounty. Note: the always-live extrinsics/blocks tickers (separate issues) cover the 'feels live' need without this tier.

Deliverables

  • Add a chainEventsQuery(params) to src/lib/metagraphed/queries.ts targeting /api/v1/chain-events (newest-first, limit/offset) with a normalizer
  • Create src/routes/events.tsx: a global events feed (ListShell) — kind, block (link), hotkey/account (link), amount, N ago — with offset pagination and per-row FreshnessBadge
  • Handle the 503 data_tier_unavailable response with an explicit 'deep-history tier not enabled' empty/notice state (not a generic error) — test the 503 branch and the populated branch
  • Add a nav entry and confirm the DATA_API worker binding/deploy is documented as the prerequisite (maintainer infra step)
  • Add route + query tests covering populated feed, empty (pre-backfill), and 503-unavailable
  • Regenerate any affected generated artifacts if the query touches the OpenAPI/contract surface

References

  • repo/workers/api.mjs:845 (data_tier gate), :924 (/api/v1/chain-events), data-api.mjs:64
  • repo/src/contracts.mjs:1076-1078 + :2137 (/api/v1/chain-events feed) + :2181-2183 (block chain-events)
  • assessment/gapMatrix.md Table A row 8 + prioritized gap #9 (chain-events UI = maintainer-only, 503-gated on DATA_API)
  • assessment/featureGaps.md A (global event feed page = MED gap) + ADR 0013 hybrid deployment

📸 Required: before/after screenshots (this is a UI change)

Non-negotiable. PRs that change UI must include a before/after screenshot table. PRs without it are automatically closed — no exceptions.

Rules:

  • Show every page/feature you changed — before and after, one row each.
  • Use the markdown table below. Screenshots go inside the table only — no large full-size images pasted elsewhere in the PR.
  • Each cell is a clickable thumbnail (a small image linking to the full-size image) with a one-line caption underneath.
  • Upload screenshots to the PR by drag-and-drop (GitHub hosts them on its CDN). Do NOT commit image files to the repo.

Copy this and fill it in (replace FULL_IMAGE_URL with the URL GitHub gives you after you drop the image in):

| Page / Feature | Before | After |
|---|---|---|
| `/your-route` | [<img src="FULL_IMAGE_URL" width="260">](FULL_IMAGE_URL)<br><sub>before: short caption</sub> | [<img src="FULL_IMAGE_URL" width="260">](FULL_IMAGE_URL)<br><sub>after: short caption</sub> |


size: M · maintainer-only (owner)

Metadata

Metadata

Assignees

Labels

frontendFrontend / metagraphed-ui workmaintainer-onlyOwner-only work — yields no Gittensor points.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions