Repository navigation
#775 part 3: an account's name and addresses, and the accounts that go together (new code only) - #2162
Draft
kartas39 wants to merge 23 commits into
Draft
#775 part 3: an account's name and addresses, and the accounts that go together (new code only)#2162kartas39 wants to merge 23 commits into
kartas39 wants to merge 23 commits into
Conversation
…r each thing Thirteen can_… checks on AccountRow, each answered from two facts worked out once: whether the account signs in with Microsoft, and whether its mail goes through Microsoft Graph. And Mailbox::suitable_account() for the account to use when none is named. New code only: nothing calls it yet, and main's own functions are as they were. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…ts that go together On AccountRow: has_server, can_send_mail, can_limit_offline_mail, name_or_address, address_or_name, has_main_address, sign_in_account and junk_owner. On Mailbox: is_my_address, my_addresses, shared_mailbox_rows, account_and_shared_mailbox_rows and account_row_with_main_address. New code only: nothing calls it yet. Human-reviewed, AI-assisted, nobody's mailbox harmed.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
…hich has a row of its own From benandez's review of UCSLabs#1836: account_rows follows accounts_in_order, which leaves out online archives, while account_row gives a row for one. Both docs say so, and so does suitable_account, which gives an archive only as the preferred account. A test pins it. Human-reviewed, AI-assisted, nobody's mailbox harmed.
Human-reviewed, AI-assisted, nobody's mailbox harmed.
Human-reviewed, AI-assisted, nobody's mailbox harmed.
…ver server keeps them From benandez's review of UCSLabs#2124. can_sync_calendar also says yes of an Exchange server account (EWS, UCSLabs#962) and of an account with a calendar server set (CalDAV, UCSLabs#209); can_fetch_contacts of a JMAP account once its server lists an address book. An account GNOME Online Accounts signs in for doesn't sign in with Microsoft here, as main's rules, shared mailboxes and Graph runs already say. The docs say what the caller still checks (the sign-in's permission, the categories read so far), and the tests cover every kind, Zimbra too. Human-reviewed, AI-assisted, nobody's mailbox harmed.
Main's tr.po missed two strings and one place of another after UCSLabs#2210 and the start-view change met; `cargo xtask i18n` writes it as main's code has it now. Human-reviewed, AI-assisted, nobody's mailbox harmed.
Human-reviewed, AI-assisted, nobody's mailbox harmed. # Conflicts: # crates/model/src/accounts.rs
… a server that can be used Main reads the calendar only through server settings with no problem (ews_directory's ews_account); can_sync_calendar now asks the same, and the test has a real address and one that can't be used. Human-reviewed, AI-assisted, nobody's mailbox harmed.
Human-reviewed, AI-assisted, nobody's mailbox harmed.
…or school account Microsoft Graph's calendar: getSchedule doesn't answer for a personal Microsoft account (Outlook.com), so `can_see_attendees_free_busy` says yes only where another person's calendar can be opened. Human-reviewed, AI-assisted, nobody's mailbox harmed.
Human-reviewed, AI-assisted, nobody's mailbox harmed.
…t in step are can_sync_contacts After a review of the branch: - `can_sync_calendar`'s doc says a calendar server's calendars are only read in this version, and that whether a calendar can be changed is its own to say; the module example no longer calls it where a new meeting goes. - `can_fetch_contacts` is `can_sync_contacts`: Microsoft and JMAP both send contact changes up. - The module doc, `AccountRow`'s doc and `suitable_account`'s doc say what the code does; an account of this computer's that a command gives a Microsoft sign-in is named. - A row works out a ticked calendar only for a shared mailbox and an address book only for a JMAP account, the checks that ask. - A test pins that an online archive has no Exchange server of its own. Human-reviewed, AI-assisted, nobody's mailbox harmed.
Human-reviewed, AI-assisted, nobody's mailbox harmed.
…osoft sign-in signs in, as on main The account page makes one when both servers of an IMAP account that signs in with Microsoft are cleared; main keeps its calendar, to-dos and contacts through Microsoft still. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…Microsoft sign-in Human-reviewed, AI-assisted, nobody's mailbox harmed.
…atever sign-in it has Human-reviewed, AI-assisted, nobody's mailbox harmed.
|
This branch has not been deployed
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.



Builds on #2124 (which builds on #1836). Part 3 of #775: the rest of the shared code. The call sites come next, so #775 stays open.
What changes for the person using MailCraft
Nothing yet. All of it is new code in
crates/model/src/accounts.rs, and nothing calls it yet.On
AccountRow:has_server,can_send_mail,can_limit_offline_mail: whatAccountKind::has_server,sends_mailandhas_offline_windowsay, asked of the account, so a caller with a row doesn't read its kind.can_send_mailalso asks for a sign-in to send with: not a shared mailbox whose owner is gone.name_or_address: what a menu or a list calls it.address_or_name: where two accounts of one name must be told apart.has_main_address(email): whether it is the account's own address, whatever the letter case and the spaces round it.sign_in_account: the account whose sign-in reads it; for a shared mailbox, the account it is opened through.junk_owner: asMailbox::junk_owner.On
Mailbox:is_my_address(email)andmy_addresses(): every account's own address and the sender addresses in use, each once.shared_mailbox_rows(account)andaccount_and_shared_mailbox_rows(account): an account's shared mailboxes, and what goes when it is removed.account_row_with_main_address(email): the first account down the folder pane with that address.How it was checked
crates/model/src/accounts_tests.rs: the three checks against the kind's own for every kind; an address told whatever its case; the two names with and without a name or an address; a shared mailbox's reader with an owner that is gone, is itself or can't open one; what goes with an account against whatremove_accountremoves; the owner's addresses in the folder pane's order, and with one id for every account.cargo xtask cipassesNot changed
isDefaultinaccount.listand the bug fixes of Accounts: the code that lists them and picks one is spread over 126 places, each with its own order, filters and checks #775 come with the next part.Human-reviewed, AI-assisted, nobody's mailbox harmed.