Play-route indexer offline degraded-mode banner #354

Closed
opened 2026-06-25 20:07:34 +00:00 by PlasticDigits · 5 comments
PlasticDigits commented 2026-06-25 20:07:34 +00:00 (Migrated from gitlab.com)

Parent

Transition Gap Analysis (#342) — P2 #14. Bundles M-F1, #96.

Current codebase

  • useIndexerConnectivity / IndexerStatusBar used on protocol page (ArenaProtocolPage.tsx) but not play route (ArenaSimplePage.tsx).
  • During indexer outage, play UI shows latched stale data via placeholderData with no degraded-mode banner.
  • indexerConnectivity.ts provides shared backoff and offline streak.

Why needed

Users on / cannot distinguish live transitions from stale cached snapshots during indexer failures — transition gap UX risk.

Constraints / guardrails

  • Reuse protocol degraded-mode pattern (IndexerStatusBar or equivalent banner).
  • Do not block read-only play when indexer recovers (banner clears).
  • Indexer-first invariant unchanged.

Relevant files

  • frontend/src/pages/arena/ArenaSimplePage.tsx
  • frontend/src/pages/arena/ArenaProtocolPage.tsx (reference)
  • frontend/src/hooks/useIndexerConnectivity.ts
  • frontend/src/components/IndexerStatusBar.tsx
  • frontend/src/lib/indexerConnectivity.ts
  1. Mount IndexerStatusBar (or slim variant) on play route layout.
  2. Optional: muted copy on timer/podium sections when isOffline.
  3. Unit test in ArenaSimplePage.test.tsx for offline banner presence.
  4. Cross-link #96 in invariant if not already.

Acceptance criteria

  • Play route shows indexer offline indicator when connectivity hook reports offline.
  • Banner matches protocol page behavior (retrying copy).
  • ArenaSimplePage.test.tsx covers offline path.
  • npm test PASS.

Test plan

Path Command
Frontend cd frontend && npm run typecheck && npm run lint && npm test
Unit ArenaSimplePage.test.tsx, indexerConnectivity.test.ts
E2E optional Mock indexer down in play-feel spec sad path

Attack / abuse test plan

  • Offline banner must not leak internal URLs or tokens.
  • Stale data must not be labeled “live” when offline (copy audit).

Verification criteria

  • Unit test PASS.
  • Manual: stop indexer, load / → banner visible.
## Parent [Transition Gap Analysis (#342)](https://gitlab.com/PlasticDigits/yieldomega/-/issues/342) — P2 #14. Bundles **M-F1**, [#96](https://gitlab.com/PlasticDigits/yieldomega/-/issues/96). ## Current codebase - `useIndexerConnectivity` / `IndexerStatusBar` used on protocol page (`ArenaProtocolPage.tsx`) but not play route (`ArenaSimplePage.tsx`). - During indexer outage, play UI shows latched stale data via `placeholderData` with no degraded-mode banner. - `indexerConnectivity.ts` provides shared backoff and offline streak. ## Why needed Users on `/` cannot distinguish live transitions from stale cached snapshots during indexer failures — transition gap UX risk. ## Constraints / guardrails - Reuse protocol degraded-mode pattern (`IndexerStatusBar` or equivalent banner). - Do not block read-only play when indexer recovers (banner clears). - Indexer-first invariant unchanged. ## Relevant files - `frontend/src/pages/arena/ArenaSimplePage.tsx` - `frontend/src/pages/arena/ArenaProtocolPage.tsx` (reference) - `frontend/src/hooks/useIndexerConnectivity.ts` - `frontend/src/components/IndexerStatusBar.tsx` - `frontend/src/lib/indexerConnectivity.ts` ## Recommended direction 1. Mount `IndexerStatusBar` (or slim variant) on play route layout. 2. Optional: muted copy on timer/podium sections when `isOffline`. 3. Unit test in `ArenaSimplePage.test.tsx` for offline banner presence. 4. Cross-link #96 in invariant if not already. ## Acceptance criteria - [ ] Play route shows indexer offline indicator when connectivity hook reports offline. - [ ] Banner matches protocol page behavior (retrying copy). - [ ] `ArenaSimplePage.test.tsx` covers offline path. - [ ] `npm test` PASS. ## Test plan | Path | Command | |------|---------| | Frontend | `cd frontend && npm run typecheck && npm run lint && npm test` | | Unit | `ArenaSimplePage.test.tsx`, `indexerConnectivity.test.ts` | | E2E optional | Mock indexer down in play-feel spec sad path | ## Attack / abuse test plan - Offline banner must not leak internal URLs or tokens. - Stale data must not be labeled “live” when offline (copy audit). ## Verification criteria - Unit test PASS. - Manual: stop indexer, load `/` → banner visible.
PlasticDigits commented 2026-06-25 20:07:51 +00:00 (Migrated from gitlab.com)

mentioned in issue #342

mentioned in issue #342
PlasticDigits commented 2026-06-25 22:29:26 +00:00 (Migrated from gitlab.com)

mentioned in commit 648936c026

mentioned in commit 648936c026058da115a87150bde7b561a8d6a923
PlasticDigits commented 2026-06-25 22:29:38 +00:00 (Migrated from gitlab.com)

mentioned in merge request !522

mentioned in merge request !522
PlasticDigits commented 2026-06-26 03:37:22 +00:00 (Migrated from gitlab.com)

mentioned in commit 6f41cbf80a

mentioned in commit 6f41cbf80ab2afe1e5022784ea1804c9abce110d
PlasticDigits commented 2026-06-26 08:13:58 +00:00 (Migrated from gitlab.com)

Verification complete — GitLab #354

Verified Play-route indexer offline degraded-mode banner on main (no repo changes; no MR).

Acceptance criteria

Criterion Result How verified
Play route shows indexer offline indicator when connectivity hook reports offline PASS ArenaSimplePage mounts IndexerStatusBar at data-testid="arena-simple-indexer-status"; manual: stopped indexer (kill on /tmp/yieldomega_indexer_stack.pid), loaded http://127.0.0.1:5173/ → INDEXER · offline · retrying within ~8s
Banner matches protocol page behavior (retrying copy) PASS Shared IndexerStatusBar component (same string as AUDIT footer); unit test asserts copy; manual play-route offline text matches expected protocol copy
ArenaSimplePage.test.tsx covers offline path PASS describe("ArenaSimplePage indexer offline banner (GitLab #354)") — mount + offline copy tests
npm test PASS PASS cd frontend && npm run typecheck && npm run lint && npm test — 143 files / 760 tests

Additional checks

Check Result How verified
indexerConnectivity.test.ts PASS Included in npm test (offline streak threshold, backoff 5s→15s→30s)
INV-FRONTEND-354-PLAY-INDEXER-STATUS docs PASS Present in docs/testing/invariants-and-business-logic.md, docs/frontend/arena-views.md, skills/play-active-time-arena/SKILL.md
Attack/abuse — no internal URL/token leak in banner PASS Manual offline banner text is INDEXER · offline · retrying only
Attack/abuse — stale data not labeled live when offline PASS Manual: offline banner has no · live; unit test asserts not.toContain("· live")
E2E optional (play-feel sad path) SKIP Not required by acceptance criteria; unit + manual cover offline banner
Manual QA §96 protocol footer pill (expanded accordion) SKIP Footer IndexerStatusBar is inside collapsed agent card; play-route inline banner is the #354 deliverable and passed manual stop-indexer check

Environment

  • Stack: SKIP_ANVIL_RICH_STATE=1 YIELDOMEGA_DEPLOY_NO_COOLDOWN=1 START_BOT_SWARM=0 bash scripts/start-qa-local-full-stack.sh --live-sale --no-swarm
  • Manual UI: Playwright Chromium (headed-equivalent headless) against Vite :5173

Closing as verified on main.

## Verification complete — GitLab #354 Verified **Play-route indexer offline degraded-mode banner** on `main` (no repo changes; no MR). ### Acceptance criteria | Criterion | Result | How verified | |-----------|--------|--------------| | Play route shows indexer offline indicator when connectivity hook reports offline | **PASS** | `ArenaSimplePage` mounts `IndexerStatusBar` at `data-testid="arena-simple-indexer-status"`; manual: stopped indexer (`kill` on `/tmp/yieldomega_indexer_stack.pid`), loaded `http://127.0.0.1:5173/` → `INDEXER · offline · retrying` within ~8s | | Banner matches protocol page behavior (retrying copy) | **PASS** | Shared `IndexerStatusBar` component (same string as AUDIT footer); unit test asserts copy; manual play-route offline text matches expected protocol copy | | `ArenaSimplePage.test.tsx` covers offline path | **PASS** | `describe("ArenaSimplePage indexer offline banner (GitLab #354)")` — mount + offline copy tests | | `npm test` PASS | **PASS** | `cd frontend && npm run typecheck && npm run lint && npm test` — 143 files / 760 tests | ### Additional checks | Check | Result | How verified | |-------|--------|--------------| | `indexerConnectivity.test.ts` | **PASS** | Included in `npm test` (offline streak threshold, backoff 5s→15s→30s) | | `INV-FRONTEND-354-PLAY-INDEXER-STATUS` docs | **PASS** | Present in `docs/testing/invariants-and-business-logic.md`, `docs/frontend/arena-views.md`, `skills/play-active-time-arena/SKILL.md` | | Attack/abuse — no internal URL/token leak in banner | **PASS** | Manual offline banner text is `INDEXER · offline · retrying` only | | Attack/abuse — stale data not labeled live when offline | **PASS** | Manual: offline banner has no `· live`; unit test asserts `not.toContain("· live")` | | E2E optional (play-feel sad path) | **SKIP** | Not required by acceptance criteria; unit + manual cover offline banner | | Manual QA §96 protocol footer pill (expanded accordion) | **SKIP** | Footer `IndexerStatusBar` is inside collapsed agent card; play-route inline banner is the #354 deliverable and passed manual stop-indexer check | ### Environment - Stack: `SKIP_ANVIL_RICH_STATE=1 YIELDOMEGA_DEPLOY_NO_COOLDOWN=1 START_BOT_SWARM=0 bash scripts/start-qa-local-full-stack.sh --live-sale --no-swarm` - Manual UI: Playwright Chromium (headed-equivalent headless) against Vite `:5173` Closing as verified on `main`.
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-06-26 08:13:59 +00:00
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/yieldomega#354
No description provided.