Skip to content

Conversation

@aadamgough
Copy link
Collaborator

Summary

Removed imaginary variables and fixed selector

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 5, 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 6, 2026 0:47am

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 5, 2026

Greptile Summary

This PR fixes the Grain integration by removing non-existent configuration options and consolidating the trigger selection UI. The main changes:

  • Removed imaginary variables: Deleted includeHighlights, includeParticipants, and includeAiSummary switches from all trigger configs that were never actually supported by Grain webhooks
  • Fixed selector: Added a unified selectedTriggerId dropdown in grain.ts:211-219 using the new grainTriggerOptions from utils, and used .slice(1) when spreading trigger subBlocks to avoid duplicate dropdown fields
  • Updated documentation: Modified setup instructions to guide users to use the "Grain Get Recording" tool for accessing additional data like AI summaries and highlights
  • Cleaned up outputs: Removed references to these non-existent fields from the output schema in buildRecordingOutputs()

The fix aligns the UI with the actual Grain API capabilities and provides a cleaner trigger configuration experience.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The changes remove non-functional UI elements and fix the trigger selector by adding a proper dropdown and avoiding duplicate fields through .slice(1). The refactoring is clean, consistent across all trigger files, and properly consolidates shared configuration into utils. No logic bugs, security issues, or breaking changes detected.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/blocks/blocks/grain.ts Added unified trigger dropdown selector and imported grainTriggerOptions, using .slice(1) to avoid duplicate dropdown fields
apps/sim/triggers/grain/utils.ts Added grainTriggerOptions export, removed references to imaginary webhook config options, updated documentation
apps/sim/triggers/grain/recording_created.ts Removed non-existent includeHighlights, includeParticipants, includeAiSummary switches from trigger config, added trigger selector dropdown
apps/sim/triggers/grain/webhook.ts Removed non-existent webhook config switches that were never supported by Grain webhooks

Sequence Diagram

sequenceDiagram
    participant User
    participant GrainBlock
    participant TriggerSelector
    participant GrainTriggers
    participant Utils
    
    User->>GrainBlock: Configure Grain integration
    GrainBlock->>Utils: Import grainTriggerOptions
    GrainBlock->>TriggerSelector: Add unified trigger dropdown
    TriggerSelector->>User: Display trigger options
    User->>TriggerSelector: Select trigger type
    TriggerSelector->>GrainTriggers: Load specific trigger config
    GrainTriggers->>Utils: Get trigger options & setup instructions
    GrainTriggers->>User: Display trigger-specific fields (API key, instructions)
    Note over GrainTriggers: Removed: includeHighlights, includeParticipants, includeAiSummary switches
    Note over Utils: Updated: documentation to use Grain Get Recording tool for additional data
Loading

@aadamgough aadamgough merged commit 445932c into staging Jan 6, 2026
10 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/grain-vars branch January 6, 2026 22:39
waleedlatif1 pushed a commit that referenced this pull request Jan 8, 2026
* fixed output and dropdown

* changed payload

* removed comments
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