[SILO-934] feat: add advanced search api#19
Conversation
📝 WalkthroughWalkthroughThis pull request introduces an advanced search feature for work items in the Plane Python SDK. It adds two new data models (AdvancedSearchWorkItem and AdvancedSearchResult), implements a POST-based advanced_search API method, includes comprehensive unit tests covering basic and filtered searches, updates documentation for Claude Code integration, and bumps the version to 0.2.5. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@CLAUDE.md`:
- Around line 50-60: The fenced architecture tree code block in CLAUDE.md is
missing a language specifier (MD040); update the opening triple-backtick for the
block that contains the PlaneClient tree to include a language (e.g., ```text)
so the block becomes a proper fenced code block with a language label.
- Around line 5-8: Update the version string in the CLAUDE.md project overview
line that currently reads "Plane Python SDK (`plane-sdk` on PyPI, v0.2.4)" to
match the released version in pyproject.toml by changing v0.2.4 to v0.2.5;
ensure the surrounding sentence remains unchanged and commit the updated
CLAUDE.md.
🧹 Nitpick comments (2)
plane/models/work_items.py (1)
218-247: Validatelimitto avoid invalid requests.
Consider enforcing a positive limit to fail fast on bad inputs.Proposed adjustment
- limit: int | None = None + limit: int | None = Field(default=None, ge=1)plane/api/work_items/base.py (1)
197-236: Handle unexpected response shapes defensively.
If the API ever returns a dict (e.g.,{ "results": [...] }), the current list comprehension will iterate keys. Consider normalizing the response before validation.Suggested safeguard
- return [AdvancedSearchResult.model_validate(item) for item in response] + items = response.get("results", response) if isinstance(response, dict) else response + if not isinstance(items, list): + raise ValueError("Unexpected advanced search response shape") + return [AdvancedSearchResult.model_validate(item) for item in items]
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
Description
Type of Change
Test Scenarios
Summary by CodeRabbit
New Features
Chores