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:
- Version changes (existing) — with diff viewer
- 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
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:
Users have no visibility into the full lifecycle of a test case.
Current State
What's shown in History tab:
TestCaseVersionrecords — immutable snapshots created when content fields changeWhat's written to
test_audit_eventsbut NOT shown:tags_modified— tag add/removetest_cases_added/test_case_removed— folder membership changesupdated— metadata-only changes (status, owner, etc)moved— bulk move between foldersSolution
Extend the History tab to show a unified timeline combining:
Timeline entry types:
version_createdupdatedtags_modifiedtest_cases_addedtest_case_removedmovedcreatedImplementation Notes
Backend:
GET /test-cases/{test_case_id}/history— returns merged timeline of versions + audit events, sorted by timestampGET /test-cases/{test_case_id}/audit-events— returns audit events only (frontend merges with versions)Frontend:
TestCaseDetail.jsxHistory tab (line 762) — replace version-only list with unified timelineAcceptance Criteria