[AAP-82758] Keep Add step and link sequential in Workflow Visualizer #3586
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
nixocio
Summary
Field is not configured to prompt on launchafter the node is already created.fromModelso the parent-child edge is persisted.PageWizardmerges supplemental data returned from stepvalidate, andNodeTypeStepregisters 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
NodeTypeStepeffect registers the launch-config load (same render cycle), validation may still advance withoutlaunch_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
Risk Analysis - REQUIRED
Testing
Ephemeral E2E Tests
Once PR is ready and preliminary checks pass, trigger tests by posting a comment
/run-playwrighton this PR.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 launcherror.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