Repository navigation
Conversation
…kJunk action - Introduce first-class ContactFolder (id, name, parent, origin) and Contact::folder (kept separate from colour Contact::categories), with CRUD, subtree/path helpers, and Mailbox::repair() validation. - Add Condition::FromInContacts / FromNotInContacts(ContactBook) with optional account, folder, and category targeting, wired through Matching::in_contacts. - Add Action::MarkJunk (moves message to the account's Junk E-mail folder). - Reject local-only contact conditions and MarkJunk when serializing Graph server rules.
- Add people.newFolder, people.renameFolder, people.deleteFolder, people.listFolders, people.move, and view.peopleFolder (with ViewState::people_folder). - Add rules.edit to update local rules in place (preserving position, enabled state, and account), plus parsing/server_cannot support for fromInContacts, fromNotInContacts, and markJunk. - Classify all new commands for agent access and binding, and add engine tests.
- Add Contact Folder switcher, New/Rename/Delete actions, ribbon button, Move to Folder context menu, and Folder picker in the contact form (independent of Categories). - Add in-place rule editing (Edit button -> Save Rule), Sender is/isn't in contacts conditions (targeting all contacts, account, or Contact folder), and Mark as junk action. - Update i18n catalogues (xtask i18n) and UI tests.
|
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. |
|
Every author has signed the CLA. Thank you. |
|
|
I have read the MailCraft CLA and I agree to it. |
|
@marian001, thanks for this, and sorry nobody answered your question. Parts of it are already taken by others: Human-reviewed, AI-assisted, nobody's mailbox harmed. |
|
Thanks, @benandez — that plan works for me.
I'll leave this draft as it is until the split PRs exist. |



Summary
Opened as a Draft PR for early feedback/review (rebased onto current
main/ 0.15.0). Note that parts of this overlap with claimed issues (#1275, #992); happy to split or adjust based on maintainer direction.What's included
First-class Contact Folders (
crates/model,crates/engine,crates/ui-egui)ContactFolder { id, name, parent: Option<Id>, origin: Origin }onMailbox+Contact::folder: Id(0= default / unfiled), kept strictly separate from colourContact::categories.parent), path formatting (Parent/Child), subtree deletion (contacts are moved to the parent or0, never lost), andMailbox::repair()validation.people.newFolder,people.renameFolder,people.deleteFolder,people.listFolders,people.move, andview.peopleFolder.Contact folder · <path>), New / Rename / Delete actions, ribbon button,Move to Foldercontext menu, andFolderselector in the contact form.Contact-based rule conditions &
MarkJunkaction (crates/model,crates/net,crates/engine,crates/ui-egui)Condition::FromInContacts(ContactBook)andCondition::FromNotInContacts(ContactBook)(targeting all contacts, an account, aContactFolderid, or a category), wired throughMatching::in_contacts.Action::MarkJunk(moves matching messages to the account's Junk E-mail folder).server_cannotand Graph rule serialization with clear reasons.Sender is in contacts/Sender isn't in contactsandContact folder · <path>.In-place rule editing (
crates/engine,crates/ui-egui)rules.editupdates local rules in place (preserving list order, enabled state, and account; refuses server-kept rules).Save Rule/Cancel).Verification
cargo +1.95 test -p mailcraft-model --lib(719 passed)cargo +1.95 test -p mailcraft-net --lib -- rules(20 passed)cargo +1.95 test -p mailcraft-engine --lib -- rules people agent(392 passed)cargo +1.95 test -p mailcraft-ui-egui --lib -- rules people address_book contact dialog agent_gate_binding_tests a_held_key_deletes_one_rule(247 passed)cargo +1.95 test -p mailcraft -p mailcraft-cli --no-run(compiled cleanly)cargo +1.95 fmt --all --check,xtask i18n --check,xtask spdx,xtask layers,xtask test-files,xtask wasm-clock— all green.