[PB-6521]: feat/select mails one-by-one#67
Conversation
xabg2
commented
Jun 23, 2026
- Select emails one-by-one
- Fix an small bug regarding Sidenav notifications
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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.
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
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (3)
package.jsonsrc/features/mail/MailView.tsxsrc/hooks/mail/useMailSelection.ts
Deploying mail-web with
|
| 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 |
There was a problem hiding this comment.
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.
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
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (5)
package.jsonsrc/features/mail/MailView.tsxsrc/test-utils/fixtures.tssrc/utils/format-emails/index.test.tssrc/utils/format-emails/index.ts
|

