Skip to content

[SILO-934] feat: add advanced search api#19

Merged
Prashant-Surya merged 1 commit intomainfrom
feat/advanced-search
Feb 4, 2026
Merged

[SILO-934] feat: add advanced search api#19
Prashant-Surya merged 1 commit intomainfrom
feat/advanced-search

Conversation

@Prashant-Surya
Copy link
Member

@Prashant-Surya Prashant-Surya commented Feb 3, 2026

Description

  • Add work-items/advanced-search api in sdk

Type of Change

  • Feature (non-breaking change which adds functionality)

Test Scenarios

  • Verified through unit tests

Summary by CodeRabbit

  • New Features

    • Added advanced search functionality for work items with support for complex recursive filters using AND/OR logic, enabling more granular query capabilities.
  • Chores

    • Updated project version to 0.2.5.

@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
API Implementation
plane/api/work_items/base.py
Added public method advanced_search() accepting workspace slug and AdvancedSearchWorkItem payload; performs POST to advanced-search endpoint and returns list of AdvancedSearchResult models.
Data Models
plane/models/work_items.py
Introduced AdvancedSearchWorkItem (request model with query, filters, limit fields) and AdvancedSearchResult (response model with id, name, sequence_id, project details, state, priority, and dates).
Unit Tests
tests/unit/test_work_items.py
Added three test cases: basic search validation, AND filter verification on priority, and OR filter validation on multiple priority levels.
Documentation & Configuration
CLAUDE.md, pyproject.toml
Added comprehensive Claude Code guidance covering project overview, development commands, architecture patterns, and coding conventions; bumped version from 0.2.4 to 0.2.5.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A searchable burrow of work items found,
Advanced filters digging all around,
With models and tests in harmony bound,
And Claude's wise guidance to keep code sound!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title '[SILO-934] feat: add advanced search api' directly and clearly describes the main change: adding a new advanced search API endpoint to the SDK.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/advanced-search

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

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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: Validate limit to 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]

@Prashant-Surya Prashant-Surya changed the title feat: add advanced search api [SILO-934] feat: add advanced search api Feb 3, 2026
@makeplane
Copy link

makeplane bot commented Feb 3, 2026

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

@Prashant-Surya Prashant-Surya merged commit 6400afc into main Feb 4, 2026
1 check passed
@Prashant-Surya Prashant-Surya deleted the feat/advanced-search branch February 4, 2026 11:09
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