Telegram: https://t.me/+DOylgFv1jyJlNzM0
Why this matters
getUserEvents in backend/src/controllers/user.controller.ts (lines ~70-96) does an unbounded prisma.streamEvent.findMany({ where: { stream: { OR: [...] } }, orderBy, include: { stream: true } }) with no take/skip. For an active wallet this returns every event ever, growing without bound and risking slow responses and large payloads. fetchUserEvents in frontend/src/lib/dashboard.ts (used by components/Dashboard.tsx) consumes this endpoint, so the dashboard pays the full cost.
The per-stream events endpoint (#364) and the per-wallet /v1/events endpoint are already paginated; this user-events endpoint was missed.
Acceptance criteria
Files to touch
backend/src/controllers/user.controller.ts
backend/src/routes/v1/user.routes.ts
Out of scope
- Changing how the frontend Dashboard consumes it (can be a follow-up if needed).
Telegram: https://t.me/+DOylgFv1jyJlNzM0
Why this matters
getUserEventsinbackend/src/controllers/user.controller.ts(lines ~70-96) does an unboundedprisma.streamEvent.findMany({ where: { stream: { OR: [...] } }, orderBy, include: { stream: true } })with notake/skip. For an active wallet this returns every event ever, growing without bound and risking slow responses and large payloads.fetchUserEventsinfrontend/src/lib/dashboard.ts(used bycomponents/Dashboard.tsx) consumes this endpoint, so the dashboard pays the full cost.The per-stream events endpoint (#364) and the per-wallet
/v1/eventsendpoint are already paginated; this user-events endpoint was missed.Acceptance criteria
limit(default e.g. 50, capped e.g. 200) andoffset/pagequery params.{ data/events, total, hasMore }).Files to touch
backend/src/controllers/user.controller.tsbackend/src/routes/v1/user.routes.tsOut of scope