← Back to Pull requests

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

Closed
unknown closed this pull request without merging on Sep 22, 2026 15:11 UTC
View on GitHub
unknown unknown commented on Sep 14, 2026 21:39 UTC
Author

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.

  • Next button / launch config: Node details validation now waits for the selected template's launch configuration to finish loading before advancing. PageWizard merges supplemental data returned from step validate, and NodeTypeStep registers in-flight loads so Prompts/Survey visibility and save data reflect the current template instead of stale flags.
  • Steps to reproduce:

    1. Create a Job template with no POL, no labels, no inv. groups, JT1
    2. Create a job template with at least a label, no POL on the label, but at least one POL ( limit, extra vars, etc ), JT2
    3. Create a WF Job template, add a step with JT1. Save, then keep adding steps from 'Add step and link' with JT2, and save, a few times.

    Before:

    https://github.com/user-attachments/assets/4f345d1c-65aa-4ca3-954c-d945ce6c7d5b

    After:

    https://github.com/user-attachments/assets/4c3aab24-d02c-4649-83ff-249b61687d6c

    Known limitation / follow-up

    If Next is clicked immediately after selecting a job template, before the NodeTypeStep effect registers the launch-config load (same render cycle), validation may still advance without launch_config. This is a narrow race and uncommon in normal use; the common case (Next while a load is already in flight) is fixed.

    Follow-up: add a validate-time fallback loader (or shared loader deduped via launchConfigLoad) so Next never advances without launch config. Track as a separate issue.

    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.
    8. On the node details step, select a job template with Prompts and/or Survey enabled and click Next only after the step settles; confirm Prompts/Survey steps appear as expected.

    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.

  • validationHelpers.test.ts / launchConfigLoad.test.ts — await launch config during wizard validation.

  • PageWizard.test.tsx — supplemental validate data and validate-without-supplemental paths.

  • NodeAddWizard.component.test.tsx, NodeAddWizard.integration.test.tsx, and E2E — add-step-and-link save and linking behavior.
  • Made with Cursor

    Diff: 561 lines (+420 / -141) across 7 files Reviewer: nixocio Review duration: 11132m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 561 lines diff across 7 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.379
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3586"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 49.7% (MEDIUM) · Higher = larger blast radius
    49.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 19.6% · Safe to merge
    19.6%