refactor: use mailbox id instead of role everywhere in ui#249
Merged
krantheman merged 5 commits intoAug 5, 2025
Merged
Conversation
Member
krantheman
commented
Aug 4, 2025
- routing
- actions
- APIs
2d16fba to
4db7b9d
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the mail system to use mailbox IDs instead of roles throughout the UI. This change improves data consistency by using unique identifiers rather than role strings for mailbox operations.
- Replaces
mailbox_rolefield references withmailbox_idin email search and storage operations - Updates API endpoints to accept and work with mailbox IDs instead of roles
- Modifies frontend components to use mailbox IDs for routing, filtering, and UI state management
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| mail/mail/doctype/email_message/search.py | Updates search indexing to use mailbox_id field instead of mailbox_role |
| mail/mail/doctype/email_message/email_message.py | Changes realtime event publishing to use mailbox_id |
| mail/api/mail.py | Refactors API functions to work with mailbox IDs and removes role-to-ID conversion calls |
| frontend/src/stores/user.ts | Adds helper function to convert mailbox roles to IDs |
| frontend/src/router.ts | Updates default route to use mailbox ID |
| frontend/src/pages/MailboxView.vue | Converts mailbox role checks to use IDs throughout component |
| frontend/src/components/Modals/SearchModal.vue | Updates search result navigation to use mailbox_id |
| frontend/src/components/MailThread.vue | Replaces role-based filtering with ID-based filtering |
| frontend/src/components/HeaderActions.vue | Changes mailbox comparisons to use IDs |
| frontend/src/components/AppSidebar.vue | Updates navigation links to use mailbox IDs |
s-aga-r
reviewed
Aug 4, 2025
4db7b9d to
7ae57c6
Compare
s-aga-r
reviewed
Aug 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.