feat(tests): remove Time Log, move Tempo sync to Phase Timeline

- Remove WorklogTimeline (manual time log) from test detail page
- TestPhaseTimeline now accepts testId, fetches its own worklogs,
  and shows Tempo sync status on the Red Team Execution row:
    • green badge if already synced (with worklog ID tooltip)
    • 'Sync to Tempo' button (blue) if not yet synced
- Add POST /tests/{id}/sync-tempo backend endpoint for manual sync:
  finds unsynced red_team_execution worklogs and pushes them to Tempo
This commit is contained in:
kitos
2026-05-28 14:09:16 +02:00
parent 1a974265de
commit 8b48716766
5 changed files with 214 additions and 34 deletions
+18
View File
@@ -263,3 +263,21 @@ export async function rejectTest(testId: string): Promise<Test> {
const { data } = await client.post<Test>(`/tests/${testId}/reject`);
return data;
}
// ── Tempo sync ─────────────────────────────────────────────────────
export interface TempoSyncResult {
worklog_id: string;
status: "synced" | "already_synced" | "skipped" | "error";
detail?: string;
}
/** Manually push this test's red team execution worklog to Tempo. */
export async function syncTestToTempo(
testId: string,
): Promise<{ results: TempoSyncResult[] }> {
const { data } = await client.post<{ results: TempoSyncResult[] }>(
`/tests/${testId}/sync-tempo`,
);
return data;
}
+5
View File
@@ -53,6 +53,11 @@ export async function getWorklog(worklogId: string): Promise<Worklog> {
return data;
}
/** List worklogs for a specific test (shorthand). */
export async function listTestWorklogs(testId: string): Promise<Worklog[]> {
return listWorklogs({ entity_type: "test", entity_id: testId });
}
/** Verify a worklog's integrity hash. */
export async function verifyWorklogIntegrity(
worklogId: string,