Skip to content

Conversation

@Saurabhkmr98
Copy link
Member

@Saurabhkmr98 Saurabhkmr98 commented Nov 11, 2025

Description

  • stickies
  • project features
  • initiatives
  • teamspace
  • workspace
  • tests

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

References

Summary by CodeRabbit

  • New Features

    • Added Stickies, Teamspaces (with project & member management), and Initiatives (labels, projects, epics); new related data models and exports
    • Workspace and project feature toggles: retrieve and update feature flags
    • Plane client now exposes stickies, teamspaces, and initiatives resources
  • Documentation

    • Updated README with new API resources and alternative test command examples
    • Added API env vars: PLANE_API_KEY and PLANE_BASE_URL
  • Tests

    • Added unit tests for initiatives, teamspaces, stickies, project features, and workspace features
  • Chores

    • Package version bumped to 0.2.1

✏️ Tip: You can customize this high-level summary in your review settings.


Note

Introduces Stickies, Teamspaces, and Initiatives APIs (with labels/projects/epics), adds workspace/project feature toggle endpoints, enables DELETE with body, updates client/exports/models, bumps version, and adds unit tests/docs.

  • API:
    • Add Stickies CRUD in src/api/Stickies.ts.
    • Add Teamspaces with sub-resources members and projects in src/api/Teamspaces/*.
    • Add Initiatives with sub-resources labels, projects, epics in src/api/Initiatives/*.
    • Add feature toggle endpoints: Workspace.retrieveFeatures/updateFeatures, Projects.retrieveFeatures/updateFeatures.
    • Allow DELETE with payload via httpDelete(endpoint, data?) in src/api/BaseResource.ts.
  • Models:
    • New models: Sticky, Teamspace, Initiative, InitiativeLabel, WorkspaceFeatures, ProjectFeatures (+ update types/index exports).
  • Client/Exports:
    • Wire new resources in PlaneClient and re-export in src/index.ts.
  • Tests:
    • Add unit tests for initiatives, teamspaces, stickies, project features, and workspace features under tests/unit/*.
  • Docs/Config:
    • Update README.md with new resources and test commands.
    • Add API vars to env.example.
  • Version:
    • Bump package.json version to 0.2.1.

Written by Cursor Bugbot for commit a69dc20. This will update automatically on new commits. Configure here.

@coderabbitai
Copy link

coderabbitai bot commented Nov 11, 2025

Walkthrough

Adds Stickies, Teamspaces, and Initiatives API resources (with sub-resources), new models and exports, feature endpoints for projects/workspaces, updates BaseResource.delete to accept optional payloads, integrates resources into PlaneClient, updates README/env, and adds unit tests and version bump.

Changes

Cohort / File(s) Summary
Documentation & Configuration
README.md, env.example
README: added API Resources entries (Stickies, Teamspaces, Initiatives, Features) and alternative test command examples; env example: added PLANE_API_KEY and PLANE_BASE_URL.
Core HTTP helper
src/api/BaseResource.ts
httpDelete(endpoint: string, data?: any) — DELETE now accepts optional payload forwarded in Axios delete call.
Stickies resource & model
src/api/Stickies.ts, src/models/Sticky.ts
New Stickies API class with create/retrieve/update/delete/list methods and corresponding Sticky, CreateSticky, UpdateSticky, ListStickiesParams types.
Teamspaces resource & sub-resources
src/api/Teamspaces/index.ts, src/api/Teamspaces/Projects.ts, src/api/Teamspaces/Members.ts, src/models/Teamspace.ts
New Teamspaces API with projects and members sub-resources; CRUD and association endpoints; Teamspace model and request types added.
Initiatives resource & sub-resources
src/api/Initiatives/index.ts, src/api/Initiatives/Labels.ts, src/api/Initiatives/Projects.ts, src/api/Initiatives/Epics.ts, src/models/Initiative.ts, src/models/InitiativeLabel.ts
New Initiatives API with Labels, Projects, Epics sub-resources; CRUD and association endpoints; Initiative and InitiativeLabel models and related request types added.
Feature endpoints & models
src/api/Projects.ts, src/api/Workspace.ts, src/models/ProjectFeatures.ts, src/models/WorkspaceFeatures.ts
Added retrieveFeatures and updateFeatures to Projects and Workspace; added ProjectFeatures, UpdateProjectFeatures, WorkspaceFeatures, UpdateWorkspaceFeatures types.
Client integration & exports
src/client/plane-client.ts, src/index.ts, src/models/index.ts
Integrated stickies, teamspaces, initiatives into PlaneClient; added public exports and re-exported new models from src/models/index.ts.
Unit tests
tests/unit/sticky.test.ts, tests/unit/teamspace.test.ts, tests/unit/initiative.test.ts, tests/unit/project.test.ts, tests/unit/workspace-features.test.ts
Added tests covering CRUD, sub-resource associations, feature endpoints, with setup/cleanup and conditional execution.
Misc
package.json
Bumped version 0.2.0 → 0.2.1.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Client as PlaneClient
  participant API as Initiatives
  participant Labels as InitiativeLabels
  participant Base as BaseResource / HTTP
  Note over Client,API `#DFF2E1`: Create initiative and manage labels
  Client->>API: create(workspaceSlug, createInitiative)
  API->>Base: post("/workspaces/.../initiatives/", body)
  Base->>Base: HTTP POST -> server
  Base-->>API: Initiative
  API->>Labels: addLabels(workspaceSlug, initiativeId, { label_ids })
  Labels->>Base: post("/workspaces/.../initiatives/{id}/labels/", body)
  Base->>Base: HTTP POST -> server
  Base-->>Labels: [InitiativeLabel...]
  Labels-->>Client: result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Areas to focus on:

  • src/api/BaseResource.ts — ensure Axios delete with data is compatible across callers.
  • src/api/Initiatives/index.ts and src/api/Teamspaces/index.ts — verify endpoint paths, sub-resource wiring, and constructor injection.
  • New models (Initiative, InitiativeLabel, Teamspace, Sticky, ProjectFeatures, WorkspaceFeatures) — check Create/Update/List type shapes and consistency with existing conventions.
  • tests/* — validate conditional gating and cleanup logic to avoid flakiness when running against live environments.

Poem

🐇 I hopped through fields of code and cheer,
New stickies, teamspaces now appear.
Initiatives sprout labels and epics too,
Features toggled, tests watch the queue.
A rabbit's applause — fresh APIs anew!

Pre-merge checks and finishing touches

✅ 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 '[SILO-676] feat: new api clients and tests' directly and accurately summarizes the main changes in the pull request, which adds multiple new API client classes (Stickies, Teamspaces, Initiatives, and related sub-resources) along with their corresponding unit tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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-new_external_apis

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

@makeplane
Copy link

makeplane bot commented Nov 11, 2025

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/api/Projects.ts (1)

21-23: Potential issues with identifier auto-generation logic.

The identifier generation has several concerns:

  1. Input mutation: Modifying createProject.identifier directly mutates the input parameter, which can cause unexpected behavior for callers.
  2. Weak generation logic: name.toUpperCase().replace(/ /g, "").slice(0, 5) could produce very short identifiers (e.g., "AB" from "A B C") or duplicates (e.g., "TESTP" from both "Test Project" and "Test Product").
  3. No validation: Missing checks for name existence, minimum length, or potential collisions.

Consider this approach:

  async create(workspaceSlug: string, createProject: CreateProject): Promise<Project> {
    if (!createProject.identifier) {
-     createProject.identifier = createProject.name.toUpperCase().replace(/ /g, "").slice(0, 5);
+     const sanitized = createProject.name.replace(/[^a-zA-Z0-9]/g, "").toUpperCase();
+     if (sanitized.length < 3) {
+       throw new Error("Project name must contain at least 3 alphanumeric characters for identifier generation");
+     }
+     createProject = {
+       ...createProject,
+       identifier: sanitized.slice(0, 5)
+     };
    }

    return this.post<Project>(`/workspaces/${workspaceSlug}/projects/`, createProject);
  }

This avoids mutation, handles non-alphanumeric characters better, and validates minimum length.

🧹 Nitpick comments (3)
src/api/BaseResource.ts (1)

114-118: DELETE with request body support added correctly.

The modification enables DELETE requests with optional data payloads, which is required for operations like bulk removal of members or projects. While DELETE with a body is less common, it's valid per HTTP specifications and aligns with the API design for this SDK.

Operational note: Some HTTP proxies and older clients may strip request bodies from DELETE requests. Ensure your target API servers and infrastructure properly support DELETE with body, and consider documenting this requirement for users deploying custom proxies or load balancers.

tests/unit/workspace-features.test.ts (1)

1-46: Configure Jest globals in ESLint.

The ESLint errors for beforeAll, it, and expect indicate that Jest globals aren't configured in your ESLint setup.

Add Jest environment to your ESLint configuration:

{
  "env": {
    "jest": true
  }
}

Or if using @typescript-eslint, ensure the test files are covered by appropriate ESLint overrides.

tests/unit/initiative.test.ts (1)

1-262: Configure Jest globals in ESLint.

Same ESLint configuration issue as workspace-features.test.ts - Jest globals need to be configured. See the comment on that file for the fix.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e921689 and 9c117c4.

📒 Files selected for processing (27)
  • README.md (2 hunks)
  • env.example (1 hunks)
  • src/api/BaseResource.ts (1 hunks)
  • src/api/Initiatives/Epics.ts (1 hunks)
  • src/api/Initiatives/Labels.ts (1 hunks)
  • src/api/Initiatives/Projects.ts (1 hunks)
  • src/api/Initiatives/index.ts (1 hunks)
  • src/api/Projects.ts (2 hunks)
  • src/api/Stickies.ts (1 hunks)
  • src/api/Teamspaces/Members.ts (1 hunks)
  • src/api/Teamspaces/Projects.ts (1 hunks)
  • src/api/Teamspaces/index.ts (1 hunks)
  • src/api/Workspace.ts (2 hunks)
  • src/client/plane-client.ts (3 hunks)
  • src/index.ts (2 hunks)
  • src/models/Initiative.ts (1 hunks)
  • src/models/InitiativeLabel.ts (1 hunks)
  • src/models/ProjectFeatures.ts (1 hunks)
  • src/models/Sticky.ts (1 hunks)
  • src/models/Teamspace.ts (1 hunks)
  • src/models/WorkspaceFeatures.ts (1 hunks)
  • src/models/index.ts (2 hunks)
  • tests/unit/initiative.test.ts (1 hunks)
  • tests/unit/project.test.ts (1 hunks)
  • tests/unit/sticky.test.ts (1 hunks)
  • tests/unit/teamspace.test.ts (1 hunks)
  • tests/unit/workspace-features.test.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (14)
src/api/Workspace.ts (2)
src/models/WorkspaceFeatures.ts (2)
  • WorkspaceFeatures (4-11)
  • UpdateWorkspaceFeatures (13-13)
src/api/Projects.ts (1)
  • updateFeatures (80-86)
src/api/Projects.ts (2)
src/models/ProjectFeatures.ts (2)
  • ProjectFeatures (4-12)
  • UpdateProjectFeatures (14-14)
src/api/Workspace.ts (1)
  • updateFeatures (32-34)
src/api/Initiatives/Projects.ts (5)
src/api/Projects.ts (1)
  • Projects (12-87)
src/api/Teamspaces/Projects.ts (1)
  • Projects (11-36)
src/index.ts (5)
  • Projects (11-11)
  • Projects (41-41)
  • Projects (44-44)
  • BaseResource (8-8)
  • Configuration (5-5)
src/models/Project.ts (1)
  • Project (6-40)
src/models/Initiative.ts (2)
  • AddInitiativeProjectsRequest (41-43)
  • RemoveInitiativeProjectsRequest (45-47)
tests/unit/initiative.test.ts (4)
src/models/Initiative.ts (2)
  • Initiative (6-18)
  • UpdateInitiative (25-25)
src/models/InitiativeLabel.ts (1)
  • InitiativeLabel (6-12)
src/models/Project.ts (1)
  • Project (6-40)
src/models/Epic.ts (1)
  • Epic (3-34)
src/client/plane-client.ts (4)
src/api/Stickies.ts (1)
  • Stickies (10-49)
src/index.ts (3)
  • Stickies (27-27)
  • Teamspaces (28-28)
  • Initiatives (29-29)
src/api/Teamspaces/index.ts (1)
  • Teamspaces (12-56)
src/api/Initiatives/index.ts (1)
  • Initiatives (13-59)
src/api/Stickies.ts (1)
src/models/Sticky.ts (4)
  • CreateSticky (20-23)
  • Sticky (6-18)
  • UpdateSticky (25-25)
  • ListStickiesParams (27-31)
src/api/Teamspaces/Members.ts (2)
src/index.ts (3)
  • Members (20-20)
  • Members (42-42)
  • BaseResource (8-8)
src/models/Teamspace.ts (2)
  • AddTeamspaceMembersRequest (38-40)
  • RemoveTeamspaceMembersRequest (42-44)
tests/unit/sticky.test.ts (1)
src/models/Sticky.ts (2)
  • Sticky (6-18)
  • UpdateSticky (25-25)
src/api/Initiatives/Epics.ts (3)
src/index.ts (4)
  • Epics (25-25)
  • Epics (45-45)
  • BaseResource (8-8)
  • Configuration (5-5)
src/models/Epic.ts (1)
  • Epic (3-34)
src/models/Initiative.ts (2)
  • AddInitiativeEpicsRequest (49-51)
  • RemoveInitiativeEpicsRequest (53-55)
src/api/Teamspaces/index.ts (5)
src/index.ts (8)
  • Teamspaces (28-28)
  • BaseResource (8-8)
  • Projects (11-11)
  • Projects (41-41)
  • Projects (44-44)
  • Members (20-20)
  • Members (42-42)
  • Configuration (5-5)
src/api/Projects.ts (1)
  • Projects (12-87)
src/api/Teamspaces/Projects.ts (1)
  • Projects (11-36)
src/api/Teamspaces/Members.ts (1)
  • Members (11-36)
src/models/Teamspace.ts (4)
  • CreateTeamspace (17-20)
  • Teamspace (6-15)
  • UpdateTeamspace (22-22)
  • ListTeamspacesParams (24-28)
tests/unit/teamspace.test.ts (2)
src/models/Teamspace.ts (2)
  • Teamspace (6-15)
  • UpdateTeamspace (22-22)
src/models/Project.ts (1)
  • Project (6-40)
src/api/Initiatives/index.ts (4)
src/api/Initiatives/Labels.ts (1)
  • Labels (11-72)
src/api/Initiatives/Projects.ts (1)
  • Projects (11-36)
src/api/Initiatives/Epics.ts (1)
  • Epics (11-36)
src/models/Initiative.ts (4)
  • CreateInitiative (20-23)
  • Initiative (6-18)
  • UpdateInitiative (25-25)
  • ListInitiativesParams (27-31)
src/api/Initiatives/Labels.ts (2)
src/models/InitiativeLabel.ts (4)
  • CreateInitiativeLabel (14-19)
  • InitiativeLabel (6-12)
  • UpdateInitiativeLabel (21-21)
  • ListInitiativeLabelsParams (23-27)
src/models/Initiative.ts (2)
  • AddInitiativeLabelsRequest (33-35)
  • RemoveInitiativeLabelsRequest (37-39)
src/api/Teamspaces/Projects.ts (4)
src/api/Initiatives/Projects.ts (1)
  • Projects (11-36)
src/index.ts (5)
  • Projects (11-11)
  • Projects (41-41)
  • Projects (44-44)
  • BaseResource (8-8)
  • Configuration (5-5)
src/models/Project.ts (1)
  • Project (6-40)
src/models/Teamspace.ts (2)
  • AddTeamspaceProjectsRequest (30-32)
  • RemoveTeamspaceProjectsRequest (34-36)
🪛 ESLint
tests/unit/initiative.test.ts

[error] 19-19: 'beforeAll' is not defined.

(no-undef)


[error] 48-48: 'afterAll' is not defined.

(no-undef)


[error] 73-73: 'it' is not defined.

(no-undef)


[error] 80-80: 'expect' is not defined.

(no-undef)


[error] 81-81: 'expect' is not defined.

(no-undef)


[error] 82-82: 'expect' is not defined.

(no-undef)


[error] 83-83: 'expect' is not defined.

(no-undef)


[error] 84-84: 'expect' is not defined.

(no-undef)


[error] 87-87: 'it' is not defined.

(no-undef)


[error] 90-90: 'expect' is not defined.

(no-undef)


[error] 91-91: 'expect' is not defined.

(no-undef)


[error] 92-92: 'expect' is not defined.

(no-undef)


[error] 95-95: 'it' is not defined.

(no-undef)


[error] 103-103: 'expect' is not defined.

(no-undef)


[error] 104-104: 'expect' is not defined.

(no-undef)


[error] 105-105: 'expect' is not defined.

(no-undef)


[error] 108-108: 'it' is not defined.

(no-undef)


[error] 111-111: 'expect' is not defined.

(no-undef)


[error] 112-112: 'expect' is not defined.

(no-undef)


[error] 113-113: 'expect' is not defined.

(no-undef)


[error] 116-116: 'expect' is not defined.

(no-undef)


[error] 119-119: 'describe' is not defined.

(no-undef)


[error] 120-120: 'it' is not defined.

(no-undef)


[error] 121-121: 'expect' is not defined.

(no-undef)


[error] 122-122: 'expect' is not defined.

(no-undef)


[error] 123-123: 'expect' is not defined.

(no-undef)


[error] 126-126: 'it' is not defined.

(no-undef)


[error] 129-129: 'expect' is not defined.

(no-undef)


[error] 130-130: 'expect' is not defined.

(no-undef)


[error] 131-131: 'expect' is not defined.

(no-undef)


[error] 134-134: 'it' is not defined.

(no-undef)


[error] 140-140: 'expect' is not defined.

(no-undef)


[error] 141-141: 'expect' is not defined.

(no-undef)


[error] 142-142: 'expect' is not defined.

(no-undef)


[error] 143-143: 'expect' is not defined.

(no-undef)


[error] 146-146: 'it' is not defined.

(no-undef)


[error] 149-149: 'expect' is not defined.

(no-undef)


[error] 150-150: 'expect' is not defined.

(no-undef)


[error] 151-151: 'expect' is not defined.

(no-undef)


[error] 154-154: 'expect' is not defined.

(no-undef)


[error] 157-157: 'it' is not defined.

(no-undef)


[error] 162-162: 'expect' is not defined.

(no-undef)


[error] 163-163: 'expect' is not defined.

(no-undef)


[error] 164-164: 'expect' is not defined.

(no-undef)


[error] 167-167: 'it' is not defined.

(no-undef)


[error] 170-170: 'expect' is not defined.

(no-undef)


[error] 171-171: 'expect' is not defined.

(no-undef)


[error] 172-172: 'expect' is not defined.

(no-undef)


[error] 175-175: 'expect' is not defined.

(no-undef)


[error] 178-178: 'it' is not defined.

(no-undef)


[error] 185-185: 'expect' is not defined.

(no-undef)


[error] 189-189: 'describe' is not defined.

(no-undef)


[error] 190-190: 'it' is not defined.

(no-undef)


[error] 195-195: 'expect' is not defined.

(no-undef)


[error] 196-196: 'expect' is not defined.

(no-undef)


[error] 197-197: 'expect' is not defined.

(no-undef)


[error] 200-200: 'it' is not defined.

(no-undef)


[error] 203-203: 'expect' is not defined.

(no-undef)


[error] 204-204: 'expect' is not defined.

(no-undef)


[error] 205-205: 'expect' is not defined.

(no-undef)


[error] 208-208: 'expect' is not defined.

(no-undef)


[error] 211-211: 'it' is not defined.

(no-undef)


[error] 218-218: 'expect' is not defined.

(no-undef)


[error] 222-222: 'describe' is not defined.

(no-undef)


[error] 223-223: 'it' is not defined.

(no-undef)


[error] 232-232: 'expect' is not defined.

(no-undef)


[error] 233-233: 'expect' is not defined.

(no-undef)


[error] 236-236: 'it' is not defined.

(no-undef)


[error] 243-243: 'expect' is not defined.

(no-undef)


[error] 244-244: 'expect' is not defined.

(no-undef)


[error] 247-247: 'it' is not defined.

(no-undef)


[error] 258-258: 'expect' is not defined.

(no-undef)

tests/unit/sticky.test.ts

[error] 12-12: 'beforeAll' is not defined.

(no-undef)


[error] 17-17: 'afterAll' is not defined.

(no-undef)


[error] 28-28: 'it' is not defined.

(no-undef)


[error] 35-35: 'expect' is not defined.

(no-undef)


[error] 36-36: 'expect' is not defined.

(no-undef)


[error] 37-37: 'expect' is not defined.

(no-undef)


[error] 38-38: 'expect' is not defined.

(no-undef)


[error] 39-39: 'expect' is not defined.

(no-undef)


[error] 42-42: 'it' is not defined.

(no-undef)


[error] 45-45: 'expect' is not defined.

(no-undef)


[error] 46-46: 'expect' is not defined.

(no-undef)


[error] 47-47: 'expect' is not defined.

(no-undef)


[error] 48-48: 'expect' is not defined.

(no-undef)


[error] 51-51: 'it' is not defined.

(no-undef)


[error] 60-60: 'expect' is not defined.

(no-undef)


[error] 61-61: 'expect' is not defined.

(no-undef)


[error] 62-62: 'expect' is not defined.

(no-undef)


[error] 63-63: 'expect' is not defined.

(no-undef)


[error] 64-64: 'expect' is not defined.

(no-undef)


[error] 67-67: 'it' is not defined.

(no-undef)


[error] 70-70: 'expect' is not defined.

(no-undef)


[error] 71-71: 'expect' is not defined.

(no-undef)


[error] 72-72: 'expect' is not defined.

(no-undef)


[error] 75-75: 'expect' is not defined.

(no-undef)


[error] 76-76: 'expect' is not defined.

(no-undef)

tests/unit/project.test.ts

[error] 85-85: 'it' is not defined.

(no-undef)


[error] 88-88: 'expect' is not defined.

(no-undef)


[error] 89-89: 'expect' is not defined.

(no-undef)


[error] 90-90: 'expect' is not defined.

(no-undef)


[error] 91-91: 'expect' is not defined.

(no-undef)


[error] 92-92: 'expect' is not defined.

(no-undef)


[error] 93-93: 'expect' is not defined.

(no-undef)


[error] 94-94: 'expect' is not defined.

(no-undef)


[error] 95-95: 'expect' is not defined.

(no-undef)


[error] 98-98: 'it' is not defined.

(no-undef)


[error] 106-106: 'expect' is not defined.

(no-undef)


[error] 107-107: 'expect' is not defined.

(no-undef)


[error] 108-108: 'expect' is not defined.

(no-undef)

tests/unit/workspace-features.test.ts

[error] 10-10: 'beforeAll' is not defined.

(no-undef)


[error] 15-15: 'it' is not defined.

(no-undef)


[error] 18-18: 'expect' is not defined.

(no-undef)


[error] 19-19: 'expect' is not defined.

(no-undef)


[error] 20-20: 'expect' is not defined.

(no-undef)


[error] 21-21: 'expect' is not defined.

(no-undef)


[error] 22-22: 'expect' is not defined.

(no-undef)


[error] 23-23: 'expect' is not defined.

(no-undef)


[error] 24-24: 'expect' is not defined.

(no-undef)


[error] 27-27: 'it' is not defined.

(no-undef)


[error] 35-35: 'expect' is not defined.

(no-undef)


[error] 36-36: 'expect' is not defined.

(no-undef)


[error] 37-37: 'expect' is not defined.

(no-undef)

tests/unit/teamspace.test.ts

[error] 15-15: 'beforeAll' is not defined.

(no-undef)


[error] 26-26: 'afterAll' is not defined.

(no-undef)


[error] 44-44: 'it' is not defined.

(no-undef)


[error] 50-50: 'expect' is not defined.

(no-undef)


[error] 51-51: 'expect' is not defined.

(no-undef)


[error] 52-52: 'expect' is not defined.

(no-undef)


[error] 53-53: 'expect' is not defined.

(no-undef)


[error] 56-56: 'it' is not defined.

(no-undef)


[error] 59-59: 'expect' is not defined.

(no-undef)


[error] 60-60: 'expect' is not defined.

(no-undef)


[error] 61-61: 'expect' is not defined.

(no-undef)


[error] 64-64: 'it' is not defined.

(no-undef)


[error] 72-72: 'expect' is not defined.

(no-undef)


[error] 73-73: 'expect' is not defined.

(no-undef)


[error] 74-74: 'expect' is not defined.

(no-undef)


[error] 77-77: 'it' is not defined.

(no-undef)


[error] 80-80: 'expect' is not defined.

(no-undef)


[error] 81-81: 'expect' is not defined.

(no-undef)


[error] 82-82: 'expect' is not defined.

(no-undef)


[error] 85-85: 'expect' is not defined.

(no-undef)


[error] 88-88: 'describe' is not defined.

(no-undef)


[error] 89-89: 'it' is not defined.

(no-undef)


[error] 94-94: 'expect' is not defined.

(no-undef)


[error] 95-95: 'expect' is not defined.

(no-undef)


[error] 96-96: 'expect' is not defined.

(no-undef)


[error] 99-99: 'it' is not defined.

(no-undef)


[error] 102-102: 'expect' is not defined.

(no-undef)


[error] 103-103: 'expect' is not defined.

(no-undef)


[error] 104-104: 'expect' is not defined.

(no-undef)


[error] 107-107: 'expect' is not defined.

(no-undef)


[error] 110-110: 'it' is not defined.

(no-undef)


[error] 117-117: 'expect' is not defined.

(no-undef)


[error] 121-121: 'describe' is not defined.

(no-undef)


[error] 124-124: 'beforeAll' is not defined.

(no-undef)


[error] 129-129: 'it' is not defined.

(no-undef)


[error] 134-134: 'expect' is not defined.

(no-undef)


[error] 135-135: 'expect' is not defined.

(no-undef)


[error] 136-136: 'expect' is not defined.

(no-undef)


[error] 139-139: 'it' is not defined.

(no-undef)


[error] 142-142: 'expect' is not defined.

(no-undef)


[error] 143-143: 'expect' is not defined.

(no-undef)


[error] 144-144: 'expect' is not defined.

(no-undef)


[error] 147-147: 'expect' is not defined.

(no-undef)


[error] 150-150: 'it' is not defined.

(no-undef)


[error] 157-157: 'expect' is not defined.

(no-undef)

🔇 Additional comments (30)
env.example (1)

4-7: LGTM! Clean addition of API configuration.

The new API configuration section is well-structured and appropriately placed. The placeholder values follow the established pattern and are suitable for an example file.

README.md (1)

75-79: Documentation updates look good.

The new API resources (Stickies, Teamspaces, Initiatives, Features) are properly documented and align with the implementation.

src/api/Projects.ts (1)

70-86: Feature management methods are well-implemented.

The retrieveFeatures and updateFeatures methods follow the established pattern and provide clean, type-safe access to project feature toggles.

tests/unit/teamspace.test.ts (1)

9-160: Comprehensive test coverage with proper cleanup.

The test suite thoroughly validates:

  • Full CRUD lifecycle for teamspaces
  • Nested resource management (projects and members)
  • Proper setup and teardown with error handling

The tests follow best practices including guarded cleanup and assertion of both structure and content.

Note: The ESLint no-undef errors for Jest globals indicate a project-wide configuration issue. Consider adding Jest support to your ESLint configuration as mentioned in the review for tests/unit/project.test.ts.

src/models/ProjectFeatures.ts (1)

1-14: Clean model definition following best practices.

The ProjectFeatures interface properly defines feature toggles as booleans, and UpdateProjectFeatures correctly uses Partial<> to support selective updates.

tests/unit/sticky.test.ts (1)

7-78: Well-structured CRUD tests with proper cleanup.

The test suite validates the full sticky lifecycle with appropriate assertions for field values and proper error-handled cleanup.

Note: ESLint no-undef errors are project-wide configuration issues already noted in other test files.

src/models/WorkspaceFeatures.ts (1)

1-13: Clean model definition following best practices.

The WorkspaceFeatures interface properly defines workspace-level feature toggles, and UpdateWorkspaceFeatures correctly uses Partial<> for selective updates.

src/client/plane-client.ts (1)

18-20: LGTM! Clean integration of new API resources.

The additions of Stickies, Teamspaces, and Initiatives resources follow the established pattern consistently. The imports, property declarations, and constructor initialization are all properly aligned with existing resources.

Also applies to: 44-46, 76-78

src/models/index.ts (1)

2-3: LGTM! Model exports properly added.

The new model exports follow the existing barrel export pattern and correctly expose the new API surface types.

Also applies to: 13-16

tests/unit/workspace-features.test.ts (2)

15-25: LGTM! Comprehensive feature retrieval test.

The test properly validates all workspace feature flags and their types.


27-44: LGTM! Good practice restoring original state.

The test correctly updates features, validates the changes, and restores the original values to avoid side effects.

src/index.ts (1)

27-29: LGTM! Public API surface properly extended.

The new exports for Stickies, Teamspaces, and Initiatives (and their sub-resources) follow the established pattern. The use of aliases (TeamspaceProjects, InitiativeProjects, etc.) appropriately prevents naming conflicts.

Also applies to: 41-45

src/api/Workspace.ts (1)

22-34: LGTM! Feature management methods properly implemented.

The retrieveFeatures and updateFeatures methods follow the same pattern as the corresponding methods in Projects.ts, maintaining API consistency across resources.

tests/unit/initiative.test.ts (6)

19-46: LGTM! Comprehensive test setup.

The setup properly creates all necessary test fixtures (project, label, and conditionally epic) with appropriate error handling for unavailable resources.


48-71: LGTM! Robust cleanup with error handling.

The cleanup logic properly handles deletion failures with try-catch blocks and console warnings, preventing test suite failures from cleanup issues.


73-117: LGTM! Complete CRUD test coverage.

The tests thoroughly validate initiative creation, retrieval, update, and listing operations.


119-187: LGTM! Comprehensive label operations testing.

Tests cover all label operations including CRUD, adding/removing labels from initiatives, and listing labels within an initiative.


189-220: LGTM! Complete project relationship testing.

Tests properly validate adding, listing, and removing projects from initiatives.


222-260: LGTM! Graceful handling of optional epic resources.

The epic tests correctly check for testEpic availability before executing, preventing failures when epics aren't available in the test environment.

src/api/Initiatives/Projects.ts (1)

11-36: LGTM! Initiative-project relationship management properly implemented.

The class provides clean CRUD operations for initiative-project relationships:

  • list with pagination support
  • add for attaching projects
  • remove using DELETE with body payload (appropriate for bulk operations)

The implementation is consistent with Teamspaces/Projects.ts and follows REST conventions.

src/models/InitiativeLabel.ts (1)

6-27: LGTM! Well-designed model types.

The InitiativeLabel model and its derivative types are properly structured:

  • Base interface includes all necessary fields
  • CreateInitiativeLabel correctly omits auto-generated fields
  • sort_order is appropriately made optional for creation
  • ListInitiativeLabelsParams includes an index signature for query parameter flexibility
src/api/Initiatives/Epics.ts (1)

1-37: LGTM - Clean implementation following consistent patterns.

The Epics resource is well-structured with clear separation of concerns. The list, add, and remove operations are properly typed and documented. The use of httpDelete with a data payload (line 34) is appropriate for the remove operation, aligning with the API design pattern used throughout this PR.

src/api/Stickies.ts (1)

1-49: LGTM - Complete CRUD implementation.

The Stickies resource provides a comprehensive set of operations with proper type safety. All methods follow REST conventions and are well-documented. The implementation is consistent with other resources in the codebase.

src/api/Teamspaces/Projects.ts (1)

1-37: LGTM - Clean relationship management.

The Projects sub-resource correctly implements the teamspace-project relationship operations. While the structure mirrors Initiatives/Projects, this separation is appropriate as it maintains clear boundaries between different parent resources and allows for future divergence if needed.

src/models/Teamspace.ts (1)

1-44: LGTM - Well-defined type structure.

The Teamspace model and supporting types are properly defined with appropriate use of TypeScript utility types. The separation of concerns between the full model, create/update types, and relationship request types is clear and maintains good type safety.

src/models/Sticky.ts (1)

20-23: LGTM - Appropriate field exclusions for create operation.

The CreateSticky type correctly omits server-managed fields (workspace, owner, sort_order) along with the standard BaseModel timestamp fields, ensuring clients cannot set these values during creation.

src/models/Initiative.ts (1)

1-55: LGTM - Comprehensive initiative model.

The Initiative model is well-defined with appropriate required fields and comprehensive relationship types for labels, projects, and epics. The type structure maintains consistency with other models in the codebase.

src/api/Teamspaces/Members.ts (1)

1-37: LGTM - Proper member relationship management.

The Members sub-resource correctly implements teamspace member operations with appropriate use of the User type for responses. The implementation follows the established pattern for relationship management resources.

src/api/Teamspaces/index.ts (2)

12-20: LGTM - Excellent nested resource pattern.

The composition of Projects and Members sub-resources (lines 13-14) with shared configuration initialization (lines 18-19) provides a clean API surface for accessing teamspace relationships. This design allows for intuitive usage like client.teamspaces.projects.list().


22-55: LGTM - Complete CRUD implementation.

All teamspace operations are properly implemented with correct types and REST conventions. The implementation is consistent with other top-level resources like Projects and Stickies.

Comment on lines +6 to +18
export interface Sticky extends BaseModel {
name?: string;
description?: Record<string, any>;
description_html?: string;
description_stripped?: string;
description_binary?: string;
logo_props?: LogoProps;
color?: string;
background_color?: string;
workspace: string;
owner: string;
sort_order: number;
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify that optional name field is intentional.

The name field on line 7 is optional, which differs from other models like Teamspace and Initiative where name is required. If stickies can legitimately exist without names, this is fine. Otherwise, consider making it required for consistency and data integrity.


🏁 Script executed:

#!/bin/bash
# Search for backend validation or requirements for sticky name field
rg -n --type=py -C3 'class.*Sticky|StickySerializer' -g '!**/test/**' -g '!**/__pycache__/**'

Length of output: 148


🏁 Script executed:

#!/bin/bash
# Find TypeScript model definitions to compare name field requirements
echo "=== Looking for Teamspace and Initiative models ==="
fd -e ts -e tsx . src/models --exec grep -l 'Teamspace\|Initiative' {} \;

echo -e "\n=== Looking at Sticky model and comparing with similar models ==="
fd -e ts -e tsx . src/models --exec cat {} \;

Length of output: 40862


🏁 Script executed:

#!/bin/bash
# Search for usage of Sticky model to understand if name is required
echo "=== Searching for Sticky instantiation/usage patterns ==="
rg -n 'new.*Sticky|Sticky\s*\{|interface.*Sticky|type.*Sticky' --type=ts --type=tsx -C2

echo -e "\n=== Checking for any validation schemas or constraints ==="
rg -n 'name.*required|required.*name|name.*\?' --type=ts --type=tsx src/models -C1

Length of output: 173


🏁 Script executed:

#!/bin/bash
# Check repository structure to understand what backend exists
echo "=== Repository root structure ==="
ls -la

echo -e "\n=== Check for backend directories ==="
fd -type d -name backend -o -name api -o -name server

echo -e "\n=== Check if any Python files exist ==="
fd -e py --max-depth 3 | head -20

Length of output: 1818


🏁 Script executed:

#!/bin/bash
# Compare interface definitions more directly
echo "=== Sticky interface ==="
cat src/models/Sticky.ts

echo -e "\n=== Looking for Teamspace interface ==="
fd -e ts -e tsx . -exec grep -l 'interface Teamspace' {} \;

echo -e "\n=== Looking for Initiative interface ==="
fd -e ts -e tsx . -exec grep -l 'interface Initiative' {} \;

Length of output: 1348


🏁 Script executed:

#!/bin/bash
# Search test files for how Sticky is used
echo "=== Searching test files for Sticky model usage ==="
fd -e spec.ts -e test.ts -e spec.tsx -e test.tsx . -exec grep -l 'Sticky' {} \;

Length of output: 293


🏁 Script executed:

#!/bin/bash
# Look for form schemas or validation rules
echo "=== Searching for validation schemas or form definitions ==="
rg -n 'Sticky|yup|zod|joi' --type=ts -C2 | grep -A5 -B5 'name'

Length of output: 3580


🏁 Script executed:

#!/bin/bash
# Search for TypeScript documentation or comments about name field
echo "=== Check README or documentation ==="
fd -e md -e txt . --max-depth 2 -exec grep -l -i 'sticky' {} \;

Length of output: 279


🏁 Script executed:

#!/bin/bash
# Look at git history if available
echo "=== Check git log for Sticky model changes ==="
cd src/models && git log --oneline Sticky.ts 2>/dev/null | head -10

Length of output: 176


Make name field required in Sticky interface for consistency.

The inconsistency is confirmed. Sticky has name?: string (optional) while Teamspace and Initiative have name: string (required). Additionally, the test file shows name is always provided during creation and updates, with tests expecting it to be present—this contradicts the optional type definition. Change line 7 to name: string to align with similar models and ensure data integrity.

export interface Sticky extends BaseModel {
  name: string;  // Changed from name?: string
  description?: Record<string, any>;
  // ... rest of fields
}
🤖 Prompt for AI Agents
In src/models/Sticky.ts around lines 6 to 18, the Sticky interface declares name
as optional (name?: string) but other models and tests treat name as required;
change the declaration on line 7 to make name required (name: string) so the
type matches Teamspace/Initiative and existing tests/usage, then run type checks
to ensure no other code assumes name can be undefined.

Comment on lines +84 to +116
describe(!!config.workspaceSlug, "Project Features", () => {
it("should retrieve project features", async () => {
const features = await client.projects.retrieveFeatures(workspaceSlug, project.id);

expect(features).toBeDefined();
expect(typeof features.epics).toBe("boolean");
expect(typeof features.modules).toBe("boolean");
expect(typeof features.cycles).toBe("boolean");
expect(typeof features.views).toBe("boolean");
expect(typeof features.pages).toBe("boolean");
expect(typeof features.intakes).toBe("boolean");
expect(typeof features.work_item_types).toBe("boolean");
});

it("should update project features", async () => {
const originalFeatures = await client.projects.retrieveFeatures(workspaceSlug, project.id);

const updatedFeatures = await client.projects.updateFeatures(workspaceSlug, project.id, {
epics: !originalFeatures.epics,
modules: !originalFeatures.modules,
});

expect(updatedFeatures).toBeDefined();
expect(updatedFeatures.epics).toBe(!originalFeatures.epics);
expect(updatedFeatures.modules).toBe(!originalFeatures.modules);

// Restore original values
await client.projects.updateFeatures(workspaceSlug, project.id, {
epics: originalFeatures.epics,
modules: originalFeatures.modules,
});
});
});
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Well-structured feature tests with proper state restoration.

The test suite properly validates feature retrieval and updates, including restoration of original values to avoid side effects. The boolean type checks ensure the API contract is correct.

However, ESLint is reporting no-undef errors for Jest globals (describe, it, expect). Verify that your ESLint configuration includes Jest support:


🏁 Script executed:

#!/bin/bash
# Check if Jest ESLint plugin is configured
cat .eslintrc.json .eslintrc.js .eslintrc 2>/dev/null | grep -E "(jest|env.*jest)" || echo "Jest environment not found in ESLint config"

# Check if Jest types are in tsconfig
cat tsconfig.json | jq '.types' 2>/dev/null || echo "Could not read tsconfig types"

Length of output: 48


I need to gather more information to determine the severity and scope of this ESLint configuration issue.<!-- [scratchpad_update]
[observations]

  • Web search confirms the issue is real and well-documented
  • Multiple solutions exist for ESLint Jest configuration
  • Configuration can be done via:
    1. .eslintrc.json with "env": { "jest": true } or "env": { "jest/globals": true }
    2. eslint.config.js with globals.jest import
    3. eslint-plugin-jest package
    4. Per-file comment /* eslint disable no-undef */
  • TypeScript support mentioned: @types/jest needed
    [pending]
  • Need to check actual ESLint config files to see what's configured
  • Need to check package.json for jest/eslint-plugin-jest
  • Need to see if tests are actually running successfully despite this
    [actions]
  • Check full .eslintrc content
  • Check package.json for eslint-plugin-jest
  • Check if there are test configuration overrides
    [scratchpad_end] -->

---

🏁 Script executed:

```shell
#!/bin/bash
# Show all ESLint config files
find . -maxdepth 2 -type f \( -name ".eslintrc*" -o -name "eslint.config.*" \) 2>/dev/null | head -20

# Check package.json for jest and eslint-plugin-jest
echo "=== Checking package.json ==="
cat package.json 2>/dev/null | jq '.devDependencies | keys[] | select(. | test("jest|eslint"))' || echo "Could not parse package.json"

Length of output: 53


I need to check the actual ESLint flat config file and verify the package dependencies properly:


---

🏁 Script executed:

```shell
#!/bin/bash
# Display the ESLint flat config
echo "=== ESLint Config (eslint.config.mjs) ==="
cat ./eslint.config.mjs 2>/dev/null || cat ./git/eslint.config.mjs 2>/dev/null || echo "Config file not found"

# Better package.json parsing
echo -e "\n=== Dependencies with jest/eslint ==="
cat package.json 2>/dev/null | jq '.devDependencies | to_entries[] | select(.key | test("jest|eslint")) | "\(.key): \(.value)"' 2>/dev/null || echo "Could not parse"

# Check if jest config exists
echo -e "\n=== Jest Configuration ==="
ls -la jest.config.* package.json 2>/dev/null | grep -E "(jest\.config|package\.json)"

Length of output: 1712


Add Jest globals to ESLint flat config.

The ESLint configuration at eslint.config.mjs does not include Jest globals. Currently, it only sets globals: globals.node, which causes describe, it, and expect to trigger no-undef errors despite Jest being properly installed and configured.

Update the globals configuration in eslint.config.mjs to include Jest:

import globals from "globals";

export default [
  {
    files: ["**/*.ts", "**/*.js"],
    languageOptions: {
      globals: { ...globals.node, ...globals.jest },
    },
  },
  // ... rest of config
];

Alternatively, override ESLint for test files specifically by adding a separate config entry targeting **/*.test.ts and **/*.test.js files with Jest globals.

🧰 Tools
🪛 ESLint

[error] 85-85: 'it' is not defined.

(no-undef)


[error] 88-88: 'expect' is not defined.

(no-undef)


[error] 89-89: 'expect' is not defined.

(no-undef)


[error] 90-90: 'expect' is not defined.

(no-undef)


[error] 91-91: 'expect' is not defined.

(no-undef)


[error] 92-92: 'expect' is not defined.

(no-undef)


[error] 93-93: 'expect' is not defined.

(no-undef)


[error] 94-94: 'expect' is not defined.

(no-undef)


[error] 95-95: 'expect' is not defined.

(no-undef)


[error] 98-98: 'it' is not defined.

(no-undef)


[error] 106-106: 'expect' is not defined.

(no-undef)


[error] 107-107: 'expect' is not defined.

(no-undef)


[error] 108-108: 'expect' is not defined.

(no-undef)

🤖 Prompt for AI Agents
In tests/unit/project.test.ts around lines 84 to 116, ESLint is flagging Jest
globals (describe/it/expect) as undefined because the project's
eslint.config.mjs only includes node globals; update eslint.config.mjs to add
Jest globals by importing the "globals" package and merging globals.jest with
globals.node in languageOptions.globals (or add a separate override entry that
targets test files like **/*.test.{ts,js} and supplies globals.jest), then save
and lint to confirm describe/it/expect are no longer reported as no-undef.

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: 0

🧹 Nitpick comments (3)
tests/unit/initiative.test.ts (3)

73-120: Consider reducing test interdependencies.

These tests rely on shared state from previous tests (the initiative variable created in line 74 is used by subsequent tests). While common in integration tests, this reduces test isolation and makes tests order-dependent.

Consider either:

  1. Making each test independent by creating its own initiative, or
  2. Documenting that these tests must run sequentially

123-127: Test name is misleading.

This test is named "should create an initiative label" but it doesn't actually create a label—it only verifies the label created in beforeAll (line 31). Consider renaming to "should verify initiative label creation" or move the label creation into this test.


225-263: Replace early returns with proper test skip mechanism.

The epic tests use early returns (lines 227-229, 240-242, 251-253) when testEpic is unavailable, making them appear to pass when they're actually skipped. This can create a false sense of test coverage.

Replace the early return pattern with Jest's conditional skip:

   describe("Initiative Epics", () => {
-    it("should add epics to initiative", async () => {
-      if (!testEpic?.id) {
-        return;
-      }
+    it.skipIf(!testEpic?.id)("should add epics to initiative", async () => {
 
       const epics = await client.initiatives.epics.add(workspaceSlug, initiative.id, {
         epic_ids: [testEpic.id],
       });
 
       expect(epics).toBeDefined();
       expect(Array.isArray(epics)).toBe(true);
     });

Apply similar changes to the other two epic tests. Alternatively, wrap the entire "Initiative Epics" describe block with describeIf(!!testEpic?.id, ...) to skip all epic tests when no epic is available.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9c117c4 and 79ab847.

📒 Files selected for processing (2)
  • src/models/Initiative.ts (1 hunks)
  • tests/unit/initiative.test.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/models/Initiative.ts
🧰 Additional context used
🧬 Code graph analysis (1)
tests/unit/initiative.test.ts (4)
src/models/Initiative.ts (2)
  • Initiative (13-25)
  • UpdateInitiative (32-32)
src/models/InitiativeLabel.ts (1)
  • InitiativeLabel (6-12)
src/models/Project.ts (1)
  • Project (6-40)
src/models/Epic.ts (1)
  • Epic (3-34)
🪛 ESLint
tests/unit/initiative.test.ts

[error] 19-19: 'beforeAll' is not defined.

(no-undef)


[error] 48-48: 'afterAll' is not defined.

(no-undef)


[error] 73-73: 'it' is not defined.

(no-undef)


[error] 80-80: 'expect' is not defined.

(no-undef)


[error] 81-81: 'expect' is not defined.

(no-undef)


[error] 82-82: 'expect' is not defined.

(no-undef)


[error] 83-83: 'expect' is not defined.

(no-undef)


[error] 84-84: 'expect' is not defined.

(no-undef)


[error] 87-87: 'it' is not defined.

(no-undef)


[error] 90-90: 'expect' is not defined.

(no-undef)


[error] 91-91: 'expect' is not defined.

(no-undef)


[error] 92-92: 'expect' is not defined.

(no-undef)


[error] 93-93: 'expect' is not defined.

(no-undef)


[error] 96-96: 'it' is not defined.

(no-undef)


[error] 105-105: 'expect' is not defined.

(no-undef)


[error] 106-106: 'expect' is not defined.

(no-undef)


[error] 107-107: 'expect' is not defined.

(no-undef)


[error] 108-108: 'expect' is not defined.

(no-undef)


[error] 111-111: 'it' is not defined.

(no-undef)


[error] 114-114: 'expect' is not defined.

(no-undef)


[error] 115-115: 'expect' is not defined.

(no-undef)


[error] 116-116: 'expect' is not defined.

(no-undef)


[error] 119-119: 'expect' is not defined.

(no-undef)


[error] 122-122: 'describe' is not defined.

(no-undef)


[error] 123-123: 'it' is not defined.

(no-undef)


[error] 124-124: 'expect' is not defined.

(no-undef)


[error] 125-125: 'expect' is not defined.

(no-undef)


[error] 126-126: 'expect' is not defined.

(no-undef)


[error] 129-129: 'it' is not defined.

(no-undef)


[error] 132-132: 'expect' is not defined.

(no-undef)


[error] 133-133: 'expect' is not defined.

(no-undef)


[error] 134-134: 'expect' is not defined.

(no-undef)


[error] 137-137: 'it' is not defined.

(no-undef)


[error] 143-143: 'expect' is not defined.

(no-undef)


[error] 144-144: 'expect' is not defined.

(no-undef)


[error] 145-145: 'expect' is not defined.

(no-undef)


[error] 146-146: 'expect' is not defined.

(no-undef)


[error] 149-149: 'it' is not defined.

(no-undef)


[error] 152-152: 'expect' is not defined.

(no-undef)


[error] 153-153: 'expect' is not defined.

(no-undef)


[error] 154-154: 'expect' is not defined.

(no-undef)


[error] 157-157: 'expect' is not defined.

(no-undef)


[error] 160-160: 'it' is not defined.

(no-undef)


[error] 165-165: 'expect' is not defined.

(no-undef)


[error] 166-166: 'expect' is not defined.

(no-undef)


[error] 167-167: 'expect' is not defined.

(no-undef)


[error] 170-170: 'it' is not defined.

(no-undef)


[error] 173-173: 'expect' is not defined.

(no-undef)


[error] 174-174: 'expect' is not defined.

(no-undef)


[error] 175-175: 'expect' is not defined.

(no-undef)


[error] 178-178: 'expect' is not defined.

(no-undef)


[error] 181-181: 'it' is not defined.

(no-undef)


[error] 188-188: 'expect' is not defined.

(no-undef)


[error] 192-192: 'describe' is not defined.

(no-undef)


[error] 193-193: 'it' is not defined.

(no-undef)


[error] 198-198: 'expect' is not defined.

(no-undef)


[error] 199-199: 'expect' is not defined.

(no-undef)


[error] 200-200: 'expect' is not defined.

(no-undef)


[error] 203-203: 'it' is not defined.

(no-undef)


[error] 206-206: 'expect' is not defined.

(no-undef)


[error] 207-207: 'expect' is not defined.

(no-undef)


[error] 208-208: 'expect' is not defined.

(no-undef)


[error] 211-211: 'expect' is not defined.

(no-undef)


[error] 214-214: 'it' is not defined.

(no-undef)


[error] 221-221: 'expect' is not defined.

(no-undef)


[error] 225-225: 'describe' is not defined.

(no-undef)


[error] 226-226: 'it' is not defined.

(no-undef)


[error] 235-235: 'expect' is not defined.

(no-undef)


[error] 236-236: 'expect' is not defined.

(no-undef)


[error] 239-239: 'it' is not defined.

(no-undef)


[error] 246-246: 'expect' is not defined.

(no-undef)


[error] 247-247: 'expect' is not defined.

(no-undef)


[error] 250-250: 'it' is not defined.

(no-undef)


[error] 261-261: 'expect' is not defined.

(no-undef)

🔇 Additional comments (3)
tests/unit/initiative.test.ts (3)

1-265: ESLint warnings are false positives.

The ESLint errors flagging Jest globals (describe, it, expect, beforeAll, afterAll) as undefined are false positives. These globals are automatically provided by Jest in test files. Ensure your ESLint configuration includes the Jest environment to suppress these warnings.


19-46: Test setup looks good.

The setup correctly creates necessary test resources and handles epic retrieval gracefully with error handling. The approach of using the first available epic is acceptable for test purposes.


48-71: Cleanup implementation is solid.

Proper error handling with try-catch blocks ensures that cleanup failures don't mask test failures. The use of optional chaining to check resource existence before cleanup is appropriate.

@Saurabhkmr98 Saurabhkmr98 self-assigned this Nov 14, 2025
@Saurabhkmr98 Saurabhkmr98 changed the title [SILO-676] feat: new external api clients and tests [SILO-676] feat: new api clients and tests Nov 14, 2025
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: 0

♻️ Duplicate comments (1)
src/models/Sticky.ts (1)

7-7: The optional name field concern has already been raised.

A previous review identified that name should be required (not optional) for consistency with similar models like Teamspace and Initiative, and to match test usage patterns.

🧹 Nitpick comments (1)
src/models/Sticky.ts (1)

38-42: Consider narrowing the index signature type in ListStickiesParams.

The index signature [key: string]: any (line 41) allows any additional properties with any type, which reduces type safety. If specific query parameters are known (e.g., filters, sorting), consider defining them explicitly.

#!/bin/bash
# Check if other list params interfaces use similar patterns
echo "=== Checking other list params interfaces ==="
rg -n 'interface.*ListParams|interface.*Params.*\{' src/models/ --type=ts -A5
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 79ab847 and a69dc20.

📒 Files selected for processing (2)
  • package.json (1 hunks)
  • src/models/Sticky.ts (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (1)
src/models/Sticky.ts (1)

20-34: The omission of description from CreateSticky is intentional and correct.

The tests confirm this design: sticky creation uses only description_html (e.g., "<p>Test Sticky Description</p>"), not the description field. The description field appears to be server-computed or derived from description_html, along with other generated fields like description_binary and description_stripped. This is a proper separation between user-provided input and server-generated content.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

expect(Array.isArray(members)).toBe(true);
});

describe(!!config.workspaceSlug, "Project Features", () => {
Copy link

Choose a reason for hiding this comment

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

Bug: Nested describe incorrectly uses conditional describe

The nested describe block uses describeIf (aliased as describe) with the same condition as its parent block. Since the file imports describeIf as describe, this nested block incorrectly calls describeIf(!!config.workspaceSlug, ...) inside a parent that already checks !!config.workspaceSlug. Nested describe blocks should use the standard Jest describe function without the condition parameter, as demonstrated in other test files like initiative.test.ts and teamspace.test.ts.

Fix in Cursor Fix in Web

@Prashant-Surya Prashant-Surya merged commit 88c1280 into main Nov 25, 2025
3 checks passed
@Prashant-Surya Prashant-Surya deleted the feat-new_external_apis branch November 25, 2025 09:38
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