Repository navigation
Conversation
…d actions, and a desktop alert - Conditions: from and sent to people, sent only to me, my address in To or Cc, subject or body, a header, sensitivity, size, a meeting invitation, an automatic reply, a category, a flag, the days received; several words or addresses in one. Each can be an exception (Except if). - Actions: copy to folder, delete permanently, flag with a due day, clear the flag, clear categories; a desktop alert beside Stop processing more rules. - On a Microsoft account the server keeps what it can; the rest stays on this computer and says why. Rules made in Outlook with these parts are shown whole. - Agents: rules.add takes the new parts and refuses wrong or too many; making, switching on or running a rule that deletes for good asks as a delete. - Also fixed: a Graph copy then delete before Send/Receive lost the message when the copy was refused; rules.add cut a rule's parts past 20. Human-reviewed, AI-assisted, nobody's mailbox harmed.
- Run Rules Now reads a calendar part for "is a meeting invitation" only when it is small enough to be shown, as the reading pane does. - An agent's question before Run Rules Now names the rules that delete mail permanently, also when the run files mail onto another server. - The test of a loaded rule that moves mail to an Outbox matches the message again, and shows the rule acting on an ordinary folder. - The Graph round trip checks that sizes go up in kilobytes. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…nged (code scanning read their fixed clock as a nonce) Human-reviewed, AI-assisted, nobody's mailbox harmed.
…ge isn't an invitation; a rule that can't act deletes nothing - "Is a meeting invitation" can't be told of a message whose calendar part wasn't brought in (one too large to be read): a rule with it as a condition or an exception leaves the message alone, as for a body not here yet. - A rule with no conditions or with parts this version doesn't know acts on nothing, so the agent gate doesn't count it as one that deletes mail permanently, nor names it. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…t for good is asked as a delete; before Run Rules Now the question says which rules copy and which move A yes to the question about sending alone made such a rule: the Delete grant was asked only when Send was allowed in advance. Now it is asked as a delete until that is allowed, once, and the question names the server and the deleting. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…e; the MCP doc says when one question covers both grants Human-reviewed, AI-assisted, nobody's mailbox harmed.
…owhere to go yet, too A copy into a folder the server hadn't listed let the original's delete go first; the copy then went from a server id that was gone, and a refusal lost the message on both sides. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…count puts nothing on another server Human-reviewed, AI-assisted, nobody's mailbox harmed.
…or good is kept on this computer when refused A copy waiting to be made on another account's server (Microsoft or IMAP, a shared mailbox too) was taken away when refused, as if its original were still here. Deleted for good meanwhile, by the owner or by a rule that copies and then deletes, the message was then lost on both sides. Now the placement names its source, and a refused copy whose source is gone stays in Imported. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…nother account, and a refused copy brings the original back The original's delete on its own server (IMAP, Microsoft, Exchange server) is held while a copy of it waits to be made on another account's server. A copy refused or called off puts the original back where its server has it, from what was kept of it; a copy made lets the delete go. An original that can't be put back (on this computer, its folder gone here, its mailbox numbered anew) leaves the copy kept on this computer, as before. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…e rule beside it that deletes for good When rules.add, rules.fromMessage, rules.enable, rules.keepOnServer, rules.move or rules.remove is asked as a delete because a rule switched on here deletes mail for good for the same mail, the question names that rule (at most five) and says why. The condition is one function for the gate and the text, as the rules window's redesign has it for rules.edit. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…to another account Human-reviewed, AI-assisted, nobody's mailbox harmed.
…box is opened again, and a copy moved on still holds it What a held delete keeps of the original is where and how it lay; its text and files come back from the copy, which names them for the mailbox file (a message kept with a delete is written without the names of content kept on disk, so after a reopen it came back empty, and its next move would have deleted the server's whole original). The same for a refused copy within a Microsoft or Exchange server account. A copy moved on into a third account before it was made still names its source, so the delete keeps waiting for it. Human-reviewed, AI-assisted, nobody's mailbox harmed.
… a copy moved on Human-reviewed, AI-assisted, nobody's mailbox harmed.
Human-reviewed, AI-assisted, nobody's mailbox harmed.
…here it lay A message moved out of an IMAP account into a Microsoft account, made there, then copied into a third account and deleted for good, had both deletes held; a refused copy brought it back on the Microsoft account and again in the IMAP account, there with the Microsoft server's id. Now it is put back once: on the Microsoft account it lay in, and the IMAP original goes as the move meant. An IMAP account's message put back carries no Microsoft server id. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…list has its say once the message is fetched whole On a Microsoft, JMAP or Exchange server account, new mail comes as headers and a preview. A rule on this computer that reads the text, a header, the size or whether it is a meeting invitation couldn't tell, and nothing ran it again after the fetch. Now the rules that couldn't tell wait with the message (Message::rules_waiting, in the order they ran, with the folder they left it in) and run once it is fetched (graph_mail::apply_graph_fetch, which the JMAP and Exchange fetches go through too). A rule that acted on arrival isn't run again; a delete for good that waited on an earlier stop rule that couldn't tell goes once that rule doesn't apply. A message moved meanwhile is let alone. file-format-parity.md says what an older build does with the new rule parts. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…f Microsoft, and keeps the copy when the original was deleted on its server meanwhile Small check of 54263e8: - Deleted on a phone while its delete for good waited for a copy: the delta's removal (or a fresh listing without it) is now noted on the held delete (graph_down::there_still), so a refused copy doesn't put the message back as one the server no longer has, to be swept away with the refused copy already taken. It comes back from the IMAP account it was moved there from, or the copy stays in Imported. - A Microsoft message being moved out into an IMAP account, not put there yet: a refused copy brings it back as that server's message, and its copy there isn't deleted. - Put back on the IMAP server, the deletion of the Microsoft original it was moved from goes as the move meant it to, and a refusal of that deletion adds no second message. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…d once, not once a word Human-reviewed, AI-assisted, nobody's mailbox harmed.
…a day, or a flag or the categories cleared has parts this version doesn't know Human-reviewed, AI-assisted, nobody's mailbox harmed.
…han it can keep, and the box for the server judges its exceptions as they are Human-reviewed, AI-assisted, nobody's mailbox harmed.
# Conflicts: # crates/ui-egui/src/forms/rules/keep_tests.rs # docs/file-format-parity.md
…ount keeps the message when its original was deleted on the server meanwhile Human-reviewed, AI-assisted, nobody's mailbox harmed.
…wered "no such message" while its original waits to be deleted for good keeps the message Human-reviewed, AI-assisted, nobody's mailbox harmed.
…umber for is refused, rather than putting one of them after the locked rule on the server Human-reviewed, AI-assisted, nobody's mailbox harmed.
Human-reviewed, AI-assisted, nobody's mailbox harmed.
…where they put it, and after "no such message" the original's delete still goes Human-reviewed, AI-assisted, nobody's mailbox harmed.
…e for good is called off again A copy within the account answered 404 confirms the message nowhere: the server may still have the original (the copy's folder there gone), and the copy here may be only its headers. So the held delete is dropped, the copy is kept in Imported when it is still in this account, and one the owner moved on stays where they put it. Tests cover a copy moved on and refused with the original deleted on a phone, and one moved on with the original not deleted. Human-reviewed, AI-assisted, nobody's mailbox harmed.
Conflicts: an undo's approval keeps both causes for Delete, mail the undo takes away (UCSLabs#473) and a rule switched on that deletes for good (UCSLabs#566); the docs keep both sides' rows. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…s answer stays where it was put Human-reviewed, AI-assisted, nobody's mailbox harmed.
… waits is taken as a refusal The server may still have the original (the copy's folder there gone) or not (deleted on a phone). Either way no copy was made, so the original is put back as on a refusal: where the server has it, or in Imported once the server says it is gone. Before, the delete was only called off and the original, still on the server, wasn't shown here again. A test covers the copy's folder gone, with the original fetched whole or only its headers. The release note says only a copy moved onto this computer or into another account stays where it was put; the threat model says an undo leaving a rule on that deletes permanently asks delete. Human-reviewed, AI-assisted, nobody's mailbox harmed.
… Graph answers rebuild the index Taking that answer as a refusal (c409d88) put the original back as the server's, and an owner's move of it, or a server index built before, could then lose it. The copy arm is back as it was at 025f461: the delete is called off and the copy kept in Imported; a message the server still has stays there and shows again once its folder is read afresh, as the comment now says. The answers to a Microsoft account's message changes now reset the index of its server's mail, as an Exchange server account's do: an original put back after a refusal, with the index built before without it, missed the phone's delete in the next listing and was swept away later. Tests: a copy of mail not here whole answered "no such message" deletes nothing there; that put-back original is kept in Imported. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…ce; the copy note names "no such message" The index reset after a Microsoft account's message answers (960fdc0) also fixes a bug on main: a copy listed after its answer showed twice in its folder when the index was built between the copy and the answer. The release note for a copy then deleted permanently names the "no such message" answer too. Human-reviewed, AI-assisted, nobody's mailbox harmed.
A search by name and New Rule over the rules; each rule with its switch, where it is kept, Move Up and Move Down, a menu (Run Rule Now, Keep Rule on Server, Delete Rule) and an arrow that shows what it does. New Rule opens the new rule's page in the lists' place, its conditions, exceptions and actions each in a box, with Add Rule and Cancel. The dialog moves by its title, is sized by its edges and corners, and keeps its size. Every rule moves with its arrows, one the server doesn't let be changed too. Its new place is told to the server first; a refusal (a 403 too, or a yes that leaves it where it was) is that rule's alone, stops the rest of that upload, and puts it and the places that were to follow it back where the server has them, said in words. The arrows are greyed only at the ends of a list and past a rule still to go to the server. A rule `rules.add` makes without `account` is the account in view's (a shared mailbox's owner's, where the window now opens too), as the window's is, and the agent's question names that account; it was for every account's mail. A rule made for the placeholder of an empty mailbox goes to the first account added, with its standard folders; it was dropped. Human-reviewed, AI-assisted, nobody's mailbox harmed.
Edit Rule, in a rule's menu, opens the rule's page filled in with what the rule is, with Save and Cancel; it is greyed, with why, for a rule the server doesn't let be changed, one with parts MailCraft can't show, one the server is still making and one the page can't show. `rules.edit` changes the rule in place: it stays for its account, where it is kept, switched on or off and in its place. One on a Microsoft account's server is sent there whole at the next Send/Receive (PATCH with its name, conditions, exceptions and actions), and what the server can't keep is said on the page and not saved. An agent's change asks as making that rule would, and names the rules beside it that delete for good. 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
|
| /// ([`sized_window`]); the rest share one. | ||
| pub(crate) fn layer(&self) -> egui::LayerId { | ||
| match self { | ||
| Dialog::Form(Form::Rules(_)) => sized_layer("rules"), |
| let title = form.title(); | ||
| let mut done = false; | ||
| let kept = vec2(app.ui.rules_width, app.ui.rules_height); | ||
| let (open, sized) = sized_window(ctx, &title, "rules", (kept, vec2(form.width(), 640.0)), |ui| done = form.show(app, ui)); |
…indow's layer is named, not salted What a rule looks for and what it does went to the Rules window in English in every language. The conditions, exceptions and actions, the words that join them, a move's folder, the stop and the alert now go through the catalogues (Condition::describe_in, Action::describe_in, Rule::looks_for_in), with fuzzy drafts in the five; the English that rules.list and the agent's question read is what it was. A rule's "When" has a context of its own, as German says "Wenn" there and "Wann" for a meeting's time. sized_window's and sized_layer's `salt` parameter is `name`: CodeQL read the Rules window's name as a hard-coded salt. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…nto Edit Rule Human-reviewed, AI-assisted, nobody's mailbox harmed.
nl.po: the two rule strings UCSLabs#780 translated take its translation. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…esktop alert then; the copy marker's time is a stamp A rule on this computer that reads what a server's list of new mail doesn't give (the text, a header, the size) acted once the message was fetched whole, but never showed the desktop alert it asks for. It now marks the message for one, the fetch names it, and the window shows it once the download is over, after the Send/Receive under way if there is one, and not for a message the run's end told of already as new mail. copy_message_marked's parameter is a stamp, not a nonce: code scanning took the test clock that reaches it for one. Human-reviewed, AI-assisted, nobody's mailbox harmed.
… in one Send/Receive; what was told isn't kept past a restart Human-reviewed, AI-assisted, nobody's mailbox harmed.
…il is downloaded, main's translations) into the Rules window Human-reviewed, AI-assisted, nobody's mailbox harmed.
… in Rules for Rules from before a rule was for one account still run on every account's mail, now after the server's rules and before the account's own of this computer, and move among themselves. They are no longer in each account's list; New Rule is greyed under All accounts. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…new head into Edit Rule Human-reviewed, AI-assisted, nobody's mailbox harmed. # Conflicts: # ROADMAP.md # crates/ui-egui/src/forms.rs
…dit Rule meets All accounts A rule under All accounts has For One Account and the accounts in its menu (rules.forAccount): it then runs on that account's mail alone, kept on this computer and first of its rules there. One that moves or copies mail to another account's folder opens on the rule page with no folder for it, and is given as it is saved (rules.edit with account); Cancel leaves it under All accounts. Edit Rule is greyed for such a rule. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…l accounts A rule made before the first account is that account's once it is added, not one for every account: the window's first line no longer names All accounts then. Human-reviewed, AI-assisted, nobody's mailbox harmed.
…o Edit Rule Human-reviewed, AI-assisted, nobody's mailbox harmed. # Conflicts: # crates/ui-egui/src/forms/rules/page_tests.rs
Edit Rule showed a folder deleted since as it was, and Save was refused after it; it now shows Choose a folder, and Save waits for one. Given to an account, a rule keeps that account's own folders even where the list of folders leaves them out. Human-reviewed, AI-assisted, nobody's mailbox harmed.
Merged
4 tasks done
3 of 4 tasks
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 #786. Part of #566; it doesn't close it. A draft until that PR is merged.
What changes for the person using MailCraft
PATCH), so an exception taken away here is taken away there too.rules.editasks the owner the way making that rule would: Delete when the rule, switched on, comes to delete mail permanently or to delete mail on its server, or while a rule on this computer that deletes permanently is switched on (the question names those rules). Send when it comes to move or copy mail onto another account's server. Settings otherwise. The buttons are Allow and Don't Allow.Edit Rule in the menu, and a rule's page opened by it, in light and dark:
How it was checked
See below.cargo xtask cipasses on 73fc640.crates/engine/src/cmd/rules_edit_tests.rs: the command and what it refuses; the change sent whole and its answers (taken, refused, not allowed yet, and changed again while a taken or a refused one was on its way); a rule still waiting to go; the server locking the rule, or giving it parts MailCraft can't show, before the change goes; the agent's question and class.crates/net/src/graph/rules_tests.rs: a changed rule is sent whole against the fake Graph server, and one the server couldn't keep is not sent.crates/ui-egui/src/forms/rules/page_tests.rs: every part a rule can have comes back unchanged from the page; Edit Rule, Save and Cancel in the window; Edit Rule greyed on a rule the server locks.Code owners' paths:
crates/net/src/graph/rules.rs(thePATCHbody) andcrates/net/src/graph/rules_tests.rs, and the release notepackaging/release-notes.d/new/566-edit-rule.md.cargo xtask cipassesA crash or data-loss fix has its regression test
"Allow edits by maintainers" is ticked (the box beside Create pull request)
I have signed the CLA, or will by commenting on this pull request
Not changed
After the review (2026-11-04)
See below.cargo xtask cipasses on 397c711.After the decision on rules for every account (2026-11-04)
rules.forAccount).rules.editwithaccount). Cancel leaves it under All accounts, as it was.rules.forAccountasks the owner as any change to the rules does: Settings, or Delete while a rule here that deletes permanently is switched on.The menu, and the rule's page when its folder is another account's, in light and dark:
rules_edit_tests.rs(giving, what is refused, the folder chosen again, the agent's question) andpage_tests.rs(For One Account in the menu; the page, Cancel and Save).cargo xtask cipasses on 12cde0f.Human-reviewed, AI-assisted, nobody's mailbox harmed.