feat(tests): remove Time Log, move Tempo sync to Phase Timeline
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled

- 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

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
kitos
2026-05-28 14:09:16 +02:00
parent 986e91a88a
commit d3baa9c032
5 changed files with 214 additions and 34 deletions

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;
}