Skip to content

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

fix: refactor plan components and fix section visibility (#17253)

boojack5d798e6ca6cb
diff --git a/frontend/src/components/Plan/components/IssueReviewView/DescriptionSection/DescriptionSection.vue b/frontend/src/components/Plan/components/IssueReviewView/DescriptionSection/DescriptionSection.vue
index 3f7d1ca6d8..b1b0e484b0 100644
--- a/frontend/src/components/Plan/components/IssueReviewView/DescriptionSection/DescriptionSection.vue
+++ b/frontend/src/components/Plan/components/IssueReviewView/DescriptionSection/DescriptionSection.vue
@@ -35,12 +35,12 @@ import {
UpdatePlanRequestSchema,
} from "@/types/proto-es/v1/plan_service_pb";
import { hasProjectPermissionV2 } from "@/utils";
-import { usePlanContextWithIssue } from "../../..";
+import { usePlanContext } from "../../..";
const { t } = useI18n();
const currentUser = useCurrentUserV1();
const { project } = useCurrentProjectV1();
-const { plan, readonly, isCreating } = usePlanContextWithIssue();
+const { plan, readonly, isCreating } = usePlanContext();
const { refreshResources } = useResourcePoller();
const state = reactive({
diff --git a/frontend/src/components/Plan/components/SpecDetailView/FailedTaskRunsSection.vue b/frontend/src/components/Plan/components/SpecDetailView/FailedTaskRunsSection.vue
index 33929f039d..500938325a 100644
--- a/frontend/src/components/Plan/components/SpecDetailView/FailedTaskRunsSection.vue
+++ b/frontend/src/components/Plan/components/SpecDetailView/FailedTaskRunsSection.vue
@@ -142,7 +142,7 @@ const taskRunList = computed(() => {
// Determine if the section should be shown at all
const shouldShowSection = computed(() => {
- return failedSpecTasks.value.length > 0 || taskRuns.value.length > 0;
+ return failedSpecTasks.value.length > 0 && taskRuns.value.length > 0;
});
// Helper function to get the task for a task run
diff --git a/frontend/src/components/Plan/components/SpecDetailView/SpecDetailView.vue b/frontend/src/components/Plan/components/SpecDetailView/SpecDetailView.vue
index f8b3dac70a..6690d2c420 100644
--- a/frontend/src/components/Plan/components/SpecDetailView/SpecDetailView.vue
+++ b/frontend/src/components/Plan/components/SpecDetailView/SpecDetailView.vue
@@ -3,7 +3,7 @@
class="flex-1 flex flex-col hide-scrollbar gap-3 divide-y overflow-x-hidden"
>
<div class="w-full flex flex-col">
- <SpecListSection v-if="isCreating || plan.specs.length > 1" />
+ <SpecListSection v-if="shouldShowSpecList" />
<TargetListSection />
<FailedTaskRunsSection v-if="!isCreating && rollout" />
</div>
@@ -51,4 +51,10 @@ const specHasRelease = computed(() => {
isValidReleaseName(selectedSpec.value.config.value.release)
);
});
+
+const shouldShowSpecList = computed(() => {
+ return (
+ isCreating.value || plan.value.specs.length > 1 || plan.value.rollout === ""
+ );
+});
</script>