Skip to content

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

Merged
xabg2 merged 3 commits intomasterfrom
feature/dropdown-to-select-inxt-domain-when-setting-up-new-mail
Mar 25, 2026
Merged

[_]: feat/add dropdown to select inxt domain#25
xabg2 merged 3 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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7c1c6b15-0932-447e-bef2-7b708d1c15d0

📥 Commits

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

📒 Files selected for processing (2)
  • src/constants.ts
  • src/features/identity-setup/components/UpdateEmail.tsx

📝 Walkthrough

Walkthrough

Added INTERNXT_EMAIL_DOMAINS constant, introduced SelectMailInput component for username + domain entry, refactored UpdateEmail to use separate username and domain state with the new component, and adjusted two mail tray import paths to kebab-case filenames.

Changes

Cohort / File(s) Summary
Email Domain Constants
src/constants.ts
Added exported INTERNXT_EMAIL_DOMAINS as a readonly tuple: ['@inxt.me', '@inxt.eu', '@encrypt.eu'] as const.
Identity Setup — New Component
src/features/identity-setup/components/SelectMailInput.tsx
Added SelectMailInput component and exported Domain type derived from INTERNXT_EMAIL_DOMAINS. Renders a text input for username and a dropdown to select domain.
Identity Setup — UpdateEmail Refactor
src/features/identity-setup/components/UpdateEmail.tsx
Replaced single email state with username and domain (Domain) states. Integrated SelectMailInput; onNext now receives ${username}${domain}. Removed prior Input usage.
Mail Tray Import Path Fixes
src/features/mail/components/tray/header/index.tsx, src/features/mail/components/tray/index.tsx
Updated import paths to use kebab-case filenames: ../search-input and ./tray-empty-state (was searchInput and trayEmptyState).

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 email domains during identity setup.
Description check ✅ Passed The description is directly related to the changeset, mentioning the dropdown feature for domain selection 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.

@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

const { translate, translateArray } = useTranslationContext();
const [email, setEmail] = useState<string>('');
const [username, setUsername] = useState<string>('');
const [domain, setDomain] = useState<Domain>('@intx.me');

Choose a reason for hiding this comment

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

typo here, it should be @inxt.me

src/constants.ts Outdated

export const HUNDRED_TB = 100 * 1024 * 1024 * 1024 * 1024;

export const INTERNXT_EMAIL_DOMAINS = ['@intx.me', '@inxt.eu', '@encrypt.eu'] as const;

Choose a reason for hiding this comment

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

same here

@xabg2 xabg2 requested a review from larryrider March 25, 2026 10:16
@sonarqubecloud
Copy link

@xabg2 xabg2 merged commit 24bf78a into master Mar 25, 2026
5 checks passed
@xabg2 xabg2 deleted the feature/dropdown-to-select-inxt-domain-when-setting-up-new-mail branch March 25, 2026 10:20
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.

2 participants