Skip to content

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

feat: show ROLLOUT_CREATE as secondary action when conditions not met (#18770)

boojackbebaa5a9d7da
diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/registry/actions/rollout.ts b/frontend/src/components/Plan/components/HeaderSection/Actions/registry/actions/rollout.ts
index 06b5c0c305..2e1e0e6910 100644
--- a/frontend/src/components/Plan/components/HeaderSection/Actions/registry/actions/rollout.ts
+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/registry/actions/rollout.ts
@@ -6,7 +6,18 @@ export const ROLLOUT_CREATE: ActionDefinition = {
id: "ROLLOUT_CREATE",
label: () => t("issue.create-rollout"),
buttonType: "default",
- category: "primary",
+ category: (ctx) => {
+ // Show as primary only when issue approved and plan checks done without errors
+ if (
+ ctx.issueApproved &&
+ !ctx.validation.planChecksRunning &&
+ !ctx.validation.planChecksFailed
+ ) {
+ return "primary";
+ }
+ // For force creating rollout, show as secondary
+ return "secondary";
+ },
priority: 55,
isVisible: (ctx) => {