Skip to content

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

refactor: separate rollout creation from issue creation (#18610)

boojack9c29fdb10d6a
diff --git a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunDetail.vue b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunDetail.vue
index 62ccf76918..968c3f4b42 100644
--- a/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunDetail.vue
+++ b/frontend/src/components/IssueV1/components/TaskRunSection/TaskRunDetail.vue
@@ -37,7 +37,7 @@ import { uniqueId } from "lodash-es";
import { RefreshCcwIcon } from "lucide-vue-next";
import { NButton, NTabPane, NTabs } from "naive-ui";
import { computed, reactive, ref, watch } from "vue";
-import { TaskRunLogViewer } from "@/components/Plan/components/RolloutView/v2/TaskRunLogViewer";
+import { TaskRunLogViewer } from "@/components/RolloutV1/components/TaskRunLogViewer";
import { rolloutServiceClientConnect } from "@/grpcweb";
import { useSheetV1Store } from "@/store";
import { Engine } from "@/types/proto-es/v1/common_pb";
diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue
index 37e3fcd84e..1620dc09f6 100644
--- a/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue
+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/Actions.vue
@@ -59,18 +59,30 @@
</template>
<script setup lang="ts">
+import { create } from "@bufbuild/protobuf";
import { useDialog } from "naive-ui";
import { computed, ref } from "vue";
import { useI18n } from "vue-i18n";
+import { useRouter } from "vue-router";
import { usePlanContext } from "@/components/Plan/logic";
import { useResourcePoller } from "@/components/Plan/logic/poller";
import { useEditorState } from "@/components/Plan/logic/useEditorState";
-import { pushNotification } from "@/store";
+import TaskRolloutActionPanel from "@/components/RolloutV1/components/TaskRolloutActionPanel.vue";
+import { rolloutServiceClientConnect } from "@/grpcweb";
+import { PROJECT_V1_ROUTE_ROLLOUT_DETAIL } from "@/router/dashboard/projectV1";
+import { pushNotification, useCurrentProjectV1 } from "@/store";
import { usePlanStore } from "@/store/modules/v1/plan";
import { State } from "@/types/proto-es/v1/common_pb";
-import { Task_Type } from "@/types/proto-es/v1/rollout_service_pb";
-import { isValidIssueName, isValidPlanName } from "@/utils";
-import TaskRolloutActionPanel from "../../RolloutView/TaskRolloutActionPanel.vue";
+import {
+ CreateRolloutRequestSchema,
+ Task_Type,
+} from "@/types/proto-es/v1/rollout_service_pb";
+import {
+ extractProjectResourceName,
+ extractRolloutUID,
+ isValidIssueName,
+ isValidPlanName,
+} from "@/utils";
import { CreateButton, CreateIssueButton } from "./create";
import { IssueReviewActionPanel, IssueStatusActionPanel } from "./panels";
import {
@@ -85,12 +97,15 @@ import {
} from "./unified";
const { t } = useI18n();
+const router = useRouter();
const dialog = useDialog();
const resourcePoller = useResourcePoller();
+const { project } = useCurrentProjectV1();
const { isCreating, plan, issue, rollout, events } = usePlanContext();
const planStore = usePlanStore();
const editorState = useEditorState();
const { availableActions } = usePlanAction();
+const creatingRollout = ref(false);
// Computed property for actions disabled state.
const actionsDisabled = computed(() => {
@@ -163,6 +178,11 @@ const primaryAction = computed((): ActionConfig | undefined => {
return { action: "ISSUE_STATUS_RESOLVE" };
}
+ // ROLLOUT_CREATE is primary when issue exists but rollout doesn't
+ if (actions.includes("ROLLOUT_CREATE")) {
+ return { action: "ROLLOUT_CREATE" };
+ }
+
// Rollout actions as primary actions (high priority for force rollout scenarios)
if (actions.includes("ROLLOUT_START")) {
return { action: "ROLLOUT_START" };
@@ -178,6 +198,9 @@ const secondaryActions = computed((): ActionConfig[] => {
if (actions.includes("ISSUE_REVIEW_REJECT")) {
secondary.push({ action: "ISSUE_REVIEW_REJECT" });
}
+ if (actions.includes("ROLLOUT_CREATE")) {
+ secondary.push({ action: "ROLLOUT_CREATE" });
+ }
if (actions.includes("ROLLOUT_CANCEL")) {
secondary.push({ action: "ROLLOUT_CANCEL" });
}
@@ -210,6 +233,9 @@ const handlePerformAction = async (action: UnifiedAction) => {
case "PLAN_REOPEN":
await handlePlanStateChange("PLAN_REOPEN");
break;
+ case "ROLLOUT_CREATE":
+ await handleCreateRollout();
+ break;
case "ROLLOUT_START":
case "ROLLOUT_CANCEL":
pendingRolloutAction.value = action as RolloutAction;
@@ -252,6 +278,46 @@ const handlePlanStateChange = async (action: PlanAction) => {
});
};
+const handleCreateRollout = async () => {
+ if (creatingRollout.value) return;
+
+ creatingRollout.value = true;
+ try {
+ const request = create(CreateRolloutRequestSchema, {
+ parent: project.value.name,
+ rollout: {
+ plan: plan.value.name,
+ },
+ });
+ const createdRollout =
+ await rolloutServiceClientConnect.createRollout(request);
+
+ pushNotification({
+ module: "bytebase",
+ style: "SUCCESS",
+ title: t("common.created"),
+ });
+
+ // Redirect to rollout page
+ router.push({
+ name: PROJECT_V1_ROUTE_ROLLOUT_DETAIL,
+ params: {
+ projectId: extractProjectResourceName(project.value.name),
+ rolloutId: extractRolloutUID(createdRollout.name),
+ },
+ });
+ } catch (error) {
+ pushNotification({
+ module: "bytebase",
+ style: "CRITICAL",
+ title: t("common.failed"),
+ description: String(error),
+ });
+ } finally {
+ creatingRollout.value = false;
+ }
+};
+
const handleRolloutActionConfirm = () => {
// The TaskRolloutActionPanel handles the actual execution
// We just need to emit status change to refresh the UI
diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/RolloutReadyLink.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/RolloutReadyLink.vue
index 0aa8376dee..8eb75d23c1 100644
--- a/frontend/src/components/Plan/components/HeaderSection/Actions/RolloutReadyLink.vue
+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/RolloutReadyLink.vue
@@ -1,24 +1,42 @@
<template>
<RouterLink v-if="rollout" :to="rolloutRoute">
- <NButton icon-placement="right" size="small" text type="info">
- {{ $t("issue.approval.ready-for-rollout") }}
+ <NButton icon-placement="right" quaternary>
+ <TaskStatus :status="rolloutStatus" size="tiny" />
+ <span class="mx-1">{{ $t("common.rollout") }}</span>
+ <span>#{{ rolloutUID }}</span>
<template #icon>
- <ArrowRightIcon class="w-4 h-4" />
+ <ArrowUpRightIcon class="opacity-60" />
</template>
</NButton>
</RouterLink>
</template>
<script lang="ts" setup>
-import { ArrowRightIcon } from "lucide-vue-next";
+import { ArrowUpRightIcon } from "lucide-vue-next";
import { NButton } from "naive-ui";
import { computed } from "vue";
import { usePlanContext } from "@/components/Plan/logic";
+import TaskStatus from "@/components/Rollout/kits/TaskStatus.vue";
import { PROJECT_V1_ROUTE_ROLLOUT_DETAIL } from "@/router/dashboard/projectV1";
-import { extractProjectResourceName, extractRolloutUID } from "@/utils";
+import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
+import {
+ extractProjectResourceName,
+ extractRolloutUID,
+ getRolloutStatus,
+} from "@/utils";
const { plan, rollout } = usePlanContext();
+const rolloutStatus = computed(() => {
+ if (!rollout.value) return Task_Status.NOT_STARTED;
+ return getRolloutStatus(rollout.value);
+});
+
+const rolloutUID = computed(() => {
+ if (!rollout.value?.name) return "";
+ return extractRolloutUID(rollout.value.name);
+});
+
const rolloutRoute = computed(() => ({
name: PROJECT_V1_ROUTE_ROLLOUT_DETAIL,
params: {
diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateIssueButton.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateIssueButton.vue
index 5822a9c396..5293416542 100644
--- a/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateIssueButton.vue
+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/create/CreateIssueButton.vue
@@ -78,10 +78,7 @@ import {
} from "@/components/Plan/components/common";
import { usePlanCheckStatus, usePlanContext } from "@/components/Plan/logic";
import RequiredStar from "@/components/RequiredStar.vue";
-import {
- issueServiceClientConnect,
- rolloutServiceClientConnect,
-} from "@/grpcweb";
+import { issueServiceClientConnect } from "@/grpcweb";
import { PROJECT_V1_ROUTE_ISSUE_DETAIL_V1 } from "@/router/dashboard/projectV1";
import {
pushNotification,
@@ -95,7 +92,6 @@ import {
IssueStatus,
} from "@/types/proto-es/v1/issue_service_pb";
import type { Plan, Plan_Spec } from "@/types/proto-es/v1/plan_service_pb";
-import { CreateRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";
import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import { extractIssueUID, extractProjectResourceName } from "@/utils";
@@ -202,15 +198,6 @@ const doCreateIssue = async () => {
const createdIssue =
await issueServiceClientConnect.createIssue(createIssueRequest);
- const createRolloutRequest = create(CreateRolloutRequestSchema, {
- parent: project.value.name,
- rollout: {
- plan: plan.value.name,
- },
- });
-
- await rolloutServiceClientConnect.createRollout(createRolloutRequest);
-
events.emit("status-changed", { eager: true });
showPopover.value = false;
diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/unified/UnifiedActionGroup.vue b/frontend/src/components/Plan/components/HeaderSection/Actions/unified/UnifiedActionGroup.vue
index 303d26cdf5..80c0abaf3f 100644
--- a/frontend/src/components/Plan/components/HeaderSection/Actions/unified/UnifiedActionGroup.vue
+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/unified/UnifiedActionGroup.vue
@@ -4,7 +4,7 @@
<RolloutReadyLink v-if="shouldShowRolloutReadyLink" />
<!-- Export Archive Download Action for export data issues (replaces primary action) -->
- <ExportArchiveDownloadAction v-else-if="shouldShowExportDownload" />
+ <ExportArchiveDownloadAction v-if="shouldShowExportDownload" />
<!-- Primary action button (hidden when export download is shown) -->
<UnifiedActionButton
@@ -32,7 +32,7 @@
:disabled="disabled"
:title="disabled ? disabledTooltip : undefined"
>
- <EllipsisVerticalIcon class="w-5 h-5" />
+ <EllipsisVerticalIcon class="w-4 h-4" />
</NButton>
</NDropdown>
</div>
diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/unified/action.ts b/frontend/src/components/Plan/components/HeaderSection/Actions/unified/action.ts
index ce4f16e3f0..3c2836e594 100644
--- a/frontend/src/components/Plan/components/HeaderSection/Actions/unified/action.ts
+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/unified/action.ts
@@ -1,5 +1,5 @@
import { computed } from "vue";
-import { usePlanContext } from "@/components/Plan/logic";
+import { usePlanCheckStatus, usePlanContext } from "@/components/Plan/logic";
import { t } from "@/plugins/i18n";
import {
candidatesOfApprovalStepV1,
@@ -15,6 +15,7 @@ import {
IssueStatus,
} from "@/types/proto-es/v1/issue_service_pb";
import { Task_Status, Task_Type } from "@/types/proto-es/v1/rollout_service_pb";
+import { Advice_Level } from "@/types/proto-es/v1/sql_service_pb";
import {
hasProjectPermissionV2,
isUserIncludedInList,
@@ -29,6 +30,12 @@ export const usePlanAction = () => {
const { isCreating, plan, issue, rollout } = usePlanContext();
+ // Plan check status for rollout creation validation
+ const {
+ getOverallStatus: planCheckStatus,
+ hasRunning: hasRunningPlanChecks,
+ } = usePlanCheckStatus(plan);
+
/**
* Compute available actions based on issue state and user permissions.
*
@@ -163,8 +170,8 @@ export const usePlanAction = () => {
}
if (canUpdateIssue) {
- // Check if issue can be resolved (all tasks must be finished)
if (rollout.value) {
+ // Check if issue can be resolved (all tasks must be finished)
const allTasksFinished = rollout.value.stages
.flatMap((stage) => stage.tasks)
.every((task) =>
@@ -173,9 +180,39 @@ export const usePlanAction = () => {
if (allTasksFinished && issueApproved) {
actions.push("ISSUE_STATUS_RESOLVE");
}
+ } else {
+ // Only allow closing issue when rollout doesn't exist
+ actions.push("ISSUE_STATUS_CLOSE");
}
+ }
+
+ // Check for rollout creation action
+ // Only shown when issue exists, rollout doesn't, and all preconditions are met.
+ if (plan.value.rollout === "" && !isIssueOnly) {
+ const canCreateRollout = hasProjectPermissionV2(
+ project.value,
+ "bb.rollouts.create"
+ );
- actions.push("ISSUE_STATUS_CLOSE");
+ if (canCreateRollout) {
+ const { requireIssueApproval, requirePlanCheckNoError } = project.value;
+
+ // Issue must be approved/skipped if requireIssueApproval is enabled
+ const issueReady =
+ !requireIssueApproval ||
+ issueValue.approvalStatus === Issue_ApprovalStatus.APPROVED ||
+ issueValue.approvalStatus === Issue_ApprovalStatus.SKIPPED;
+
+ // Plan checks must pass if requirePlanCheckNoError is enabled
+ const planCheckReady =
+ !requirePlanCheckNoError ||
+ (!hasRunningPlanChecks.value &&
+ planCheckStatus.value !== Advice_Level.ERROR);
+
+ if (issueReady && planCheckReady) {
+ actions.push("ROLLOUT_CREATE");
+ }
+ }
}
// Check for rollout actions when rollout has database creation/export tasks
@@ -257,6 +294,8 @@ export const usePlanAction = () => {
return t("common.close");
case "PLAN_REOPEN":
return t("common.reopen");
+ case "ROLLOUT_CREATE":
+ return t("issue.create-rollout");
case "ROLLOUT_START":
return isExportPlan.value ? t("common.export") : t("common.rollout");
case "ROLLOUT_CANCEL":
diff --git a/frontend/src/components/Plan/components/HeaderSection/Actions/unified/types.ts b/frontend/src/components/Plan/components/HeaderSection/Actions/unified/types.ts
index eeccd6a968..b7c9fcb0a0 100644
--- a/frontend/src/components/Plan/components/HeaderSection/Actions/unified/types.ts
+++ b/frontend/src/components/Plan/components/HeaderSection/Actions/unified/types.ts
@@ -15,7 +15,10 @@ export type IssueAction =
export type PlanAction = "PLAN_CLOSE" | "PLAN_REOPEN";
-export type RolloutAction = "ROLLOUT_START" | "ROLLOUT_CANCEL";
+export type RolloutAction =
+ | "ROLLOUT_CREATE"
+ | "ROLLOUT_START"
+ | "ROLLOUT_CANCEL";
// All unified actions
export type UnifiedAction = IssueAction | PlanAction | RolloutAction;
diff --git a/frontend/src/components/Plan/components/HeaderSection/HeaderSection.vue b/frontend/src/components/Plan/components/HeaderSection/HeaderSection.vue
index b4c914b396..003933f82a 100644
--- a/frontend/src/components/Plan/components/HeaderSection/HeaderSection.vue
+++ b/frontend/src/components/Plan/components/HeaderSection/HeaderSection.vue
@@ -7,6 +7,18 @@
</template>
{{ $t("common.draft") }}
</NTag>
+ <NTag v-else-if="showClosedTag" round type="default">
+ <template #icon>
+ <BanIcon class="w-4 h-4" />
+ </template>
+ {{ $t("common.closed") }}
+ </NTag>
+ <NTag v-else-if="showDoneTag" round type="success">
+ <template #icon>
+ <CheckCircle2Icon class="w-4 h-4" />
+ </template>
+ {{ $t("common.done") }}
+ </NTag>
<TitleInput />
<div class="flex flex-row items-center justify-end">
<Actions />
@@ -27,11 +39,18 @@
</template>
<script lang="ts" setup>
-import { CircleDotDashedIcon, MenuIcon } from "lucide-vue-next";
+import {
+ BanIcon,
+ CheckCircle2Icon,
+ CircleDotDashedIcon,
+ MenuIcon,
+} from "lucide-vue-next";
import { NButton, NTag } from "naive-ui";
import { computed } from "vue";
import { useRoute } from "vue-router";
import { PROJECT_V1_ROUTE_ISSUE_DETAIL_V1 } from "@/router/dashboard/projectV1";
+import { State } from "@/types/proto-es/v1/common_pb";
+import { IssueStatus } from "@/types/proto-es/v1/issue_service_pb";
import { isValidPlanName } from "@/utils";
import { usePlanContext } from "../../logic";
import { useSidebarContext } from "../../logic/sidebar";
@@ -40,7 +59,7 @@ import DescriptionSection from "./DescriptionSection.vue";
import TitleInput from "./TitleInput.vue";
const route = useRoute();
-const { isCreating, plan } = usePlanContext();
+const { isCreating, plan, issue } = usePlanContext();
const hasSidebar = computed(() => {
// Check if we're in a layout with sidebar (Issue overview tab only)
@@ -67,6 +86,17 @@ const showDraftTag = computed(() => {
);
});
+const showClosedTag = computed(() => {
+ return (
+ plan.value.state === State.DELETED ||
+ issue.value?.status === IssueStatus.CANCELED
+ );
+});
+
+const showDoneTag = computed(() => {
+ return issue.value?.status === IssueStatus.DONE;
+});
+
const showDescriptionSection = computed(() => {
// Only show when there's no issue yet (draft plan)
return (
diff --git a/frontend/src/components/Plan/components/IssueReviewView/DatabaseCreateView.vue b/frontend/src/components/Plan/components/IssueReviewView/DatabaseCreateView.vue
index a1e2fb8834..d01bea803b 100644
--- a/frontend/src/components/Plan/components/IssueReviewView/DatabaseCreateView.vue
+++ b/frontend/src/components/Plan/components/IssueReviewView/DatabaseCreateView.vue
@@ -73,6 +73,7 @@
import { computed, watchEffect } from "vue";
import { extractCoreDatabaseInfoFromDatabaseCreateTask } from "@/components/IssueV1/logic/utils";
import MonacoEditor from "@/components/MonacoEditor/MonacoEditor.vue";
+import TaskRunTable from "@/components/RolloutV1/components/TaskRunTable.vue";
import {
DatabaseV1Name,
EnvironmentV1Name,
@@ -90,7 +91,6 @@ import { isValidInstanceName } from "@/types/v1/instance";
import { getSheetStatement } from "@/utils";
import { extractInstanceResourceName } from "@/utils/v1/instance";
import { usePlanContextWithRollout } from "../..";
-import TaskRunTable from "../RolloutView/TaskRunTable.vue";
const { plan, rollout, taskRuns } = usePlanContextWithRollout();
const { project } = useCurrentProjectV1();
diff --git a/frontend/src/components/Plan/components/IssueReviewView/DatabaseExportView/ExecutionHistorySection.vue b/frontend/src/components/Plan/components/IssueReviewView/DatabaseExportView/ExecutionHistorySection.vue
index fa831e3cfa..c16e92188d 100644
--- a/frontend/src/components/Plan/components/IssueReviewView/DatabaseExportView/ExecutionHistorySection.vue
+++ b/frontend/src/components/Plan/components/IssueReviewView/DatabaseExportView/ExecutionHistorySection.vue
@@ -23,7 +23,7 @@
<script lang="ts" setup>
import { computed } from "vue";
-import TaskRunTable from "@/components/Plan/components/RolloutView/TaskRunTable.vue";
+import TaskRunTable from "@/components/RolloutV1/components/TaskRunTable.vue";
import type { TaskRun } from "@/types/proto-es/v1/rollout_service_pb";
import { extractTaskUID } from "@/utils";
import { usePlanContext, usePlanContextWithRollout } from "../../../logic";
diff --git a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/DatabaseChangeSection.vue b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/DatabaseChangeSection.vue
index 7b9a582e4a..99ea306a0d 100644
--- a/frontend/src/components/Plan/components/IssueReviewView/Sidebar/DatabaseChangeSection.vue
+++ b/frontend/src/components/Plan/components/IssueReviewView/Sidebar/DatabaseChangeSection.vue
@@ -1,22 +1,5 @@
<template>
<template v-if="shouldShowSection">
- <!-- SQL Checks -->
- <div class="flex flex-col gap-y-1">
- <h3 class="textlabel">
- {{ $t("plan.navigator.checks") }}
- </h3>
- <div class="flex items-center gap-2">
- <PlanCheckStatusCount
- :plan="plan"
- clickable
- @click="selectedResultStatus = $event"
- />
- <span v-if="!hasAnyChecks" class="text-sm text-control-placeholder">
- {{ $t("plan.overview.no-checks") }}
- </span>
- </div>
- </div>
-
<!-- Stages -->
<div v-if="rollout" class="flex flex-col gap-y-1">
<h3 class="textlabel">
@@ -57,6 +40,23 @@
</div>
</div>
+ <!-- SQL Checks -->
+ <div class="flex flex-col gap-y-1">
+ <h3 class="textlabel">
+ {{ $t("plan.navigator.checks") }}
+ </h3>
+ <div class="flex items-center gap-2">
+ <PlanCheckStatusCount
+ :plan="plan"
+ clickable
+ @click="selectedResultStatus = $event"
+ />
+ <span v-if="!hasAnyChecks" class="text-sm text-control-placeholder">
+ {{ $t("plan.overview.no-checks") }}
+ </span>
+ </div>
+ </div>
+
<NDivider class="!my-0" />
<ChecksDrawer
diff --git a/frontend/src/components/Plan/components/RolloutView/index.ts b/frontend/src/components/Plan/components/RolloutView/index.ts
deleted file mode 100644
index 631e94a991..0000000000
--- a/frontend/src/components/Plan/components/RolloutView/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export { default as TaskView } from "./TaskView.vue";
-export { default as TaskRunTable } from "./TaskRunTable.vue";
-export { default as TaskStatusActions } from "./TaskStatusActions.vue";
diff --git a/frontend/src/components/Plan/components/SpecDetailView/FailedTaskRunsSection.vue b/frontend/src/components/Plan/components/SpecDetailView/FailedTaskRunsSection.vue
index 8c21fcdd7e..45dd150856 100644
--- a/frontend/src/components/Plan/components/SpecDetailView/FailedTaskRunsSection.vue
+++ b/frontend/src/components/Plan/components/SpecDetailView/FailedTaskRunsSection.vue
@@ -58,6 +58,7 @@ import { useRouter } from "vue-router";
import TaskRunDetail from "@/components/IssueV1/components/TaskRunSection/TaskRunDetail.vue";
import TaskRunStatusIcon from "@/components/IssueV1/components/TaskRunSection/TaskRunStatusIcon.vue";
import HumanizeDate from "@/components/misc/HumanizeDate.vue";
+import TaskRunComment from "@/components/RolloutV1/components/TaskRunComment.vue";
import { Drawer, DrawerContent } from "@/components/v2";
import { PROJECT_V1_ROUTE_ROLLOUT_DETAIL_TASK_DETAIL } from "@/router/dashboard/projectV1";
import { useCurrentProjectV1, useDatabaseV1Store } from "@/store";
@@ -75,7 +76,6 @@ import {
} from "@/utils";
import { usePlanContextWithRollout } from "../../logic";
import DatabaseDisplay from "../common/DatabaseDisplay.vue";
-import TaskRunComment from "../RolloutView/TaskRunComment.vue";
import { useSelectedSpec } from "./context";
const DEFAULT_TASK_RUNS_PER_PAGE = 5;
diff --git a/frontend/src/components/Plan/logic/useCICDTabNavigation.tsx b/frontend/src/components/Plan/logic/useIssueTabNavigation.tsx
similarity index 74%
rename from frontend/src/components/Plan/logic/useCICDTabNavigation.tsx
rename to frontend/src/components/Plan/logic/useIssueTabNavigation.tsx
index 93c21d822a..9e6c971bb5 100644
--- a/frontend/src/components/Plan/logic/useCICDTabNavigation.tsx
+++ b/frontend/src/components/Plan/logic/useIssueTabNavigation.tsx
@@ -1,4 +1,4 @@
-import { CirclePlayIcon, FileDiffIcon, Layers2Icon } from "lucide-vue-next";
+import { FileDiffIcon, Layers2Icon } from "lucide-vue-next";
import { NTag } from "naive-ui";
import type { Ref } from "vue";
import { computed } from "vue";
@@ -9,23 +9,19 @@ import {
PROJECT_V1_ROUTE_PLAN_DETAIL,
PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL,
PROJECT_V1_ROUTE_PLAN_DETAIL_SPECS,
- PROJECT_V1_ROUTE_ROLLOUT_DETAIL,
- PROJECT_V1_ROUTE_ROLLOUT_DETAIL_STAGE_DETAIL,
- PROJECT_V1_ROUTE_ROLLOUT_DETAIL_TASK_DETAIL,
} from "@/router/dashboard/projectV1";
import type { Issue } from "@/types/proto-es/v1/issue_service_pb";
import { Issue_Type } from "@/types/proto-es/v1/issue_service_pb";
import type { Plan } from "@/types/proto-es/v1/plan_service_pb";
import { EMPTY_PLAN_NAME } from "@/types/v1/issue/plan";
-import { extractIssueUID, extractPlanUID, extractRolloutUID } from "@/utils";
+import { extractIssueUID, extractPlanUID } from "@/utils";
export enum TabKey {
Plan = "plan",
Issue = "issue",
- Rollout = "rollout",
}
-export interface UseCICDTabNavigationOptions {
+export interface UseIssueTabNavigationOptions {
route: RouteLocationNormalizedLoaded;
router: Router;
plan: Ref<Plan>;
@@ -35,7 +31,9 @@ export interface UseCICDTabNavigationOptions {
t: ComposerTranslation;
}
-export const useCICDTabNavigation = (options: UseCICDTabNavigationOptions) => {
+export const useIssueTabNavigation = (
+ options: UseIssueTabNavigationOptions
+) => {
const { route, router, plan, issue, isCreating, enabledNewLayout, t } =
options;
@@ -56,14 +54,6 @@ export const useCICDTabNavigation = (options: UseCICDTabNavigationOptions) => {
return TabKey.Plan;
} else if (routeName === PROJECT_V1_ROUTE_ISSUE_DETAIL_V1) {
return TabKey.Issue;
- } else if (
- [
- PROJECT_V1_ROUTE_ROLLOUT_DETAIL,
- PROJECT_V1_ROUTE_ROLLOUT_DETAIL_STAGE_DETAIL,
- PROJECT_V1_ROUTE_ROLLOUT_DETAIL_TASK_DETAIL,
- ].includes(routeName)
- ) {
- return TabKey.Rollout;
}
// Fallback: Default to Issue if no valid plan, otherwise Plan
return plan.value.name === EMPTY_PLAN_NAME ? TabKey.Issue : TabKey.Plan;
@@ -86,11 +76,6 @@ export const useCICDTabNavigation = (options: UseCICDTabNavigationOptions) => {
tabs.push(TabKey.Plan);
}
- // Show Rollout tab if rollout exists
- if (plan.value.rollout) {
- tabs.push(TabKey.Rollout);
- }
-
return tabs;
});
@@ -113,21 +98,12 @@ export const useCICDTabNavigation = (options: UseCICDTabNavigationOptions) => {
</div>
));
- const rolloutTabContent = computed(() => (
- <div class="flex items-center gap-2">
- <CirclePlayIcon size={18} />
- <span>{t("plan.navigator.rollout")}</span>
- </div>
- ));
-
const tabRender = (tab: TabKey) => {
switch (tab) {
case TabKey.Issue:
return issueTabContent.value;
case TabKey.Plan:
return planTabContent.value;
- case TabKey.Rollout:
- return rolloutTabContent.value;
default:
return tab;
}
@@ -147,9 +123,6 @@ export const useCICDTabNavigation = (options: UseCICDTabNavigationOptions) => {
if (plan.value.issue) {
params.issueId = extractIssueUID(plan.value.issue);
}
- if (plan.value.rollout) {
- params.rolloutId = extractRolloutUID(plan.value.rollout);
- }
}
const query = route.query || {};
@@ -174,16 +147,6 @@ export const useCICDTabNavigation = (options: UseCICDTabNavigationOptions) => {
.catch((error) => {
console.error("Failed to navigate to Plan tab:", error);
});
- } else if (tab === TabKey.Rollout) {
- router
- .push({
- name: PROJECT_V1_ROUTE_ROLLOUT_DETAIL,
- params: params,
- query: query,
- })
- .catch((error) => {
- console.error("Failed to navigate to Rollout tab:", error);
- });
}
};
diff --git a/frontend/src/components/Revision/RevisionDetailPanel.vue b/frontend/src/components/Revision/RevisionDetailPanel.vue
index b65f5e09f7..f101229437 100644
--- a/frontend/src/components/Revision/RevisionDetailPanel.vue
+++ b/frontend/src/components/Revision/RevisionDetailPanel.vue
@@ -48,6 +48,7 @@ import { computedAsync } from "@vueuse/core";
import { NSpin } from "naive-ui";
import { computed, ref, watch } from "vue";
import { MonacoEditor } from "@/components/MonacoEditor";
+import { TaskRunLogViewer } from "@/components/RolloutV1/components/TaskRunLogViewer";
import { CopyButton } from "@/components/v2";
import {
rolloutServiceClientConnect,
@@ -61,7 +62,6 @@ import {
GetTaskRunRequestSchema,
} from "@/types/proto-es/v1/rollout_service_pb";
import HumanizeDate from "../misc/HumanizeDate.vue";
-import { TaskRunLogViewer } from "../Plan/components/RolloutView/v2/TaskRunLogViewer";
const props = defineProps<{
database: ComposedDatabase;
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/LatestTaskRunInfo.vue b/frontend/src/components/RolloutV1/components/LatestTaskRunInfo.vue
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/LatestTaskRunInfo.vue
rename to frontend/src/components/RolloutV1/components/LatestTaskRunInfo.vue
diff --git a/frontend/src/components/RolloutV1/components/RolloutBreadcrumb.vue b/frontend/src/components/RolloutV1/components/RolloutBreadcrumb.vue
new file mode 100644
index 0000000000..3d6500c44d
--- /dev/null
+++ b/frontend/src/components/RolloutV1/components/RolloutBreadcrumb.vue
@@ -0,0 +1,151 @@
+<template>
+ <nav v-if="rolloutUID" class="inline-flex items-center text-sm">
+ <template v-for="(item, index) in breadcrumbItems" :key="index">
+ <span v-if="index > 0" class="mx-2 text-gray-400 font-mono">/</span>
+ <RouterLink
+ v-if="item.clickable && item.route"
+ :to="item.route"
+ class="text-gray-500 hover:text-accent transition-colors"
+ >
+ {{ item.label }}
+ </RouterLink>
+ <span v-else class="text-gray-900">
+ {{ item.label }}
+ </span>
+ </template>
+ </nav>
+</template>
+
+<script lang="ts" setup>
+import { computed } from "vue";
+import { useI18n } from "vue-i18n";
+import { type RouteLocationRaw, RouterLink, useRoute } from "vue-router";
+import { usePlanContext } from "@/components/Plan/logic";
+import {
+ PROJECT_V1_ROUTE_ISSUE_DETAIL_V1,
+ PROJECT_V1_ROUTE_PLAN_DETAIL,
+ PROJECT_V1_ROUTE_ROLLOUT_DETAIL,
+ PROJECT_V1_ROUTE_ROLLOUT_DETAIL_STAGE_DETAIL,
+} from "@/router/dashboard/projectV1";
+import { useEnvironmentV1Store } from "@/store";
+import {
+ extractIssueUID,
+ extractPlanUID,
+ extractProjectResourceName,
+ extractRolloutUID,
+} from "@/utils";
+
+interface BreadcrumbItem {
+ label: string;
+ route?: RouteLocationRaw;
+ clickable: boolean;
+}
+
+const { t } = useI18n();
+const route = useRoute();
+const { plan, issue, rollout } = usePlanContext();
+const environmentStore = useEnvironmentV1Store();
+
+const projectId = computed(() => {
+ if (!plan.value?.name) return "";
+ return extractProjectResourceName(plan.value.name);
+});
+
+const planUID = computed(() => {
+ if (!plan.value?.name) return "";
+ return extractPlanUID(plan.value.name);
+});
+
+const issueUID = computed(() => {
+ if (!issue.value?.name) return "";
+ return extractIssueUID(issue.value.name);
+});
+
+const rolloutUID = computed(() => {
+ if (!rollout.value?.name) return "";
+ return extractRolloutUID(rollout.value.name);
+});
+
+// Route params for stage/task views
+const stageId = computed(() => route.params.stageId as string | undefined);
+const taskId = computed(() => route.params.taskId as string | undefined);
+
+// Stage info for task detail views
+const selectedStage = computed(() => {
+ if (!stageId.value || !rollout.value) return undefined;
+ return rollout.value.stages.find((s) => s.name.endsWith(`/${stageId.value}`));
+});
+
+const stageTitle = computed(() => {
+ if (!selectedStage.value) return "";
+ if (selectedStage.value.environment) {
+ const env = environmentStore.getEnvironmentByName(
+ selectedStage.value.environment
+ );
+ if (env?.title) return env.title;
+ }
+ return selectedStage.value.name.split("/").pop() || "";
+});
+
+const breadcrumbItems = computed<BreadcrumbItem[]>(() => {
+ const items: BreadcrumbItem[] = [];
+ const hasTask = !!taskId.value;
+
+ // Issue or Plan (prefer Issue if exists, but rollout must have a plan)
+ if (issueUID.value) {
+ items.push({
+ label: `${t("common.issue")} #${issueUID.value}`,
+ route: {
+ name: PROJECT_V1_ROUTE_ISSUE_DETAIL_V1,
+ params: { projectId: projectId.value, issueId: issueUID.value },
+ },
+ clickable: true,
+ });
+ } else {
+ items.push({
+ label: `${t("common.plan")} #${planUID.value}`,
+ route: {
+ name: PROJECT_V1_ROUTE_PLAN_DETAIL,
+ params: { projectId: projectId.value, planId: planUID.value },
+ },
+ clickable: true,
+ });
+ }
+
+ // Rollout - clickable when viewing task detail
+ items.push({
+ label: `${t("common.rollout")} #${rolloutUID.value}`,
+ route: {
+ name: PROJECT_V1_ROUTE_ROLLOUT_DETAIL,
+ params: { projectId: projectId.value, rolloutId: rolloutUID.value },
+ },
+ clickable: hasTask,
+ });
+
+ // Stage (only when viewing a task)
+ if (hasTask && stageTitle.value) {
+ items.push({
+ label: stageTitle.value,
+ route: {
+ name: PROJECT_V1_ROUTE_ROLLOUT_DETAIL_STAGE_DETAIL,
+ params: {
+ projectId: projectId.value,
+ rolloutId: rolloutUID.value,
+ stageId: stageId.value,
+ },
+ },
+ clickable: true,
+ });
+ }
+
+ // Task (always last, not clickable - current page)
+ if (hasTask) {
+ items.push({
+ label: `${t("common.task")} #${taskId.value}`,
+ clickable: false,
+ });
+ }
+
+ return items;
+});
+</script>
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/RolloutView.vue b/frontend/src/components/RolloutV1/components/RolloutView.vue
similarity index 94%
rename from frontend/src/components/Plan/components/RolloutView/v2/RolloutView.vue
rename to frontend/src/components/RolloutV1/components/RolloutView.vue
index c508723796..c7ff85bfe5 100644
--- a/frontend/src/components/Plan/components/RolloutView/v2/RolloutView.vue
+++ b/frontend/src/components/RolloutV1/components/RolloutView.vue
@@ -37,6 +37,8 @@ import { computed, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import { useRoute, useRouter } from "vue-router";
import BBSpin from "@/bbkit/BBSpin.vue";
+import { usePlanContextWithRollout } from "@/components/Plan/logic";
+import { useRolloutViewContext } from "@/components/RolloutV1/logic/context";
import { rolloutServiceClientConnect } from "@/grpcweb";
import { PROJECT_V1_ROUTE_ROLLOUT_DETAIL_STAGE_DETAIL } from "@/router/dashboard/projectV1";
import { useCurrentProjectV1 } from "@/store";
@@ -44,14 +46,12 @@ import { pushNotification } from "@/store/modules/notification";
import type { Stage } from "@/types/proto-es/v1/rollout_service_pb";
import { CreateRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";
import { extractProjectResourceName } from "@/utils";
-import { usePlanContextWithRollout } from "../../../logic/context";
-import { useRolloutViewContext } from "../context";
-import type { TargetType } from "../TaskRolloutActionPanel.vue";
-import TaskRolloutActionPanel from "../TaskRolloutActionPanel.vue";
import { useStageSelection } from "./composables/useStageSelection";
import { useTaskInstancePreload } from "./composables/useTaskInstancePreload";
import StageContentView from "./StageContentView.vue";
import StageNavigationBar from "./StageNavigationBar.vue";
+import type { TargetType } from "./TaskRolloutActionPanel.vue";
+import TaskRolloutActionPanel from "./TaskRolloutActionPanel.vue";
const route = useRoute();
const router = useRouter();
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/ScheduledTimeIndicator.vue b/frontend/src/components/RolloutV1/components/ScheduledTimeIndicator.vue
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/ScheduledTimeIndicator.vue
rename to frontend/src/components/RolloutV1/components/ScheduledTimeIndicator.vue
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/StageContentSidebar.vue b/frontend/src/components/RolloutV1/components/StageContentSidebar.vue
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/StageContentSidebar.vue
rename to frontend/src/components/RolloutV1/components/StageContentSidebar.vue
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/StageContentView.vue b/frontend/src/components/RolloutV1/components/StageContentView.vue
similarity index 84%
rename from frontend/src/components/Plan/components/RolloutView/v2/StageContentView.vue
rename to frontend/src/components/RolloutV1/components/StageContentView.vue
index 4e71ea2b6b..915be43a6b 100644
--- a/frontend/src/components/Plan/components/RolloutView/v2/StageContentView.vue
+++ b/frontend/src/components/RolloutV1/components/StageContentView.vue
@@ -5,18 +5,6 @@
<div class="w-full flex flex-row items-center justify-between py-4 gap-2">
<!-- Left: Stage info and filters -->
<div class="flex flex-row items-center gap-3">
- <div class="flex flex-row items-center gap-2">
- <NTag round>{{ $t("common.stage") }}</NTag>
- <span class="font-medium text-lg">
- <EnvironmentV1Name
- :environment="
- environmentStore.getEnvironmentByName(selectedStage.environment)
- "
- :null-environment-placeholder="'Null'"
- :link="false"
- />
- </span>
- </div>
<TaskFilter
v-if="isStageCreated(selectedStage)"
:stage="selectedStage"
@@ -94,13 +82,11 @@
<script lang="ts" setup>
import { useWindowSize } from "@vueuse/core";
import { PlayIcon, PlusIcon } from "lucide-vue-next";
-import { NButton, NPopconfirm, NTag } from "naive-ui";
+import { NButton, NPopconfirm } from "naive-ui";
import { computed, ref } from "vue";
-import { EnvironmentV1Name } from "@/components/v2";
-import { useEnvironmentV1Store } from "@/store";
+import { usePlanContextWithRollout } from "@/components/Plan/logic";
import type { Rollout, Stage } from "@/types/proto-es/v1/rollout_service_pb";
import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
-import { usePlanContextWithRollout } from "../../../logic";
import StageContentSidebar from "./StageContentSidebar.vue";
import TaskFilter from "./TaskFilter.vue";
import TaskList from "./TaskList.vue";
@@ -116,7 +102,6 @@ defineEmits<{
(event: "create-stage", stage: Stage): void;
}>();
-const environmentStore = useEnvironmentV1Store();
const filterStatuses = ref<Task_Status[]>([]);
// Responsive layout: sidebar on wide screen (>= 768px), drawer on narrow
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/StageNavigationBar.vue b/frontend/src/components/RolloutV1/components/StageNavigationBar.vue
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/StageNavigationBar.vue
rename to frontend/src/components/RolloutV1/components/StageNavigationBar.vue
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/StageProgressCard.vue b/frontend/src/components/RolloutV1/components/StageProgressCard.vue
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/StageProgressCard.vue
rename to frontend/src/components/RolloutV1/components/StageProgressCard.vue
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/StageTaskRunsRollback.vue b/frontend/src/components/RolloutV1/components/StageTaskRunsRollback.vue
similarity index 89%
rename from frontend/src/components/Plan/components/RolloutView/v2/StageTaskRunsRollback.vue
rename to frontend/src/components/RolloutV1/components/StageTaskRunsRollback.vue
index f1de06cd4a..bbbb063a3b 100644
--- a/frontend/src/components/Plan/components/RolloutView/v2/StageTaskRunsRollback.vue
+++ b/frontend/src/components/RolloutV1/components/StageTaskRunsRollback.vue
@@ -20,10 +20,10 @@
import { DatabaseBackupIcon } from "lucide-vue-next";
import { NButton } from "naive-ui";
import { ref, toRef } from "vue";
+import { usePlanContextWithRollout } from "@/components/Plan/logic";
import type { Stage } from "@/types/proto-es/v1/rollout_service_pb";
-import { usePlanContextWithRollout } from "../../../logic";
-import TaskRunRollbackDrawer from "../TaskRunRollbackDrawer.vue";
import { useRollbackableTasks } from "./composables/useRollbackableTasks";
+import TaskRunRollbackDrawer from "./TaskRunRollbackDrawer.vue";
const props = defineProps<{
stage: Stage | null | undefined;
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/StageTimeline.vue b/frontend/src/components/RolloutV1/components/StageTimeline.vue
similarity index 99%
rename from frontend/src/components/Plan/components/RolloutView/v2/StageTimeline.vue
rename to frontend/src/components/RolloutV1/components/StageTimeline.vue
index b965439758..70bd816036 100644
--- a/frontend/src/components/Plan/components/RolloutView/v2/StageTimeline.vue
+++ b/frontend/src/components/RolloutV1/components/StageTimeline.vue
@@ -135,6 +135,7 @@ import { computed, ref, watch } from "vue";
import BBSpin from "@/bbkit/BBSpin.vue";
import TaskRunDetail from "@/components/IssueV1/components/TaskRunSection/TaskRunDetail.vue";
import TimestampDisplay from "@/components/misc/Timestamp.vue";
+import { useResourcePoller } from "@/components/Plan/logic/poller";
import TaskStatus from "@/components/Rollout/kits/TaskStatus.vue";
import { Drawer, DrawerContent } from "@/components/v2";
import { useCurrentProjectV1 } from "@/store";
@@ -145,7 +146,6 @@ import {
extractDatabaseResourceName,
extractInstanceResourceName,
} from "@/utils";
-import { useResourcePoller } from "../../../logic/poller";
import { useTaskNavigation } from "./composables/useTaskNavigation";
import {
getTaskNameFromTaskRun,
diff --git a/frontend/src/components/Plan/components/RolloutView/TaskDatabaseName.vue b/frontend/src/components/RolloutV1/components/TaskDatabaseName.vue
similarity index 70%
rename from frontend/src/components/Plan/components/RolloutView/TaskDatabaseName.vue
rename to frontend/src/components/RolloutV1/components/TaskDatabaseName.vue
index 3805be0492..92d909e10a 100644
--- a/frontend/src/components/Plan/components/RolloutView/TaskDatabaseName.vue
+++ b/frontend/src/components/RolloutV1/components/TaskDatabaseName.vue
@@ -3,8 +3,8 @@
</template>
<script setup lang="ts">
+import DatabaseDisplay from "@/components/Plan/components/common/DatabaseDisplay.vue";
import type { Task } from "@/types/proto-es/v1/rollout_service_pb";
-import DatabaseDisplay from "../common/DatabaseDisplay.vue";
defineProps<{
task: Task;
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/TaskFilter.vue b/frontend/src/components/RolloutV1/components/TaskFilter.vue
similarity index 95%
rename from frontend/src/components/Plan/components/RolloutView/v2/TaskFilter.vue
rename to frontend/src/components/RolloutV1/components/TaskFilter.vue
index 98350f06ef..9ea82e7199 100644
--- a/frontend/src/components/Plan/components/RolloutView/v2/TaskFilter.vue
+++ b/frontend/src/components/RolloutV1/components/TaskFilter.vue
@@ -31,8 +31,8 @@
<script lang="ts" setup>
import { NTag } from "naive-ui";
import { computed } from "vue";
-import { TASK_STATUS_FILTERS } from "@/components/Plan/constants/task";
import TaskStatus from "@/components/Rollout/kits/TaskStatus.vue";
+import { TASK_STATUS_FILTERS } from "@/components/RolloutV1/constants/task";
import type {
Stage,
Task_Status,
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/TaskItem.vue b/frontend/src/components/RolloutV1/components/TaskItem.vue
similarity index 99%
rename from frontend/src/components/Plan/components/RolloutView/v2/TaskItem.vue
rename to frontend/src/components/RolloutV1/components/TaskItem.vue
index 6cc910383d..d3aad61b14 100644
--- a/frontend/src/components/Plan/components/RolloutView/v2/TaskItem.vue
+++ b/frontend/src/components/RolloutV1/components/TaskItem.vue
@@ -234,7 +234,6 @@ import HighlightCodeBlock from "@/components/HighlightCodeBlock.vue";
import Timestamp from "@/components/misc/Timestamp.vue";
import { usePlanContextWithRollout } from "@/components/Plan";
import DatabaseDisplay from "@/components/Plan/components/common/DatabaseDisplay.vue";
-import TaskRolloutActionPanel from "@/components/Plan/components/RolloutView/TaskRolloutActionPanel.vue";
import TaskStatus from "@/components/Rollout/kits/TaskStatus.vue";
import { taskRunNamePrefix, useSheetV1Store } from "@/store";
import type { Stage, Task } from "@/types/proto-es/v1/rollout_service_pb";
@@ -247,6 +246,7 @@ import { useTaskStatement } from "./composables/useTaskStatement";
import { useTaskTiming } from "./composables/useTaskTiming";
import LatestTaskRunInfo from "./LatestTaskRunInfo.vue";
import ScheduledTimeIndicator from "./ScheduledTimeIndicator.vue";
+import TaskRolloutActionPanel from "./TaskRolloutActionPanel.vue";
const props = withDefaults(
defineProps<{
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/TaskList.vue b/frontend/src/components/RolloutV1/components/TaskList.vue
similarity index 99%
rename from frontend/src/components/Plan/components/RolloutView/v2/TaskList.vue
rename to frontend/src/components/RolloutV1/components/TaskList.vue
index d6cc71f8b7..c1d051ce84 100644
--- a/frontend/src/components/Plan/components/RolloutView/v2/TaskList.vue
+++ b/frontend/src/components/RolloutV1/components/TaskList.vue
@@ -48,7 +48,7 @@
<script lang="ts" setup>
import { computed, ref, watch } from "vue";
-import { usePlanContextWithRollout } from "@/components/Plan/logic/context";
+import { usePlanContextWithRollout } from "@/components/Plan/logic";
import type { Rollout, Stage } from "@/types/proto-es/v1/rollout_service_pb";
import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
import { useTaskCollapse } from "./composables/useTaskCollapse";
diff --git a/frontend/src/components/Plan/components/RolloutView/TaskRollbackButton.vue b/frontend/src/components/RolloutV1/components/TaskRollbackButton.vue
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/TaskRollbackButton.vue
rename to frontend/src/components/RolloutV1/components/TaskRollbackButton.vue
diff --git a/frontend/src/components/Plan/components/RolloutView/TaskRolloutActionPanel.vue b/frontend/src/components/RolloutV1/components/TaskRolloutActionPanel.vue
similarity index 99%
rename from frontend/src/components/Plan/components/RolloutView/TaskRolloutActionPanel.vue
rename to frontend/src/components/RolloutV1/components/TaskRolloutActionPanel.vue
index da2a387947..489facc19b 100644
--- a/frontend/src/components/Plan/components/RolloutView/TaskRolloutActionPanel.vue
+++ b/frontend/src/components/RolloutV1/components/TaskRolloutActionPanel.vue
@@ -255,6 +255,12 @@ import { computed, ref, watchEffect } from "vue";
import { useI18n } from "vue-i18n";
import { ErrorList } from "@/components/IssueV1/components/common";
import CommonDrawer from "@/components/IssueV1/components/Panel/CommonDrawer.vue";
+import PlanCheckStatusCount from "@/components/Plan/components/PlanCheckStatusCount.vue";
+import {
+ usePlanCheckStatus,
+ usePlanContextWithRollout,
+} from "@/components/Plan/logic";
+import { projectOfPlan } from "@/components/Plan/logic/utils";
import TaskStatus from "@/components/Rollout/kits/TaskStatus.vue";
import { EnvironmentV1Name } from "@/components/v2";
import { trackPriorBackupOnTaskRun } from "@/composables/usePriorBackupTelemetry";
@@ -293,9 +299,6 @@ import {
TaskRun_Status,
} from "@/types/proto-es/v1/rollout_service_pb";
import { extractStageUID, isNullOrUndefined } from "@/utils";
-import { usePlanCheckStatus, usePlanContextWithRollout } from "../../logic";
-import { projectOfPlan } from "../../logic/utils";
-import PlanCheckStatusCount from "../PlanCheckStatusCount.vue";
import TaskDatabaseName from "./TaskDatabaseName.vue";
import { canRolloutTasks } from "./taskPermissions";
diff --git a/frontend/src/components/Plan/components/RolloutView/TaskRunComment.vue b/frontend/src/components/RolloutV1/components/TaskRunComment.vue
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/TaskRunComment.vue
rename to frontend/src/components/RolloutV1/components/TaskRunComment.vue
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/TaskRunLogViewer/SectionContent.vue b/frontend/src/components/RolloutV1/components/TaskRunLogViewer/SectionContent.vue
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/TaskRunLogViewer/SectionContent.vue
rename to frontend/src/components/RolloutV1/components/TaskRunLogViewer/SectionContent.vue
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/TaskRunLogViewer/SectionHeader.vue b/frontend/src/components/RolloutV1/components/TaskRunLogViewer/SectionHeader.vue
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/TaskRunLogViewer/SectionHeader.vue
rename to frontend/src/components/RolloutV1/components/TaskRunLogViewer/SectionHeader.vue
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/TaskRunLogViewer/TaskRunLogViewer.vue b/frontend/src/components/RolloutV1/components/TaskRunLogViewer/TaskRunLogViewer.vue
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/TaskRunLogViewer/TaskRunLogViewer.vue
rename to frontend/src/components/RolloutV1/components/TaskRunLogViewer/TaskRunLogViewer.vue
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/TaskRunLogViewer/index.ts b/frontend/src/components/RolloutV1/components/TaskRunLogViewer/index.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/TaskRunLogViewer/index.ts
rename to frontend/src/components/RolloutV1/components/TaskRunLogViewer/index.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/TaskRunLogViewer/types.ts b/frontend/src/components/RolloutV1/components/TaskRunLogViewer/types.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/TaskRunLogViewer/types.ts
rename to frontend/src/components/RolloutV1/components/TaskRunLogViewer/types.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/TaskRunLogViewer/useTaskRunLogSections.ts b/frontend/src/components/RolloutV1/components/TaskRunLogViewer/useTaskRunLogSections.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/TaskRunLogViewer/useTaskRunLogSections.ts
rename to frontend/src/components/RolloutV1/components/TaskRunLogViewer/useTaskRunLogSections.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/TaskRunLogViewer/utils.ts b/frontend/src/components/RolloutV1/components/TaskRunLogViewer/utils.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/TaskRunLogViewer/utils.ts
rename to frontend/src/components/RolloutV1/components/TaskRunLogViewer/utils.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/TaskRunRollbackDrawer.vue b/frontend/src/components/RolloutV1/components/TaskRunRollbackDrawer.vue
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/TaskRunRollbackDrawer.vue
rename to frontend/src/components/RolloutV1/components/TaskRunRollbackDrawer.vue
diff --git a/frontend/src/components/Plan/components/RolloutView/TaskRunRollbackSection.vue b/frontend/src/components/RolloutV1/components/TaskRunRollbackSection.vue
similarity index 96%
rename from frontend/src/components/Plan/components/RolloutView/TaskRunRollbackSection.vue
rename to frontend/src/components/RolloutV1/components/TaskRunRollbackSection.vue
index 8a161250c1..3e740237c3 100644
--- a/frontend/src/components/Plan/components/RolloutView/TaskRunRollbackSection.vue
+++ b/frontend/src/components/RolloutV1/components/TaskRunRollbackSection.vue
@@ -25,6 +25,7 @@
import { DatabaseBackupIcon } from "lucide-vue-next";
import { NButton } from "naive-ui";
import { computed, ref } from "vue";
+import { usePlanContextWithRollout } from "@/components/Plan/logic";
import { taskRunNamePrefix, useCurrentProjectV1 } from "@/store";
import type {
Rollout,
@@ -33,7 +34,6 @@ import type {
} from "@/types/proto-es/v1/rollout_service_pb";
import { TaskRun_Status } from "@/types/proto-es/v1/rollout_service_pb";
import { databaseForTask } from "@/utils";
-import { usePlanContextWithRollout } from "../../logic";
import TaskRunRollbackDrawer from "./TaskRunRollbackDrawer.vue";
const props = defineProps<{
diff --git a/frontend/src/components/Plan/components/RolloutView/TaskRunTable.vue b/frontend/src/components/RolloutV1/components/TaskRunTable.vue
similarity index 98%
rename from frontend/src/components/Plan/components/RolloutView/TaskRunTable.vue
rename to frontend/src/components/RolloutV1/components/TaskRunTable.vue
index 04a65aef93..17d44b38c8 100644
--- a/frontend/src/components/Plan/components/RolloutView/TaskRunTable.vue
+++ b/frontend/src/components/RolloutV1/components/TaskRunTable.vue
@@ -35,6 +35,7 @@ import TaskRunDetail from "@/components/IssueV1/components/TaskRunSection/TaskRu
import TaskRunStatusIcon from "@/components/IssueV1/components/TaskRunSection/TaskRunStatusIcon.vue";
import HumanizeDate from "@/components/misc/HumanizeDate.vue";
import DatabaseDisplay from "@/components/Plan/components/common/DatabaseDisplay.vue";
+import { usePlanContextWithRollout } from "@/components/Plan/logic";
import { Drawer, DrawerContent } from "@/components/v2";
import { useCurrentProjectV1 } from "@/store";
import {
@@ -44,7 +45,6 @@ import {
import type { Task, TaskRun } from "@/types/proto-es/v1/rollout_service_pb";
import { TaskRun_Status } from "@/types/proto-es/v1/rollout_service_pb";
import { databaseForTask, extractTaskUID, humanizeDurationV1 } from "@/utils";
-import { usePlanContextWithRollout } from "../../logic";
import TaskRunComment from "./TaskRunComment.vue";
const props = defineProps<{
diff --git a/frontend/src/components/Plan/components/RolloutView/TaskStatusActions.vue b/frontend/src/components/RolloutV1/components/TaskStatusActions.vue
similarity index 98%
rename from frontend/src/components/Plan/components/RolloutView/TaskStatusActions.vue
rename to frontend/src/components/RolloutV1/components/TaskStatusActions.vue
index 92ad8acdc9..30f3185ce1 100644
--- a/frontend/src/components/Plan/components/RolloutView/TaskStatusActions.vue
+++ b/frontend/src/components/RolloutV1/components/TaskStatusActions.vue
@@ -38,6 +38,7 @@ import { EllipsisVerticalIcon } from "lucide-vue-next";
import { NButton, NDropdown } from "naive-ui";
import { computed, ref } from "vue";
import { useI18n } from "vue-i18n";
+import { usePlanContextWithRollout } from "@/components/Plan/logic";
import type {
Rollout,
Stage,
@@ -45,7 +46,6 @@ import type {
TaskRun,
} from "@/types/proto-es/v1/rollout_service_pb";
import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
-import { usePlanContextWithRollout } from "../../logic";
import TaskRolloutActionPanel from "./TaskRolloutActionPanel.vue";
import { canRolloutTasks } from "./taskPermissions";
diff --git a/frontend/src/components/Plan/components/RolloutView/TaskTable.vue b/frontend/src/components/RolloutV1/components/TaskTable.vue
similarity index 96%
rename from frontend/src/components/Plan/components/RolloutView/TaskTable.vue
rename to frontend/src/components/RolloutV1/components/TaskTable.vue
index cc48f065b3..75f3ee281f 100644
--- a/frontend/src/components/Plan/components/RolloutView/TaskTable.vue
+++ b/frontend/src/components/RolloutV1/components/TaskTable.vue
@@ -28,7 +28,9 @@ import { useRouter } from "vue-router";
import { semanticTaskType } from "@/components/IssueV1";
import Timestamp from "@/components/misc/Timestamp.vue";
import DatabaseDisplay from "@/components/Plan/components/common/DatabaseDisplay.vue";
+import { usePlanContextWithRollout } from "@/components/Plan/logic";
import TaskStatus from "@/components/Rollout/kits/TaskStatus.vue";
+import { useRolloutViewContext } from "@/components/RolloutV1/logic/context";
import { PROJECT_V1_ROUTE_ROLLOUT_DETAIL_TASK_DETAIL } from "@/router/dashboard/projectV1";
import { useCurrentProjectV1, useDatabaseV1Store } from "@/store";
import { getTimeForPbTimestampProtoEs } from "@/types";
@@ -39,8 +41,6 @@ import {
extractSchemaVersionFromTask,
humanizeTs,
} from "@/utils";
-import { usePlanContextWithRollout } from "../../logic";
-import { useRolloutViewContext } from "./context";
const props = withDefaults(
defineProps<{
@@ -61,10 +61,10 @@ const emit = defineEmits<{
const { t } = useI18n();
const router = useRouter();
+const databaseStore = useDatabaseV1Store();
const { project } = useCurrentProjectV1();
const { rollout, mergedStages } = useRolloutViewContext();
const { taskRuns } = usePlanContextWithRollout();
-const dbStore = useDatabaseV1Store();
const taskList = computed(() => {
if (props.taskStatusFilter.length === 0) {
@@ -106,7 +106,7 @@ const stageMap = computed(() => {
const prepareDatabases = async () => {
if (taskList.value.length > 0) {
try {
- await dbStore.batchGetOrFetchDatabases(
+ await databaseStore.batchGetOrFetchDatabases(
taskList.value.map((task) => task.target)
);
} catch {
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/TaskToolbar.vue b/frontend/src/components/RolloutV1/components/TaskToolbar.vue
similarity index 97%
rename from frontend/src/components/Plan/components/RolloutView/v2/TaskToolbar.vue
rename to frontend/src/components/RolloutV1/components/TaskToolbar.vue
index 2e0bc2c1cd..3d4878ce4a 100644
--- a/frontend/src/components/Plan/components/RolloutView/v2/TaskToolbar.vue
+++ b/frontend/src/components/RolloutV1/components/TaskToolbar.vue
@@ -103,14 +103,14 @@ import { PlayIcon, SkipForwardIcon, XIcon } from "lucide-vue-next";
import { NButton, NCheckbox, NTooltip } from "naive-ui";
import { computed, ref } from "vue";
import { useI18n } from "vue-i18n";
-import TaskRolloutActionPanel from "@/components/Plan/components/RolloutView/TaskRolloutActionPanel.vue";
-import { canRolloutTasks } from "@/components/Plan/components/RolloutView/taskPermissions";
import { usePlanContext } from "@/components/Plan/logic";
import { useCurrentUserV1 } from "@/store";
import { userNamePrefix } from "@/store/modules/v1/common";
import { Issue_Type } from "@/types/proto-es/v1/issue_service_pb";
import type { Stage, Task } from "@/types/proto-es/v1/rollout_service_pb";
import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
+import TaskRolloutActionPanel from "./TaskRolloutActionPanel.vue";
+import { canRolloutTasks } from "./taskPermissions";
import type { TaskAction } from "./types";
const props = defineProps<{
diff --git a/frontend/src/components/Plan/components/RolloutView/TaskView.vue b/frontend/src/components/RolloutV1/components/TaskView.vue
similarity index 98%
rename from frontend/src/components/Plan/components/RolloutView/TaskView.vue
rename to frontend/src/components/RolloutV1/components/TaskView.vue
index 1f4d683738..e06c68e655 100644
--- a/frontend/src/components/Plan/components/RolloutView/TaskView.vue
+++ b/frontend/src/components/RolloutV1/components/TaskView.vue
@@ -153,6 +153,11 @@ import { RouterLink } from "vue-router";
import { semanticTaskType } from "@/components/IssueV1";
import TaskRunDetail from "@/components/IssueV1/components/TaskRunSection/TaskRunDetail.vue";
import { MonacoEditor } from "@/components/MonacoEditor";
+import DatabaseDisplay from "@/components/Plan/components/common/DatabaseDisplay.vue";
+import {
+ getSpecTitle,
+ usePlanContextWithRollout,
+} from "@/components/Plan/logic";
import TaskStatus from "@/components/Rollout/kits/TaskStatus.vue";
import {
PROJECT_V1_ROUTE_PLAN_DETAIL_SPEC_DETAIL,
@@ -177,8 +182,6 @@ import {
getSheetStatement,
sheetNameOfTaskV1,
} from "@/utils";
-import { getSpecTitle, usePlanContextWithRollout } from "../../logic";
-import DatabaseDisplay from "../common/DatabaseDisplay.vue";
import TaskRollbackButton from "./TaskRollbackButton.vue";
import TaskRunTable from "./TaskRunTable.vue";
import TaskStatusActions from "./TaskStatusActions.vue";
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/composables/useRollbackableTasks.ts b/frontend/src/components/RolloutV1/components/composables/useRollbackableTasks.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/composables/useRollbackableTasks.ts
rename to frontend/src/components/RolloutV1/components/composables/useRollbackableTasks.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/composables/useStageSelection.ts b/frontend/src/components/RolloutV1/components/composables/useStageSelection.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/composables/useStageSelection.ts
rename to frontend/src/components/RolloutV1/components/composables/useStageSelection.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/composables/useStageStatus.ts b/frontend/src/components/RolloutV1/components/composables/useStageStatus.ts
similarity index 93%
rename from frontend/src/components/Plan/components/RolloutView/v2/composables/useStageStatus.ts
rename to frontend/src/components/RolloutV1/components/composables/useStageStatus.ts
index ecf72d8443..7820c92024 100644
--- a/frontend/src/components/Plan/components/RolloutView/v2/composables/useStageStatus.ts
+++ b/frontend/src/components/RolloutV1/components/composables/useStageStatus.ts
@@ -1,5 +1,5 @@
import { type ComputedRef, computed } from "vue";
-import { TASK_STATUS_FILTERS } from "@/components/Plan/constants/task";
+import { TASK_STATUS_FILTERS } from "@/components/RolloutV1/constants/task";
import type { Stage } from "@/types/proto-es/v1/rollout_service_pb";
import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskActions.ts b/frontend/src/components/RolloutV1/components/composables/useTaskActions.ts
similarity index 96%
rename from frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskActions.ts
rename to frontend/src/components/RolloutV1/components/composables/useTaskActions.ts
index 434786b2f2..698e89c453 100644
--- a/frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskActions.ts
+++ b/frontend/src/components/RolloutV1/components/composables/useTaskActions.ts
@@ -1,8 +1,8 @@
import type { ComputedRef, Ref } from "vue";
import { computed, ref } from "vue";
-import { canRolloutTasks } from "@/components/Plan/components/RolloutView/taskPermissions";
import type { Stage, Task } from "@/types/proto-es/v1/rollout_service_pb";
import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
+import { canRolloutTasks } from "../taskPermissions";
export type TaskAction = "RUN" | "SKIP" | "CANCEL";
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskCollapse.ts b/frontend/src/components/RolloutV1/components/composables/useTaskCollapse.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskCollapse.ts
rename to frontend/src/components/RolloutV1/components/composables/useTaskCollapse.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskDisplay.ts b/frontend/src/components/RolloutV1/components/composables/useTaskDisplay.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskDisplay.ts
rename to frontend/src/components/RolloutV1/components/composables/useTaskDisplay.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskInstancePreload.ts b/frontend/src/components/RolloutV1/components/composables/useTaskInstancePreload.ts
similarity index 91%
rename from frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskInstancePreload.ts
rename to frontend/src/components/RolloutV1/components/composables/useTaskInstancePreload.ts
index 34bfdaad8d..719af20dd9 100644
--- a/frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskInstancePreload.ts
+++ b/frontend/src/components/RolloutV1/components/composables/useTaskInstancePreload.ts
@@ -7,8 +7,8 @@ import type { Stage } from "@/types/proto-es/v1/rollout_service_pb";
* This ensures database and engine icons display correctly
*/
export const useTaskInstancePreload = (stages: () => Stage[]) => {
+ const databaseStore = useDatabaseV1Store();
const fetchedDatabases = ref(new Set<string>());
- const dbStore = useDatabaseV1Store();
watch(
stages,
@@ -32,7 +32,7 @@ export const useTaskInstancePreload = (stages: () => Stage[]) => {
if (newDatabases.length > 0) {
// Batch fetch databases (which also fetches their instances)
try {
- await dbStore.batchGetOrFetchDatabases(newDatabases);
+ await databaseStore.batchGetOrFetchDatabases(newDatabases);
// Mark these databases as fetched
newDatabases.forEach((name) => fetchedDatabases.value.add(name));
} catch {
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskNavigation.ts b/frontend/src/components/RolloutV1/components/composables/useTaskNavigation.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskNavigation.ts
rename to frontend/src/components/RolloutV1/components/composables/useTaskNavigation.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskRunLogSummary.ts b/frontend/src/components/RolloutV1/components/composables/useTaskRunLogSummary.ts
similarity index 98%
rename from frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskRunLogSummary.ts
rename to frontend/src/components/RolloutV1/components/composables/useTaskRunLogSummary.ts
index 9ca94809f1..55f9ada861 100644
--- a/frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskRunLogSummary.ts
+++ b/frontend/src/components/RolloutV1/components/composables/useTaskRunLogSummary.ts
@@ -1,6 +1,6 @@
import type { ComputedRef, MaybeRefOrGetter } from "vue";
import { computed, onUnmounted, ref, toValue, watch } from "vue";
-import { usePlanContext } from "@/components/Plan/logic/context";
+import { usePlanContext } from "@/components/Plan/logic";
import { useTaskRunLogStore } from "@/store/modules/v1/taskRunLog";
import type {
TaskRun,
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskRunUtils.ts b/frontend/src/components/RolloutV1/components/composables/useTaskRunUtils.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskRunUtils.ts
rename to frontend/src/components/RolloutV1/components/composables/useTaskRunUtils.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskSelection.ts b/frontend/src/components/RolloutV1/components/composables/useTaskSelection.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskSelection.ts
rename to frontend/src/components/RolloutV1/components/composables/useTaskSelection.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskStatement.ts b/frontend/src/components/RolloutV1/components/composables/useTaskStatement.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskStatement.ts
rename to frontend/src/components/RolloutV1/components/composables/useTaskStatement.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskTiming.ts b/frontend/src/components/RolloutV1/components/composables/useTaskTiming.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/composables/useTaskTiming.ts
rename to frontend/src/components/RolloutV1/components/composables/useTaskTiming.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/constants.ts b/frontend/src/components/RolloutV1/components/constants.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/constants.ts
rename to frontend/src/components/RolloutV1/components/constants.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/taskPermissions.ts b/frontend/src/components/RolloutV1/components/taskPermissions.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/taskPermissions.ts
rename to frontend/src/components/RolloutV1/components/taskPermissions.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/types.ts b/frontend/src/components/RolloutV1/components/types.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/types.ts
rename to frontend/src/components/RolloutV1/components/types.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/utils/reactivity.ts b/frontend/src/components/RolloutV1/components/utils/reactivity.ts
similarity index 100%
rename from frontend/src/components/Plan/components/RolloutView/v2/utils/reactivity.ts
rename to frontend/src/components/RolloutV1/components/utils/reactivity.ts
diff --git a/frontend/src/components/Plan/components/RolloutView/v2/utils/taskStatus.ts b/frontend/src/components/RolloutV1/components/utils/taskStatus.ts
similarity index 96%
rename from frontend/src/components/Plan/components/RolloutView/v2/utils/taskStatus.ts
rename to frontend/src/components/RolloutV1/components/utils/taskStatus.ts
index 13052ec495..9f11b2cac0 100644
--- a/frontend/src/components/Plan/components/RolloutView/v2/utils/taskStatus.ts
+++ b/frontend/src/components/RolloutV1/components/utils/taskStatus.ts
@@ -1,4 +1,4 @@
-import { TASK_STATUS_FILTERS } from "@/components/Plan/constants/task";
+import { TASK_STATUS_FILTERS } from "@/components/RolloutV1/constants/task";
import { getTimeForPbTimestampProtoEs } from "@/types";
import type { Task } from "@/types/proto-es/v1/rollout_service_pb";
import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
diff --git a/frontend/src/components/RolloutV1/constants/task.ts b/frontend/src/components/RolloutV1/constants/task.ts
new file mode 100644
index 0000000000..60302df8ba
--- /dev/null
+++ b/frontend/src/components/RolloutV1/constants/task.ts
@@ -0,0 +1,11 @@
+import { Task_Status } from "@/types/proto-es/v1/rollout_service_pb";
+
+export const TASK_STATUS_FILTERS: Task_Status[] = [
+ Task_Status.RUNNING,
+ Task_Status.FAILED,
+ Task_Status.PENDING,
+ Task_Status.NOT_STARTED,
+ Task_Status.CANCELED,
+ Task_Status.DONE,
+ Task_Status.SKIPPED,
+];
diff --git a/frontend/src/components/RolloutV1/index.ts b/frontend/src/components/RolloutV1/index.ts
new file mode 100644
index 0000000000..26200cde2d
--- /dev/null
+++ b/frontend/src/components/RolloutV1/index.ts
@@ -0,0 +1,28 @@
+// Main rollout components
+export { default as RolloutBreadcrumb } from "./components/RolloutBreadcrumb.vue";
+export { default as RolloutView } from "./components/RolloutView.vue";
+export { default as TaskRolloutActionPanel } from "./components/TaskRolloutActionPanel.vue";
+export { default as TaskRunTable } from "./components/TaskRunTable.vue";
+export { default as TaskTable } from "./components/TaskTable.vue";
+export { default as TaskView } from "./components/TaskView.vue";
+export { default as TaskStatusActions } from "./components/TaskStatusActions.vue";
+
+// Stage components
+export { default as StageContentView } from "./components/StageContentView.vue";
+export { default as StageNavigationBar } from "./components/StageNavigationBar.vue";
+export { default as StageTimeline } from "./components/StageTimeline.vue";
+
+// Task list components
+export { default as TaskItem } from "./components/TaskItem.vue";
+export { default as TaskList } from "./components/TaskList.vue";
+export { default as TaskToolbar } from "./components/TaskToolbar.vue";
+export { default as TaskFilter } from "./components/TaskFilter.vue";
+
+// Task run log viewer
+export * from "./components/TaskRunLogViewer";
+
+// Logic/context
+export * from "./logic/context";
+
+// Constants
+export * from "./constants/task";
diff --git a/frontend/src/components/Plan/components/RolloutView/context.ts b/frontend/src/components/RolloutV1/logic/context.ts
similarity index 96%
rename from frontend/src/components/Plan/components/RolloutView/context.ts
rename to frontend/src/components/RolloutV1/logic/context.ts
index fc2340b646..cee8903702 100644
--- a/frontend/src/components/Plan/components/RolloutView/context.ts
+++ b/frontend/src/components/RolloutV1/logic/context.ts
@@ -1,10 +1,13 @@
import { create } from "@bufbuild/protobuf";
import type { InjectionKey } from "vue";
import { computed, inject, nextTick, onUnmounted, provide, ref } from "vue";
+import {
+ generateRolloutPreview,
+ usePlanContextWithRollout,
+} from "@/components/Plan/logic";
import { useCurrentProjectV1 } from "@/store";
import type { Rollout } from "@/types/proto-es/v1/rollout_service_pb";
import { RolloutSchema } from "@/types/proto-es/v1/rollout_service_pb";
-import { generateRolloutPreview, usePlanContextWithRollout } from "../../logic";
export const KEY = Symbol(
"bb.plan.rollout-view"
diff --git a/frontend/src/components/RolloutV1/logic/index.ts b/frontend/src/components/RolloutV1/logic/index.ts
new file mode 100644
index 0000000000..2edd280c79
--- /dev/null
+++ b/frontend/src/components/RolloutV1/logic/index.ts
@@ -0,0 +1 @@
+export * from "./context";
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 8efeaabc7a..4a940ab98d 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -173,6 +173,7 @@
"deleted": "Deleted",
"active": "Active",
"reopen": "Reopen",
+ "plan": "Plan",
"rollout": "Rollout",
"upload": "Upload",
"clear": "Clear",
@@ -937,6 +938,7 @@
"labels": "Issue Labels",
"my-issues": "My Issues",
"waiting-approval": "Waiting for Approval",
+ "create-rollout": "Create Rollout",
"status-transition": {
"modal": {
"resolve": "Resolve issue?",
@@ -1156,8 +1158,7 @@
"approval": {
"rejected-error": "Issue approval has been rejected.",
"pending-error": "Issue approval is pending.",
- "approved-and-waiting-for-rollout": "This issue has been approved and is ready to rollout.",
- "ready-for-rollout": "Ready to rollout"
+ "approved-and-waiting-for-rollout": "This issue has been approved and is ready to rollout."
},
"new-layout": "New CI/CD Layout"
},
@@ -1174,7 +1175,6 @@
"navigator": {
"changes": "Changes",
"checks": "Checks",
- "rollout": "Rollout",
"statement-empty": "Statement is empty"
},
"checks": {
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 2d026638ef..72ceac9b89 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -173,6 +173,7 @@
"deleted": "Eliminado",
"active": "Activo",
"reopen": "Reabrir",
+ "plan": "Plan",
"rollout": "Implementar",
"upload": "Subir",
"clear": "Limpiar",
@@ -937,6 +938,7 @@
"labels": "Etiquetas de problema",
"my-issues": "Mis Incidencias",
"waiting-approval": "A la espera de la aprobación",
+ "create-rollout": "Crear despliegue",
"status-transition": {
"modal": {
"resolve": "¿Resolver incidencia?",
@@ -1156,8 +1158,7 @@
"approval": {
"rejected-error": "Se ha rechazado la aprobación del problema.",
"pending-error": "La aprobación del problema está pendiente.",
- "approved-and-waiting-for-rollout": "Este problema ha sido aprobado y está listo para implementarse.",
- "ready-for-rollout": "Listo para implementar"
+ "approved-and-waiting-for-rollout": "Este problema ha sido aprobado y está listo para implementarse."
},
"new-layout": "Nuevo diseño de CI/CD"
},
@@ -1174,7 +1175,6 @@
"navigator": {
"changes": "Cambios",
"checks": "Cheques",
- "rollout": "Despliegue",
"statement-empty": "La declaración está vacía"
},
"checks": {
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index ab911608e1..c8b953067e 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -173,6 +173,7 @@
"deleted": "削除されました",
"active": "アクティブ",
"reopen": "再開",
+ "plan": "プラン",
"rollout": "リリース",
"upload": "アップロード",
"clear": "クリア",
@@ -937,6 +938,7 @@
"labels": "イシューラベル",
"my-issues": "マイイシュー",
"waiting-approval": "承認待ち",
+ "create-rollout": "ロールアウトを作成",
"status-transition": {
"modal": {
"resolve": "イシューは完了しましたか?",
@@ -1156,8 +1158,7 @@
"approval": {
"rejected-error": "問題の承認が拒否されました。",
"pending-error": "問題の承認が保留中です。",
- "approved-and-waiting-for-rollout": "この問題は承認されており、展開する準備ができています。",
- "ready-for-rollout": "展開可能"
+ "approved-and-waiting-for-rollout": "この問題は承認されており、展開する準備ができています。"
},
"new-layout": "新しいCI/CDレイアウト"
},
@@ -1174,7 +1175,6 @@
"navigator": {
"changes": "変更点",
"checks": "小切手",
- "rollout": "ロールアウトする",
"statement-empty": "ステートメントが空です"
},
"checks": {
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index 07975f6e02..2b90a8586b 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -173,6 +173,7 @@
"deleted": "Đã xóa",
"active": "Tích cực",
"reopen": "Mở lại",
+ "plan": "Kế hoạch",
"rollout": "Triển khai",
"upload": "Tải lên",
"clear": "Xóa",
@@ -937,6 +938,7 @@
"labels": "Nhãn vấn đề",
"my-issues": "Vấn đề của tôi",
"waiting-approval": "Đang chờ phê duyệt",
+ "create-rollout": "Tạo triển khai",
"status-transition": {
"modal": {
"resolve": "Giải quyết vấn đề?",
@@ -1156,8 +1158,7 @@
"approval": {
"rejected-error": "Đã từ chối phê duyệt vấn đề.",
"pending-error": "Đang chờ phê duyệt vấn đề.",
- "approved-and-waiting-for-rollout": "Phiên bản này đã được chấp thuận và sẵn sàng triển khai.",
- "ready-for-rollout": "Sẵn sàng triển khai"
+ "approved-and-waiting-for-rollout": "Phiên bản này đã được chấp thuận và sẵn sàng triển khai."
},
"new-layout": "Bố cục CI/CD mới"
},
@@ -1174,7 +1175,6 @@
"navigator": {
"changes": "Thay đổi",
"checks": "Kiểm tra",
- "rollout": "Triển khai",
"statement-empty": "Câu lệnh trống rỗng"
},
"checks": {
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 6da5041b89..ab05604fea 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -173,6 +173,7 @@
"deleted": "已删除",
"active": "开启",
"reopen": "重开",
+ "plan": "变更计划",
"rollout": "发布",
"upload": "上传",
"clear": "清除",
@@ -937,6 +938,7 @@
"labels": "工单标签",
"my-issues": "我的工单",
"waiting-approval": "等待审批",
+ "create-rollout": "创建发布",
"status-transition": {
"modal": {
"resolve": "完成工单?",
@@ -1156,8 +1158,7 @@
"approval": {
"rejected-error": "此工单已被退回。",
"pending-error": "此工单正在等待审批。",
- "approved-and-waiting-for-rollout": "该工单已批准,等待发布。",
- "ready-for-rollout": "等待发布"
+ "approved-and-waiting-for-rollout": "该工单已批准,等待发布。"
},
"new-layout": "使用新版 CI/CD 页面"
},
@@ -1174,7 +1175,6 @@
"navigator": {
"changes": "变更项",
"checks": "SQL 检查",
- "rollout": "发布任务",
"statement-empty": "变更语句为空"
},
"checks": {
diff --git a/frontend/src/router/dashboard/projectV1.ts b/frontend/src/router/dashboard/projectV1.ts
index 35f50b358d..599f123561 100644
--- a/frontend/src/router/dashboard/projectV1.ts
+++ b/frontend/src/router/dashboard/projectV1.ts
@@ -34,10 +34,10 @@ export const PROJECT_V1_ROUTE_ROLLOUT_DETAIL = `${PROJECT_V1_ROUTE_ROLLOUTS}.det
export const PROJECT_V1_ROUTE_ROLLOUT_DETAIL_STAGE_DETAIL = `${PROJECT_V1_ROUTE_ROLLOUT_DETAIL}.stage.detail`;
export const PROJECT_V1_ROUTE_ROLLOUT_DETAIL_TASK_DETAIL = `${PROJECT_V1_ROUTE_ROLLOUT_DETAIL_STAGE_DETAIL}.task.detail`;
-const cicdRoutes: RouteRecordRaw[] = [
+const issueRoutes: RouteRecordRaw[] = [
{
path: "",
- component: () => import("@/views/project/CICDLayout.vue"),
+ component: () => import("@/views/project/IssueLayout.vue"),
props: true,
children: [
{
@@ -75,11 +75,21 @@ const cicdRoutes: RouteRecordRaw[] = [
component: () => import("@/views/project/IssueDetailV1View.vue"),
props: true,
},
+ ],
+ },
+];
+
+const rolloutRoutes: RouteRecordRaw[] = [
+ {
+ path: "rollouts/:rolloutId",
+ component: () => import("@/views/project/RolloutLayout.vue"),
+ props: true,
+ meta: {
+ title: () => t("common.rollout"),
+ },
+ children: [
{
- path: "rollouts/:rolloutId",
- meta: {
- title: () => t("common.rollout"),
- },
+ path: "",
component: () => import("@/views/project/RolloutDetailLayout.vue"),
props: true,
children: [
@@ -87,9 +97,7 @@ const cicdRoutes: RouteRecordRaw[] = [
path: "",
name: PROJECT_V1_ROUTE_ROLLOUT_DETAIL,
component: () =>
- import(
- "@/components/Plan/components/RolloutView/v2/RolloutView.vue"
- ),
+ import("@/components/RolloutV1/components/RolloutView.vue"),
props: true,
meta: {
requiredPermissionList: () => ["bb.rollouts.get"],
@@ -99,9 +107,7 @@ const cicdRoutes: RouteRecordRaw[] = [
path: "stages/:stageId",
name: PROJECT_V1_ROUTE_ROLLOUT_DETAIL_STAGE_DETAIL,
component: () =>
- import(
- "@/components/Plan/components/RolloutView/v2/RolloutView.vue"
- ),
+ import("@/components/RolloutV1/components/RolloutView.vue"),
props: true,
meta: {
requiredPermissionList: () => ["bb.rollouts.get"],
@@ -111,7 +117,7 @@ const cicdRoutes: RouteRecordRaw[] = [
path: "stages/:stageId/tasks/:taskId",
name: PROJECT_V1_ROUTE_ROLLOUT_DETAIL_TASK_DETAIL,
component: () =>
- import("@/components/Plan/components/RolloutView/TaskView.vue"),
+ import("@/components/RolloutV1/components/TaskView.vue"),
props: true,
meta: {
requiredPermissionList: () => ["bb.rollouts.get"],
@@ -409,7 +415,8 @@ const projectV1Routes: RouteRecordRaw[] = [
},
],
},
- ...cicdRoutes,
+ ...issueRoutes,
+ ...rolloutRoutes,
],
},
];
diff --git a/frontend/src/utils/v1/issue/rollout.ts b/frontend/src/utils/v1/issue/rollout.ts
index 34ecbb6dc5..0113e22039 100644
--- a/frontend/src/utils/v1/issue/rollout.ts
+++ b/frontend/src/utils/v1/issue/rollout.ts
@@ -247,6 +247,19 @@ export const getStageStatus = (stage: Stage): Task_Status => {
return Task_Status.NOT_STARTED;
};
+export const getRolloutStatus = (rollout: Rollout): Task_Status => {
+ const stages = rollout.stages;
+ if (stages.length === 0) return Task_Status.NOT_STARTED;
+
+ for (const status of TASK_STATUS_FILTERS) {
+ if (stages.some((stage) => getStageStatus(stage) === status)) {
+ return status;
+ }
+ }
+
+ return Task_Status.NOT_STARTED;
+};
+
export const databaseForTask = (project: Project, task: Task) => {
switch (task.type) {
case Task_Type.DATABASE_CREATE:
diff --git a/frontend/src/views/project/CICDLayout.vue b/frontend/src/views/project/IssueLayout.vue
similarity index 84%
rename from frontend/src/views/project/CICDLayout.vue
rename to frontend/src/views/project/IssueLayout.vue
index e6d16821be..80a2b6c7f0 100644
--- a/frontend/src/views/project/CICDLayout.vue
+++ b/frontend/src/views/project/IssueLayout.vue
@@ -3,8 +3,6 @@
<template v-if="ready">
<PollerProvider>
<div class="h-full flex flex-col">
- <BannerSection />
-
<HeaderSection />
<NTabs
@@ -21,13 +19,6 @@
:name="tab"
:tab="tabRender(tab)"
/>
-
- <!-- Suffix slot -->
- <template #suffix>
- <div class="pr-3 flex flex-row justify-end items-center gap-4">
- <RefreshIndicator />
- </div>
- </template>
</NTabs>
<div class="flex-1 flex">
@@ -62,10 +53,9 @@ import {
useBasePlanContext,
useInitializePlan,
} from "@/components/Plan";
-import { BannerSection, HeaderSection } from "@/components/Plan/components";
-import RefreshIndicator from "@/components/Plan/components/RefreshIndicator.vue";
+import { HeaderSection } from "@/components/Plan/components";
import { provideSidebarContext } from "@/components/Plan/logic/sidebar";
-import { useCICDTabNavigation } from "@/components/Plan/logic/useCICDTabNavigation.tsx";
+import { useIssueTabNavigation } from "@/components/Plan/logic/useIssueTabNavigation.tsx";
import { useNavigationGuard } from "@/components/Plan/logic/useNavigationGuard";
import PollerProvider from "@/components/Plan/PollerProvider.vue";
import { useIssueLayoutVersion } from "@/composables/useIssueLayoutVersion";
@@ -75,7 +65,6 @@ const props = defineProps<{
projectId: string;
planId?: string;
issueId?: string;
- rolloutId?: string;
}>();
const { t } = useI18n();
@@ -90,8 +79,7 @@ const {
} = useInitializePlan(
toRef(props, "projectId"),
toRef(props, "planId"),
- toRef(props, "issueId"),
- toRef(props, "rolloutId")
+ toRef(props, "issueId")
);
const planBaseContext = useBasePlanContext({
isCreating,
@@ -107,7 +95,7 @@ const ready = computed(() => {
});
const shouldShowNavigation = computed(() => {
- // Or if we have a valid plan with supported specs
+ // Show navigation if we have a valid plan with supported specs and an issue
if (!plan.value) {
return false;
}
@@ -116,7 +104,7 @@ const shouldShowNavigation = computed(() => {
plan.value.specs.some(
(spec) => spec.config.case === "changeDatabaseConfig"
) &&
- (plan.value.issue || plan.value.rollout)
+ plan.value.issue
);
});
@@ -138,7 +126,7 @@ provideSidebarContext(containerRef);
// Tab navigation
const { tabKey, availableTabs, tabRender, handleTabChange } =
- useCICDTabNavigation({
+ useIssueTabNavigation({
route,
router,
plan,
diff --git a/frontend/src/views/project/RolloutDetailLayout.vue b/frontend/src/views/project/RolloutDetailLayout.vue
index 8614cff9e9..b09915768e 100644
--- a/frontend/src/views/project/RolloutDetailLayout.vue
+++ b/frontend/src/views/project/RolloutDetailLayout.vue
@@ -5,7 +5,7 @@
<script lang="ts" setup>
import { watchEffect } from "vue";
import { usePlanContextWithRollout } from "@/components/Plan";
-import { provideRolloutViewContext } from "@/components/Plan/components/RolloutView/context";
+import { provideRolloutViewContext } from "@/components/RolloutV1/logic/context";
import { usePolicyV1Store } from "@/store";
import { PolicyType } from "@/types/proto-es/v1/org_policy_service_pb";
diff --git a/frontend/src/views/project/RolloutLayout.vue b/frontend/src/views/project/RolloutLayout.vue
new file mode 100644
index 0000000000..b5ee73e2c3
--- /dev/null
+++ b/frontend/src/views/project/RolloutLayout.vue
@@ -0,0 +1,116 @@
+<template>
+ <div ref="containerRef" class="relative overflow-x-hidden h-full">
+ <template v-if="ready">
+ <PollerProvider>
+ <div class="h-full flex flex-col">
+ <div class="flex items-center justify-between pt-2 px-3 sm:px-4 shrink-0">
+ <RolloutBreadcrumb />
+ <RefreshIndicator />
+ </div>
+
+ <h1 class="px-3 sm:px-4 pt-1 text-lg font-medium text-main truncate shrink-0">
+ {{ title }}
+ </h1>
+
+ <router-view v-slot="{ Component }">
+ <keep-alive :max="3">
+ <component :is="Component" />
+ </keep-alive>
+ </router-view>
+ </div>
+ </PollerProvider>
+ </template>
+ <div v-else class="w-full h-full flex flex-col items-center justify-center">
+ <NSpin />
+ </div>
+ </div>
+</template>
+
+<script lang="ts" setup>
+import { useTitle } from "@vueuse/core";
+import { NSpin } from "naive-ui";
+import { computed, ref, toRef } from "vue";
+import { useI18n } from "vue-i18n";
+import {
+ providePlanContext,
+ useBasePlanContext,
+ useInitializePlan,
+} from "@/components/Plan";
+import RefreshIndicator from "@/components/Plan/components/RefreshIndicator.vue";
+import { provideSidebarContext } from "@/components/Plan/logic/sidebar";
+import PollerProvider from "@/components/Plan/PollerProvider.vue";
+import RolloutBreadcrumb from "@/components/RolloutV1/components/RolloutBreadcrumb.vue";
+import { useBodyLayoutContext } from "@/layouts/common";
+
+const props = defineProps<{
+ projectId: string;
+ rolloutId: string;
+}>();
+
+const { t } = useI18n();
+const {
+ isCreating,
+ plan,
+ planCheckRuns,
+ issue,
+ rollout,
+ taskRuns,
+ isInitializing,
+} = useInitializePlan(
+ toRef(props, "projectId"),
+ undefined, // planId - not used for rollout routes
+ undefined, // issueId - not used for rollout routes
+ toRef(props, "rolloutId")
+);
+const planBaseContext = useBasePlanContext({
+ isCreating,
+ plan,
+ issue,
+});
+const containerRef = ref<HTMLElement>();
+
+const ready = computed(() => {
+ // Ready when we have a rollout and initialization is complete
+ return !!rollout.value && !isInitializing.value;
+});
+
+const title = computed(() => {
+ // Use issue title if available, otherwise plan title
+ if (issue.value?.title) {
+ return issue.value.title;
+ }
+ if (plan.value?.title) {
+ return plan.value.title;
+ }
+ return "";
+});
+
+providePlanContext({
+ isCreating,
+ plan,
+ planCheckRuns,
+ issue,
+ rollout,
+ taskRuns,
+ ...planBaseContext,
+});
+
+provideSidebarContext(containerRef);
+
+const { overrideMainContainerClass } = useBodyLayoutContext();
+
+overrideMainContainerClass("py-0! px-0!");
+
+const documentTitle = computed(() => {
+ if (ready.value && rollout.value) {
+ // Use plan title if available, otherwise rollout name
+ if (plan.value?.title) {
+ return plan.value.title;
+ }
+ return t("common.rollout");
+ }
+ return t("common.loading");
+});
+
+useTitle(documentTitle);
+</script>