- imap_sync_folder now searches only UID > max_known_uid instead of ALL
- First sync gets last 50, subsequent syncs only get new mails
- UI loads cached mails immediately from DB, sync runs in background
- Folder counts updated after sync
- New imap_sync_folder function: syncs single folder quickly for live use
- New POST /mail/folders/{folder_id}/sync route
- Frontend: syncFolder API + called on every folder selection
- Auto-sync interval reduced from 300s to 60s
- Sent mail IMAP APPEND already uploads full body via msg.as_bytes()
- imap_delete_mail: use stored imap_uid instead of Message-ID search, raise on failure
- imap_move_mail: same imap_uid fix, raise on failure
- New MailSyncQueue model + migration 0007 for pending IMAP operations
- delete_mail route: queues failed IMAP delete for retry
- move_mail route: queues failed IMAP move for retry
- process_sync_queue: retries pending delete/move operations in auto-sync loop
- Auto-sync loop: processes sync queue before pulling new mails
- Restore soft-deleted mails if they still exist on IMAP server during sync
- Upload sent mails to IMAP Sent folder via APPEND after SMTP send
- Plugin version bumped to 1.2.0
- Mail list: title and subject font text-xs -> text-sm
- Remove Termin (create-event) toolbar button
- Rename Flagge -> Markierung with select dropdown (star, flag, bookmark, important, question)
- Backend: add flag_type column to Mail model + migration 0006
- Backend: flag_type in MailFlagsUpdate schema, update_flags route, mail_to_response
- Frontend: flag_type in Mail interface, FlagUpdatePayload, MailList symbol display
- MailFolderTree: compact styling matching AI assistant SessionList (py-1, text-sm, depth*12+8 padding, no space-y)
- Added right-click context menu on folders with "Ordner leeren" entry
- Backend: POST /mail/folders/{folder_id}/empty soft-deletes all mails in folder
- Frontend API: emptyFolder() function added to mail.ts
- Mail.tsx: onFolderEmptied callback reloads mails and folders
- Create app/core/worker.py with WorkerSettings for ARQ
- Register all job functions: reindex, index_*, embedding_batch, deep_analysis
- Update prestart.sh to start ARQ worker in background before uvicorn
- Worker runs with max_jobs=10, job_timeout=300s
- Ollama Cloud has no embedding endpoint, OpenRouter does
- text-embedding-3-small with dimensions=768 matches DB vector(768) column
- API_KEY_OPENROUTER env var is primary, DB provider is fallback
- Added dimensions parameter for text-embedding-3 models
- mail.ts: add explicit types to decodeMimeHeader callback params
- SessionList.tsx: use React.MouseEvent instead of nativeEvent
- ComposeModal.tsx: construct name from first_name + last_name
- MailDetail.tsx: destructure onReply/onForward from props
- RichTextEditor.tsx: use SetContentOptions object instead of boolean
- MailSearchBar.tsx: add optional value prop to interface
- EmptyState.tsx: add optional children prop
- Badge.tsx: add secondary variant to BadgeVariant, variantClasses, dotColors
- ConfirmDialog.tsx: add optional children prop
- hooks.ts: extend SearchResult type to include mail/file/event
- Remove duplicate vi.mock(@/api/hooks) in SettingsRoles.test.tsx that overrode forceUpdate logic
- SettingsRoles mock: use vi.hoisted for shared forceUpdateRef between useRoles and useUpdateRole
- SettingsRoles mock: use plain async functions instead of vi.fn().mockImplementation for mutations
- query_understanding.py: get API key/base_url/provider_type from ai_providers DB
- embedding.py: get API key from DB, pass db+tenant_id through call chain
- routes.py: pass db+tenant_id to llm_analyze_query and llm_aggregate_results
- search_engine.py: pass db+tenant_id to generate_embedding
- unified_search/jobs.py: pass db+tenant_id to generate_embedding
- Fix all default model names: ollama/deepseek-v4 -> ollama/deepseek-v4-flash
- Ollama Cloud has no embedding endpoint; embedding calls fail gracefully
- _get_llm_api_key now returns provider_type
- Model string built with provider_type prefix (openai/deepseek-v4 instead of ollama/deepseek-v4)
- api_base set from provider.base_url (https://ollama.com/v1)
- Fixes: litellm tried localhost:11434 instead of Ollama Cloud
- ai_proactive now reads API key from ai_providers table (like ai_assistant)
- Falls back to API_KEY_OLLAMA_CLOUD env var if no provider found
- Fixes: proactive engine could not generate suggestions because API key was empty
- AISidebar: full height, right of TopBar and Toolbar (all pages except AI Assistant)
- AISidebar: collapsed mode shows narrow 48px icon strip with KI button
- AISidebar: expanded mode uses ResizablePanel with drag-to-resize (240-600px)
- AppShell: moved AISidebar outside inner content container to full-height flex
- uiStore: renamed aiSidebarOpen→aiSidebarCollapsed (default: true=collapsed)
- TopBar: AI button highlights when sidebar is expanded
- MailFolderTree: reduce padding/gap ~25% (py-2→py-1, gap-2→gap-1.5)
- MailList: text-sm→text-xs for from and subject lines
- ResizablePanel: use DOM ref for width during drag instead of React state
- No re-renders during drag, only single setWidth on mouseup
- panelRef on outer div, contentRef on inner div
- pointer-events:none on content during drag
- contain:strict on content area