Skip to content

Conversation

@aadamgough
Copy link
Contributor

Summary

Linear was missing projectId in a few of its operations.

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Jan 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Jan 9, 2026 2:58am

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

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:

  1. Added operations to projectId selector's required/condition arrays:

    • linear_create_project_update
    • linear_create_project_link
    • linear_create_project_status
    • linear_create_project_label
  2. Added projectId validation and parameter passing:

    • Added if (!effectiveProjectId) validation checks in the case statements for linear_create_project_label and linear_create_project_status
    • Added projectId: effectiveProjectId to the returned parameters for these operations
  3. Corrected projectId source for label-project operations:

    • Changed linear_add_label_to_project and linear_remove_label_from_project to use params.projectIdForMilestone instead of effectiveProjectId (these operations use a separate manual input field, not the project selector)

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
Loading

@aadamgough aadamgough merged commit 6b28742 into staging Jan 9, 2026
10 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/linear branch January 10, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants