Skip to content

v0.2.12: fix + improvement#675

Merged
waleedlatif1 merged 15 commits intomainfrom
staging
Jul 13, 2025
Merged

v0.2.12: fix + improvement#675
waleedlatif1 merged 15 commits intomainfrom
staging

Conversation

@waleedlatif1
Copy link
Collaborator

@waleedlatif1 waleedlatif1 commented Jul 13, 2025

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Security enhancement
  • Performance improvement
  • Code refactoring (no functional changes)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally and in CI (bun run test)
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have updated version numbers as needed (if needed)
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Security Considerations:

  • My changes do not introduce any new security vulnerabilities
  • I have considered the security implications of my changes

Additional Information:

Any additional information, configuration or data that might be necessary to reproduce the issue or use the feature.

@vercel
Copy link

vercel bot commented Jul 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sim (staging) ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 13, 2025 3:23am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Skipped (Inspect) Jul 13, 2025 3:23am

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.

PR Summary

Major v0.2.12 release with security enhancements and Gmail improvements focusing on UX and functionality improvements.

  • Added separate STRIPE_BILLING_WEBHOOK_SECRET environment variable in apps/sim/lib/env.ts for improved webhook security
  • Implemented Gmail draft functionality in apps/sim/tools/gmail/draft.ts allowing emails to be saved without sending
  • Fixed security issue with password managers incorrectly triggering on numeric inputs across multiple components by adding proper input attributes
  • Fixed double scrollbar visual bug in apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/long-input.tsx
  • Improved developer experience by updating pre-commit hook to use lint-staged with automatic fixes

16 files reviewed, 4 comments
Edit PR Review Bot Settings | Greptile

Comment on lines +82 to 104
### `gmail_draft`

Read emails from Gmail
Draft emails using Gmail

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Access token for Gmail API |
| `messageId` | string | No | ID of the message to read |
| `folder` | string | No | Folder/label to read emails from |
| `unreadOnly` | boolean | No | Only retrieve unread messages |
| `maxResults` | number | No | Maximum number of messages to retrieve \(default: 1, max: 10\) |
| `to` | string | Yes | Recipient email address |
| `subject` | string | Yes | Email subject |
| `body` | string | Yes | Email body content |

#### Output

| Parameter | Type |
| --------- | ---- |
| `content` | string |
| `metadata` | string |

### `gmail_search`

Search emails in Gmail

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `accessToken` | string | Yes | Access token for Gmail API |
| `query` | string | Yes | Search query for emails |
| `maxResults` | number | No | Maximum number of results to return |

#### Output

| Parameter | Type |
| --------- | ---- |
| `content` | string |
| `message` | string |
| `threadId` | string |
| `labelIds` | string |

Copy link
Contributor

Choose a reason for hiding this comment

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

style: Documentation for gmail_draft operation matches the send operation's parameters exactly. Consider documenting any draft-specific parameters or behaviors that differentiate it from send.

Comment on lines +48 to +63
body: (params: GmailSendParams): Record<string, any> => {
const email = [
'Content-Type: text/plain; charset="UTF-8"',
'MIME-Version: 1.0',
`To: ${params.to}`,
`Subject: ${params.subject}`,
'',
params.body,
].join('\n')

return {
message: {
raw: Buffer.from(email).toString('base64url'),
},
}
},
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Move email construction logic into a separate function for better maintainability and reusability between send and draft operations

Comment on lines +58 to +62
return {
message: {
raw: Buffer.from(email).toString('base64url'),
},
}
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Add type for message object instead of using Record<string, any>

Comment on lines +19 to +39
accessToken: {
type: 'string',
required: true,
description: 'Access token for Gmail API',
},
to: {
type: 'string',
required: true,
description: 'Recipient email address',
},
subject: {
type: 'string',
required: true,
description: 'Email subject',
},
body: {
type: 'string',
required: true,
description: 'Email body content',
},
},
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Consider grouping to, subject, and body into an emailOptions object parameter

@delve-auditor
Copy link

delve-auditor bot commented Jul 13, 2025

No security or compliance issues detected. Reviewed everything up to 36eb04d.

Security Overview
  • 🔎 Scanned files: 19 changed file(s)
Detected Code Changes
Change Type Relevant files
Configuration changes ► .husky/pre-commit
    Update lint command to use lint-staged
► package.json
    Update lint-staged configuration
► lib/env.ts
    Add Stripe billing webhook secret configuration
Enhancement ► gmail.mdx
    Add Gmail draft operation documentation
► tools/gmail/draft.ts
    Add Gmail draft tool implementation
► tools/gmail/index.ts
    Export Gmail draft tool
► tools/registry.ts
    Register Gmail draft tool
► trace-spans.ts
    Enhance trace spans processing
Bug Fix ► route.ts
    Update Stripe webhook secret reference

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

@waleedlatif1 waleedlatif1 merged commit 38f5aae into main Jul 13, 2025
8 of 9 checks passed
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