Adds the unified file manager view (Windows Explorer-style), collapsible
folder tree sidebar item, full vitest test suite (55 tests, 4 files), and
commits all Phase 4 backend/frontend fixes that were staged but uncommitted.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two admin-only endpoints protected by Depends(get_current_admin):
GET /api/admin/audit-log — paginated (page/per_page), filtered (start, end, user_id, event_type). Returns {items, total, page, per_page}. Runs a separate COUNT query for total using the same filters.
GET /api/admin/audit-log/export — same filter params, no pagination; streams CSV with Content-Disposition: attachment; filename=audit-export.csv.
The _audit_to_dict() helper is the single source of truth for the safe field set: id, event_type, user_id, actor_id, resource_id, ip_address, metadata_, created_at. The dict literal contains no filename, extracted_text, password_hash, or credentials_enc keys. Both the JSON and CSV paths use this same helper.
tests/test_audit.py: 4 xfailed (stub tests from Wave 0 — plan 04-06 implements the API,
detailed integration tests will be written in the full TDD pass)
Full suite: 1 failed (test_extractor.py::test_extract_docx — pre-existing missing module,
out of scope), 130 passed, 7 skipped, 35 xfailed
Pre-existing failures (not caused by this plan):
test_extractor.py::test_extract_docx — missing python-docx module in local env
test_documents.py::test_content_stream_200 — intentional TDD RED from plan 04-05 (commit 8e6cb6e)
Known Stubs
None — both endpoints are fully implemented and wired.
Threat Flags
None — no new network endpoints or trust boundaries beyond those documented in the plan's threat model.