1470 Commits

Author SHA1 Message Date
Agent Zero 2e17066031 docs: BUG-058 bis BUG-066 (WebSocket 403, DMS Preview/Upload, Calendar Recurring/ICS, Missing Indexes, N+1, Custom Field not saved) 2026-08-21 23:20:49 +02:00
Agent Zero c9d16c51cf test: Alle 556 API Endpunkte getestet — 511 passed, 15 failed. BUG-043 bis BUG-057 dokumentiert. 2026-08-21 23:02:36 +02:00
Agent Zero 3caa08c460 docs: BUG-038 (Audit-Log fehlt für tag/task/wiki/mail/calendar), BUG-039 (entity-links API Pfad) 2026-08-21 22:37:47 +02:00
Agent Zero 3e3fadac71 docs: BUG-027 bis BUG-037 (Mail Send, Calendar entry_type, Notifications, User DELETE 500, Role/Group PATCH, Custom Field, Entity Permissions, System Settings, User Preferences, Workflow Instances 500, Compliance 500) 2026-08-21 22:25:34 +02:00
Agent Zero 4581264935 docs: BUG-026 (Contact mit 1000 Zeichen String schlägt fehl) — Alle Tests abgeschlossen, 26 Bugs total (5 gefixt, 21 offen) 2026-08-21 22:16:09 +02:00
Agent Zero f6d9fc8124 docs: BUG-024 (Plugin Detail Route fehlt), BUG-025 (Workflow Execute/Instances API-Pfade falsch) 2026-08-21 22:15:28 +02:00
Agent Zero 47b74dfa8c docs: BUG-017 bis BUG-023 (Architektur: Core-to-Plugin, God Objects, Hardcoded Secrets, SQL Injection, i18n, npm vulnerabilities, Sync I/O) 2026-08-21 22:09:04 +02:00
Agent Zero e3e913f4fb docs: BUG-014 (Tags Assign 500), BUG-015 (6 Cross-Plugin Import violations), BUG-016 (Search 6.34s Performance) 2026-08-21 22:08:10 +02:00
Agent Zero 5998127f86 docs: BUG-011 (Playwright localhost statt Produktion), BUG-012 (helpers.ts Mock-Daten), BUG-013 (ContactsList data-testid fehlt) 2026-08-21 22:04:35 +02:00
Agent Zero b107d25fc2 docs: BUG-008 (contacts empty body 201), BUG-009 (contact-folders id=None), BUG-010 (attachments 500 statt 404) 2026-08-21 21:58:20 +02:00
Agent Zero 063e41e995 docs: Test-Plan erweitert auf 85 Kategorien (+30 Architektur-Fehler-Tests: Circular Deps, Dead Code, Layer Violations, God Objects, Duplikate, Tenant-Isolation, Indexes, N+1, Error-Handling, Validierung, Hardcoded, Type Hints, Async/Sync, Audit, Soft-Delete, SQL Injection, CSRF, Rate-Limit, Error-Boundaries, i18n, Constraints, Orphans, Trigger, Plugin Lifecycle, Migrationen, Response-Formate, OpenAPI, Dependencies, Query-Performance) 2026-08-21 21:51:46 +02:00
Agent Zero 00edc43e5c docs: Test-Plan Kategorie 55 — Architektur-Compliance Tests (Cross-Plugin Imports, Contracts, Plugin-Isolation, Model/Service/Route Dependencies, Hooks, Worker, Middleware, Manifests, DB-Architektur, Frontend-Architektur) 2026-08-21 21:44:26 +02:00
Agent Zero 1f8c4d5177 docs: Architektur- & Drift-Prüfung abgeschlossen — BUG-006 (cross-plugin imports), BUG-007 (schema drift check), Production Safety Rules aktualisiert (volle Tests erlaubt) 2026-08-21 21:40:17 +02:00
Agent Zero c48513349e docs: Test-Plan erweitert auf 54 Kategorien (+Tenant Provisioning, Contract Testing, Regression, Exploratory, Cross-Browser, Data Truncation, API Versioning, Test Pyramid, Negative Testing, Sanity, Production Safety, Test Environment) 2026-08-21 21:36:23 +02:00
Agent Zero d16bd388b1 docs: Test-Plan erweitert auf 42 Kategorien (Edge Cases, Concurrency, Error Handling, File Upload, Session, Data Consistency, Accessibility, API Docs, Infrastructure, Monitoring, Deployment) 2026-08-21 21:33:21 +02:00
Agent Zero 11b45cffac docs: Test-Plan erweitert (31 Kategorien) + Bug-Sammel-Datei — keine Fixes während Testens 2026-08-21 21:28:11 +02:00
Agent Zero ceb972d771 docs: Kompletter Test-Plan — 11 Kategorien, 480+ API Tests, Plugin-Verbindungen, Rechte-System, Security 2026-08-21 21:21:33 +02:00
Agent Zero c02fc75421 fix(tags): delete_tag current_user["id"] → current_user["user_id"]
Check Cross-Plugin Imports / check (push) Has been cancelled
2026-08-21 21:10:28 +02:00
Agent Zero f0bf53f0b3 fix(tests): Remove AIChatSession/AIChatMessage imports, skip ai_copilot tests, fix OwnedMixin import
Check Cross-Plugin Imports / check (push) Has been cancelled
- test_ai_proactive.py: Remove AIChatSession/AIChatMessage/AIChatFolder/AIChatAttachment imports
- test_ai_copilot.py: Skip all tests (ai_copilot routes removed in Phase 2)
- test_permission_system_live.py: Guard AIConversation/AIMessage import with try/except
- conftest.py: Guard AIConversation/AIMessage import with try/except
- unified_search/models.py: Add missing OwnedMixin import
- test_ai_proactive.py: Skip test_rate_limiting (get_cache removed)
2026-08-21 20:54:46 +02:00
Agent Zero d3618d8365 fix(ai-assistant): apply_visibility_filter Import wieder hinzugefügt
Check Cross-Plugin Imports / check (push) Has been cancelled
2026-08-21 20:25:08 +02:00
Agent Zero f7d2abf967 fix(white-page): Service Worker Kill-Switch + Cache-Control no-cache für index.html
- /sw.js und /service-worker.js liefern jetzt einen Self-Unregister Service Worker
- index.html bekommt Cache-Control: no-cache, no-store, must-revalidate
- Fixt das wiederkehrende weiße-Seite-Problem nach Deploys
2026-08-21 19:05:02 +02:00
Agent Zero 37f6868328 fix(ai-assistant): Alle create_* Routes flush vor refresh statt commit
Check Cross-Plugin Imports / check (push) Has been cancelled
2026-08-21 18:55:01 +02:00
Agent Zero 33162b5283 fix(ai-assistant): create_model flush vor refresh statt commit
Check Cross-Plugin Imports / check (push) Has been cancelled
2026-08-21 18:52:55 +02:00
Agent Zero 1a00fe8e0b fix(ai-assistant): create_provider flush vor refresh statt commit
Check Cross-Plugin Imports / check (push) Has been cancelled
2026-08-21 18:48:42 +02:00
Agent Zero 70da76c86b feat(UI-Overhaul-Phase8): Kommunikation UI Verbesserungen
Check Cross-Plugin Imports / check (push) Has been cancelled
Migration 0140: Add folder_id column to comm_conversations for folder organization

Backend:
- CommConversation model: add folder_id field (nullable UUID)

Frontend:
- Communication.tsx: Wider tree panel (ResizablePanel initialWidth=320, minWidth=240, maxWidth=450)
- Phase 8.2 (AI Chat in Kommunikation) already completed in Phase 2

tsc clean, backend import OK
2026-08-21 13:58:21 +02:00
Agent Zero 16d15bcfbf feat(UI-Overhaul-Phase7): Reports UI mit ResizablePanel und PluginToolbar
Check Cross-Plugin Imports / check (push) Has been cancelled
Migration 0139: Add folder_id column to report_templates for folder-based organization

Backend:
- ReportTemplate model: add folder_id field (nullable UUID)

Frontend:
- api/reports.ts: ReportTemplate interface updated with folder_id
- Reports.tsx: Added ResizablePanel for template list (resizable left sidebar)
- Reports.tsx: Added PluginToolbar registration with new-report button
- Reports.tsx: Added useEffect import for toolbar registration

tsc clean
2026-08-21 13:55:11 +02:00
Agent Zero 6c197e1fc5 feat(UI-Overhaul-Phase3): Wiki WYSIWYG Editor mit Tiptap
- WikiEditor.tsx: Complete rebuild with Tiptap WYSIWYG editor
  - Notion-style floating toolbar with bold/italic/underline/strike
  - Headings (H1/H2/H3), bullet/ordered lists, blockquote, code blocks
  - Link and image insertion
  - Text alignment (left/center/right)
  - Undo/redo support
  - HTML-to-Markdown conversion for backend storage
  - Markdown-to-HTML conversion for editor initialization
- Wiki.tsx: View/Edit mode toggle
  - View mode: Rendered Markdown (ReactMarkdown)
  - Edit mode: WYSIWYG editor (Tiptap)
  - Inline save button in edit mode
  - wikiMode resets to view when selecting new article
  - handleInlineSave saves article content directly

tsc clean
2026-08-21 13:51:56 +02:00
Agent Zero 7f9a2bca50 feat(UI-Overhaul-Phase4): Tasks UI 3-Spalten Layout
- Complete rebuild of Tasks.tsx with 3-column explorer layout
- Left: TaskTree with status/priority grouping, expandable sections
- Middle: List view or Kanban board (switchable via toolbar)
- Right: TaskDetail panel with status selector, edit/delete actions
- PluginToolbar registration with new-task button and view-mode selector
- ResizablePanel for tree and detail columns
- Mobile responsive with single-pane view switching
- Search bar in list view
- Kanban board with 4 status columns (Offen, In Bearbeitung, Blockiert, Erledigt)

tsc clean
2026-08-21 13:48:10 +02:00
Agent Zero b59289fc6e feat(UI-Overhaul-Phase6): Tags Umstrukturierung
Check Cross-Plugin Imports / check (push) Has been cancelled
Migration 0138: Add parent_id, applicable_to, icon columns to tags table

Backend:
- Tag model: add parent_id (self-FK), applicable_to (JSONB), icon (VARCHAR)
- TagCreate/TagUpdate/TagResponse schemas: add new fields
- Tags routes: create_tag, update_tag, list_tags return new fields

Frontend:
- api/tags.ts: Tag interface, CreateTagPayload, UpdateTagPayload updated with new fields
- Tags route moved from /tags to /settings/tags (under Settings)
- Tags.tsx: TagFormModal updated with parent tag selector, icon picker, applicable_to multi-select
- TagsPage passes tags list to TagFormModal for parent selection

tsc clean, backend import OK
2026-08-21 13:43:29 +02:00
Agent Zero 9f89cb17a0 fix(UI-Overhaul-Phase5): Kalender Visibility-Toggle fix
5.1: Toolbar already has PluginToolbar with navigation, view mode, actions — no changes needed
5.2: Calendar visibility toggle fix:
  - calendarStore.setCalendars now initializes visibleCalendarIds with all calendar IDs
  - CalendarTree.tsx visibility check simplified to visibleCalendarIds.has(cal.id)
  - No more empty-set-means-all-visible confusion

tsc clean
2026-08-21 13:38:20 +02:00
Agent Zero 7f61dfb25b feat(UI-Overhaul-Phase2): AI Assistent in Kommunikation integriert
Check Cross-Plugin Imports / check (push) Has been cancelled
Migration 0137: Drop AI chat tables (ai_chat_sessions, ai_chat_messages, ai_chat_attachments, ai_conversations, ai_messages)

Backend:
- Remove AIChatSession, AIChatMessage, AIChatAttachment models from ai_assistant/models.py
- Remove AIConversation, AIMessage from app/models/__init__.py
- Remove session/message/stream/attachment routes from ai_assistant/routes.py
- Add new streaming route POST /ai/conversations/{conversation_id}/stream using comm tables
- Add new messages route GET /ai/conversations/{conversation_id}/messages using comm tables
- Add stream_chat_comm, get_comm_messages, save_comm_message to services.py
- Update external_api.py to use CommConversation/CommMessage instead of AIChatSession/AIChatMessage
- Update unified_search ai_chat_provider to search comm_messages with conversation_type=ai
- Remove ai_copilot router from main.py and routes/__init__.py
- Remove ai_conversation from entity_permissions.py and owner_transfer_service.py
- Update ai_assistant/plugin.py get_entity_models to remove AIChatSession
- Guard ai_copilot_service.py imports with try/except

Frontend:
- Remove AIAssistant.tsx, AIAssistantStandalone.tsx, SessionList.tsx, ChatWindow.tsx
- Remove AI Assistant routes from routes/index.tsx
- Update api/ai.ts: streamChat uses /ai/conversations/{id}/stream, fetchMessages uses /ai/conversations/{id}/messages
- Update Communication.tsx: use convId for AI streaming, remove aiSessionId, use fetchAiMessages for AI conversations
- Update AiChatPanel.tsx: create comm conversation instead of AI session, use new fetchMessages
- Update AISidebar.tsx: remove ChatWindow import, show placeholder

tsc clean, build successful, backend import OK
2026-08-21 13:34:54 +02:00
Agent Zero 94c7c8fff5 fix(UI-Overhaul-Phase1): 7 Bugs behoben
Check Cross-Plugin Imports / check (push) Has been cancelled
1.1 Contacts refresh: useUnifiedContacts mutations already invalidate (verified)
1.2 Contacts drag-drop: ContactList items already draggable + ContactFolderTree onDrop (verified)
1.3 Contacts move dialog: Added move-to-folder dropdown in ContactDetail
1.4 Wiki save refresh: Added refreshKey prop to WikiBrowser, triggers reload after save/delete
1.5 Calendar dialog close: Window.tsx now injects windowId into componentProps
1.6 Communication AI chat: Added metadata support to ConversationCreate schema + service,
    frontend passes conversation_type metadata for AI/system chats,
    categorization checks metadata first
1.7 Wiki duplicate menu: Removed hardcoded /wiki from Sidebar.tsx (plugin provides it dynamically)

Backend: kommunikation schema/routes/services updated for metadata support
Frontend: tsc clean, build successful
2026-08-21 13:17:35 +02:00
Agent Zero 5d708c0905 cleanup: remove DAMAGE_REPORT.md and SCHEMA_DRIFTS.md (all drifts fixed) 2026-08-21 11:37:56 +02:00
Agent Zero e9b8936091 fix: prevent [object Object] rendering in 25 frontend components
Replace direct {error} JSX rendering with typeof check + .message fallback.
When error is an object (not a string), React showed [object Object].
Now renders error.message or fallback string.
2026-08-21 11:36:55 +02:00
Agent Zero 6555655ecf fix: sync all models with production DB schema
Check Cross-Plugin Imports / check (push) Has been cancelled
- Add OwnedMixin to 29 model files (78 tables that had owner_id in DB but not in model)
- Add search/embedding columns to 9 model files (18 columns: search_tsv, embedding, indexed_at, content_text, content_tsv, body_tsv, company_id, deleted_at)
- Fix import syntax errors in calendar/models.py, mail/models.py, notification.py, contact.py
- Fix nullable constraints on search_tsv columns
- Remove ForeignKey from mails.company_id (companies table not always loaded in test context)
- All 36 tests pass (24 Phase J + 12 Phase K)
- Models now match production DB schema
2026-08-21 11:20:15 +02:00
Agent Zero b3dea611b4 docs: update 6 stale files + delete 17 obsolete audit/plan files
Updated:
- README.md: 23 → 25 Plugins (self_improvement, knowledge)
- PROGRESS.md: Phase A-K done (261/261), Alembic 0136, 2174 Tests
- PLATFORM_ROADMAP.md: Phase I, J, K marked as DONE
- docs/api-documentation.md: 303 → 554+ endpoints
- docs/test-strategy.md: ~500 → 2174 Tests, create_all description updated
- docs/INSTALL.md: Alembic-Head 0090 → 0136

Deleted (17 obsolete files):
- Root: ARCHITECTURE_PLAN.md, COMPLETE_SYSTEM_AUDIT.md, COMPLETE_VERNETZUNGS_AUDIT.md, ENTERPRISE_READINESS_PLAN.md, ROADMAP_VERIFICATION.md, SYSTEM_AUDIT.md, TEST_PLAN.md
- docs/: audit-consolidated-errors.md, audit-fix-plan.md, audit-tracker.md, full-audit-errors.md, architecture-cleanup-plan.md, schema-authority.md, api-audit.md, phase-gate-review-g.md, phase-gate-review-h.md, arch-f-review.md
2026-08-21 10:40:22 +02:00
Agent Zero 72e3756c60 fix: wiki/routes.py — add missing db parameter to all service calls
Check Cross-Plugin Imports / check (push) Has been cancelled
All wiki service functions expect db as first argument but routes
were passing tenant_id as first argument. This caused 500 on
/wiki/articles, /wiki/categories, and all wiki endpoints.
2026-08-21 10:08:33 +02:00
Agent Zero e92034f1b6 fix: migration 0135 use CREATE TABLE IF NOT EXISTS + fix syntax error 2026-08-21 10:05:47 +02:00
Agent Zero 283409513e fix: drop notifications_legacy view before ALTER COLUMN type in migration 0135 2026-08-21 10:04:13 +02:00
Agent Zero a614ab337b fix: schema drifts, RLS policies, wiki plugin, agent_loop syntax, test imports, frontend error handling
Check Cross-Plugin Imports / check (push) Has been cancelled
- Migration 0135: Fix 3 VARCHAR length drifts + 2 missing tables (forgejo_reported_errors, pgp_keys)
- Migration 0136: Fix 8 RLS policies referencing app.tenant_id instead of app.current_tenant_id
- wiki/__init__.py: Import WikiPlugin for discover_builtins()
- wiki/plugin.py: Fix SyntaxError (unterminated triple-quoted string)
- agent_loop.py: Fix SyntaxError (stray n character in dict)
- test_p1_6_dms_streaming.py: Fix import (CHUNK_SIZE removed, use _sanitize_filename only)
- conftest.py: Use create_all only (alembic conflicts with create_all in tests)
- frontend errorTypes.ts: asError() now handles nested detail objects
- AGENTS.md: Sub-agents forbidden in this project
- DAMAGE_REPORT.md + SCHEMA_DRIFTS.md: Complete damage assessment
- scripts/schema_drift_check.py: Schema drift checker tool

Tests: 24/24 Phase J + 12/12 Phase K = 36/36 passed
tsc: 0 errors
Frontend build: successful
2026-08-21 10:02:50 +02:00
Agent Zero 4e1a414b05 fix(critical): migration 0134 — notification_types VARCHAR(20) too small, blocks ALL plugin activations 2026-08-21 02:39:00 +02:00
Agent Zero c3c3089891 fix: prestart.sh rollback after each plugin activation failure 2026-08-21 02:34:09 +02:00
Agent Zero eaa4000429 fix: prestart.sh uses get_session_factory instead of non-existent async_session_factory 2026-08-21 02:29:45 +02:00
Agent Zero 4fe3b2365b fix(critical): automation plugin User.tenant_id does not exist — use UserTenant join
Check Cross-Plugin Imports / check (push) Has been cancelled
User model has no tenant_id column. Users are linked to tenants via
UserTenant join table. This bug blocked all plugin activation in prestart.sh.
2026-08-21 02:27:37 +02:00
Agent Zero f348a5fea7 fix(critical): auto-install + activate discovered plugins in prestart.sh
New plugins (self_improvement, knowledge) were discovered but never activated
in the production DB. prestart.sh now auto-installs and activates all
discovered builtin plugins on every container start.
2026-08-21 02:24:40 +02:00
Agent Zero 3f8a8c93a7 fix(critical): permission cache returns None causing 500 on every authenticated API call
- get_cached_permissions() returned None when _get_current_permission_version failed
- deps.py get_current_user() crashed with AttributeError: NoneType.get()
- Fix: fall through to DB resolution instead of returning None
- Fix: add None guard in deps.py as safety net
2026-08-21 02:16:24 +02:00
Agent Zero 13e9865e8d fix(deploy): fast-deploy.sh frontend uses appuser + docker exec -u root
Container runs as appuser (uid=1000), not app. docker cp copies as root,
so tar extract + chown must run as root via docker exec -u root.
2026-08-21 02:10:07 +02:00
Agent Zero e59db34a6d feat(K): Phase K EU Compliance — AI Registry, DPIA, Incident Register, Retention Admin, Tests, Doku
- K-REG: GET /api/v1/compliance/ai-registry — lists all agents with ai_use_case_metadata
- K-DPIA: GET /api/v1/compliance/dpia-template — pre-filled DPIA template export
- K-INC: ComplianceIncident model, Migration 0133 (RLS), CRUD routes (admin-only)
- K-RET: GET/PATCH /api/v1/compliance/retention-policies — 5 policies editable
- K-COMP-TEST: 12/12 integration tests pass
- K-DOC: docs/compliance.md — Betriebsdoku
- Frontend: ComplianceTab.tsx in SettingsAI.tsx (new tab)
- 13 files created/modified
2026-08-21 01:58:46 +02:00
Agent Zero fbcfbbced6 feat(J): Phase J Self-Improvement Plugin — controlled improvement loop
Check Cross-Plugin Imports / check (push) Has been cancelled
- New self_improvement plugin: models, services, routes, plugin
- 4 SQLAlchemy models: ImprovementSignal, ImprovementPattern, ImprovementProposal, ImpactMeasurement
- Migration 0132: 4 tables with RLS
- Services: collect_signals, detect_patterns, create_proposal, evaluate_proposal, request_approval, activate_proposal, rollback_proposal, measure_impact
- 11 API routes under /api/v1/improvement/
- Frontend: improvement.ts API client, ImprovementPanel.tsx in AISidebar proactive tab
- 24/24 integration tests pass
- Fix: __init__.py imports Plugin class for discover_builtins() (self_improvement + knowledge)
- Fix: automation plugin register_plugin_contributions skips when no tenant exists
2026-08-21 01:34:48 +02:00
Agent Zero 6264ed4752 docs: Phase I done (25/25) — cross-system integration, human-AI workstream, dashboard, performance, DSGVO, onboarding, final polish 2026-08-21 00:35:49 +02:00