Skip to content

Conversation

@narekhovhannisyan
Copy link
Collaborator

Motivation

Changes

  • Change 1
  • Change 2

How to test

  • Test 1
  • Test 2

Images and GIFs

Before After
link1 link2
link3 link4
link5 link6
link7 link8
link9 link10

- Introduced `getMessages` and `showEmailMessage` functions to handle retrieving and displaying email messages from the sandbox test inbox.
- Updated tools registry to include new handlers for these functionalities.
- Updated the description of the "show-sandbox-email-message" tool for clarity and conciseness.
- Added a new `getMessages` function to fetch messages from the sandbox test inbox.
- Includes error handling for missing environment variables and sandbox client availability.
- Returns formatted message details or an error message if retrieval fails.
- Added exports for `getMessages` and `showEmailMessage` functions along with their corresponding schemas to the sandbox tools index.
- This update enhances the functionality available for managing email messages in the sandbox environment.
- Added the `showEmailMessage` function to fetch and display details of a specific email message from the sandbox test inbox.
- Includes error handling for missing environment variables and sandbox client availability.
- Returns formatted message details along with HTML and text content if available, or an error message if retrieval fails.
- Introduced a new test suite for the `getMessages` function to validate its behavior in various scenarios, including successful message retrieval, handling of empty and null responses, and error cases for missing environment variables and API errors.
- Utilized Jest for mocking the sandbox client and ensuring comprehensive coverage of the function's logic.
- Introduced a comprehensive test suite for the `showEmailMessage` function, validating its behavior across various scenarios including successful retrieval of email details, handling of missing HTML and text content, and error cases for null responses and missing environment variables.
- Utilized Jest for mocking the sandbox client to ensure robust testing of the function's logic.
- Introduced a new schema definition for the `getMessages` function, specifying properties for pagination, message filtering, and limits on message retrieval.
- This schema enhances validation and ensures proper handling of input parameters for the message retrieval process.
- Introduced a new schema definition for the `showEmailMessage` function, specifying the required `message_id` property for retrieving email messages.
- This schema enhances validation and ensures proper handling of input parameters for the email message retrieval process.
- Introduced new interface definitions for `GetMessagesRequest` and `ShowEmailMessageRequest`, enhancing the structure for message retrieval requests.
- These additions improve validation and ensure proper handling of input parameters for fetching messages from the sandbox environment.
- Eliminated the limit property from the getMessages schema, as it is not supported by the Mailtrap SDK and will be ignored. This change simplifies the schema and improves clarity for users.
…e retrieval instructions

- Added new sections for sandbox operations, detailing commands for retrieving and displaying messages from the sandbox inbox.
- Included parameters and usage notes for `get-sandbox-messages` and `show-sandbox-email-message` functions to enhance user understanding and facilitate testing.
…tions

- Added tests to validate the passing of various parameters (page, last_id, search) to the getMessages function.
- Ensured that multiple parameters can be correctly handled and passed to the SDK, improving test coverage and reliability of the message retrieval functionality.
@coderabbitai
Copy link

coderabbitai bot commented Nov 19, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch get-emails-in-sandbox

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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