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:
37 files changed
+677
-132
No files matched your search
@@ -16,8 +16,15 @@ const STATE_CLASSES: Record<string, string> = {
|
||||
skipped: "border-dashed border-muted-foreground/60",
|
||||
};
|
||||
|
||||
const MARK_CLASSES: Record<string, string> = {
|
||||
added: "border-ok ring-2 ring-ok/40",
|
||||
removed: "border-danger ring-2 ring-danger/40",
|
||||
changed: "border-warn ring-2 ring-warn/40",
|
||||
};
|
||||
|
||||
const stateClass = computed(() => {
|
||||
if (props.data.kind === "start") return "border-primary/60";
|
||||
if (props.data.mark) return MARK_CLASSES[props.data.mark];
|
||||
return STATE_CLASSES[props.data.run?.status ?? ""] ?? "border-border";
|
||||
});
|
||||
|
||||
@@ -58,6 +65,7 @@ function duration(ms?: number): string {
|
||||
<span v-if="data.step" class="font-mono text-[11px] text-fg-subtle">{{ data.step }}</span>
|
||||
<span class="truncate text-sm font-medium" :title="data.title">{{ data.title }}</span>
|
||||
</div>
|
||||
<div v-if="data.mark" class="text-[11px] font-medium" :class="{ 'text-ok': data.mark === 'added', 'text-danger': data.mark === 'removed', 'text-warn': data.mark === 'changed' }">{{ data.mark === "added" ? "Added" : data.mark === "removed" ? "Removed" : "Changed" }}</div>
|
||||
<div v-if="data.type && data.title !== stepTitle(data.type)" class="truncate font-mono text-[11px] text-fg-subtle">{{ data.type }}</div>
|
||||
<ul v-if="data.kind === 'start' && data.triggers?.length" class="mt-1 space-y-0.5">
|
||||
<li v-for="trigger in data.triggers" :key="trigger.kind + trigger.label" class="flex items-center gap-1.5 text-xs" :title="trigger.detail">
|
||||
|
||||
Reference in new issue
Block a user