Commit Graph

21 Commits

Author SHA1 Message Date
Agent Zero b0e987f790 feat: notification preferences system with plugin registry
- Add NotificationType and NotificationPreference models
- Add get_notification_types() to BasePlugin for plugin registration
- Add sync_notification_types() to PluginRegistry
- Update create_notification() to check user preferences (returns Notification|None)
- Add API endpoints: GET /types, GET /preferences, PATCH /preferences/{type_key}
- Add NotificationPreferenceUpdate schema
- Mail plugin registers 10 notification types with metadata
- Add Alembic migration 0017 for new tables + seed data
- Frontend: SettingsNotifications page with toggle switches
- Frontend: Settings tab, route, hooks for notification preferences
- i18n: notification settings keys (de/en)
2026-07-15 21:00:32 +02:00
Agent Zero c4d0ec6f7f feat: mail notification integration - 10 notification types
- mail_new: new mails during sync (max 10, then summary)
- mail_error: IMAP connection failure
- mail_auth: IMAP login failure
- mail_quota: mailbox quota >80% / >95% critical
- mail_sync_error: general sync failure per account
- mail_sent: mail sent confirmation
- mail_send_error: SMTP send failure
- mail_draft: draft saved confirmation
- mail_account: account inactive warning
- mail_folder: folder created/deleted confirmation
- All notifications non-critical (try/except wrapped)
- Import create_notification from app.core.notifications
2026-07-15 20:41:57 +02:00
Agent Zero f1a12092a0 feat: mail phase 4 - IMAP folder create/delete + auto-sync
- Add imap_create_folder() and imap_delete_folder() service functions
- Call IMAP CREATE/DELETE in folder create/delete endpoints
- Add auto_sync_all_accounts() background task (every 5 min)
- Start auto-sync loop on plugin activation via asyncio.create_task
- Frontend: working sync button with isSyncing state and toast feedback
- i18n: syncSuccess, syncFailed, syncing, autoSyncEnabled keys (de/en)
2026-07-15 20:28:11 +02:00
Agent Zero 4e100e9d33 feat: mail phase 3 - sorting (date/from/subject, asc/desc)
- Add sort_by and sort_order query params to list_mails endpoint
- Add deleted_at IS NULL filter to exclude soft-deleted mails
- Frontend: sort state in Mail.tsx, sort header bar in MailList
- Sort dropdown (Datum/Absender/Betreff) + asc/desc toggle
- fetchMails API accepts optional sortBy/sortOrder params
- i18n: 6 new sort keys (de/en)
2026-07-15 20:17:27 +02:00
Agent Zero ed1eec87dc feat: mail phase 2 - delete, move, drafts
- Add deleted_at field to Mail/MailAccount/MailFolder models
- Add DELETE /{mail_id} endpoint (soft-delete + IMAP EXPUNGE)
- Add POST /{mail_id}/move endpoint (IMAP UID MOVE + folder_id update)
- Add POST /drafts and PUT /drafts/{id} endpoints (save/edit drafts)
- Add imap_delete_mail() and imap_move_mail() service functions
- Add save_draft() and update_draft() service functions
- Frontend: deleteMail, moveMail, saveDraft, updateDraft API functions
- ComposeModal: draft mode with Save Draft button
- MailDetail: delete/move buttons, edit-draft for drafts
- Mail.tsx: bulk delete/move, move dropdown, draft handlers
- i18n: 13 new keys (de/en)
2026-07-15 19:44:46 +02:00
Agent Zero df83cee10c feat: mail phase 1 - HTML iframe display, bulk read/unread, IMAP flag sync
- Fix FlagUpdatePayload field names to match backend schema (is_seen/is_flagged)
- Replace dangerouslySetInnerHTML with sandboxed iframe (srcDoc, sandbox="")
- Add bulk mark read/unread with checkbox selection in MailList
- Add floating bulk action bar in Mail.tsx
- Add imap_sync_mail_flags() to push Seen/Flagged flags to IMAP server
- Call IMAP flag sync in PATCH /flags endpoint
- Add i18n keys for bulk actions (de/en)
2026-07-15 19:26:37 +02:00
Agent Zero 2108bdb9c2 feat: mail attachment support — sync, display, download, upload 2026-07-15 18:43:38 +02:00
Agent Zero 57b6df5357 fix: IMAP hierarchical folder sync, deduplication, folder tree display, resizable panel 2026-07-15 15:59:04 +02:00
Agent Zero e0975f4044 fix: mail UI German labels, multi-folder sync, account management, resizable panel fix 2026-07-15 14:36:45 +02:00
Agent Zero 6b6408fd25 fix: mail response fields - arrays for addresses, add from_name/body_html/sanitized_html/date
- to_addresses/cc_addresses/bcc_addresses now returned as arrays
- Added from_name, body_html, sanitized_html, date fields for frontend compatibility
2026-07-15 08:42:37 +02:00
Agent Zero be8a95995b fix: IMAP sync response parsing - extract bytearray from response lines
- aioimaplib returns bytes/bytearray lines, not tuples
- Find bytearray line containing the raw email data
2026-07-15 02:20:02 +02:00
Agent Zero 78478db625 fix: IMAP sync uid_fetch and response parsing
- Replace client.uid_fetch() with client.uid("fetch", ...) (aioimaplib API)
- Fix response parsing for aioimaplib Response object structure
2026-07-15 02:14:01 +02:00
leocrm-bot 6710480527 feat: report_generator core plugin — Jinja2 templates, CSV/Excel/JSON output, 8 API endpoints 2026-07-08 23:50:59 +02:00
leocrm-bot bb4b0ce514 feat: Core Plugin system — is_core flag, topological sort dependency resolution, deactivation protection 2026-07-07 07:44:02 +02:00
Leopoldadmin 18a0861a96 fix(plugin): discover MailPlugin in builtins __init__
Bug 1: MailPlugin was missing from imports and __all__, preventing
the plugin registry from discovering the mail plugin at startup.
2026-07-03 16:19:04 +00:00
leocrm-bot f646c597dc T06: Mail plugin backend — IMAP/SMTP, threading, templates, rules, PGP, vacation, delegates — 46 tests, 74.56% coverage
- 14 SQLAlchemy models (mail_accounts, mail_folders, mails, attachments, labels, rules, templates, signatures, etc.)
- AES-256 encrypted credential storage
- IMAP sync service (ARQ-ready, sync trigger endpoint)
- SMTP send/reply/forward service
- Mail rule engine (condition matching → move/label/flag/forward)
- Vacation auto-reply with dedup (vacation_sent_log)
- PGP integration (key import, encrypt/decrypt, contact public keys)
- Shared mailboxes with delegate access + send permissions
- HTML sanitization (nh3)
- Full-text search (ILIKE fallback, tsvector-ready)
- Thread grouping via References/In-Reply-To headers
- Template variable substitution
- Contact/company auto-linking from email addresses
- Calendar event creation from mail
- 46 tests covering all 40 acceptance criteria
- Ruff lint clean, format clean
- Full regression: 527 tests pass (0 failures)
2026-07-01 15:41:27 +02:00
leocrm-bot 7fbeeda678 T05: Calendar plugin backend — appointments + tasks + kanban + ICS + resources + recurrence — 69 tests, 86.87% coverage 2026-06-30 01:12:33 +02:00
leocrm-bot fdb41dade1 T04: DMS plugin backend — folders + files + preview + OnlyOffice + shares + search + bulk — 106 tests, 97.90% coverage 2026-06-29 20:48:58 +02:00
leocrm-bot a2452cc04b chore: fix all ruff lint errors + format — 0 errors, 306 tests pass 2026-06-29 17:43:56 +02:00
leocrm-bot 5d1850768a T11: tags plugin + permissions plugin + entity links backend — 68 tests, 66.61% coverage 2026-06-29 14:01:24 +02:00
leocrm-bot 9678344f0e T03: plugin system framework + lifecycle + migrations + event bus + DI
- Plugin registry with discover/install/activate/deactivate/uninstall lifecycle
- PluginManifest Pydantic v2 schema (name, version, dependencies, routes, events, migrations)
- BasePlugin abstract class with lifecycle hooks (on_install/activate/deactivate/uninstall)
- Migration runner with tenant_id validator (rejects tables without tenant_id)
- Event bus integration: register/unregister listeners on activate/deactivate
- Service container DI: plugins receive db, cache, event_bus, storage, notifications
- Idempotent operations (activate active=200, deactivate inactive=200)
- UI registry for frontend component registration
- 47 new tests (14 ACs + 33 unit tests), 103 total tests pass
- Migration 0003: plugins + plugin_migrations tables
- Coverage: 85.92% for plugin modules
2026-06-29 08:02:15 +02:00