feat(automation): add environment automation area - #2945
RemiBonnet wants to merge 39 commits into
Conversation
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx affected --target=test --parallel=3 --config... |
❌ Failed | 2m 39s | View ↗ |
nx affected --target=lint --parallel=3 |
✅ Succeeded | 2m 36s | View ↗ |
nx-cloud record -- yarn nx format:check |
✅ Succeeded | 7s | View ↗ |
💡 Dealing with memory or CPU issues? See memory and CPU details with the resource usage add-on ↗.
☁️ Nx Cloud last updated this comment at 2026-09-09 16:25:19 UTC
There was a problem hiding this comment.
2 issues found across 21 files
Confidence score: 3/5
- The route in
apps/console/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/automations/index.tsxstill exposes agent-task listings and creation whenargentic-workflowis disabled, allowing the feature flag to be bypassed via fallback or direct URL; guard the route and its creation entry points. - The filter in
apps/console/src/routes/_authenticated/organization/route.tsxremoves the only navigation entry for Deployment rules and Preview environments when the flag is disabled, making existing settings difficult or impossible to reach; keep those settings visible while hiding only agent-task pages.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/console/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/automations/index.tsx">
<violation number="1" location="apps/console/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/automations/index.tsx:19">
P2: When `argentic-workflow` is disabled, this route still renders the agent-task list and creation cards, so the feature flag can be bypassed through the existing creation-route fallback or a direct URL. Guard this route with the same feature-flag redirect behavior and send disabled users to a non-agent environment page.</violation>
</file>
<file name="apps/console/src/routes/_authenticated/organization/route.tsx">
<violation number="1" location="apps/console/src/routes/_authenticated/organization/route.tsx:382">
P2: When `argentic-workflow` is disabled, this filter hides the only environment navigation entry for Deployment rules and Preview environments, even though those existing settings are not agent-task pages. Keep the environment settings links discoverable independently of the agent-task feature flag, and gate only the agent-task UI.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
|
||
| if (!environment) return null | ||
|
|
||
| const hasAgentTasks = services.some(isAgenticWorkflow) |
There was a problem hiding this comment.
P2: When argentic-workflow is disabled, this route still renders the agent-task list and creation cards, so the feature flag can be bypassed through the existing creation-route fallback or a direct URL. Guard this route with the same feature-flag redirect behavior and send disabled users to a non-agent environment page.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/console/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/automations/index.tsx, line 19:
<comment>When `argentic-workflow` is disabled, this route still renders the agent-task list and creation cards, so the feature flag can be bypassed through the existing creation-route fallback or a direct URL. Guard this route with the same feature-flag redirect behavior and send disabled users to a non-agent environment page.</comment>
<file context>
@@ -0,0 +1,46 @@
+
+ if (!environment) return null
+
+ const hasAgentTasks = services.some(isAgenticWorkflow)
+ const useCasesProps = {
+ organizationId,
</file context>
| ? context.tabs.filter((tab) => hasAlerting || tab.id !== 'alerts') | ||
| : context.tabs | ||
| : context.type === 'environment' | ||
| ? context.tabs.filter((tab) => isAgenticWorkflowEnabled || tab.id !== 'automations') |
There was a problem hiding this comment.
P2: When argentic-workflow is disabled, this filter hides the only environment navigation entry for Deployment rules and Preview environments, even though those existing settings are not agent-task pages. Keep the environment settings links discoverable independently of the agent-task feature flag, and gate only the agent-task UI.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/console/src/routes/_authenticated/organization/route.tsx, line 382:
<comment>When `argentic-workflow` is disabled, this filter hides the only environment navigation entry for Deployment rules and Preview environments, even though those existing settings are not agent-task pages. Keep the environment settings links discoverable independently of the agent-task feature flag, and gate only the agent-task UI.</comment>
<file context>
@@ -372,9 +378,11 @@ function useNavigationContext(): NavigationContext | null {
- ? context.tabs.filter((tab) => hasAlerting || tab.id !== 'alerts')
- : context.tabs
+ : context.type === 'environment'
+ ? context.tabs.filter((tab) => isAgenticWorkflowEnabled || tab.id !== 'automations')
+ : context.type === 'organization'
+ ? context.tabs.filter((tab) => hasAlerting || tab.id !== 'alerts')
</file context>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## staging #2945 +/- ##
===========================================
+ Coverage 46.54% 49.24% +2.69%
===========================================
Files 535 1243 +708
Lines 13938 27024 +13086
Branches 4299 8090 +3791
===========================================
+ Hits 6487 13307 +6820
- Misses 6337 11494 +5157
- Partials 1114 2223 +1109
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
All reported issues were addressed across 8 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
1 issue found across 4 files (changes from recent commits).
Confidence score: 3/5
- In
agentic-workflow-service-list.tsx, removing theEnabledandDisabledlabels conflicts with the existingAgenticWorkflowServiceListtest and will fail the feature Jest suite; update the test expectations alongside the rendering change.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="libs/domains/services/feature/src/lib/agentic-workflow-service-list/agentic-workflow-service-list.tsx">
<violation number="1" location="libs/domains/services/feature/src/lib/agentic-workflow-service-list/agentic-workflow-service-list.tsx:114">
P2: This replacement removes the `Enabled` and `Disabled` labels that the existing `AgenticWorkflowServiceList` test asserts, causing the feature Jest suite to fail. Update the test expectations alongside this rendering change.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| </Table.Cell> | ||
| <Table.Cell className="flex h-full min-w-0 items-center border-r border-neutral"> | ||
| <WebhookCell service={service} onAction={stopRowNavigation} /> | ||
| <div className="flex flex-col gap-1"> |
There was a problem hiding this comment.
P2: This replacement removes the Enabled and Disabled labels that the existing AgenticWorkflowServiceList test asserts, causing the feature Jest suite to fail. Update the test expectations alongside this rendering change.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At libs/domains/services/feature/src/lib/agentic-workflow-service-list/agentic-workflow-service-list.tsx, line 114:
<comment>This replacement removes the `Enabled` and `Disabled` labels that the existing `AgenticWorkflowServiceList` test asserts, causing the feature Jest suite to fail. Update the test expectations alongside this rendering change.</comment>
<file context>
@@ -110,7 +111,17 @@ export function AgenticWorkflowServiceList({ environment }: AgenticWorkflowServi
</Table.Cell>
<Table.Cell className="flex h-full min-w-0 items-center border-r border-neutral">
- <span>{service.enabled ? 'Enabled' : 'Disabled'}</span>
+ <div className="flex flex-col gap-1">
+ <time dateTime={MOCK_RUNS[0].created_at}>
+ {new Intl.DateTimeFormat('en-GB', {
</file context>
There was a problem hiding this comment.
2 issues found across 11 files (changes from recent commits).
Confidence score: 4/5
apps/console/src/routes/_authenticated/organization/route.tsxexposes the service-level Runs tab without theargentic-workflowfeature-flag gate used by the surrounding Automations UI, which could make unsupported functionality visible; align the tab visibility with the existing flag behavior.apps/console/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/$serviceId/runs.tsxrenders a blank main area when the loaded service is non-agentic or null, leaving users without guidance or navigation; add an explicit empty or unsupported-service state.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/console/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/$serviceId/runs.tsx">
<violation number="1" location="apps/console/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/$serviceId/runs.tsx:14">
P3: When `service` is loaded but is not an agentic workflow (or is null), this route returns `null`, rendering a blank main area with no message and no way to navigate back. The Runs link only appears in the agentic-workflow action menu, so a real user normally can't reach this route for a non-agentic service, but the route is directly URL-addressable (e.g. a manually entered or stale link), and a blank screen gives no feedback. Check `isAgenticWorkflow` and render a redirect or fallback instead of `null`.</violation>
</file>
<file name="apps/console/src/routes/_authenticated/organization/route.tsx">
<violation number="1" location="apps/console/src/routes/_authenticated/organization/route.tsx:235">
P2: The service-level Runs tab is added unconditionally to agentic workflow services, while the rest of the Automations area is gated by the `argentic-workflow` feature flag. In this same file the environment Automations tab is hidden with `isAgenticWorkflowEnabled || tab.id !== 'automations'`, and the agentic Variables tab is similarly removed when the flag is off (`isAgenticWorkflowEnabled || tab.id !== 'variables'`). As a result, when the flag is disabled but a service of type `AGENTIC_WORKFLOW` still exists (created while the flag was on), the user sees a Runs tab that links into flag-gated automations content. Gate `runs` the same way as `variables` for consistency.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
|
|
||
| const ARGOCD_SERVICE_TAB_IDS = ['overview', 'service-logs', 'cloud-shell', 'manifest'] | ||
| const AGENTIC_WORKFLOW_SERVICE_TAB_IDS = ['overview', 'deployments', 'service-logs', 'variables', 'settings'] | ||
| const AGENTIC_WORKFLOW_SERVICE_TAB_IDS = ['overview', 'runs', 'deployments', 'service-logs', 'variables', 'settings'] |
There was a problem hiding this comment.
P2: The service-level Runs tab is added unconditionally to agentic workflow services, while the rest of the Automations area is gated by the argentic-workflow feature flag. In this same file the environment Automations tab is hidden with isAgenticWorkflowEnabled || tab.id !== 'automations', and the agentic Variables tab is similarly removed when the flag is off (isAgenticWorkflowEnabled || tab.id !== 'variables'). As a result, when the flag is disabled but a service of type AGENTIC_WORKFLOW still exists (created while the flag was on), the user sees a Runs tab that links into flag-gated automations content. Gate runs the same way as variables for consistency.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/console/src/routes/_authenticated/organization/route.tsx, line 235:
<comment>The service-level Runs tab is added unconditionally to agentic workflow services, while the rest of the Automations area is gated by the `argentic-workflow` feature flag. In this same file the environment Automations tab is hidden with `isAgenticWorkflowEnabled || tab.id !== 'automations'`, and the agentic Variables tab is similarly removed when the flag is off (`isAgenticWorkflowEnabled || tab.id !== 'variables'`). As a result, when the flag is disabled but a service of type `AGENTIC_WORKFLOW` still exists (created while the flag was on), the user sees a Runs tab that links into flag-gated automations content. Gate `runs` the same way as `variables` for consistency.</comment>
<file context>
@@ -225,7 +232,7 @@ const SERVICE_TABS: NavigationTab[] = [
const ARGOCD_SERVICE_TAB_IDS = ['overview', 'service-logs', 'cloud-shell', 'manifest']
-const AGENTIC_WORKFLOW_SERVICE_TAB_IDS = ['overview', 'deployments', 'service-logs', 'variables', 'settings']
+const AGENTIC_WORKFLOW_SERVICE_TAB_IDS = ['overview', 'runs', 'deployments', 'service-logs', 'variables', 'settings']
function hasServiceMonitoringTab(service?: AnyService, cluster?: Cluster) {
</file context>
| function RouteComponent() { | ||
| const { environmentId = '', serviceId = '' } = useParams({ strict: false }) | ||
| const { data: service } = useService({ environmentId, serviceId, suspense: true }) | ||
| if (!service || !isAgenticWorkflow(service)) return null |
There was a problem hiding this comment.
P3: When service is loaded but is not an agentic workflow (or is null), this route returns null, rendering a blank main area with no message and no way to navigate back. The Runs link only appears in the agentic-workflow action menu, so a real user normally can't reach this route for a non-agentic service, but the route is directly URL-addressable (e.g. a manually entered or stale link), and a blank screen gives no feedback. Check isAgenticWorkflow and render a redirect or fallback instead of null.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/console/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/$serviceId/runs.tsx, line 14:
<comment>When `service` is loaded but is not an agentic workflow (or is null), this route returns `null`, rendering a blank main area with no message and no way to navigate back. The Runs link only appears in the agentic-workflow action menu, so a real user normally can't reach this route for a non-agentic service, but the route is directly URL-addressable (e.g. a manually entered or stale link), and a blank screen gives no feedback. Check `isAgenticWorkflow` and render a redirect or fallback instead of `null`.</comment>
<file context>
@@ -0,0 +1,21 @@
+function RouteComponent() {
+ const { environmentId = '', serviceId = '' } = useParams({ strict: false })
+ const { data: service } = useService({ environmentId, serviceId, suspense: true })
+ if (!service || !isAgenticWorkflow(service)) return null
+ return (
+ <Section className="py-6">
</file context>
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Confidence score: 4/5
- In
libs/domains/services/feature/src/lib/agent-task-runs/agent-task-runs.spec.tsx, the test queries an accessible dialog name the component does not expose, so it will fail despite the UI behavior being unchanged. Query the dialog byRun details, matchingSheet’saria-label, or remove the competing label in the component.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="libs/domains/services/feature/src/lib/agent-task-runs/agent-task-runs.spec.tsx">
<violation number="1" location="libs/domains/services/feature/src/lib/agent-task-runs/agent-task-runs.spec.tsx:10">
P2: The test now searches for an accessible dialog name that the component does not expose. Because `Sheet` sets `aria-label="Run details"`, query the dialog by `Run details` (or remove the competing label in the component).</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| expect(screen.queryByRole('combobox')).not.toBeInTheDocument() | ||
| expect(screen.getAllByRole('row')).toHaveLength(6) | ||
| await userEvent.click(screen.getByRole('button', { name: 'Open run a83f1203-a121-4000-8000-000000000003' })) | ||
| expect(screen.getByRole('dialog', { name: 'Run a83f1203' })).toBeInTheDocument() |
There was a problem hiding this comment.
P2: The test now searches for an accessible dialog name that the component does not expose. Because Sheet sets aria-label="Run details", query the dialog by Run details (or remove the competing label in the component).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At libs/domains/services/feature/src/lib/agent-task-runs/agent-task-runs.spec.tsx, line 10:
<comment>The test now searches for an accessible dialog name that the component does not expose. Because `Sheet` sets `aria-label="Run details"`, query the dialog by `Run details` (or remove the competing label in the component).</comment>
<file context>
@@ -7,12 +7,12 @@ describe('AgentTaskRuns', () => {
expect(screen.getAllByRole('row')).toHaveLength(6)
await userEvent.click(screen.getByRole('button', { name: 'Open run a83f1203-a121-4000-8000-000000000003' }))
- expect(screen.getByRole('region', { name: 'Run details' })).toBeInTheDocument()
+ expect(screen.getByRole('dialog', { name: 'Run a83f1203' })).toBeInTheDocument()
expect(
screen.getByText(/The configured monitoring integration could not be reached/, { selector: 'p' })
</file context>
| expect(screen.getByRole('dialog', { name: 'Run a83f1203' })).toBeInTheDocument() | |
| expect(screen.getByRole('dialog', { name: 'Run details' })).toBeInTheDocument() |
There was a problem hiding this comment.
1 issue found across 2 files (changes from recent commits).
Confidence score: 3/5
- In
agentic-workflow-service-list.tsx, the global run lookup can show one task’s output in every row, including tasks without a completed run, causing incorrect results for multi-task workflows. Scope the lookup to the current agent task and render an empty state when no matching run exists.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="libs/domains/services/feature/src/lib/agentic-workflow-service-list/agentic-workflow-service-list.tsx">
<violation number="1" location="libs/domains/services/feature/src/lib/agentic-workflow-service-list/agentic-workflow-service-list.tsx:17">
P2: When multiple agent tasks are listed, this global lookup renders one task’s output in every row, including tasks with no matching completed run. Scope the run lookup to the current agent task and render an empty state when it has no output.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| const tableGridLayoutClassName = | ||
| 'grid w-full grid-cols-[minmax(280px,1.1fr)_minmax(260px,1fr)_minmax(180px,0.7fr)_minmax(280px,1fr)_130px]' | ||
| 'grid w-full grid-cols-[minmax(240px,1.2fr)_minmax(180px,1fr)_minmax(200px,1fr)_minmax(160px,0.8fr)_100px]' | ||
| const latestOutput = MOCK_RUNS.find((run) => run.output_url || run.result) |
There was a problem hiding this comment.
P2: When multiple agent tasks are listed, this global lookup renders one task’s output in every row, including tasks with no matching completed run. Scope the run lookup to the current agent task and render an empty state when it has no output.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At libs/domains/services/feature/src/lib/agentic-workflow-service-list/agentic-workflow-service-list.tsx, line 17:
<comment>When multiple agent tasks are listed, this global lookup renders one task’s output in every row, including tasks with no matching completed run. Scope the run lookup to the current agent task and render an empty state when it has no output.</comment>
<file context>
@@ -12,7 +12,9 @@ import { ServiceNameCell } from '../service-list/service-list-cells'
-const tableGridLayoutClassName = 'grid w-full grid-cols-[minmax(240px,1.2fr)_minmax(180px,1fr)_minmax(200px,1fr)_100px]'
+const tableGridLayoutClassName =
+ 'grid w-full grid-cols-[minmax(240px,1.2fr)_minmax(180px,1fr)_minmax(200px,1fr)_minmax(160px,0.8fr)_100px]'
+const latestOutput = MOCK_RUNS.find((run) => run.output_url || run.result)
export interface AgenticWorkflowServiceListProps {
</file context>

Summary
Add an environment-level Automations area to make Agent Tasks easier to discover and manage. Move Agent Task creation and listing out of Create Service and expose Runs, Deployment rules, and Preview environments in the same navigation area while preserving redirects from the previous Settings routes.
Screenshots / Recordings
Not applicable.
Testing
PR Checklist
.cursor/rules)feat(service): add new Terraform service) - required for semantic-releaseSummary by cubic
Adds a feature-flagged, environment-level Automations area for Agent Tasks, runs, deployment rules, and preview environments. Agent Task creation and listing move out of Create Service and the environment overview, and existing Settings URLs redirect to the new area.
Written for commit 2a7a8cc. Summary will update on new commits.