Files
libra/docs/tasks/4-2.md
T
Naser Mansour 0f9d12c3cf Prepare project for pipeline takeover: task tracker, UX doc, CLAUDE.md pointers
Adds docs/tasks/ (16 epics + 102 stories converted to task/subtask files with
statuses.md as the new status source of truth) and docs/ux-design.md
(retrospective design-system reference), and points CLAUDE.md at them.
docs/prd.md and docs/architecture.md are kept as BMAD wrote them; the legacy
docs/stories/, docs/epics/, docs/qa/gates/ and .bmad-core/ stay in place as
historical/traceability records, superseded but not deleted.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-27 22:02:23 +03:00

41 lines
1.7 KiB
Markdown

---
id: 4-2
title: 4-2 Timeline Updates Management
status: QA Review
date: 2026-09-27
parent: 4
---
## Description
As an admin, I want to add and edit updates within a timeline, So that I can keep clients informed about their case progress. Context: Integrates with: timeline_updates table, timelines table; Technology: Livewire Volt, rich text editor (Trix recommended); Follows pattern: Nested CRUD pattern. Full implementation history: docs/stories/story-4.2-timeline-updates-management.md
## Acceptance Criteria
- [ ] Add new update to timeline
- [ ] Update text content (required)
- [ ] Rich text formatting supported:
- [ ] Timestamp automatically recorded
- [ ] Admin name automatically recorded
- [ ] Client notified via email on new update
- [ ] Edit existing update text
- [ ] Edit history preserved (updated_at changes)
- [ ] Cannot change timestamp or admin
- [ ] Updates displayed in chronological order
- [ ] Each update shows:
- [ ] Visual timeline representation
- [ ] HTML sanitization using `mews/purifier` package
- [ ] Audit log for add/edit operations via AdminLog
- [ ] Feature tests for all operations
- [ ] Can add update with valid text (min 10 chars)
- [ ] Cannot add update with empty text - validation error
- [ ] Cannot add update with text < 10 chars - validation error
- [ ] HTML is sanitized (script tags, XSS vectors removed)
- [ ] Client receives notification email on new update
- [ ] Audit log created when update is added
- [ ] Audit log created when update is edited (includes old/new values)
- [ ] Updates display in chronological order (oldest first)
- [ ] Admin name and timestamp automatically recorded
- [ ] Edit preserves original created_at, updates updated_at
- [ ] Cannot change timestamp or admin on edit