feat(workflows): test-run unsaved drafts and browse workflow version history
A test run pins a validated draft, runs with forge and push writes suppressed and recorded per step, and is excluded from workflow stats. The History tab lists revisions that changed a workflow, diffs them as YAML and on the canvas, restores into the editor, and ties runs to the revision they used.
This commit is contained in:
1 parent
2f05cbd34f
commit
2a066f6d4f
37 files changed
+677
-132
No files matched your search
@@ -81,6 +81,7 @@ const activity = computed(() => events.value.filter((event) => {
|
||||
if (event.data?.step_id != null) return Number(event.data.step_id) === props.stage.id;
|
||||
return names.value.has(event.stage ?? "") && inWindow(event.at);
|
||||
}).sort((a, b) => String(a.at ?? "").localeCompare(String(b.at ?? ""))));
|
||||
const suppressed = computed(() => activity.value.filter((event) => event.kind === "forge_suppressed"));
|
||||
const groups = computed(() => {
|
||||
const agents = props.stage.agents ?? [];
|
||||
const branches = new Set(["", ...agents.map((agent) => agent.name.includes("/") ? agent.name.split("/")[0]! : ""), ...activity.value.map((event) => String(event.data?.branch ?? ""))]);
|
||||
@@ -128,6 +129,12 @@ const scopedLogs = computed(() => logs.value ? { ...logs.value, entries: (logs.v
|
||||
<p v-if="group.reports.length" class="text-xs text-muted-foreground">{{ group.reports.map((report) => describeTimelineEvent(report).detail).filter(Boolean).join(' · ') }}</p>
|
||||
<p v-else-if="group.agents.length" class="text-xs text-muted-foreground">{{ group.agents.reduce((sum, agent) => sum + agent.tokens_used, 0).toLocaleString() }} tokens recorded</p>
|
||||
</section>
|
||||
<section v-if="suppressed.length" class="space-y-1">
|
||||
<h3 class="text-xs font-medium text-muted-foreground" title="This was a test run, so these writes were skipped">Skipped in test run</h3>
|
||||
<ul class="divide-y divide-border rounded-md border border-border">
|
||||
<li v-for="(event, i) in suppressed" :key="i" class="px-3 py-2 text-xs break-words whitespace-pre-wrap">{{ event.detail }}</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="space-y-3">
|
||||
<h3 class="text-xs font-medium text-muted-foreground">Captured changes</h3>
|
||||
<p v-if="changesError" role="alert" class="text-danger">{{ changesError }}</p>
|
||||
|
||||
Reference in new issue
Block a user