Skip to content

feat: add streamed subgraph user announcement scan#105

Open
marcomariscal wants to merge 7 commits intofeat/issue-92-subgraph-paginationfrom
feat/issue-91-streaming-scan
Open

feat: add streamed subgraph user announcement scan#105
marcomariscal wants to merge 7 commits intofeat/issue-92-subgraph-paginationfrom
feat/issue-91-streaming-scan

Conversation

@marcomariscal
Copy link
Copy Markdown
Collaborator

Summary

  • add a subgraph-first async generator for scanning user announcements page by page
  • yield matches incrementally with scannedCount, nextCursor, and snapshotBlock
  • document the happy-path usage and add a simple React streaming example

Changes

  • reuse the bounded page API from getAnnouncementsPageUsingSubgraph
  • extract shared user-filtering helpers so eager and streaming paths stay aligned
  • enforce strict chain-recency ordering for streamed batches and cover resume/empty-batch behavior with tests

Test Plan

  • ~/.bun/bin/bunx tsc --noEmit
  • ~/.bun/bin/bun test src/lib/actions/getAnnouncementsForUser/getAnnouncementsForUser.test.ts src/lib/actions/scanAnnouncementsForUserUsingSubgraph/scanAnnouncementsForUserUsingSubgraph.test.ts src/lib/actions/getAnnouncementsUsingSubgraph/subgraphHelpers.test.ts
  • ~/.bun/bin/bunx biome check README.md src/lib/actions/getAnnouncementsForUser/getAnnouncementsForUser.ts src/lib/actions/getAnnouncementsForUser/getAnnouncementsForUser.test.ts src/lib/actions/getAnnouncementsForUser/types.ts src/lib/actions/scanAnnouncementsForUserUsingSubgraph/types.ts src/lib/actions/scanAnnouncementsForUserUsingSubgraph/scanAnnouncementsForUserUsingSubgraph.ts src/lib/actions/scanAnnouncementsForUserUsingSubgraph/scanAnnouncementsForUserUsingSubgraph.test.ts src/lib/actions/index.ts src/lib/stealthClient/createStealthClient.ts src/lib/stealthClient/types.ts examples/scanAnnouncementsForUserUsingSubgraph/index.tsx examples/scanAnnouncementsForUserUsingSubgraph/package.json examples/scanAnnouncementsForUserUsingSubgraph/tsconfig.json examples/scanAnnouncementsForUserUsingSubgraph/vite.config.ts examples/scanAnnouncementsForUserUsingSubgraph/index.html examples/scanAnnouncementsForUserUsingSubgraph/README.md

Part of #91

@marcomariscal marcomariscal temporarily deployed to Testing All Networks March 31, 2026 22:03 — with GitHub Actions Inactive
@marcomariscal marcomariscal temporarily deployed to Testing All Networks March 31, 2026 22:17 — with GitHub Actions Inactive
@marcomariscal marcomariscal temporarily deployed to Testing All Networks March 31, 2026 22:17 — with GitHub Actions Inactive
@marcomariscal marcomariscal temporarily deployed to Testing All Networks March 31, 2026 23:01 — with GitHub Actions Inactive
@marcomariscal marcomariscal temporarily deployed to Testing All Networks March 31, 2026 23:03 — with GitHub Actions Inactive
@marcomariscal marcomariscal temporarily deployed to Testing All Networks March 31, 2026 23:04 — with GitHub Actions Inactive
@marcomariscal marcomariscal temporarily deployed to Testing All Networks March 31, 2026 23:07 — with GitHub Actions Inactive
@marcomariscal marcomariscal temporarily deployed to Testing All Networks March 31, 2026 23:07 — with GitHub Actions Inactive
@marcomariscal marcomariscal temporarily deployed to Testing All Networks March 31, 2026 23:16 — with GitHub Actions Inactive
@marcomariscal marcomariscal temporarily deployed to Testing All Networks March 31, 2026 23:16 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant