Agent Zero
26feadf179
AI Assistant plugin: backend with LiteLLM, agents, tools, streaming chat
2026-07-17 00:45:24 +02:00
Agent Zero
2278ec2722
fix(mail): robust MIME filename decoding with fallback for attachments
...
- Add _decode_mime_filename() helper with Q-encoding fallback decoder
- Use helper for both new and existing email attachment saving
- Handles edge cases where email.header.decode_header fails on partially processed filenames
2026-07-16 23:30:13 +02:00
Agent Zero
0c310c5028
fix(mail): decode MIME-encoded attachment filenames during sync
...
- Decode =?utf-8?q?...?= filenames before sanitizing for both new and existing emails
- Prevents filenames like __utf-8_q_Wire_236095209372_2Epdf_2Ehtml__
- Uses email.header.decode_header + make_header for proper decoding
2026-07-16 23:23:27 +02:00
Agent Zero
881f4817be
fix(mail): save attachments for existing emails during sync
...
- IMAP sync now saves attachments for existing emails that have has_attachments=true
but no attachment records in the database (retroactive attachment saving)
- Replace silent exception catching with logger.warning for attachment save failures
- Add logging module import and logger instance
- This fixes the issue where 62 emails had has_attachments=true but 0 attachment records
2026-07-16 23:08:37 +02:00
Agent Zero
2a80aeb0af
fix(mail): sync Object error, MIME subject decoding, sticky compact pagination
...
- Fix sync error: backend returns {synced, error?} not {success, synced_count}; frontend now checks error field
- Decode MIME encoded-words (=?UTF-8?Q?...?=) in backend during IMAP sync for subject/from/to/cc headers
- Add frontend decodeMimeHeader() utility for already-stored encoded subjects (MailList + MailDetail)
- Make pagination sticky at bottom of mail list (flex-col h-full, ul scrolls, pagination flex-shrink-0)
- Make pagination compact: smaller padding (px-1.5 py-0.5), text-xs, smaller icons, tighter spacing
2026-07-16 09:40:59 +02:00
Agent Zero
467f73113c
test: 102 comprehensive RBAC tests + fix: filter soft-deleted groups in permission resolver
2026-07-16 01:58:22 +02:00
Agent Zero
a4560344c9
feat: phase 5 - mail plugin RBAC integration with delegate access levels (read/write/delete/full)
2026-07-16 00:34:36 +02:00
Agent Zero
beaca24480
feat: phase 3 - field-level permissions with plugin field definitions, service-layer filtering, 20 core field definitions
2026-07-15 23:02:30 +02:00
Agent Zero
08fd3ab72c
feat: phase 2 - migrate all route guards to require_permission (75 guards, 21 files)
2026-07-15 22:35:50 +02:00
Agent Zero
b490a62322
feat: granular RBAC system with user groups, deny-list, permission registry, system-admin, self-mod prevention
2026-07-15 21:59:45 +02:00
Agent Zero
21f47b91dc
fix: add missing created_at and deleted_at columns to notification_preferences
...
- Remove duplicate updated_at from NotificationPreference model (inherited from TimestampMixin)
- Add migration 0018 to add created_at and deleted_at columns
- Fixes 500 error on GET /notifications/types and /preferences
2026-07-15 21:13:32 +02:00
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
leocrm-bot
047b59a1f3
fix: remove broken service re-exports from __init__.py — fixes ImportError on startup
2026-07-04 18:14:30 +02:00
Leopoldadmin
d0375a990e
A: Remove address fields from contact_service — dict, create, update
2026-07-04 01:42:11 +00:00
Leopoldadmin
1708c4d94a
A: Remove address fields from company_service — dict, create, update, export
2026-07-04 01:42:10 +00:00
Leopoldadmin
7473efbb02
A: Remove address fields from contact schemas — addresses now via Address model
2026-07-04 01:42:09 +00:00
Leopoldadmin
1e3ee64431
A: Remove address fields from company schemas — addresses now via Address model
2026-07-04 01:42:08 +00:00
Leopoldadmin
f137f38cdd
C3: Fix sequence_service.py — add delete_sequence function (soft-delete with audit)
2026-07-04 01:31:19 +00:00
Leopoldadmin
d13f82ae8b
A/C1/C6: Register addresses+audit routers, add seed_default_data in lifespan
2026-07-04 01:30:08 +00:00
Leopoldadmin
4c415e8f37
C6: Add audit log route — admin-only, paginated, filterable
2026-07-04 01:30:07 +00:00
Leopoldadmin
fe2882689b
C1: Add seeds.py — EUR currency, 19% and 7% tax rates, idempotent
2026-07-04 01:30:06 +00:00
Leopoldadmin
42db39cd31
Update app/services/sequence_service.py
2026-07-04 01:30:05 +00:00
Leopoldadmin
e594e8aa16
C3: Add DELETE endpoint to sequences route (admin-only, soft-delete)
2026-07-04 01:30:04 +00:00
Leopoldadmin
a925ca01e4
B2: Currency.code — remove unique=True, add tenant-scoped UniqueConstraint
2026-07-04 01:30:03 +00:00
Leopoldadmin
1a1b02c168
C2: Add all new services to services/__init__.py exports
2026-07-04 01:30:02 +00:00
Leopoldadmin
b7c8abd7aa
A/C6: Add addresses and audit to routes/__init__.py
2026-07-04 01:30:01 +00:00
Leopoldadmin
9009135c74
B3: CSRF middleware — add X-CSRF-Token validation via Redis session lookup
2026-07-04 01:23:41 +00:00
Leopoldadmin
2bcf3e5c55
A: Add address routes — list, create, update, delete with entity filtering
2026-07-04 01:23:40 +00:00
Leopoldadmin
0a228ba982
A: Add address_service — CRUD with tenant isolation, set_default, migration helper
2026-07-04 01:23:39 +00:00
Leopoldadmin
944a90747f
A: Add Address to models/__init__.py exports
2026-07-04 01:23:38 +00:00
Leopoldadmin
25ea973c1b
A: Add Address schemas — create, update, response
2026-07-04 01:22:07 +00:00
Leopoldadmin
71e8c4aa86
A: Remove 5 address fields from Contact — addresses now via Address model
2026-07-04 01:22:06 +00:00
Leopoldadmin
bcc83c2f84
A: Remove 5 address fields from Company — addresses now via Address model
2026-07-04 01:22:06 +00:00
Leopoldadmin
426028b615
A: Add Address model — polymorphic multi-address support
2026-07-04 01:22:04 +00:00
Leopoldadmin
73601d17f8
B1: Fix duplicate __all__ in models/__init__.py — merged into single block with all models, no duplicates
2026-07-04 01:21:20 +00:00
Leopoldadmin
3bf2adff86
feat(core): remove duplicate deleted_at from Attachment (inherited from SoftDeleteMixin)
2026-07-04 00:31:47 +00:00
Leopoldadmin
30a7f603b7
feat(core): remove duplicate deleted_at from SystemSettings (inherited from SoftDeleteMixin)
2026-07-04 00:31:46 +00:00