Skip to content

fix: fix pagination issue page not found#822

Open
priscila-moneo wants to merge 1 commit intomasterfrom
fix/fix-pagination-issue-page-not-found
Open

fix: fix pagination issue page not found#822
priscila-moneo wants to merge 1 commit intomasterfrom
fix/fix-pagination-issue-page-not-found

Conversation

@priscila-moneo
Copy link

@priscila-moneo priscila-moneo commented Mar 10, 2026

ref: https://app.clickup.com/t/86b8t9q51

Summary by CodeRabbit

  • Bug Fixes

    • Fixed pagination in form template item list to reset to the first page upon loading, ensuring consistent behavior.
  • Tests

    • Added unit tests to verify correct pagination initialization for the form template item list page.

@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b31653ca-94a4-49f6-83f3-55aafcb98d91

📥 Commits

Reviewing files that changed from the base of the PR and between b29d23f and 392a50c.

📒 Files selected for processing (2)
  • src/pages/sponsors-global/form-templates/__tests__/form-template-item-list-page.test.js
  • src/pages/sponsors-global/form-templates/form-template-item-list-page.js

📝 Walkthrough

Walkthrough

A new unit test for FormTemplateItemListPage validates that the component resets pagination to the default first page when fetching form template items, regardless of previous page state. Additionally, the component logic is updated to use DEFAULT_CURRENT_PAGE instead of the stored currentPage value during initial data fetch.

Changes

Cohort / File(s) Summary
Test Addition
src/pages/sponsors-global/form-templates/__tests__/form-template-item-list-page.test.js
New test file with 77 lines verifying that FormTemplateItemListPage resets pagination to DEFAULT_CURRENT_PAGE on mount, regardless of previous page state. Mocks Redux actions and validates correct parameters passed to getFormTemplate and getFormTemplateItems.
Component Logic
src/pages/sponsors-global/form-templates/form-template-item-list-page.js
Updated copyright year to 2026 and modified initial data fetch to use DEFAULT_CURRENT_PAGE instead of currentPage, ensuring pagination resets when loading form template items.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • smarcet
  • tomrndom

Poem

🐰 A form's pages dance, but we reset them straight,
Back to the first, no matter their fate,
Default we go, when templates do load,
No lost navigation upon this code road! 📋✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the main change in the PR: fixing a pagination issue where the form template item list page was not resetting to the first page when the form template loads, causing a 'page not found' error.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/fix-pagination-issue-page-not-found

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 and usage tips.

Copy link

@martinquiroga-exo martinquiroga-exo left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants