Skip to content

feat(client): add a new notebook option for sending emails#716

Merged
neelneelneel merged 6 commits intodevfrom
583-add-send-email-reactor-cell
May 6, 2025
Merged

feat(client): add a new notebook option for sending emails#716
neelneelneel merged 6 commits intodevfrom
583-add-send-email-reactor-cell

Conversation

@boredcod
Copy link
Copy Markdown
Contributor

Description

Added a cell in a notebook to send simple email

Changes Made

  • New Send Email tab under notebook cell for drag/drop component.

How to Test

  1. Create a new Drag/drop application in SEMOSS
  2. Click on empty space to create a new cell
  3. Select Send email
  4. Fill out the necessary fields
  5. Run the notebook to test out (need to set up a local SMTP server to test in the local environment)

Notes

@boredcod boredcod requested a review from a team as a code owner March 17, 2025 17:42
@github-actions
Copy link
Copy Markdown

@CodiumAI-Agent /describe

@QodoAI-Agent
Copy link
Copy Markdown

Title

feat(client): add a new notebook option for sending emails


User description

Description

Added a cell in a notebook to send simple email

Changes Made

  • New Send Email tab under notebook cell for drag/drop component.

How to Test

  1. Create a new Drag/drop application in SEMOSS
  2. Click on empty space to create a new cell
  3. Select Send email
  4. Fill out the necessary fields
  5. Run the notebook to test out (need to set up a local SMTP server to test in the local environment)

Notes


PR Type

  • Enhancement

Description

  • Integrate send email cell configuration.

  • Implement SendEmail cell component with form.

  • Update notebook UI to include email option.


Changes walkthrough 📝

Relevant files
Enhancement
index.ts
Add SendEmail to cell defaults.                                                   

libs/renderer/src/components/cell-defaults/index.ts

  • Import SendEmail cell config and definition.
  • Add SendEmail cell to default registry.
  • +4/-1     
    SendEmailCell.tsx
    Implement SendEmail cell component UI.                                     

    libs/renderer/src/components/cell-defaults/send-email-cell/SendEmailCell.tsx

  • Create new SendEmail cell component.
  • Use react-hook-form and styled UI.
  • Implement email parameter inputs.
  • +277/-0 
    config.ts
    Configure SendEmail cell behavior.                                             

    libs/renderer/src/components/cell-defaults/send-email-cell/config.ts

  • Add configuration for SendEmail cell.
  • Define default parameters and toPixel conversion.
  • +34/-0   
    index.ts
    Export SendEmail cell module.                                                       

    libs/renderer/src/components/cell-defaults/send-email-cell/index.ts

    • Export SendEmail cell config and component.
    +2/-0     
    NotebookAddCell.tsx
    Update Notebook cell add UI with email option.                     

    packages/client/src/components/notebook/NotebookAddCell.tsx

  • Add EmailOutlined icon import.
  • Include send-email option in cell add options.
  • +6/-0     

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • @github-actions
    Copy link
    Copy Markdown

    @CodiumAI-Agent /review

    @github-actions
    Copy link
    Copy Markdown

    @CodiumAI-Agent /improve

    @QodoAI-Agent
    Copy link
    Copy Markdown

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 No relevant tests
    🔒 Security concerns

    Sensitive data exposure:
    Including plain text passwords in the pixel conversion output may pose a security risk. Ensure that sensitive credentials are handled securely.

    ⚡ Recommended focus areas for review

    Regex Validation

    The email validation regex pattern for fields like "to", "cc", "bcc", and "from" appears to be incorrect. The pattern /^S+@\S+.\S+$/ might be missing a backslash before the first S, resulting in potential mis-validation of email addresses.

    rules={{
        required: "To is required",
        pattern: {
            value: /^S+@\S+\.\S+$/,
            message: "Invalid email format",
        },
    }}
    Sensitive Data Exposure

    The toPixel function concatenates sensitive fields such as the password into its output string. This could expose user credentials if the output is logged or otherwise exposed. Verify that this behavior is intentional and secure.

        password,
    }) => {
        return `SendEmail(smtpHost="${smtpHost}", smtpPort="${smtpPort}", subject="${subject}", to="${to}", cc="${cc}", bcc="${bcc}", from="${from}", message="${message}", username="${username}", password="${password}")`;
    },

    @QodoAI-Agent
    Copy link
    Copy Markdown

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @boredcod boredcod linked an issue Mar 17, 2025 that may be closed by this pull request
    @johbaxter
    Copy link
    Copy Markdown
    Contributor

    johbaxter commented Mar 18, 2025

    Hey can you make these a grid view (2 columns). Make this a little better to look at, and make sure sectioning makes logical sense.

    The message field makes sense in its own row and maybe needs to be a multiline input

    image

    image

    Also click the collapse button, please put together a read-only collapsed version of your cell (look at how other cells have collapsed version)

    @QodoAI-Agent
    Copy link
    Copy Markdown

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @johbaxter
    Copy link
    Copy Markdown
    Contributor

    image

    Also can you add a new menu for other, where miscellaneous cells like this Send Email one will live

    Copy link
    Copy Markdown
    Contributor

    @johbaxter johbaxter left a comment

    Choose a reason for hiding this comment

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

    Address issues listed in comment

    @boredcod boredcod self-assigned this Apr 7, 2025
    @ehynd ehynd requested a review from johbaxter April 9, 2025 13:45
    @neelneelneel neelneelneel self-requested a review May 6, 2025 18:40
    @neelneelneel neelneelneel reopened this May 6, 2025
    @neelneelneel neelneelneel merged commit 628777a into dev May 6, 2025
    7 checks passed
    @neelneelneel neelneelneel deleted the 583-add-send-email-reactor-cell branch May 6, 2025 18:40
    @github-actions
    Copy link
    Copy Markdown

    github-actions bot commented May 6, 2025

    @CodiumAI-Agent /update_changelog

    @QodoAI-Agent
    Copy link
    Copy Markdown

    Changelog updates: 🔄

    2025-05-06 [*][https://github.com//pull/716]

    Added

    • Send Email notebook cell for composing and sending emails
    • “Others” category in the add-cell menu to surface the email cell

    to commit the new content to the CHANGELOG.md file, please type:
    '/update_changelog --pr_update_changelog.push_changelog_changes=true'

    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.

    Add Send Email Cell in notebook

    4 participants