-
Notifications
You must be signed in to change notification settings - Fork 2
[SILO-676] feat: new api clients and tests #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds 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
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Areas to focus on:
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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.
Example instruction:
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. Comment |
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
There was a problem hiding this 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:
- Input mutation: Modifying
createProject.identifierdirectly mutates the input parameter, which can cause unexpected behavior for callers.- 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").- 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, andexpectindicate 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
📒 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
retrieveFeaturesandupdateFeaturesmethods 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-undeferrors for Jest globals indicate a project-wide configuration issue. Consider adding Jest support to your ESLint configuration as mentioned in the review fortests/unit/project.test.ts.src/models/ProjectFeatures.ts (1)
1-14: Clean model definition following best practices.The
ProjectFeaturesinterface properly defines feature toggles as booleans, andUpdateProjectFeaturescorrectly usesPartial<>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-undeferrors 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
WorkspaceFeaturesinterface properly defines workspace-level feature toggles, andUpdateWorkspaceFeaturescorrectly usesPartial<>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
retrieveFeaturesandupdateFeaturesmethods follow the same pattern as the corresponding methods inProjects.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
testEpicavailability 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:
listwith pagination supportaddfor attaching projectsremoveusing DELETE with body payload (appropriate for bulk operations)The implementation is consistent with
Teamspaces/Projects.tsand 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
CreateInitiativeLabelcorrectly omits auto-generated fieldssort_orderis appropriately made optional for creationListInitiativeLabelsParamsincludes an index signature for query parameter flexibilitysrc/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
httpDeletewith 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
CreateStickytype 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
Usertype 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.
| 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; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 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 -C1Length 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 -20Length 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 -10Length 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.
| 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, | ||
| }); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 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:
- .eslintrc.json with "env": { "jest": true } or "env": { "jest/globals": true }
- eslint.config.js with globals.jest import
- eslint-plugin-jest package
- 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.
There was a problem hiding this 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
initiativevariable 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:
- Making each test independent by creating its own initiative, or
- 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
testEpicis 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
📒 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.
There was a problem hiding this 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 optionalnamefield concern has already been raised.A previous review identified that
nameshould 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
📒 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 ofdescriptionfrom CreateSticky is intentional and correct.The tests confirm this design: sticky creation uses only
description_html(e.g.,"<p>Test Sticky Description</p>"), not thedescriptionfield. Thedescriptionfield appears to be server-computed or derived fromdescription_html, along with other generated fields likedescription_binaryanddescription_stripped. This is a proper separation between user-provided input and server-generated content.
There was a problem hiding this 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", () => { |
There was a problem hiding this comment.
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.
Description
Type of Change
Screenshots and Media (if applicable)
Test Scenarios
References
Summary by CodeRabbit
New Features
Documentation
Tests
Chores
✏️ 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.
StickiesCRUD insrc/api/Stickies.ts.Teamspaceswith sub-resourcesmembersandprojectsinsrc/api/Teamspaces/*.Initiativeswith sub-resourceslabels,projects,epicsinsrc/api/Initiatives/*.Workspace.retrieveFeatures/updateFeatures,Projects.retrieveFeatures/updateFeatures.httpDelete(endpoint, data?)insrc/api/BaseResource.ts.Sticky,Teamspace,Initiative,InitiativeLabel,WorkspaceFeatures,ProjectFeatures(+ update types/index exports).PlaneClientand re-export insrc/index.ts.tests/unit/*.README.mdwith new resources and test commands.env.example.package.jsonversion to0.2.1.Written by Cursor Bugbot for commit a69dc20. This will update automatically on new commits. Configure here.