Skip to content

[AAP-82758] Keep Add step and link sequential in Workflow Visualizer - #3586

Draft
lgalis wants to merge 1 commit into
ansible:develfrom
lgalis:fix/AAP-82758-workflow-visualizer-add-step-link
Draft

lgalis wants to merge 1 commit into
ansible:develfrom
lgalis:fix/AAP-82758-workflow-visualizer-add-step-link

Conversation

@lgalis

@lgalis lgalis commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixes Workflow Visualizer Add step and link saving the new node as a parallel root sibling instead of a sequential child of the selected node.
  • Stop associating labels, instance groups, and credentials unless the job template has Prompt on Launch for those fields, so save no longer fails with Field is not configured to prompt on launch after the node is already created.
  • Sanitize unprompted related fields when adding a new node, and re-mark the source node after fromModel so the parent-child edge is persisted.

Type of Change

  • Bug fix
  • Enhancement
  • Tests
  • Documentation
  • Other (please specify)

Risk Analysis - REQUIRED

  • High — Broad platform impact (e.g., SWR config, shared framework components, authentication, routing, API wrappers, build/bundler config). Changes affect multiple workspaces or could cause widespread regressions.
  • Medium — Scoped but cross-cutting (e.g., shared utility functions, changes to multiple pages within one workspace, component library updates, test infrastructure). Limited blast radius but touches common code paths.
  • Low — Narrowly scoped (e.g., single page fix, styling tweak, documentation, test-only changes, copy/string updates). Minimal risk of unintended side effects.

Testing

Ephemeral E2E Tests

Once PR is ready and preliminary checks pass, trigger tests by posting a comment /run-playwright on this PR.

Tests run against a fresh AAP instance (version based on branch).

Manual Testing

  1. Create a Workflow Job Template and add a Job Template as the first node; save.
  2. Create another Job Template that has Labels assigned but Prompt on Launch for Labels disabled (other prompted fields are fine).
  3. Open the workflow in the Workflow Visualizer.
  4. On the first node, choose Add step and link, select the second Job Template, finish, and save.
  5. Confirm save succeeds with no Field is not configured to prompt on launch error.
  6. Confirm the new node is a sequential child of the selected node, not a parallel sibling under Start.
  7. Repeat with an approval node linked after an existing node.

Unit Tests

  • useSaveVisualizer.test.ts — does not associate unprompted related resources; associates a new node as a sequential child of the source node.
  • buildEffectivePrompt.test.ts — clears unprompted related fields for new nodes; preserves prompted fields.

Made with Cursor

Stop associating unprompted labels, instance groups, and credentials so save can finish and persist the parent-child edge.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added bug-fix Bug fix community Community contribution from fork controller Changes in frontend/awx vitest Changes to vitest test files risk:medium Medium risk PR size/M Medium PR and removed community Community contribution from fork bug-fix Bug fix labels Sep 14, 2026
@lgalis
lgalis marked this pull request as draft September 14, 2026 21:39
@github-actions github-actions Bot added bug-fix Bug fix risk:medium Medium risk PR e2e: pending E2E tests not yet triggered waiting-on-author PR requires author attention and removed risk:medium Medium risk PR labels Sep 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@lgalis — SonarQube Quality Gate failed:

  • Coverage on New Code: 46.2%

Please address the SonarQube findings.

@lgalis lgalis closed this Sep 14, 2026
@lgalis lgalis reopened this Sep 15, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
46.2% Coverage on New Code (required ≥ 90%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix Bug fix controller Changes in frontend/awx e2e: pending E2E tests not yet triggered risk:medium Medium risk PR size/M Medium PR vitest Changes to vitest test files waiting-on-author PR requires author attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant