Commit Graph

138 Commits

Author SHA1 Message Date
Agent Zero e07ffc9aee fix: SaveViewDialog speichern button template literal className fix 2026-07-28 14:21:44 +02:00
Agent Zero 69c1962995 feat: SaveViewDialog with selectable components (folder, view, filter, group, sort) 2026-07-28 14:09:15 +02:00
Agent Zero cd1e15eb09 feat: save/load/delete filters directly in FilterPanel dropdown 2026-07-28 13:59:15 +02:00
Agent Zero 65bb9c9866 fix: print and open-standalone icon-only, right-aligned in toolbar 2026-07-28 12:42:49 +02:00
Agent Zero 7194240a32 fix: keep tree structure in multi-select, checkbox+chevron, separate toggle/expand 2026-07-28 12:37:04 +02:00
Agent Zero 04bd5b1c09 fix: multi-select icon before label, checkboxes not indented in multi-select mode 2026-07-28 12:31:18 +02:00
Agent Zero 78738f5aa9 feat: folder multi-select mode with checkboxes, shows contacts from multiple folders 2026-07-28 12:22:30 +02:00
Agent Zero 05cc51609b feat: GroupPanel + toolbar reorder (New, View, Search, Filter, Sort, Group) 2026-07-28 10:34:30 +02:00
Agent Zero 11ffffcb44 feat: SmartSuite-style SortPanel with multi-field priority sorting, all contact fields 2026-07-28 10:26:22 +02:00
Agent Zero e95875464b feat: SmartSuite-style FilterPanel with multi-condition AND/OR, all contact fields, context-sensitive ordering 2026-07-28 09:19:02 +02:00
Agent Zero 7962d34fcf toolbar: unified filter+sort dropdown with sections, fixed positioning, iconOnly support 2026-07-28 02:16:03 +02:00
Agent Zero bbaded656f fix: toolbar dropdown z-index and overflow for visibility 2026-07-28 00:50:39 +02:00
Agent Zero 722335c923 contacts toolbar: consolidate views and filters into dropdowns 2026-07-28 00:45:55 +02:00
Agent Zero e1e7405821 fix: match mail folder tree styling - remove min-h-touch, font-medium only on active, motion-safe transition 2026-07-27 23:55:01 +02:00
Agent Zero ee38b200f8 fix: tighten folder tree spacing + collapsible search icon in toolbar 2026-07-27 23:46:16 +02:00
Agent Zero 9a922f8abb feat: color picker panel with 18 preset colors + native color input + hex field 2026-07-27 17:31:42 +02:00
Agent Zero c670084420 fix: dropdown as portal in document.body with z-9999 — no longer hidden by sidebar 2026-07-27 17:22:24 +02:00
Agent Zero 01040201ef fix: button as sibling of draggable div — desktop drag no longer blocks click 2026-07-27 17:10:00 +02:00
Agent Zero 4a3e4cd0a4 fix: restore drag-and-drop + onPointerDown stopPropagation on button — both work on all resolutions 2026-07-27 16:57:48 +02:00
Agent Zero 4c951c9c61 fix: remove draggable from folder item — button click works on all resolutions 2026-07-27 16:48:49 +02:00
Agent Zero 470e183ade fix: button in normal flow, only inner span draggable — fixes dropdown position and icon shift 2026-07-27 16:35:13 +02:00
Agent Zero bb48793217 fix: move more-options button outside draggable div to fix click
- Button was inside draggable div — browser started drag instead of click
- Button is now absolutely positioned outside the draggable div
- Outer div has position:relative for correct button placement
- Spacer span reserves space for the button in the layout
- Works on all screen sizes (desktop, tablet, mobile)
2026-07-27 16:28:24 +02:00
Agent Zero 75505ab5bf fix: folder dropdown button not working — drag interference + button too small
- Button: draggable={false}, onMouseDown stopPropagation prevents drag swallow
- Button: larger (p-1.5, w-4 h-4), opacity-70, rounded hover bg
- Parent onDragStart: checks if target is Optionen button, prevents drag
- handleMoreClick: currentTarget fallback to closest('button')
- type='button' prevents accidental form submit
2026-07-27 15:58:48 +02:00
Agent Zero 81ff27b76a feat: contact folder drag-and-drop, mobile dropdown, folder-in-folder move
- Folders are draggable: drag folder into another folder (parent_id update)
- Circular reference prevention: isDescendantOrSelf() check
- Root drop zone: drag folder to root unparents it (parent_id=null)
- MoreVertical button: opacity-60 for mobile visibility (was opacity-0)
- Dropdown: viewport-clamped positioning + maxHeight with scroll
- ContactList already had draggable contacts (no changes needed)
2026-07-27 14:32:42 +02:00
Agent Zero 1916243d36 fix: restore drag-and-drop in ContactFolderTree with dropdown menu (rename/color/pin/delete) 2026-07-27 09:52:55 +02:00
Agent Zero 47dfdfb794 fix: ContactFolderTree drag-drop removed, dropdown menu with rename/color/pin/delete; ContactsList toolbar moved to plugin toolbar 2026-07-27 09:47:22 +02:00
Agent Zero 1ba702f6fe fix: report API errors (422, 404, 5xx, network) and React errors to Forgejo error reporter
- client.ts: logError() import added, API error interceptor now reports to /api/v1/errors
- ErrorBoundary.tsx: logError() import added, React rendering errors now reported
- 401 (auth) and 403 (permission) errors are NOT reported (expected behavior)
- 422 (validation), 404 (not found), 5xx (server), 0 (network) ARE reported
2026-07-26 23:45:59 +02:00
Agent Zero b6e3afd28b Phase 4 + M5: Low-priority fixes and frontend component integration
M5: TagBadge integrated into ContactDetail (replaces plain Badge)
M5: EntityHistoryPanel integrated into ContactDetail (timeline section)

L1: Replace document.write() with Blob URL in print.ts (XSS-safe)
L2: AI UI Control feedback storage capped at 100 entries (FIFO eviction)
L3: Backup & Restore documentation added to DEPLOY.md

Verified: Backend import OK, TypeScript 0 errors
2026-07-26 21:29:37 +02:00
Agent Zero 808da564f3 fix: improve error handling and stability - no logout on transient errors, add ErrorBoundary, global error logging 2026-07-26 12:18:52 +02:00
Agent Zero 79ece0fe2e Phase 4: Webhooks, Backup/Restore UI, Onboarding/Tutorial
- Webhooks Backend: model, schema, service (HMAC-SHA256, httpx), routes, event bus dispatcher, migration 0042
- Webhooks Frontend: SettingsWebhooksPage (CRUD, test button, event multi-select), API client
- Backup/Restore Backend: model, schema, service (pg_dump/pg_restore), routes (admin-only), migration 0043
- Backup/Restore Frontend: SettingsBackupPage (create, list, restore dialog with RESTORE confirmation, auto-refresh)
- Onboarding: OnboardingTour (8 steps, custom CSS overlay), WelcomeDialog, onboardingStore (zustand + localStorage)
- Onboarding integrated into AppShell
- Routes: /settings/webhooks, /settings/backup registered
- Settings nav: Webhooks, Backup & Restore entries added
- Migration conflict fixed: 0042_webhooks → 0043_backups chain
2026-07-26 03:17:40 +02:00
Agent Zero 10dcc8ae90 Phase 3: Saved Filters UI, Entity History UI, Activity Timeline, API Docs Link
- Saved Filters: SavedFilterBar (dropdown, apply, delete), SaveFilterDialog (name + save)
- Entity History: EntityHistoryPanel (timeline, restore, undo), HistoryDiff (field changes visual)
- Activity Timeline: ActivityTimelinePage (grouped by day, pagination), ActivityFilter (user/entity/action/date)
- API Docs Link: TopBar user menu entry, SettingsSystem Entwickler section (Swagger, ReDoc, OpenAPI)
- Routes: /activity registered
- Menu items: Aktivitäten added to automation plugin manifest
2026-07-26 03:08:26 +02:00
Agent Zero a7e3890634 Phase 2: Tags UI, Custom Fields UI, Notifications Bell
- Tags UI: TagsPage (CRUD, color picker), TagBadge, TagSelector (multi-select, inline creation)
- Custom Fields Backend: model, schema, service, routes, migration 0041
- Custom Fields Frontend: CustomFieldsPage (definitions CRUD), CustomFieldRenderer (dynamic field rendering)
- Custom Fields: _collect_custom_field_definitions() extended to merge DB definitions with plugin definitions
- Notifications Bell: NotificationBell (30s polling, unread badge), NotificationDropdown, NotificationItem
- NotificationBell integrated into TopBar
- Routes: /tags, /settings/custom-fields registered
- Settings nav: Custom Fields entry added
- Menu items: Tags added to automation plugin manifest
2026-07-26 03:02:25 +02:00
Agent Zero a3a5a10514 Phase 1: Workflows UI, Dedup/Merge UI, Import/Export UI, Print/PDF
- Workflows UI: full page with definitions/instances tabs, step editor, instance detail with approve/reject
- Dedup/Merge UI: duplicate detection, side-by-side comparison, field-level merge dialog, merge history
- Import/Export UI: import wizard (dry-run preview), export panel (CSV/XLSX), backend export route added
- Print/PDF: PrintButton component, print.css, integrated in Contacts/Calendar/Reports/ContactDetail
- Backend: GET /api/v1/export endpoint, export_companies_csv() service function
- Routes: /workflows, /contacts/dedup, /import-export registered
- Menu items: Workflows, Import/Export, Duplikate added to automation plugin manifest
- IMPLEMENTATION_PLAN.md: audit-corrected plan for all 14 remaining features
2026-07-26 02:35:44 +02:00
Agent Zero 727d86614e Security fixes: P0-P2 complete (22 fixes)
P0 (7): Auth-bypass removed, migrations fixed, plugin-upload disabled, RLS FORCE+WITH CHECK, plugin double-registration fixed, persistent volume, domain removed
P1 (11): User/tenant model, Redis centralized, worker separated, transactional outbox, XSS fixed, DMS chunked streaming, permissions unified, password reset, metrics secured, config/docs fixed, cross-tenant FK
P2 (4): Contact model normalized, cross-imports reduced 94%, commands+state machines for contacts/dms/mail/calendar, SPA path-traversal

8 new migrations, 99 unit tests, 13 commands, 8 contracts, 72 files changed
2026-07-25 21:03:46 +02:00
Agent Zero aaa7406929 perf: Fix all 7 code analysis issues
HIGH (Performance):
- Replace 8 sync file operations with aiofiles in async context (storage, mail,
  report_generator, dms_bridge, ai_assistant)
- Frontend bundle splitting: manualChunks for react-vendor, ui-components, tanstack,
  markdown, icons, utils, i18n (ui chunk 936K → ~19K)

MEDIUM (Architecture):
- Worker circular deps: Replace direct plugin imports with job_registry.py pattern
  (register_job/get_all_jobs, importlib-based lazy loading)
- App-wide ErrorBoundary: New ErrorBoundary.tsx component, wrapped in AppShell
  and all standalone routes

LOW (Code Quality):
- N+1 query fix: selectinload(Contact.contact_persons) in list_contacts()
- O(n²) dedup fix: SQL GROUP BY for email/phone duplicates, Dict-based name grouping
- Response format standardization: 7 routes converted from plain arrays to
  {items: [...], total: N} format
2026-07-25 09:19:32 +02:00
Agent Zero 868bb274ef feat: standalone buttons for all plugin pages + window system for modals
Standalone buttons:
- Add ExternalLink button to Dms, Calendar, Mail, ContactsList toolbars
- Create standalone pages for each (no sidebar, full screen)
- Add standalone routes outside ProtectedRoute

Window system for modals:
- AppointmentModal -> AppointmentEditForm + openWindow()
- ComposeModal -> MailComposeForm + openWindow()
- FilePreviewModal -> FilePreviewContent + openWindow()
- Calendar, Mail, Dms use openWindow() instead of modal state
2026-07-25 00:21:37 +02:00
Agent Zero 35e87b5d51 feat: window management system with minimize, fullscreen, and AI chat split
- Window manager store (Zustand) for managing open/minimized/fullscreen windows
- Window component with header controls: KI-Chat toggle, fullscreen, minimize, close
- AI chat panel with streaming chat via existing /ai/sessions API
- WindowContainer renders all non-minimized windows
- TopBar shows minimized windows as clickable pills
- ContactEditForm extracted from ContactEditModal for window rendering
- ContactsList and ContactDetailPage use openWindow() instead of modal state
- Draggable windows with z-index management
2026-07-24 23:42:53 +02:00
Agent Zero 8b3873d676 feat: restructure settings menu + add automation/agents to topbar
TopBar:
- Add Automation and Agenten to user dropdown menu

Settings restructure:
- Stammdaten: Firmendaten, Adressen (CRUD), Konten (CRUD), Sonstige Daten
- Nutzerverwaltung: Benutzer, Rollen, Gruppen as tabs
- System: Menü, Theme, Plugins as tabs
- Reduce nav items from 15+ to 8
- Add end prop to all settings NavLinks
2026-07-24 22:35:35 +02:00
Agent Zero b4121082f7 fix: add end prop to all NavLinks to prevent prefix-matching activation 2026-07-24 22:13:53 +02:00
Agent Zero 046f00e464 fix: remove mail settings, automation/agents from sidebar + settings from bottom
- Remove Einstellungen from E-Mail group (accessible via Settings page)
- Remove Automation and Agenten from sidebar (accessible via Topbar profile menu)
- Remove Settings from sidebar bottom items
2026-07-24 22:04:45 +02:00
Agent Zero e017da9d12 feat: navigation restructure + drag-and-drop menu ordering
Navigation:
- Remove Plugins header from sidebar
- Merge static items and plugin items into unified sorted list
- Group related menu items (Dateien, E-Mail, Kalender, Automation)
- German labels for all menu items
- Sort by order field, alphabetical fallback for ties

Drag-and-Drop Menu:
- New backend endpoints: GET/PUT /api/v1/users/me/menu-order
- Store menu order in user preferences JSONB field
- New SettingsMenuOrder page with @dnd-kit drag-and-drop
- New Settings tab: Menu ordering
- Sidebar reads saved menu order and sorts accordingly
- Reset to default option
2026-07-24 21:46:27 +02:00
Agent Zero 4b9cb5a098 fix: Zustand selector anti-pattern causing infinite re-render + plugin loader path
- Fix usePluginStore(s => s.getAll*()) selectors that returned new arrays
  on every call, causing infinite re-render loops and permanent spinner
- Affected: Sidebar, Settings, ContactDetail, ContactEditModal, PluginRouteRenderer
- Use usePluginStore(s => s.manifests) + useMemo instead
- Fix PluginRouteRenderer: show spinner instead of null when manifests loading
- Fix PluginLoader: @/ path replacement ../ -> ../../ for correct dynamic imports
2026-07-24 19:29:48 +02:00
Agent Zero 2fd4bd123d fix: restore API response formats + ai-ui-control ws + profile fields
- Restore {plugins: [...], total: N} for /plugins and /plugins/active-manifests
  (flat array broke frontend PluginRegistry → no menu items → empty UI)
- Restore {count: N} for /notifications/unread-count
  (scalar broke frontend notification badge)
- Fix ai_ui_control: on_install → on_activate for WS manager registration
  (WS 403 on every reconnect after container restart)
- Fix double /api/v1 prefix in useAIContext.ts and SuggestionBadge.tsx
- Add first_name, last_name, avatar_url to User model + migration 0032
- Extend UserUpdate schema with profile + password change fields
- Extend user_service.update_user with profile fields + password change
- Extend frontend UserResponse/UserUpdate types
2026-07-24 17:17:53 +02:00
Agent Zero ecab11c19a fix(dms): add onRangeSelect prop to FileExplorerProps to fix TSC errors 2026-07-24 10:23:23 +02:00
Agent Zero 924d28cbf2 fix: resolve menu duplicates, route prefix conflicts, API path bugs, permissions.deleted_at, remove test plugin from production 2026-07-24 08:19:45 +02:00
Agent Zero 761f8d88dc Phase 6.6: Mail-Settings-Forms on RHF + Zod
- MailSettings account form: RHF+Zod (email valid, password required, imap/smtp host required, ports numeric)
- SignatureManager: RHF+Zod (name required, body_html, is_default)
- RuleEditor: RHF+Zod (name required, priority numeric)
- LabelManager: RHF+Zod (name required, color optional)
- VacationResponder: RHF+Zod (enabled, dates with end>start validation, subject, body)
- Error display under each field
- Preserved all existing functionality: CRUD, templates, variables
- Added 2 validation tests for MailSettings account form
2026-07-24 00:38:40 +02:00
Agent Zero 3e8038b75e Phase 6.5: Tag-Forms on RHF + Zod
- TagPicker create-tag form: RHF+Zod (name required, color optional with default)
- Error display under name field
- Color picker uses setTagValue from RHF
- Preserved all existing functionality: search, assign, unassign
- Added 2 validation tests (empty name, valid submit)
2026-07-24 00:33:57 +02:00
Agent Zero eb2f37b2bc Phase 6.4: DMS-Forms on RHF + Zod
- Dms.tsx folder-create: RHF+Zod (name required)
- ShareDialog add-share: RHF+Zod (shareId required, shareType/permission kept as useState)
- Error display under each field
- Preserved all existing functionality: folder tree, file grid, share links
- Added 2 validation tests for ShareDialog (empty shareId, valid submit)
2026-07-24 00:32:00 +02:00
Agent Zero 2931a850c0 Phase 6.2: AppointmentModal on RHF + Zod
- Migrated AppointmentModal from useState to React Hook Form + Zod
- Zod schema: title (required), calendar_id (required), start_at/end_at (required, end > start)
- Object-level superRefine for date validation (end must be after start)
- Error display via Input error prop and summary error div
- Preserved all existing functionality: create, edit, delete, prefill
- Added 3 validation tests (empty title, end before start, valid submit)
2026-07-24 00:22:31 +02:00
Agent Zero d4aa661164 Phase 6.1: ComposeModal on RHF + Zod
- Migrated ComposeModal from useState to React Hook Form + Zod
- Zod schema: to (required, email list), cc/bcc (optional, email list), subject (required), body
- Object-level superRefine for comma-separated email validation
- Error display under each field via Input error prop
- Preserved all existing functionality: attachments, signatures, templates, drafts
- Added 4 validation tests (empty to, invalid email, empty subject, valid submit)
2026-07-24 00:21:09 +02:00