Skip to content

[_]: feat/add dropdown to select inxt domain#25

Open
xabg2 wants to merge 2 commits intomasterfrom
feature/dropdown-to-select-inxt-domain-when-setting-up-new-mail
Open

[_]: feat/add dropdown to select inxt domain#25
xabg2 wants to merge 2 commits intomasterfrom
feature/dropdown-to-select-inxt-domain-when-setting-up-new-mail

Conversation

@xabg2
Copy link
Contributor

@xabg2 xabg2 commented Mar 24, 2026

Adding a dropdown to select the init domain when setting up the identity.

@xabg2 xabg2 self-assigned this Mar 24, 2026
@xabg2 xabg2 added the enhancement New feature or request label Mar 24, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 24, 2026

📝 Walkthrough

Walkthrough

Added INTERNXT_EMAIL_DOMAINS constant, created SelectMailInput component for email domain selection, refactored UpdateEmail to use the new component for username and domain input, and updated import paths in mail tray components.

Changes

Cohort / File(s) Summary
Email Domain Constants
src/constants.ts
Added INTERNXT_EMAIL_DOMAINS readonly tuple containing three Internxt email domain suffixes.
Identity Setup Email Components
src/features/identity-setup/components/SelectMailInput.tsx, src/features/identity-setup/components/UpdateEmail.tsx
New SelectMailInput component with dropdown domain selector and text input. Refactored UpdateEmail to replace single email input with username and domain state, using new component for composition.
Mail Tray Import Paths
src/features/mail/components/tray/header/index.tsx, src/features/mail/components/tray/index.tsx
Updated import paths from camelCase to kebab-case filenames (searchInputsearch-input, trayEmptyStatetray-empty-state).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a dropdown component to select Internxt domains during identity setup, which is reflected across the new SelectMailInput component and UpdateEmail modifications.
Description check ✅ Passed The description is directly related to the changeset, accurately describing the addition of a dropdown for selecting the Internxt domain during identity setup.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/dropdown-to-select-inxt-domain-when-setting-up-new-mail

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.

@sonarqubecloud
Copy link

@xabg2 xabg2 requested a review from larryrider March 24, 2026 11:23
Copy link

@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.

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/features/identity-setup/components/SelectMailInput.tsx`:
- Around line 35-44: The text input in SelectMailInput lacks a programmatic
label; update the input inside the SelectMailInput component to include an
accessible name (either add a visible <label> and connect it via htmlFor/id or
add an appropriate aria-label/aria-labelledby) so assistive tech can identify
the username field; ensure the chosen label text clearly describes the purpose
(e.g., "email username" or "username") and use the existing props/state (value,
onChangeValue, setIsFocused) without changing their behavior.

In `@src/features/identity-setup/components/UpdateEmail.tsx`:
- Around line 22-25: The click handler currently forwards fullEmail without
validating username; update handleOnClick in UpdateEmail.tsx to trim and
validate username (e.g., const sanitized = username.trim(); ensure sanitized is
non-empty and matches your allowed pattern such as alphanumeric plus allowed
symbols) and only call onNext(`${sanitized}${domain}`) when valid; when invalid,
prevent advancing and surface feedback (set a local error state like
usernameError or disable the Next button) so empty/whitespace/illegal usernames
are blocked before calling onNext.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ff25c23d-73d4-4587-818a-322b97057559

📥 Commits

Reviewing files that changed from the base of the PR and between c0fa5c8 and 52d7dc4.

📒 Files selected for processing (7)
  • src/constants.ts
  • src/features/identity-setup/components/SelectMailInput.tsx
  • src/features/identity-setup/components/UpdateEmail.tsx
  • src/features/mail/components/tray/header/index.tsx
  • src/features/mail/components/tray/index.tsx
  • src/features/mail/components/tray/search-input/index.tsx
  • src/features/mail/components/tray/tray-empty-state/index.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant