Skip to content

add help text to contact form and aws integration setup#35

Merged
ccbrown merged 1 commit intomainfrom
aws-integration-warning
May 15, 2025
Merged

add help text to contact form and aws integration setup#35
ccbrown merged 1 commit intomainfrom
aws-integration-warning

Conversation

@ccbrown
Copy link
Owner

@ccbrown ccbrown commented May 15, 2025

What It Does

  • Adds a reminder to the contact form submission success message to check spam folders.
  • Adds a warning if a user attempts to configure an integration with "AWSLogs" in the prefix.

Copilot AI review requested due to automatic review settings May 15, 2025 05:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds two user-facing improvements: a reminder in the contact form success message to check spam folders, and context-specific warnings in the AWS integration setup when the S3 key prefix contains "AWSLogs".

  • Updated success message in the contact form to help users identify missing emails.
  • Added conditional warnings in the integrations page based on regex tests for AWSLogs in the S3 key prefix.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
frontend/src/app/(user-area)/teams/[teamId]/settings/integrations/page.tsx Introduces new regex validations and corresponding warning messages for AWSLogs usage in the S3 key prefix.
frontend/src/app/(public-area)/contact/ContactForm.tsx Updates the success message with an added reminder to check the spam folder.
Comments suppressed due to low confidence (1)

frontend/src/app/(public-area)/contact/ContactForm.tsx:44

  • Consider adding tests to verify that the updated success message correctly includes the spam folder reminder.
        <SuccessMessage>

Comment on lines +128 to +141
{s3KeyPrefix &&
(startsWithAwsLogsRegex.test(s3KeyPrefix) ? (
<p className="text-xs text-indian-red">
Cloud Snitch will automatically search for the &quot;AWSLogs&quot; directory in your S3
bucket. This field is only necessary if you have a custom prefix for your CloudTrail
logs. Otherwise, you should leave it empty.
</p>
) : includesAwsLogsRegex.test(s3KeyPrefix) ? (
<p className="text-xs text-indian-red">
Cloud Snitch will automatically search for the &quot;AWSLogs&quot; directory in your S3
bucket. This field should only contain the custom prefix that you specified when
creating the trail, if any.
</p>
) : null)}
Copy link

Copilot AI May 15, 2025

Choose a reason for hiding this comment

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

[nitpick] The nested ternary conditions for rendering warnings make the code harder to read; consider refactoring the conditional logic into a clearer structure or helper functions.

Suggested change
{s3KeyPrefix &&
(startsWithAwsLogsRegex.test(s3KeyPrefix) ? (
<p className="text-xs text-indian-red">
Cloud Snitch will automatically search for the &quot;AWSLogs&quot; directory in your S3
bucket. This field is only necessary if you have a custom prefix for your CloudTrail
logs. Otherwise, you should leave it empty.
</p>
) : includesAwsLogsRegex.test(s3KeyPrefix) ? (
<p className="text-xs text-indian-red">
Cloud Snitch will automatically search for the &quot;AWSLogs&quot; directory in your S3
bucket. This field should only contain the custom prefix that you specified when
creating the trail, if any.
</p>
) : null)}
{getS3KeyPrefixWarning(s3KeyPrefix)}

Copilot uses AI. Check for mistakes.
@ccbrown ccbrown merged commit 01b03e3 into main May 15, 2025
3 checks passed
@ccbrown ccbrown deleted the aws-integration-warning branch May 15, 2025 05:55
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.

1 participant