Skip to content

feat(core): Dynamic max page size limit for pagination dto #16100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

guillaumejacquart
Copy link
Contributor

Summary

Make the max page size dynamic when parsing the pagination DTO, because insights require a max page size of 100.

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/PAY-2924/insights-table-page-size-does-not-work

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

Copy link

codecov bot commented Jun 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Jun 6, 2025
@guillaumejacquart guillaumejacquart marked this pull request as ready for review June 6, 2025 15:38
@guillaumejacquart guillaumejacquart requested a review from afitzek June 6, 2025 15:38
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cubic found 4 issues across 3 files. Review them in cubic.dev

React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai to give specific feedback.

afitzek
afitzek previously approved these changes Jun 10, 2025
Copy link
Contributor

@afitzek afitzek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an optional small comment, looks good otherwise 👍

@@ -30,7 +32,8 @@ const sortByValidator = z
.optional();

export class ListInsightsWorkflowQueryDto extends Z.class({
...paginationSchema,
skip: skipValidator,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to include the full paginationSchema and just overwrite the take validator? For example:

 ...paginationSchema,
take: createTakeValidator(MAX_ITEMS_PER_PAGE),

This way if the paginationSchema changes otherwise, we will automatically get these changes.

Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

@guillaumejacquart guillaumejacquart force-pushed the pay-2924-insights-table-page-size-does-not-work branch from ce8ac42 to 165e9d8 Compare June 10, 2025 08:31
Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

@guillaumejacquart guillaumejacquart force-pushed the pay-2924-insights-table-page-size-does-not-work branch from 165e9d8 to 572be8f Compare June 10, 2025 09:08
Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

2 similar comments
Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Copy link
Contributor

⚠️ Some Cypress E2E specs are failing, please fix them before merging

Copy link
Contributor

✅ All Cypress E2E specs passed

@guillaumejacquart guillaumejacquart merged commit 5c748ca into master Jun 10, 2025
87 of 93 checks passed
@guillaumejacquart guillaumejacquart deleted the pay-2924-insights-table-page-size-does-not-work branch June 10, 2025 12:00
@janober
Copy link
Member

janober commented Jun 11, 2025

Got released with [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants