You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[PAI-2131] fix: declare the cursor on initiative list responses - #83
Was:PaginatedInitiativeResponse and PaginatedInitiativeLabelResponse declared only results. Plane pages both lists (20 by default), but the cursor fields were untyped extras, so callers concluded the lists don't paginate. The Plane MCP connector read it that way and returned page one as every initiative.
Now: both subclass PaginatedResponse, like the other 40 list responses, so next_cursor, next_page_results, total_count and the rest are typed fields.
No runtime change for callers that read extras: extra="allow" already kept the values.
Where to look
🔴 plane/models/initiatives.py — the two base classes
Auto reviews are disabled on base/target branches other than the default branch.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 1633a62d-9595-4238-85d1-62fc1d028512
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The initiative and initiative-label paginated response models now inherit from PaginatedResponse. Tests verify that both models declare and preserve pagination values.
Both paginated response models inherit from PaginatedResponse and retain their existing response fields. Parameterized tests check pagination field declarations and sample values after validation.
This change types the pagination fields on initiative and initiative-label list responses, so callers can read the cursor, next-page flag and total count directly. Behavior is expected to be unchanged for servers that already return the full pagination envelope. The earlier worry that a response missing a pagination field would now be rejected is unconfirmed, and nothing in the code points to such a response. The change looks safe to merge.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the fix and the affected area: declaring the cursor on initiative list responses. The raw summary shows the change makes both PaginatedInitiativeResponse and PaginatedInitiativeLabelRe…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check
Explanation
The title names the fix and the affected area: declaring the cursor on initiative list responses. The raw summary shows the change makes both PaginatedInitiativeResponse and PaginatedInitiativeLabelResponse inherit from PaginatedResponse, which types next_cursor, next_page_results, and total_count. The title matches the main change. The ticket prefix and conventional-commit 'fix:' label are acceptable.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 1e9ea699-7b20-4ebb-8b70-1a9a4ecc643d
Commits
Reviewing files that changed from the base of the PR and between 86c1b85 and ae290d0.
Files selected for processing: 2
plane/models/initiatives.py
tests/unit/test_initiatives.py
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
PaginatedInitiativeResponseandPaginatedInitiativeLabelResponsedeclared onlyresults. Plane pages both lists (20 by default), but the cursor fields were untyped extras, so callers concluded the lists don't paginate. The Plane MCP connector read it that way and returned page one as every initiative.PaginatedResponse, like the other 40 list responses, sonext_cursor,next_page_results,total_countand the rest are typed fields.extra="allow"already kept the values.Where to look
plane/models/initiatives.py— the two base classestests/unit/test_initiatives.py—test_list_declares_the_cursor, offlineProof
pytest tests/unit/test_initiatives.py -k cursor: passes; fails for both models onmainruff check,black --checkon both files: cleantests/unit(needPLANE_BASE_URL)Links
Summary by CodeRabbit