Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
This PR fixes a bug where four Linear operations that require a projectId parameter were not properly configured to require project selection in the UI.
Changes Made:
-
Added operations to projectId selector's required/condition arrays:
linear_create_project_updatelinear_create_project_linklinear_create_project_statuslinear_create_project_label
-
Added projectId validation and parameter passing:
- Added
if (!effectiveProjectId)validation checks in the case statements forlinear_create_project_labelandlinear_create_project_status - Added
projectId: effectiveProjectIdto the returned parameters for these operations
- Added
-
Corrected projectId source for label-project operations:
- Changed
linear_add_label_to_projectandlinear_remove_label_from_projectto useparams.projectIdForMilestoneinstead ofeffectiveProjectId(these operations use a separate manual input field, not the project selector)
- Changed
Impact:
Before this fix, users could attempt to create project labels, statuses, updates, or links without selecting a project, leading to runtime errors. Now the UI properly enforces project selection for these operations, preventing user errors.
Confidence Score: 5/5
- Safe to merge - this is a straightforward bug fix that adds missing parameter requirements without changing existing logic.
- The changes are minimal, well-targeted, and correct. All modified operations have been verified against their tool implementations to confirm they require projectId. The fix prevents runtime errors by ensuring the UI enforces required parameters. No breaking changes or risky modifications.
- No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| apps/sim/blocks/blocks/linear.ts | 5/5 | Added missing projectId parameter requirements for four project-related operations (create_project_update, create_project_link, create_project_status, create_project_label) to ensure the UI enforces project selection. Also corrected projectId source for label-to-project operations. |
Sequence Diagram
sequenceDiagram
participant User
participant UI as Linear Block UI
participant Config as Block Config
participant Tool as Linear API Tool
User->>UI: Select operation (e.g., create_project_label)
UI->>Config: Check required fields
Config->>Config: Validate projectId is in required array
Config->>UI: Show project selector (required)
User->>UI: Select project from dropdown
User->>UI: Fill in label details
User->>Config: Submit form
Config->>Config: Build params with effectiveProjectId
Config->>Config: Validate projectId exists
alt projectId missing
Config->>User: Error: Project ID is required
else projectId present
Config->>Tool: Call linear_create_project_label(projectId, name, ...)
Tool->>Tool: Execute GraphQL mutation
Tool->>Config: Return success/failure
Config->>User: Display result
end
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Linear was missing projectId in a few of its operations.
Type of Change
Testing
Tested manually
Checklist