Skip to content

[PB-6521]: feat/select mails one-by-one#67

Merged
xabg2 merged 6 commits into
masterfrom
fix/ui-issues
Jun 26, 2026
Merged

[PB-6521]: feat/select mails one-by-one#67
xabg2 merged 6 commits into
masterfrom
fix/ui-issues

Conversation

@xabg2

@xabg2 xabg2 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor
  • Select emails one-by-one
  • Fix an small bug regarding Sidenav notifications

@xabg2 xabg2 requested a review from jzunigax2 June 23, 2026 16:04
@xabg2 xabg2 self-assigned this Jun 23, 2026
@xabg2 xabg2 added the enhancement New feature or request label Jun 23, 2026
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ui-issues

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/hooks/mail/useMailSelection.ts`:
- Around line 13-20: Add a co-located test file useMailSelection.test.ts to test
the selectEmail function's toggle behavior using AAA (Arrange-Act-Assert) style
tests. Create test cases covering: selecting a valid email id that adds it to
the selection, toggling a selected email id to remove it, attempting to select
an invalid email id that should not be added, and verifying transitions between
add and remove states. Ensure all edge cases for the conditional logic in
selectEmail are covered.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8f4c9d65-0b06-4624-8117-db423b5fa916

📥 Commits

Reviewing files that changed from the base of the PR and between b29a780 and 28f6fff.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • package.json
  • src/features/mail/MailView.tsx
  • src/hooks/mail/useMailSelection.ts

Comment thread src/hooks/mail/useMailSelection.ts
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 25, 2026

Copy link
Copy Markdown

Deploying mail-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: ea1fef4
Status: ✅  Deploy successful!
Preview URL: https://896a9ac7.mail-web-ea0.pages.dev
Branch Preview URL: https://fix-ui-issues.mail-web-ea0.pages.dev

View logs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/utils/format-emails/index.test.ts`:
- Around line 49-57: Add a boundary test for the formatEmailsToList behavior
when participants is an empty array, since the existing test only covers the
missing-property case. Update the existing test suite in index.test.ts near the
formatEmailsToList and getMockedMails setup to explicitly set participants to []
and assert the sender fallback still uses the message sender (for example,
Alice) as the from value.

In `@src/utils/format-emails/index.ts`:
- Line 17: The sender mapping in format-emails currently uses mail.participants
?? mail.from, which leaves an empty participants array in place and prevents
falling back to mail.from. Update the logic in the toParticipant mapping to
check for an empty participants list as well as nullish values, so the fallback
still runs when participants exists but has no entries. Use the existing
mail.participants and mail.from symbols in src/utils/format-emails/index.ts to
locate the fix.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: ea8ee4ec-fde8-4841-9e4d-1479c26bca5c

📥 Commits

Reviewing files that changed from the base of the PR and between 28f6fff and b5e8b31.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • package.json
  • src/features/mail/MailView.tsx
  • src/test-utils/fixtures.ts
  • src/utils/format-emails/index.test.ts
  • src/utils/format-emails/index.ts

Comment thread src/utils/format-emails/index.test.ts
Comment thread src/utils/format-emails/index.ts Outdated
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
52.6% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@xabg2 xabg2 merged commit 6984449 into master Jun 26, 2026
5 of 6 checks passed
@xabg2 xabg2 deleted the fix/ui-issues branch June 26, 2026 09:24
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