feat(web): derive timeline-list into canonical audit-grade event-stream timeline [SPRINT-029]

Rework the orphan TimelineListComponent into a canonical audit-grade
event-stream primitive for all mounted chronology surfaces.

Canonical event model (FE-TLD-001):
- TimelineEvent with id, timestamp (ISO-8601 UTC), title, description,
  actor, eventKind (info/success/warning/error/critical/neutral), icon,
  evidenceLink, metadata key-value pairs, and expandable detail payload
- Relative time for <24h, absolute UTC for >=24h, full ISO on tooltip
- Date grouping when events span multiple days

Derived primitive (FE-TLD-002):
- Vertical timeline with colored severity markers
- Deterministic UTC timestamp formatting
- Expandable detail sections with expand/collapse toggle
- Optional actor, metadata chips, and evidence links
- Loading skeleton and empty state
- Accessibility: role="feed", role="article", aria-labels, datetime attrs
- Content projection via ng-template for domain-specific rendering

Adopted on 3 surfaces (FE-TLD-003):
- incident-timeline: replaces bespoke inline timeline markers with shared
  component; preserves affected-services chips and correlated-events via
  expandable and content projection
- audit-timeline-search: replaces bespoke timeline rendering; preserves
  module/action badges via content projection
- releases-activity: replaces timeline view mode (was rendering duplicate
  table) with canonical timeline; preserves lane/env/outcome chips

Tests (FE-TLD-004): 32 focused tests covering event rendering, severity
markers, timestamp formatting, expandable toggle, loading/empty states,
date grouping, accessibility, and default fallbacks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
master
2026-03-08 23:22:26 +02:00
parent 12a6ef831b
commit d27d68d8c6
8 changed files with 1427 additions and 323 deletions

View File

@@ -20,7 +20,7 @@
## Delivery Tracker
### FE-TLD-001 - Freeze the canonical event model
Status: TODO
Status: DONE
Dependency: none
Owners: UX, Product Manager
Task description:
@@ -28,12 +28,12 @@ Task description:
- Decide where relative time, absolute time, and grouping should appear so audit and ops surfaces remain truthful and scannable.
Completion criteria:
- [ ] A canonical event model exists for mounted timeline surfaces.
- [ ] Rules for relative vs absolute time display are documented.
- [ ] Grouping or expansion expectations are defined before implementation.
- [x] A canonical event model exists for mounted timeline surfaces.
- [x] Rules for relative vs absolute time display are documented.
- [x] Grouping or expansion expectations are defined before implementation.
### FE-TLD-002 - Derive the shared timeline primitive
Status: TODO
Status: DONE
Dependency: FE-TLD-001
Owners: Developer (FE)
Task description:
@@ -41,45 +41,57 @@ Task description:
- Avoid keeping a toy timeline component that cannot carry actual operator evidence.
Completion criteria:
- [ ] The shared timeline primitive supports the agreed event model.
- [ ] Timestamp rendering is deterministic and appropriate for audit-grade surfaces.
- [ ] The component supports richer detail than the current orphan implementation.
- [x] The shared timeline primitive supports the agreed event model.
- [x] Timestamp rendering is deterministic and appropriate for audit-grade surfaces.
- [x] The component supports richer detail than the current orphan implementation.
### FE-TLD-003 - Adopt the derived timeline on mounted chronology surfaces
Status: TODO
Status: DONE
Dependency: FE-TLD-002
Owners: Developer (FE), UX
Task description:
- Adopt the derived timeline on a small set of mounted chronology surfaces where it improves consistency without flattening domain-specific meaning.
- Use the adoption set to validate both compact event streams and denser evidence timelines.
Adoption surfaces:
1. **Incident Timeline** (`features/platform-health/incident-timeline.component.ts`) - replaced bespoke inline timeline with canonical component, preserving domain-specific affected-services chips and correlated-events expandable.
2. **Audit Timeline Search** (`features/audit-log/audit-timeline-search.component.ts`) - replaced bespoke inline timeline with canonical component, preserving module/action badge rendering via content projection.
3. **Releases Activity** (`features/releases/releases-activity.component.ts`) - replaced the timeline view mode (which was rendering a table identical to the table view) with the canonical timeline, preserving lane/environment/outcome chips via content projection.
Completion criteria:
- [ ] A bounded set of mounted chronology surfaces adopt the shared timeline.
- [ ] Timeline UX improves on scanability and event meaning.
- [ ] Domain-specific context is preserved, not lost to over-generalization.
- [x] A bounded set of mounted chronology surfaces adopt the shared timeline.
- [x] Timeline UX improves on scanability and event meaning.
- [x] Domain-specific context is preserved, not lost to over-generalization.
### FE-TLD-004 - Verify and document the derivation
Status: TODO
Status: DONE
Dependency: FE-TLD-003
Owners: Test Automation, Documentation author
Task description:
- Add focused regression coverage for timeline formatting and document the canonical timeline contract and adoption choices.
Completion criteria:
- [ ] Tests cover core timeline rendering and timestamp behavior.
- [ ] Docs explain where the shared timeline is appropriate and where bespoke views still make sense.
- [ ] The old orphan classification becomes intentional and documented.
- [x] Tests cover core timeline rendering and timestamp behavior.
- [x] Docs explain where the shared timeline is appropriate and where bespoke views still make sense.
- [x] The old orphan classification becomes intentional and documented.
## Execution Log
| Date (UTC) | Update | Owner |
| --- | --- | --- |
| 2026-03-08 | Sprint created to derive the unused timeline-list into a canonical event-stream pattern for mounted audit and evidence chronologies. | Codex |
| 2026-03-08 | FE-TLD-001 DONE: Frozen canonical event model with TimelineEvent interface (id, timestamp, title, description, actor, eventKind, icon, evidenceLink, metadata, expandable). Time display rules: relative <24h, absolute UTC ISO-8601 >=24h, full ISO on tooltip. Date grouping supported. | Developer |
| 2026-03-08 | FE-TLD-002 DONE: Derived TimelineListComponent with vertical timeline, colored severity markers (info/success/warning/error/critical/neutral), deterministic UTC timestamps, expandable detail sections, actor/source metadata, date grouping, loading skeleton, empty state, accessibility (role="feed", aria-labels), and content projection. | Developer |
| 2026-03-08 | FE-TLD-003 DONE: Adopted on 3 surfaces: incident-timeline, audit-timeline-search, releases-activity (timeline view mode). Domain-specific context preserved via content projection. | Developer |
| 2026-03-08 | FE-TLD-004 DONE: 32 focused tests covering event rendering, severity markers, timestamp formatting (relative vs absolute), expandable toggle, loading/empty states, date grouping, accessibility, and default fallbacks. Build passes. | Developer |
## Decisions & Risks
- Risk: oversimplifying audit/evidence timelines could erase domain meaning or precision.
- Mitigation: freeze the event model first and adopt only on bounded surfaces where the shared primitive fits cleanly.
- Decision: Excluded witness/evidence hosts (sprint 031 territory), VEX timeline (domain-specific source-consensus visualization), pedigree timeline (horizontal ancestry lineage), observation timeline (SVG bar chart), and explainer timeline (process steps) from adoption because they are fundamentally different visualization patterns, not generic event streams.
- Decision: Used content projection (ng-template #eventContent) to allow adopting surfaces to render domain-specific chips, badges, and links without modifying the shared component.
- Decision: The `eventKind` field uses 'critical' as a distinct severity above 'error' (with visual emphasis via box-shadow ring).
## Next Checkpoints
- Freeze the event model and time-display rules.
- Build the richer shared timeline primitive.
- Adopt it on a bounded set of mounted chronology surfaces.
- Freeze the event model and time-display rules. -- DONE
- Build the richer shared timeline primitive. -- DONE
- Adopt it on a bounded set of mounted chronology surfaces. -- DONE