Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Order the transition button more natually

天舟6174c9ab4182
diff --git a/frontend/src/components/IssueStatusTransitionButtonGroup.vue b/frontend/src/components/IssueStatusTransitionButtonGroup.vue
index 7d24e591f5..a3043f7381 100644
--- a/frontend/src/components/IssueStatusTransitionButtonGroup.vue
+++ b/frontend/src/components/IssueStatusTransitionButtonGroup.vue
@@ -15,9 +15,7 @@
class="flex space-x-2"
>
<template
- v-for="(
- transition, index
- ) in applicableTaskStatusTransitionList.reverse()"
+ v-for="(transition, index) in applicableTaskStatusTransitionList"
:key="index"
>
<button
diff --git a/frontend/src/utils/pipeline.ts b/frontend/src/utils/pipeline.ts
index 393057e445..aece07d0aa 100644
--- a/frontend/src/utils/pipeline.ts
+++ b/frontend/src/utils/pipeline.ts
@@ -195,16 +195,16 @@ const TASK_STATUS_TRANSITION_LIST: Map<
type TaskTransitionStatus = TaskStatus | "PENDING_APPROVAL";
-// The transition button is ordered from right to left on the UI
+// The transition button are displayed from left to right on the UI, and the right-most one is the primary button
const APPLICABLE_TASK_TRANSITION_LIST: Map<
TaskTransitionStatus,
TaskStatusTransitionType[]
> = new Map([
- ["PENDING", ["RUN", "SKIP"]],
- ["PENDING_APPROVAL", ["APPROVE", "SKIP"]],
+ ["PENDING", ["SKIP", "RUN"]],
+ ["PENDING_APPROVAL", ["SKIP", "APPROVE"]],
["RUNNING", ["CANCEL"]],
["DONE", []],
- ["FAILED", ["RETRY", "SKIP"]],
+ ["FAILED", ["SKIP", "RETRY"]],
["SKIPPED", []],
]);