Skip to content

Comments

Staging#768

Merged
MrgSub merged 69 commits intomainfrom
staging
Apr 25, 2025
Merged

Staging#768
MrgSub merged 69 commits intomainfrom
staging

Conversation

@MrgSub
Copy link
Collaborator

@MrgSub MrgSub commented Apr 25, 2025

Summary by CodeRabbit

  • New Features
    • Added support for deleting mail threads from the bin via the context menu.
    • Enabled inline editing of email addresses in the "to", "cc", and "bcc" fields when composing emails.
    • Introduced the ability to send existing draft emails.
    • Added Traditional Chinese and Simplified Chinese as supported languages.
  • Localization
    • Added new English strings for mail deletion actions.
    • Included placeholder localization files for Simplified and Traditional Chinese.
  • Chores
    • Added a script for sending test emails using the Resend API.
    • Added the dompurify dependency.

ahmetskilinc and others added 30 commits April 19, 2025 01:28
- added cc and bcc when saving drafts
- save drafts less aggresively
chore: simplify and fix the dev env
* Create prompts with XML formatting

* Include XML formatted prompts in generate func

* remove unused regex and add helper functions/warnings

* error handling

* Update apps/mail/lib/prompts.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* lint issues

* Update prompts.ts

* #706 (comment)

Coderabbit fix 1

* erabbitai bot 3 days ago ⚠️ Potential issue  errorOccurred state is stale inside finally  React state setters (setErrorOccurred) are asynchronous; the errorOccurred value captured at render time will not yet reflect changes made earlier in the same event loop. Consequently, the logic deciding whether to collapse/expand may run with an outdated flag.  -  } finally { -      setIsLoading(false); -      if (!errorOccurred || isAskingQuestion) { -        setIsExpanded(true); -      } else { -        setIsExpanded(false); // Collapse on errors -      } -  } +  } finally { +      setIsLoading(false); +      // Use a local flag to track errors deterministically +      const hadError = isAskingQuestion ? false : !!errorFlagRef.current; +      setIsExpanded(!hadError); +  } You can create const errorFlagRef = useRef(false); and update errorFlagRef.current = true every time an error is detected, ensuring reliable behaviour irrespective of React batching.  Committable suggestion skipped: line range outside the PR's diff.

* #706 (comment)

* #706 (comment)

* #706 (comment)

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…users (#726)

* feat(i18n): add Vietnamese language support

Add Vietnamese ('vi') to the list of supported languages in the
i18n configuration and JSON file to expand language options.

* Add a new Vietnamese translation file to support Vietnamese language users.

* Clear Vietnamese translation strings
Co-authored-by: needle <122770437+needleXO@users.noreply.github.com>
* Updated lockfile

* Updated home page session validation

---------

Co-authored-by: Adam <x_1337@outlook.com>
* Create route og image

* resolve coderabbit nitpicks

---------

Co-authored-by: Adam <x_1337@outlook.com>
ahmetskilinc and others added 14 commits April 24, 2025 12:58
- updates lib/auth.ts to use the new method
- updates actions/user.ts
- updates app/(routes)/settings/danger-zone/page.tsx
…mponent

- Added posthog-js version 1.236.6 to package.json and bun.lock.
- Introduced search functionality by implementing handleFilterByLabel in NavMain component.
- Updated NavItem to trigger label filtering on click.
- Updated NavItem to include an onClick prop for the Link component, allowing for custom click behavior.
- Maintained existing functionality with prefetch and target attributes.
* delete mails permanently from bin

* add English translations for delete mail actions

* update the call handleDelete

* fixed handle delete function

* handleDelete call

* enhance handledelete to reset bulk selection after deletion

* removed the scope

* delete mails permanently from bin

* add English translations for delete mail actions

* update the call handleDelete

* handleDelete call

* enhance handledelete to reset bulk selection after deletion

* removed the scope

---------

Co-authored-by: Ahmet Kilinc <akx9@icloud.com>
Co-authored-by: Adam <x_1337@outlook.com>
* Add sendDraft method to Gmail driver and MailManager interface

* fix sendDraft method

* Add support for sending draft emails and clear draftId after sending

---------

Co-authored-by: Adam <x_1337@outlook.com>
@vercel
Copy link

vercel bot commented Apr 25, 2025

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

Name Status Preview Comments Updated (UTC)
0 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 25, 2025 6:23pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 25, 2025

Warning

Rate limit exceeded

@MrgSub has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 22 minutes and 46 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 76efa60 and 53d41b0.

📒 Files selected for processing (1)
  • apps/mail/actions/mail.ts (2 hunks)

Walkthrough

This update introduces several new features and enhancements to the mail application. Notably, it adds functionality for deleting mail threads directly from the bin, including new backend actions and UI context menu integration. The email sending workflow is expanded to support sending draft emails, with corresponding changes to driver interfaces and implementations. Inline editing of email addresses is now supported in the compose interface. Localization is broadened with the addition of Simplified and Traditional Chinese language files and language support entries. New status messages for deletion actions are added to English localization. Additional changes include a test script for sending emails, a new dependency for DOM sanitization, and minor UI improvements.

Changes

File(s) Change Summary
apps/mail/actions/mail.ts Added deleteThread async function for deleting mail threads with error handling.
apps/mail/actions/send.ts Extended sendEmail to support optional draftId; logic to send drafts or new emails accordingly.
apps/mail/app/api/driver/google.ts
apps/mail/app/api/driver/types.ts
Added sendDraft method to MailManager interface and Google driver implementation for sending draft emails.
apps/mail/components/context/thread-context.tsx Integrated deleteThread into context menu, added handleDelete for thread deletion from bin with UI feedback.
apps/mail/components/create/create-email.tsx Added handleEditEmail for editing addresses; refactored send logic to support sending drafts; minor UI class tweak.
apps/mail/components/create/email-input.tsx Enabled inline editing of email chips; added onEditEmail prop and related state/handlers.
apps/mail/i18n/config.ts Added zh_TW (Traditional Chinese) and zh_CN (Simplified Chinese) to supported languages.
apps/mail/locales/en.json Added English localization strings for mail deletion actions and command.
apps/mail/locales/zh_CN.json
apps/mail/locales/zh_TW.json
Added new localization files for Simplified and Traditional Chinese with placeholder strings.
apps/mail/package.json Added dompurify dependency.
apps/mail/scripts.ts New script for sending test emails using Resend API and Faker for randomization.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant UI
    participant Actions
    participant Driver

    User->>UI: Right-click thread in bin, select "Delete from Bin"
    UI->>Actions: handleDelete(threadId)
    Actions->>Driver: delete(threadId)
    Driver-->>Actions: success/failure
    Actions-->>UI: Return result
    UI-->>User: Show toast (success/error)
Loading
sequenceDiagram
    participant User
    participant ComposeUI
    participant Actions
    participant Driver

    User->>ComposeUI: Edit email address inline
    ComposeUI->>ComposeUI: handleEditEmail updates state

    User->>ComposeUI: Send email
    ComposeUI->>Actions: sendEmail(emailData, [draftId])
    alt draftId is provided
        Actions->>Driver: sendDraft(draftId, emailData)
    else no draftId
        Actions->>Driver: create(emailData)
    end
    Driver-->>Actions: success/failure
    Actions-->>ComposeUI: Return result
    ComposeUI-->>User: Show result, clear draftId if sent
Loading

Possibly related PRs

Suggested reviewers

  • ahmetskilinc

Poem

In the warren of code, a bunny did hop,
Adding delete and edit with a quick little pop.
Now drafts can be sent, and emails revised,
With new languages waiting to be localized.
From bin to compose, the features expand—
A rabbit’s delight in a well-tended land!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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: 3

🧹 Nitpick comments (6)
apps/mail/components/context/thread-context.tsx (1)

239-253: Inconsistent indentation and spacing issues.

The implementation of handleDelete function has inconsistent indentation (tabs instead of spaces) and a formatting issue in the error logging.

Apply this diff to fix the indentation and spacing:

const handleDelete = () => async () => {
-		try {
+    try {
        const promise = deleteThread({ id: threadId }).then(() => {
          setMail(prev => ({ ...prev, bulkSelected: [] }));
          return mutate();
        });
        toast.promise(promise, {
          loading: t('common.actions.deletingMail'),
          success: t('common.actions.deletedMail'),
          error: t('common.actions.failedToDeleteMail'),
        });
    } catch (error) {
-        console.error(`Error deleting ${threadId? 'email' : 'thread'}:`, error);
+        console.error(`Error deleting ${threadId ? 'email' : 'thread'}:`, error);
      }
    };

The function otherwise correctly implements the deletion workflow with appropriate error handling and user notifications.

apps/mail/scripts.ts (2)

40-43: Add exponential backoff for reliable testing.

The current random delay implementation is simple but doesn't handle rate limiting properly. For more robust testing, consider implementing exponential backoff.

-    const randomDelay = Math.floor(Math.random() * 1000);
-    console.log('Sleeping for', randomDelay, 'ms...');
-    await new Promise((resolve) => setTimeout(resolve, randomDelay));
+    // Add exponential backoff with jitter
+    const baseDelay = 500;
+    const attempt = i + 1;
+    const maxDelay = Math.min(baseDelay * Math.pow(2, attempt), 5000);
+    const delay = Math.floor(maxDelay * (0.5 + Math.random() * 0.5));
+    console.log(`Sleeping for ${delay} ms (attempt ${attempt})...`);
+    await new Promise((resolve) => setTimeout(resolve, delay));

31-50: Consider adding command-line parameters for better testability.

The test function lacks configurability, making it difficult to use in different environments or for different testing scenarios.

Add command-line parameter support:

import { faker } from '@faker-js/faker';
import { Resend } from 'resend';
import minimist from 'minimist';

const arr = [
  // existing email templates
];

const runTest = async (options: {
  apiKey: string;
  recipient: string;
  count?: number;
  maxDelay?: number;
}) => {
  const resend = new Resend(options.apiKey);
  const emailsToSend = options.count ? arr.slice(0, options.count) : arr;
  
  for (const item of emailsToSend) {
    const response = await resend.emails.send({
      from: `${faker.person.firstName().toLowerCase()}@n8n.new`,
      to: options.recipient,
      subject: item.subject,
      html: item.text,
    });
    
    const randomDelay = Math.floor(Math.random() * (options.maxDelay || 1000));
    console.log('Sleeping for', randomDelay, 'ms...');
    await new Promise((resolve) => setTimeout(resolve, randomDelay));

    if (response.error) {
      console.log('Error sending email:', response.error);
    } else {
      console.log('Email sent successfully');
    }
  }
};

// Parse command line arguments
const argv = minimist(process.argv.slice(2));
const apiKey = argv.key || process.env.RESEND_API_KEY;
const recipient = argv.to || process.env.TEST_RECIPIENT_EMAIL;

if (!apiKey) {
  console.error('No API key provided. Use --key or set RESEND_API_KEY env variable');
  process.exit(1);
}

if (!recipient) {
  console.error('No recipient provided. Use --to or set TEST_RECIPIENT_EMAIL env variable');
  process.exit(1);
}

runTest({ 
  apiKey, 
  recipient,
  count: argv.count ? parseInt(argv.count, 10) : undefined,
  maxDelay: argv.delay ? parseInt(argv.delay, 10) : undefined
});
apps/mail/components/create/email-input.tsx (3)

88-98: Consider enhancing keyboard navigation for better UX.

The keyboard handling is good for Enter and Escape, but consider adding Tab support to allow users to quickly edit multiple email addresses in sequence.

 const handleEditKeyDown = (e: React.KeyboardEvent<HTMLInputElement>, index: number) => {
   if (e.key === 'Enter') {
     e.preventDefault();
     onEditEmail(type, index, editValue);
     setEditingIndex(null);
     setEditValue('');
   } else if (e.key === 'Escape') {
     setEditingIndex(null);
     setEditValue('');
+  } else if (e.key === 'Tab' && !e.shiftKey && index < emails.length - 1) {
+    e.preventDefault();
+    onEditEmail(type, index, editValue);
+    handleChipClick(index + 1, emails[index + 1]);
+  } else if (e.key === 'Tab' && e.shiftKey && index > 0) {
+    e.preventDefault();
+    onEditEmail(type, index, editValue);
+    handleChipClick(index - 1, emails[index - 1]);
   }
 };

113-133: Add validation and consider accessibility improvements for the edit input.

The conditional rendering of the editable input looks good, but consider adding:

  1. Email validation before submitting the edit
  2. ARIA attributes for better screen reader support
  3. Potentially save changes on blur rather than discarding them
 {editingIndex === index ? (
   <div className="relative flex items-center">
     <input
       ref={editInputRef}
       type="text"
       value={editValue}
       onChange={(e) => setEditValue(e.target.value)}
       onKeyDown={(e) => handleEditKeyDown(e, index)}
-      onBlur={() => setEditingIndex(null)}
+      onBlur={() => {
+        // Optional: validate and save on blur
+        const isValid = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(editValue.trim());
+        if (isValid && editValue !== email) {
+          onEditEmail(type, index, editValue);
+        }
+        setEditingIndex(null);
+        setEditValue('');
+      }}
       className="w-[150px] bg-transparent focus:outline-none pr-6"
+      aria-label={`Edit email address ${email}`}
     />
     <span className="absolute right-1 text-xs text-muted-foreground">↵</span>
   </div>
 ) : (
   <span
     onClick={() => handleChipClick(index, email)}
     className="max-w-[150px] cursor-pointer overflow-hidden text-ellipsis whitespace-nowrap"
+    aria-label={`Click to edit: ${email}`}
+    role="button"
+    tabIndex={0}
+    onKeyDown={(e) => {
+      if (e.key === 'Enter' || e.key === ' ') {
+        handleChipClick(index, email);
+      }
+    }}
   >
     {email}
   </span>
 )}

102-102: CSS class concatenation can be simplified with template literals.

The CSS class concatenation is correct but can be simplified for better readability.

- <div className={`text-muted-foreground flex-shrink-0 pr-3 text-[1rem] font-[600] opacity-50 ${className}`}>
+ <div className={`text-muted-foreground flex-shrink-0 pr-3 text-[1rem] font-[600] opacity-50 ${className ?? ''}`}>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c99d5ad and 4fa171f.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (13)
  • apps/mail/actions/mail.ts (1 hunks)
  • apps/mail/actions/send.ts (4 hunks)
  • apps/mail/app/api/driver/google.ts (1 hunks)
  • apps/mail/app/api/driver/types.ts (1 hunks)
  • apps/mail/components/context/thread-context.tsx (3 hunks)
  • apps/mail/components/create/create-email.tsx (8 hunks)
  • apps/mail/components/create/email-input.tsx (4 hunks)
  • apps/mail/i18n/config.ts (1 hunks)
  • apps/mail/locales/en.json (2 hunks)
  • apps/mail/locales/zh_CN.json (1 hunks)
  • apps/mail/locales/zh_TW.json (1 hunks)
  • apps/mail/package.json (1 hunks)
  • apps/mail/scripts.ts (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (6)
apps/mail/app/api/driver/types.ts (1)
apps/mail/types/index.ts (1)
  • IOutgoingMessage (110-120)
apps/mail/actions/send.ts (1)
apps/mail/app/api/driver/google.ts (1)
  • driver (195-1061)
apps/mail/actions/mail.ts (2)
apps/mail/app/api/driver/google.ts (1)
  • driver (195-1061)
apps/mail/actions/utils.ts (3)
  • getActiveDriver (33-63)
  • FatalErrors (9-9)
  • deleteActiveConnection (11-31)
apps/mail/app/api/driver/google.ts (1)
apps/mail/types/index.ts (1)
  • IOutgoingMessage (110-120)
apps/mail/components/context/thread-context.tsx (1)
apps/mail/actions/mail.ts (1)
  • deleteThread (117-128)
apps/mail/components/create/create-email.tsx (1)
apps/mail/actions/send.ts (1)
  • sendEmail (7-67)
🔇 Additional comments (20)
apps/mail/package.json (1)

69-69:

Details

✅ Verification successful

Added DOMPurify for HTML sanitization

The addition of DOMPurify (^3.2.5) is a good security practice for sanitizing HTML content in email handling to prevent XSS attacks.

Let's verify if this is the latest version with all security patches:


🏁 Script executed:

#!/bin/bash
# Check for the latest version of DOMPurify and any security advisories
npm view dompurify versions --json | jq '.[-5:]'
npm view dompurify time --json | jq '.modified'

# Check for any security vulnerabilities
npm audit --json | jq '.advisories[] | select(.module_name=="dompurify")' || echo "No vulnerabilities found for DOMPurify"

Length of output: 753


DOMPurify dependency verified as up-to-date and secure

  • apps/mail/package.json (line 69): "dompurify": "^3.2.5"
  • Latest release is 3.2.5 (published 2025-04-03)
  • No known security advisories found

All checks pass—this change can be merged.

apps/mail/app/api/driver/types.ts (1)

13-13: Added sendDraft method to MailManager interface

The new method provides a clear API contract for sending an existing draft email by its ID, distinguishing it from creating new emails. This implementation aligns with the feature for sending draft emails.

apps/mail/i18n/config.ts (1)

4-5: Added support for Traditional and Simplified Chinese languages

The addition of Chinese language options expands the internationalization capabilities of the application, providing better accessibility for Chinese-speaking users.

apps/mail/actions/send.ts (3)

17-17: Added draftId parameter to sendEmail function

The optional draftId parameter enables the function to handle both new emails and sending existing drafts, maintaining backward compatibility while extending functionality.

Also applies to: 28-28


48-58: Refactored email data into a separate object

Good refactoring that improves code readability and reduces duplication when calling either sendDraft or create methods.


60-64: Added conditional logic for sending drafts vs. new emails

The implementation correctly handles both cases - sending an existing draft when draftId is provided, or creating a new email otherwise.

apps/mail/locales/en.json (2)

22-24: Appropriate localization strings for mail deletion actions.

These new status messages for deleting mail follow the existing pattern for action notifications and provide clear user feedback during the deletion process.


255-255: Command label added properly for the new deletion action.

The "Delete from Bin" command label is correctly added to support the new context menu option in the mail UI.

apps/mail/app/api/driver/google.ts (1)

835-853: Correctly implemented sendDraft method.

The sendDraft implementation follows the established patterns for mail driver methods:

  • Properly calls parseOutgoing to prepare message data
  • Uses withErrorHandler with appropriate operation name and context
  • Correctly structures the Gmail API call with proper parameters

This enables sending draft emails through the UI and provides consistent error handling.

apps/mail/components/context/thread-context.tsx (2)

29-29: Import statement updated correctly.

The import statement has been correctly updated to include the new deleteThread function.


285-291: Well-implemented delete action in the context menu.

The new context menu item is correctly added to the bin folder actions, with appropriate icon and label references for localization. The action is properly connected to the handleDelete function.

apps/mail/locales/zh_TW.json (1)

1-450: LGTM: Well-structured locale file for Traditional Chinese.

The structure aligns with standard localization patterns, providing empty placeholders for all needed translations. Ensure translators fill these values before deployment to Chinese-speaking regions.

apps/mail/components/create/create-email.tsx (4)

271-288: Good implementation of inline email editing.

The handleEditEmail function properly handles validation and state updates for editing email addresses. The error handling with toast notification provides good user feedback.


357-375: Refactored email sending with draft support.

Good refactoring to support both draft and new email sending through a unified interface. The construction of emailData and conditional sending logic improves maintainability.


600-600: Consistent implementation of editing across all email fields.

The onEditEmail prop is consistently added to all EmailInput components (to, cc, bcc), ensuring that inline editing works uniformly across the interface.

Also applies to: 616-616, 633-633


817-817: Minor CSS class order change with no functional impact.

The order of max-h-[40vh] and touch-auto CSS classes was swapped, which doesn't affect the component's appearance or behavior.

apps/mail/locales/zh_CN.json (1)

1-450: LGTM: Well-structured locale file for Simplified Chinese.

The structure follows the same pattern as the Traditional Chinese file and aligns with the application's localization needs. Remember to have translators fill these values before deployment to Chinese-speaking regions.

apps/mail/components/create/email-input.tsx (3)

14-14: Well-implemented inline editing feature with proper prop addition.

The new onEditEmail prop is correctly typed and integrated into both the interface and component parameters, allowing the parent component to handle email address updates properly.

Also applies to: 29-29


35-39: Good state management for editing functionality.

The state variables for tracking editing state (editingIndex, editValue) and the additional ref (editInputRef) are appropriately designed for managing the inline editing experience.


74-86: Effective chip click handler with proper focus management.

The handleChipClick function correctly sets up the editing state and uses setTimeout to ensure the DOM is updated before attempting to focus the input. The cursor positioning at the end of the text is a nice UX touch.

@MrgSub MrgSub merged commit 243f645 into main Apr 25, 2025
5 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Jul 9, 2025
10 tasks
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.

10 participants