Skip to content

fix: take - #1107

Merged
coodos merged 1 commit into
mainfrom
fix/paginate-deliveries-thing
Aug 12, 2026
Merged

fix: take#1107
coodos merged 1 commit into
mainfrom
fix/paginate-deliveries-thing

Conversation

@coodos

@coodos coodos commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description of change

Issue Number

Type of change

  • Breaking (any change that would cause existing functionality to not work as expected)
  • New (a change which implements a new feature)
  • Update (a change which updates existing functionality)
  • Fix (a change which fixes an issue)
  • Docs (changes to the documentation)
  • Chore (refactoring, build scripts or anything else that isn't user-facing)

How the change has been tested

Change checklist

  • I have ensured that the CI Checks pass locally
  • I have removed any unnecessary logic
  • My code is well documented
  • I have signed my commits
  • My code follows the pattern of the application
  • I have self reviewed my code

Summary by CodeRabbit

  • Performance
    • Improved delivery-list loading, especially for subscriptions with many deliveries.
    • Reduced response size by excluding large delivery payload snapshots from list results.
    • Delivery results are now more efficiently limited and ordered with support for faster newest-first queries.

@coodos
coodos merged commit 6ab638b into main Aug 12, 2026
3 of 4 checks passed
@coodos
coodos deleted the fix/paginate-deliveries-thing branch August 12, 2026 12:09
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 19aff2fc-840a-4a76-873a-6799ee85d423

📥 Commits

Reviewing files that changed from the base of the PR and between a77e04a and 1a51498.

📒 Files selected for processing (3)
  • services/awareness-service/api/src/controllers/ConsumerController.ts
  • services/awareness-service/api/src/database/entities/Delivery.ts
  • services/awareness-service/api/src/database/migrations/1786492800000-AddDeliveriesSubscriptionCreatedIndex.ts

📝 Walkthrough

Walkthrough

The delivery listing query now selects required fields without each delivery’s payload, applies .limit(limit), and uses a composite subscriptionId and createdAt index defined in the entity and migration.

Changes

Delivery query optimization

Layer / File(s) Summary
Delivery index definition and migration
services/awareness-service/api/src/database/entities/Delivery.ts, services/awareness-service/api/src/database/migrations/1786492800000-AddDeliveriesSubscriptionCreatedIndex.ts
The Delivery entity and migration add the subscriptionId/createdAt index. The migration supports guarded creation and rollback.
Delivery listing query
services/awareness-service/api/src/controllers/ConsumerController.ts
The query selects required delivery fields, omits payload, and uses .limit(limit) after the subscription join.

Estimated code review effort: 2 (Simple) | ~15 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/paginate-deliveries-thing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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