# Task 022 — CRM Timeline Completion & Activity Feed

## Status: done

## Scope

Extend existing `Activity` model and `ActivityTimeline` — do not rebuild.

## Deliverables

- [x] Unified timeline event types (campaign, sequence, inbox, AI, CRM, pipeline, tasks, notes)
- [x] Automatic logging wired in services
- [x] Company / Person / Lead timeline tabs complete
- [x] Pipeline stage transitions in timeline (`pipeline_stage_changed`)
- [x] Sequence history visible on person/lead timelines
- [x] Manual notes (`POST /api/timeline/notes`, إضافة ملاحظة)
- [x] Task create/complete → timeline events
- [x] Global `/activities` feed
- [x] In-tab search + category filters
- [x] Activity summary counters on profiles
- [x] AI classification metadata in timeline entries
- [x] Documentation

## Acceptance

- Existing timeline intact
- lint + build pass

See [docs/27-crm-timeline-completion.md](../docs/27-crm-timeline-completion.md).
