Skip to content

refactor: use mailbox id instead of role everywhere in ui#249

Merged
krantheman merged 5 commits into
frappe:developfrom
krantheman:refactor-mailbox-id-instead-of-role
Aug 5, 2025
Merged

refactor: use mailbox id instead of role everywhere in ui#249
krantheman merged 5 commits into
frappe:developfrom
krantheman:refactor-mailbox-id-instead-of-role

Conversation

@krantheman
Copy link
Copy Markdown
Member

  • routing
  • actions
  • APIs

@krantheman krantheman force-pushed the refactor-mailbox-id-instead-of-role branch from 2d16fba to 4db7b9d Compare August 4, 2025 13:00
@krantheman krantheman requested a review from Copilot August 4, 2025 13:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_role field references with mailbox_id in 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

Comment thread mail/mail/doctype/email_message/email_message.py
Comment thread mail/api/mail.py Outdated
Comment thread mail/api/mail.py Outdated
Comment thread frontend/src/components/MailThread.vue Outdated
Comment thread frontend/src/components/MailThread.vue Outdated
Comment thread mail/api/mail.py Outdated
@krantheman krantheman force-pushed the refactor-mailbox-id-instead-of-role branch from 4db7b9d to 7ae57c6 Compare August 5, 2025 06:16
Comment thread mail/api/mail.py Outdated
@krantheman krantheman merged commit 131d36d into frappe:develop Aug 5, 2025
3 checks passed
@krantheman krantheman deleted the refactor-mailbox-id-instead-of-role branch August 5, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants