Skip to content

History tab: show full activity timeline (tags, folders, metadata) not just content versions #16

Description

@elitea-ai

Problem

The History tab on test case detail view only shows content version changes (title, steps, description, etc). Other important actions are tracked in audit events but invisible to the user:

  • Tag additions/removals
  • Folder (suite) additions/removals
  • Metadata-only changes (status, owner, execution_type, test_category)

Users have no visibility into the full lifecycle of a test case.

Current State

What's shown in History tab:

  • TestCaseVersion records — immutable snapshots created when content fields change
  • Version diff viewer (side-by-side comparison)
  • Author, timestamp, change_reason per version

What's written to test_audit_events but NOT shown:

  • tags_modified — tag add/remove
  • test_cases_added / test_case_removed — folder membership changes
  • updated — metadata-only changes (status, owner, etc)
  • moved — bulk move between folders

Solution

Extend the History tab to show a unified timeline combining:

  1. Version changes (existing) — with diff viewer
  2. Audit events for this test case — rendered as timeline entries

Timeline entry types:

Event Display
version_created "v2 created by @user — Title changed, 3 steps modified" (with Diff button)
updated "Status changed from Draft → Ready by @user"
tags_modified "Tags: +regression, -draft by @user"
test_cases_added "Added to suite 'Smoke Tests' by @user"
test_case_removed "Removed from suite 'Old Suite' by @user"
moved "Moved to folder 'Regression' by @user"
created "Test case created by @user"

Implementation Notes

Backend:

  • New API endpoint: GET /test-cases/{test_case_id}/history — returns merged timeline of versions + audit events, sorted by timestamp
  • Or: GET /test-cases/{test_case_id}/audit-events — returns audit events only (frontend merges with versions)

Frontend:

  • TestCaseDetail.jsx History tab (line 762) — replace version-only list with unified timeline
  • Keep the Diff button/viewer for version changes
  • Simpler display for non-version events (inline text, no diff needed)

Acceptance Criteria

  • History tab shows all event types, not just content versions
  • Events are sorted chronologically (newest first)
  • Version events retain Diff viewer functionality
  • Non-version events show actor, timestamp, and change summary
  • Tag changes show which tags were added/removed
  • Folder changes show suite name

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestplannedTriaged and approved for implementation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions