Skip to content

Comments

Email action analytics#219

Merged
elie222 merged 8 commits intomainfrom
email-action-analytics
Aug 26, 2024
Merged

Email action analytics#219
elie222 merged 8 commits intomainfrom
email-action-analytics

Conversation

@elie222
Copy link
Owner

@elie222 elie222 commented Aug 26, 2024

Keep track of actions done using inbox zero and display these to the user on the analytics tab

Summary by CodeRabbit

  • New Features

    • Introduced a new component to visualize email actions (archived and deleted emails) with a bar chart.
    • Added an API route for retrieving email action statistics.
    • Enhanced email archiving and deletion functions to include the user's email and action source for better tracking.
  • Bug Fixes

    • Improved error handling in email archiving and deletion processes.
  • Documentation

    • Updated documentation to reflect new API endpoints and functionalities.
  • Chores

    • Refined user session management logic to enhance clarity and structure of user data.

@vercel
Copy link

vercel bot commented Aug 26, 2024

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

Name Status Preview Updated (UTC)
inbox-zero ✅ Ready (Inspect) Visit Preview Aug 26, 2024 8:05pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 26, 2024

Walkthrough

The changes introduce a new component for visualizing email actions, enhance existing components by updating UI elements, and improve data handling and API interactions related to email archiving and deletion. Additionally, new endpoints and data structures are established for better tracking and analytics of user email actions.

Changes

Files Change Summary
apps/web/app/(app)/stats/EmailActionsAnalytics.tsx Introduced a new React component to visualize email actions using a bar chart, fetching data via the useSWR hook from an API endpoint.
apps/web/app/(app)/stats/LargestEmails.tsx, apps/web/app/(app)/stats/page.tsx Updated LargestEmails to replace CardTitle with Title for improved presentation. Added EmailActionsAnalytics to StatsPage to integrate email action analytics.
apps/web/app/api/google/threads/archive/controller.ts, apps/web/utils/actions/mail.ts Modified archiveEmail and action functions to include additional parameters (ownerEmail, actionSource) for improved tracking during email archiving and deletion.
apps/web/app/api/user/stats/email-actions/route.ts Introduced a new API route for retrieving email action statistics, integrating authentication and data processing.
apps/web/utils/actions/helpers.ts Updated user session handling to focus on the user's email instead of ID, returning a more structured user object.
apps/web/utils/ai/actions.ts Enhanced archive action function by adding parameters for contextual information, improving tracking of email actions.
packages/tinybird/datasources/email_action.datasource, packages/tinybird/pipes/get_email_actions_by_period.pipe Introduced a schema for email action data and a pipe for retrieving aggregated email actions over specified periods.
packages/tinybird/src/publish.ts, packages/tinybird/src/query.ts Added functionality for publishing email actions and retrieving statistics, including new helper functions and a Zod schema for validation.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant EmailActionsAnalytics
    participant API
    participant Tinybird

    User->>EmailActionsAnalytics: Request email action stats
    EmailActionsAnalytics->>API: Fetch stats from /api/user/stats/email-actions
    API->>Tinybird: Retrieve email actions data
    Tinybird-->>API: Return email actions data
    API-->>EmailActionsAnalytics: Return stats
    EmailActionsAnalytics-->>User: Display email actions in bar chart
Loading

🐇 In fields so wide and bright,
New stats take flight,
With charts to see,
How emails roam free,
Archiving with delight,
A hop, a skip, a jump in the night! 🌙


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

Outside diff range, codebase verification and nitpick comments (1)
apps/web/app/api/user/stats/email-actions/route.ts (1)

13-13: Avoid unnecessary use of template literals.

The use of template literals without interpolation is unnecessary. Replace with a string literal.

Apply this diff to replace the template literal with a string literal:

-    await getEmailActionsByDay({ ownerEmail: options.email })
+    await getEmailActionsByDay({ ownerEmail: options.email })
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 129f922 and 04f85c8.

Files selected for processing (14)
  • apps/web/app/(app)/stats/EmailActionsAnalytics.tsx (1 hunks)
  • apps/web/app/(app)/stats/LargestEmails.tsx (3 hunks)
  • apps/web/app/(app)/stats/page.tsx (2 hunks)
  • apps/web/app/api/google/threads/archive/controller.ts (1 hunks)
  • apps/web/app/api/user/stats/email-actions/route.ts (1 hunks)
  • apps/web/utils/actions/helpers.ts (1 hunks)
  • apps/web/utils/actions/mail.ts (3 hunks)
  • apps/web/utils/ai/actions.ts (1 hunks)
  • apps/web/utils/gmail/label.ts (2 hunks)
  • apps/web/utils/gmail/trash.ts (2 hunks)
  • packages/tinybird/datasources/email_action.datasource (1 hunks)
  • packages/tinybird/pipes/get_email_actions_by_period.pipe (1 hunks)
  • packages/tinybird/src/publish.ts (1 hunks)
  • packages/tinybird/src/query.ts (1 hunks)
Additional context used
Biome
apps/web/app/(app)/stats/EmailActionsAnalytics.tsx

[error] 14-14: Do not use template literals if interpolation and special-character handling are not needed.

Unsafe fix: Replace with string literal

(lint/style/noUnusedTemplateLiteral)

apps/web/utils/gmail/trash.ts

[error] 1-1: Some named imports are only used as types.

This import is only used as a type.

Importing the types with import type ensures that they are removed by the transpilers and avoids loading unnecessary modules.
Safe fix: Use import type.

(lint/style/useImportType)

apps/web/utils/gmail/label.ts

[error] 1-2: Some named imports are only used as types.

This import is only used as a type.

Importing the types with import type ensures that they are removed by the transpilers and avoids loading unnecessary modules.
Safe fix: Use import type.

(lint/style/useImportType)

apps/web/utils/actions/mail.ts

[error] 32-32: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)

apps/web/utils/ai/actions.ts

[error] 234-234: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

Additional comments not posted (23)
apps/web/utils/actions/helpers.ts (3)

Line range hint 6-6: LGTM!

The function is correctly implemented.

The code changes are approved.


Line range hint 15-20: LGTM!

The function is correctly implemented.

The code changes are approved.


11-13: LGTM! But verify the function usage in the codebase.

The function is correctly implemented. However, ensure that all function calls to getSessionAndGmailClient match the new logic.

The code changes are approved.

Run the following script to verify the function usage:

Verification successful

Verification Successful: Function Usage Matches New Logic

The function getSessionAndGmailClient is used consistently across the codebase, with all instances correctly handling the error and gmail object as per the new logic.

  • Files with verified usage:
    • apps/web/utils/actions/mail.ts
    • apps/web/utils/actions/categorize.ts
    • apps/web/utils/actions/ai-rule.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `getSessionAndGmailClient` match the new logic.

# Test: Search for the function usage. Expect: Only occurrences of the new logic.
rg --type typescript -A 5 $'getSessionAndGmailClient'

Length of output: 87


Script:

#!/bin/bash
# Description: Verify all function calls to `getSessionAndGmailClient` match the new logic.

# Test: Search for the function usage in .ts files. Expect: Only occurrences of the new logic.
rg 'getSessionAndGmailClient' --glob '**/*.ts' -A 5

Length of output: 3526

apps/web/app/api/user/stats/email-actions/route.ts (2)

11-21: LGTM!

The function is correctly implemented.

The code changes are approved.


23-31: LGTM!

The function is correctly implemented.

The code changes are approved.

apps/web/app/(app)/stats/EmailActionsAnalytics.tsx (1)

10-42: LGTM!

The function is correctly implemented.

The code changes are approved.

Tools
Biome

[error] 14-14: Do not use template literals if interpolation and special-character handling are not needed.

Unsafe fix: Replace with string literal

(lint/style/noUnusedTemplateLiteral)

apps/web/utils/gmail/trash.ts (3)

11-12: LGTM!

The function signature correctly includes the new parameters ownerEmail and actionSource.

The code changes are approved.


14-42: LGTM!

The function body correctly handles the new parameters and concurrent operations using Promise.allSettled. The error handling is appropriate.

The code changes are approved.


Line range hint 44-54: LGTM!

The trashMessage function remains unchanged and is correctly implemented.

The code changes are approved.

packages/tinybird/src/publish.ts (5)

39-45: LGTM!

The Zod schema tinybirdEmailAction is correctly defined to validate the structure of email action objects.

The code changes are approved.


47-47: LGTM!

The TinybirdEmailAction type is correctly inferred from the tinybirdEmailAction schema.

The code changes are approved.


49-52: LGTM!

The publishEmailAction function is correctly created using tb.buildIngestEndpoint.

The code changes are approved.


55-57: LGTM!

The publishArchive function correctly publishes archive actions.

The code changes are approved.


59-61: LGTM!

The publishDelete function correctly publishes delete actions.

The code changes are approved.

apps/web/app/(app)/stats/page.tsx (2)

15-15: LGTM!

The import statement correctly includes the new component EmailActionsAnalytics.

The code changes are approved.


102-104: LGTM!

The EmailActionsAnalytics component is correctly integrated into the StatsPage component.

The code changes are approved.

apps/web/utils/gmail/label.ts (1)

34-67: LGTM! But verify the function usage in the codebase.

The changes enhance the functionality and resilience of the archiveThread function. Ensure that all function calls to archiveThread match the new signature.

The code changes are approved.

Run the following script to verify the function usage:

Verification successful

Function usage verified: All calls to archiveThread match the new signature.

The function archiveThread is used consistently across the codebase with the updated signature, ensuring that the changes have been correctly integrated.

  • Files verified:
    • apps/web/providers/QueueProvider.tsx
    • apps/web/utils/ai/actions.ts
    • apps/web/utils/actions/mail.ts
    • apps/web/app/api/google/threads/archive/controller.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify all function calls to `archiveThread` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type typescript -A 5 $'archiveThread'

Length of output: 76


Script:

#!/bin/bash
# Description: Verify all function calls to `archiveThread` match the new signature.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type ts -A 5 $'archiveThread'

Length of output: 3868

apps/web/app/(app)/stats/LargestEmails.tsx (2)

6-6: LGTM!

The import statement for the Title component from @tremor/react is correct and necessary for the changes made to the component.

The code changes are approved.


57-57: LGTM! But verify the visual styling and behavior.

The CardTitle component has been replaced with the Title component. Ensure that the Title component is correctly styled and behaves as expected in the UI.

The code changes are approved.

Check the visual styling and behavior of the Title component in the UI.

apps/web/utils/actions/mail.ts (2)

51-57: LGTM!

The changes enhance the functionality by allowing the action to access and utilize the user's email. The implementation is correct.

The code changes are approved.


66-72: LGTM!

The changes enhance the functionality by allowing the action to access and utilize the user's email. The implementation is correct.

The code changes are approved.

packages/tinybird/src/query.ts (1)

193-203: LGTM!

The function getEmailActionsByDay is correctly implemented. Ensure that the pipe name "get_email_actions_by_period" is correct.

The code changes are approved.

Run the following script to verify the pipe name:

apps/web/utils/ai/actions.ts (1)

234-240: LGTM!

The function archive is correctly updated to include additional parameters and properties.

The code changes are approved.

Tools
Biome

[error] 234-234: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

Comment on lines +1 to +13
NODE get_email_actions
DESCRIPTION >
Get the number of email actions by period

SQL >
%
SELECT
toDate(fromUnixTimestamp64Milli(timestamp)) AS date,
countIf(action = 'archive') AS archive_count,
countIf(action = 'delete') AS delete_count
FROM email_action
WHERE ownerEmail = {{ String(ownerEmail) }}
GROUP BY date
Copy link
Contributor

Choose a reason for hiding this comment

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

Add error handling and validation for the ownerEmail parameter.

The SQL query is correct, but it lacks error handling and validation for the ownerEmail parameter. Consider adding validation to ensure the ownerEmail is not null or empty.

Apply this diff to add validation:

 WHERE ownerEmail = {{ String(ownerEmail) }}
+  AND ownerEmail IS NOT NULL
+  AND ownerEmail != ''
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
NODE get_email_actions
DESCRIPTION >
Get the number of email actions by period
SQL >
%
SELECT
toDate(fromUnixTimestamp64Milli(timestamp)) AS date,
countIf(action = 'archive') AS archive_count,
countIf(action = 'delete') AS delete_count
FROM email_action
WHERE ownerEmail = {{ String(ownerEmail) }}
GROUP BY date
NODE get_email_actions
DESCRIPTION >
Get the number of email actions by period
SQL >
%
SELECT
toDate(fromUnixTimestamp64Milli(timestamp)) AS date,
countIf(action = 'archive') AS archive_count,
countIf(action = 'delete') AS delete_count
FROM email_action
WHERE ownerEmail = {{ String(ownerEmail) }}
AND ownerEmail IS NOT NULL
AND ownerEmail != ''
GROUP BY date

Comment on lines +8 to +10
ENGINE "MergeTree"
ENGINE_SORTING_KEY ownerEmail, action, actionSource, timestamp
ENGINE_PARTITION_KEY "toYYYYMM(fromUnixTimestamp64Milli(timestamp))" No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

Add error handling and validation for the sorting and partitioning keys.

The engine definition is correct, but it lacks error handling and validation for the sorting and partitioning keys. Consider adding validation to ensure the keys are not null or empty.

Apply this diff to add validation:

 ENGINE_SORTING_KEY ownerEmail, action, actionSource, timestamp
+  CHECK ownerEmail IS NOT NULL AND ownerEmail != ''
+  CHECK action IS NOT NULL AND action != ''
+  CHECK actionSource IS NOT NULL AND actionSource != ''
+  CHECK timestamp IS NOT NULL

Committable suggestion was skipped due to low confidence.

Comment on lines +1 to +6
SCHEMA >
`ownerEmail` String `json:$.ownerEmail`,
`threadId` String `json:$.threadId`,
`action` LowCardinality(String) `json:$.action`,
`actionSource` LowCardinality(String) `json:$.actionSource`,
`timestamp` Int64 `json:$.timestamp`
Copy link
Contributor

Choose a reason for hiding this comment

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

Add validation for the ownerEmail field.

The schema is correct, but it lacks validation for the ownerEmail field. Consider adding validation to ensure the ownerEmail is not null or empty.

Apply this diff to add validation:

 `ownerEmail` String `json:$.ownerEmail`,
+  CHECK ownerEmail IS NOT NULL AND ownerEmail != ''
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
SCHEMA >
`ownerEmail` String `json:$.ownerEmail`,
`threadId` String `json:$.threadId`,
`action` LowCardinality(String) `json:$.action`,
`actionSource` LowCardinality(String) `json:$.actionSource`,
`timestamp` Int64 `json:$.timestamp`
SCHEMA >
`ownerEmail` String `json:$.ownerEmail`,
CHECK ownerEmail IS NOT NULL AND ownerEmail != '',
`threadId` String `json:$.threadId`,
`action` LowCardinality(String) `json:$.action`,
`actionSource` LowCardinality(String) `json:$.actionSource`,
`timestamp` Int64 `json:$.timestamp`

Comment on lines +15 to +20
const thread = await archiveThread({
gmail,
threadId: body.id,
ownerEmail: session.user.email,
actionSource: "user",
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Add error handling and validation for the additional parameters.

The modifications are correct, but it lacks error handling and validation for the additional parameters. Additionally, consider making the actionSource value more flexible.

Apply this diff to add validation:

 const thread = await archiveThread({
   gmail,
   threadId: body.id,
   ownerEmail: session.user.email,
-  actionSource: "user",
+  actionSource: body.actionSource || "user",
 });

Committable suggestion was skipped due to low confidence.

return (
<LoadingContent
loading={isLoading}
error={error}
Copy link
Contributor

Choose a reason for hiding this comment

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

Improve error handling.

The error handling could be improved by providing more user-friendly messages.

Apply this diff to improve error handling:

-      error={error}
+      error={error ? "Failed to load email action statistics. Please try again later." : null}
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
error={error}
error={error ? "Failed to load email action statistics. Please try again later." : null}

@@ -1,3 +1,4 @@
import { publishDelete, TinybirdEmailAction } from "@inboxzero/tinybird";
Copy link
Contributor

Choose a reason for hiding this comment

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

Optimize type-only imports.

Use import type for TinybirdEmailAction to ensure that they are removed by the transpilers and avoid loading unnecessary modules.

Apply this diff to optimize the import:

-import { publishDelete, TinybirdEmailAction } from "@inboxzero/tinybird";
+import { publishDelete } from "@inboxzero/tinybird";
+import type { TinybirdEmailAction } from "@inboxzero/tinybird";
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { publishDelete, TinybirdEmailAction } from "@inboxzero/tinybird";
import { publishDelete } from "@inboxzero/tinybird";
import type { TinybirdEmailAction } from "@inboxzero/tinybird";
Tools
Biome

[error] 1-1: Some named imports are only used as types.

This import is only used as a type.

Importing the types with import type ensures that they are removed by the transpilers and avoids loading unnecessary modules.
Safe fix: Use import type.

(lint/style/useImportType)

@@ -1,4 +1,5 @@
import type { gmail_v1 } from "googleapis";
import { publishArchive, TinybirdEmailAction } from "@inboxzero/tinybird";
Copy link
Contributor

Choose a reason for hiding this comment

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

Use import type for type-only imports.

The TinybirdEmailAction import is only used as a type. Use import type to ensure it is removed by the transpilers and avoid loading unnecessary modules.

Apply this diff to fix the issue:

-import { publishArchive, TinybirdEmailAction } from "@inboxzero/tinybird";
+import { publishArchive } from "@inboxzero/tinybird";
+import type { TinybirdEmailAction } from "@inboxzero/tinybird";
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { publishArchive, TinybirdEmailAction } from "@inboxzero/tinybird";
import { publishArchive } from "@inboxzero/tinybird";
import type { TinybirdEmailAction } from "@inboxzero/tinybird";
Tools
Biome

[error] 1-2: Some named imports are only used as types.

This import is only used as a type.

Importing the types with import type ensures that they are removed by the transpilers and avoids loading unnecessary modules.
Safe fix: Use import type.

(lint/style/useImportType)

action: (
gmail: gmail_v1.Gmail,
user: { id: string; email: string },
) => Promise<any>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Avoid using any.

The use of any should be avoided to ensure type safety. Specify a different type for the error parameter.

Apply this diff to fix the issue:

-): Promise<ServerActionResponse<T>> {
+): Promise<ServerActionResponse<T | { error: string }>> {

Committable suggestion was skipped due to low confidence.

Tools
Biome

[error] 32-32: Unexpected any. Specify a different type.

any disables many type checking rules. Its use should be avoided.

(lint/suspicious/noExplicitAny)


const archive: ActionFunction<{}> = async (gmail, email) => {
await archiveThread({ gmail, threadId: email.threadId });
const archive: ActionFunction<{}> = async (gmail, email, _args, userEmail) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Replace {} with a more specific type.

The use of {} as a type should be replaced with a more specific type to improve type safety.

Apply this diff to replace {} with a more specific type:

-const archive: ActionFunction<{}> = async (gmail, email, _args, userEmail) => {
+const archive: ActionFunction<Record<string, never>> = async (gmail, email, _args, userEmail) => {
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const archive: ActionFunction<{}> = async (gmail, email, _args, userEmail) => {
const archive: ActionFunction<Record<string, never>> = async (gmail, email, _args, userEmail) => {
Tools
Biome

[error] 234-234: Don't use '{}' as a type.

Prefer explicitly define the object shape. '{}' means "any non-nullable value".

(lint/complexity/noBannedTypes)

@elie222 elie222 merged commit 35a4854 into main Aug 26, 2024
@elie222 elie222 deleted the email-action-analytics branch August 26, 2024 20:19
@coderabbitai coderabbitai bot mentioned this pull request Nov 27, 2024
@coderabbitai coderabbitai bot mentioned this pull request Jan 11, 2025
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