Repository navigation
feat(events): add cursor-based API adapter (#1002) - #1055
Merged
greatest0fallt1me merged 2 commits intoNov 23, 2026
Merged
greatest0fallt1me merged 2 commits into
greatest0fallt1me merged 2 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@001somto is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@001somto 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! 🚀 |
Contributor
|
Thanks @001somto! We resolved the merge conflicts on our side and merged this. 🎉 |
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.
Description
Adds an API-backed, filtered and cursor-paginated events adapter. Event fixtures are extracted from the store and retained for tests and explicitly enabled mock mode.
Type of Change
Related Issues
Closes #1002
Changes Made
Files Modified
lib/events-store.ts— load events through the adapter, start with empty state, support pagination and ignore stale responses.lib/events-api.ts— add API fetching, Zod payload validation, error classification and adapter selection.lib/events-mock.tsandlib/fixtures/events.ts— add the in-memory mock adapter and move event fixtures out of the store.lib/env.tsandnext.config.mjs— support and configure theNEXT_PUBLIC_USE_MOCKSbuild-time flag.components/events/pagination.tsx— request additional adapter pages when needed.README.md— document how to enable mock events in development.lib/__tests__/events-store.test.ts,lib/__tests__/events-api.test.ts, andcomponents/events/__tests__/virtualized-events-list.integration.test.tsx— cover adapter, store, pagination and error behavior.Key Changes
Eventtype. HTTP permission errors, invalid responses and network errors are surfaced as distinct error kinds.NEXT_PUBLIC_USE_MOCKS=true; otherwise the API adapter is used.Testing
Test Coverage
Related test commands:
corepack pnpm test -- lib/__tests__/events-store.test.ts lib/__tests__/events-api.test.ts— passed (22 tests).corepack pnpm test -- components/events/__tests__/virtualized-events-list.integration.test.tsx— passed (14 tests).corepack pnpm type-check— failed on existing unrelated issues incomponents/__tests__/error-boundary.test.tsxandlib/portfolio-analytics.ts/ its tests.corepack pnpm build— compilation succeeded, then failed on the existingFilteredClaimsEmptyStateexport type error inapp/(dashboard)/claims/page.ts.Code Quality
Functionality
Documentation
Security & Accessibility