Skip to content

feat: add parent to work item comment models - #71

Merged
Prashant-Surya merged 2 commits into
mainfrom
feat/comment-parent
Sep 2, 2026
Merged

feat: add parent to work item comment models#71
Prashant-Surya merged 2 commits into
mainfrom
feat/comment-parent

Conversation

@sunder-ch

@sunder-ch sunder-ch commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds parent to CreateWorkItemComment and WorkItemComment.

The v1 API already accepts parent when creating a work item comment (the id of a top-level comment on the same work item to reply to) and returns it on read, but the SDK models did not declare the field — and with extra="ignore" a parent= passed to CreateWorkItemComment was silently dropped rather than rejected. Threading a reply through the SDK was therefore impossible.

UpdateWorkItemComment is left unchanged.

Test

CreateWorkItemComment(comment_html="<p>x</p>", parent="<comment-id>").model_dump(exclude_none=True)
# {'comment_html': '<p>x</p>', 'parent': '<comment-id>'}

Consumed by the Pi native-agent threading change in makeplane/plane-ee (PAI-1827).

Summary by CodeRabbit

  • New Features
    • Added support for replying to top-level comments on the same work item.
    • Comment replies can optionally reference a parent comment, making conversation threads easier to follow.
    • Comments without a parent continue to work as top-level comments.

The v1 API accepts parent on comment create (a top-level comment on the same
work item to reply to) and returns it on read, but the SDK models did not
declare it; with extra="ignore" the field was silently dropped.
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: d56bb433-a20c-4eed-a905-bd2ab54b7fd4

📥 Commits

Reviewing files that changed from the base of the PR and between 3117571 and 671a722.

📒 Files selected for processing (1)
  • pyproject.toml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The work item comment models now support optional parent comment IDs. Comment creation requests can identify the top-level comment that the new comment replies to. The package version changes to 0.2.24.

Changes

Work item comments

Layer / File(s) Summary
Add parent comment fields
plane/models/work_items.py
WorkItemComment exposes an optional parent ID. CreateWorkItemComment accepts an optional parent ID for replies.
Update package version
pyproject.toml
The package version changes from 0.2.23 to 0.2.24.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 671a7

The SDK now preserves the optional parent comment ID for creating and reading threaded work item comments. No actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: akhil-vamshi-konam

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding the parent field to work item comment models.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/comment-parent

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.

@makeplane

makeplane Bot commented Sep 2, 2026

Copy link
Copy Markdown

Linked to Plane Work Item(s)

References

This comment was auto-generated by Plane

@Prashant-Surya
Prashant-Surya merged commit 4fdaded into main Sep 2, 2026
1 check passed
@Prashant-Surya
Prashant-Surya deleted the feat/comment-parent branch September 2, 2026 09:53
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.

2 participants