Skip to content

Add realtime protocol stats and freshness safeguards - #422

Open
faith-ng wants to merge 2 commits into
Refract-Protocol:mainfrom
faith-ng:feat/realtime-issues-280-283
Open

faith-ng wants to merge 2 commits into
Refract-Protocol:mainfrom
faith-ng:feat/realtime-issues-280-283

Conversation

@faith-ng

@faith-ng faith-ng commented Oct 21, 2026 •

Copy link
Copy Markdown

What changed

  • Added a shared REST/realtime resource hook with abortable fetches, monotonic sequence/timestamp guards, explicit deterministic tie handling, bounded REST seeds/fallbacks, and animation-frame coalescing for protocol stats.
  • Restored the oracle, recent claims, and holder claims hooks; connected the landing statistics to protocol.stats and added manual refresh controls.
  • Added recursive realtime log sanitization, production-safe logging defaults, and a tab-session debug switch.
  • Documented the polling inventory, staged topic gates, ordering policy, and logging boundary.

Validation

  • Focused realtime tests: 6 passed (redact.test.ts, useRealtimeResource.test.ts).
  • Scoped TypeScript check for the changed data/realtime modules: passed.
  • Full test suite: blocked by existing repository failures, including the unparseable src/app/cover/page.tsx, missing fake-indexeddb, and unrelated existing test/API failures.
  • npm run typecheck and npm run build: blocked by the pre-existing JSX syntax errors in src/app/cover/page.tsx.
  • npm run size: unable to measure because the failed build produced no .next/static/chunks files.

Rollout note

All realtime topic flags remain off by default. The inventory documents that no data polling intervals existed in these three blank hooks on the upstream baseline, and keeps the landing seconds-ago timer as display-only. The production observation-window duration remains an operational decision before enabling each topic.

Closes #280
Closes #281
Closes #282
Closes #283

@drips-wave

drips-wave Bot commented Oct 21, 2026

Copy link
Copy Markdown

@faith-ng Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant