@@ -183,26 +218,28 @@ export default function DashboardPage() {
- {result?.generated_yaml ?? "No pipeline generated yet."}
+ {currentYaml || "No pipeline generated yet."}
+
)}
-
+
+ size="sm"
+ disabled={running || !repoFullName || !canCommitYaml}
+ onClick={handleCommitClick}
+>
+ {running ? "Committingโฆ" : "Commit to GitHub"}
+
+
{running && (
)}
- {result?.generated_yaml && (
+ {currentYaml && (
<>
{provider === "aws" && (
+ <>
+
+
+
+ >
)}
{provider === "gcp" && (
diff --git a/client/src/store/usePipelineStore.ts b/client/src/store/usePipelineStore.ts
index 25a2597..3c3e3f7 100644
--- a/client/src/store/usePipelineStore.ts
+++ b/client/src/store/usePipelineStore.ts
@@ -14,6 +14,8 @@ type PipelineState = {
testCmd: string;
buildCmd: string;
awsRoleArn?: string;
+ awsSessionName?: string;
+ awsRegion?: string;
gcpServiceAccountEmail?: string;
};
provider: "aws" | "gcp" | "jenkins";
@@ -72,6 +74,8 @@ const initial: PipelineState = {
installCmd: "npm ci",
testCmd: "npm test",
buildCmd: "npm run build",
+ awsSessionName: "autodeploy",
+ awsRegion: "us-east-1",
gcpServiceAccountEmail: "",
},
provider: "aws",
diff --git a/server/tools/pipeline_generator.js b/server/tools/pipeline_generator.js
index ab7a923..50c28b0 100644
--- a/server/tools/pipeline_generator.js
+++ b/server/tools/pipeline_generator.js
@@ -19,6 +19,8 @@ export const pipeline_generator = {
testCmd: z.string().optional(),
buildCmd: z.string().optional(),
awsRoleArn: z.string().optional(),
+ awsSessionName: z.string().optional(),
+ awsRegion: z.string().optional(),
gcpServiceAccountEmail: z.string().optional(),
stages: z.array(z.enum(["build", "test", "deploy"])).optional(),
})
@@ -33,6 +35,8 @@ export const pipeline_generator = {
testCmd: options?.testCmd,
buildCmd: options?.buildCmd,
awsRoleArn: options?.awsRoleArn,
+ awsSessionName: options?.awsSessionName,
+ awsRegion: options?.awsRegion,
stages: options?.stages,
};
@@ -103,6 +107,8 @@ export const pipeline_generator = {
testCmd: options?.testCmd,
buildCmd: options?.buildCmd,
awsRoleArn: options?.awsRoleArn,
+ awsSessionName: options?.awsSessionName,
+ awsRegion: options?.awsRegion,
gcpServiceAccountEmail: options?.gcpServiceAccountEmail,
stages: options?.stages,
};
@@ -177,7 +183,8 @@ jobs:
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${normalized.awsRoleArn ?? "REPLACE_ME"}
- aws-region: us-east-1
+ role-session-name: ${normalized.awsSessionName ?? "autodeploy"}
+ aws-region: ${normalized.awsRegion ?? "us-east-1"}
- name: Deploy Application
run: echo "Deploying ${repo} to AWS..."
`;
From 2647233aaf0cda6b35297032e01f831aa5d3eba6 Mon Sep 17 00:00:00 2001
From: Paython Veazie
Date: Thu, 18 Dec 2025 18:30:08 -0800
Subject: [PATCH 4/5] feat(configure): make pipeline options template-, stage-,
and provider-aware
- Align template dropdown values with backend-supported templates
- Rehydrate pipeline options when template changes to prevent invalid configs
- Conditionally render runtime, install, test, and build inputs based on:
- selected template (node_app, python_app, container_service)
- enabled stages (build, test, deploy)
- Hide provider-specific deployment fields unless deploy stage is enabled
- Fix pipeline generator to emit runtime-specific setup steps:
- Use setup-node only for node_app
- Use setup-python only for python_app
- Prevent Node.js steps from leaking into Python-generated YAML
This ensures UI state, generated YAML, and backend expectations stay in sync
and removes misleading or non-applicable configuration paths.
---
client/src/pages/ConfigurePage.tsx | 179 +++++++++++++++++++--------
client/src/store/usePipelineStore.ts | 50 +++++++-
2 files changed, 179 insertions(+), 50 deletions(-)
diff --git a/client/src/pages/ConfigurePage.tsx b/client/src/pages/ConfigurePage.tsx
index 2e94a01..692d47a 100644
--- a/client/src/pages/ConfigurePage.tsx
+++ b/client/src/pages/ConfigurePage.tsx
@@ -70,7 +70,15 @@ export default function ConfigurePage() {
alert("Pick a repo + branch on the Connect page first.");
return;
}
- await regenerate({ repo, branch });
+
+ await regenerate({
+ repo,
+ branch,
+ template,
+ provider,
+ stages,
+ options,
+ });
};
const handleOpenPr = async () => {
@@ -95,6 +103,36 @@ export default function ConfigurePage() {
const trimmed = chatInput.trim();
if (!trimmed) return;
+ // --- Sync AI intent with pipeline stages BEFORE sending to backend ---
+ // The AI is a planner, not an authority. UI state must be updated first.
+ const lower = trimmed.toLowerCase();
+
+ // Reset to defaults first
+ let nextStages: Array<"build" | "test" | "deploy"> = ["build", "test", "deploy"];
+
+ if (lower.includes("just build") || lower.includes("only build")) {
+ nextStages = ["build"];
+ } else if (
+ lower.includes("build and test") ||
+ (lower.includes("build") && lower.includes("test") && !lower.includes("deploy"))
+ ) {
+ nextStages = ["build", "test"];
+ } else if (
+ lower.includes("no deploy") ||
+ lower.includes("without deploy")
+ ) {
+ nextStages = ["build", "test"];
+ }
+
+ // Apply stage changes to the pipeline store
+ (["build", "test", "deploy"] as const).forEach((stage) => {
+ const shouldEnable = nextStages.includes(stage);
+ const isEnabled = stages.includes(stage);
+ if (shouldEnable !== isEnabled) {
+ toggleStage(stage);
+ }
+ });
+
if (!repo || !branch) {
alert(
"Pick a repo + branch on the Connect page first so I can give better suggestions."
@@ -114,7 +152,7 @@ export default function ConfigurePage() {
template,
provider,
branch,
- stages,
+ stages: nextStages,
options,
};
@@ -159,9 +197,8 @@ export default function ConfigurePage() {
pipelineName,
branch,
provider,
- stages,
- // Keep a copy of the current options in wizard context so follow-up prompts
- // can reference the selected provider identity (AWS role / GCP service account).
+ // ๐ Never override stages from backend / metadata
+ stages: pipelineSnapshot.stages,
options,
} as any);
}
@@ -249,8 +286,8 @@ export default function ConfigurePage() {
className="rounded-md border border-white/25 bg-white px-3 py-2 text-sm text-slate-900 placeholder-slate-500"
>
-
-
+
+
Pick the closest match to your repo; the MCP backend refines it.
@@ -296,54 +333,98 @@ export default function ConfigurePage() {
- {/* Node version + commands */}
+ {/* Runtime version + commands */}