Skip to content

feat(forecast): return {items,next_cursor,total} paginated envelope f… - #1031

Merged
greatest0fallt1me merged 3 commits into
CalloraOrg:mainfrom
vally111:feat/fwc26-forecast-paginated-envelope
Jul 29, 2026
Merged

feat(forecast): return {items,next_cursor,total} paginated envelope f…#1031
greatest0fallt1me merged 3 commits into
CalloraOrg:mainfrom
vally111:feat/fwc26-forecast-paginated-envelope

Conversation

@vally111

Copy link
Copy Markdown
Contributor

…rom GET /api/forecast

GrantFox FWC26 — closes #fwc26

Changes:

  • Add PaginatedForecastResponse type with items, next_cursor?, and total
  • Add encodeCursor/decodeCursor helpers (base64url, fc: format)
  • Add listForecastQuerySchema (limit 1-100 default 20, cursor)
  • GET / now returns paginated envelope instead of {forecast, generatedAt}
  • 400 on invalid limit (non-integer, <=0) or malformed cursor
  • Structured logging with requestId/correlationId on every list request
  • Expand forecast.test.ts with focused pagination suite (shape, traversal, validation, no-audit, timeout, CRUD regression)
  • Update src/routes/tests/forecast.test.ts to match new envelope shape
  • ForecastResponse kept (deprecated) for backward-compat
  • closes Add pagination metadata envelope on /api/forecast [b#016] #881

…rom GET /api/forecast

GrantFox FWC26 — closes #fwc26

Changes:
- Add PaginatedForecastResponse type with items, next_cursor?, and total
- Add encodeCursor/decodeCursor helpers (base64url, fc:<index> format)
- Add listForecastQuerySchema (limit 1-100 default 20, cursor)
- GET / now returns paginated envelope instead of {forecast, generatedAt}
- 400 on invalid limit (non-integer, <=0) or malformed cursor
- Structured logging with requestId/correlationId on every list request
- Expand forecast.test.ts with focused pagination suite (shape, traversal,
  validation, no-audit, timeout, CRUD regression)
- Update src/routes/__tests__/forecast.test.ts to match new envelope shape
- ForecastResponse kept (deprecated) for backward-compat
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@vally111 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

@greatest0fallt1me
greatest0fallt1me merged commit 9f7b565 into CalloraOrg:main Jul 29, 2026
1 check passed
@greatest0fallt1me

Copy link
Copy Markdown
Contributor

LGTM — clean, tested. Merged 🙌

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.

Add pagination metadata envelope on /api/forecast [b#016]

2 participants