Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 18, 2025

The Nodes Manager dialog allowed users to proceed with the "replace failed node" workflow without actually selecting a node to replace. This resulted in users being able to click through all the steps (Action → Node Id → Inclusion Mode) without any validation, but no actual replacement would occur in the backend since no node ID was provided.

Problem

In the DialogNodesManager.vue component, the nextStep() function processed the 'replaceFailed' step without validating whether a node had been selected (replaceId value). This allowed the workflow to proceed to the inclusion mode step even when replaceId was null or undefined.

Solution

Added proper validation to prevent progression without node selection:

  1. Created submitReplaceFailed() validation function that:

    • Validates that a node has been selected before proceeding
    • Shows user-friendly error messages via snackbar notifications
    • Validates numeric node IDs when manually entered
    • Only calls nextStep() after successful validation
  2. Updated the Next button in the replaceFailed step to use submitReplaceFailed() instead of directly calling nextStep()

  3. Added informative error messages:

    • "Please select a node to replace" when no node is selected
    • "Please enter a valid node ID" for invalid numeric input

Before/After

Before: Users could click "NEXT" without selecting a node and proceed through all steps, but nothing would happen in the backend.

After: Users must select a valid node before they can proceed, with clear error messages guiding them when validation fails.

The fix maintains full backward compatibility while ensuring the replace failed node workflow requires proper node selection.

Fixes #4379.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 224.0.0.251

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Prevent replacing a failed node without actually selecting a node to replace fix: prevent replace failed node without selecting a node Sep 18, 2025
Copilot finished work on behalf of robertsLando September 18, 2025 12:30
Copilot AI requested a review from robertsLando September 18, 2025 12:30
@robertsLando robertsLando changed the title fix: prevent replace failed node without selecting a node fix(ui): prevent replace failed node without selecting a node Oct 6, 2025
@robertsLando robertsLando marked this pull request as ready for review October 6, 2025 14:14
@robertsLando robertsLando merged commit a2ae434 into master Oct 6, 2025
6 of 10 checks passed
@robertsLando robertsLando deleted the copilot/fix-4379 branch October 6, 2025 14:15
@coveralls
Copy link

Pull Request Test Coverage Report for Build 18283848149

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 20.321%

Totals Coverage Status
Change from base Build 18283781436: 0.0%
Covered Lines: 3959
Relevant Lines: 20731

💛 - Coveralls

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent replacing a failed node without actually selecting a node to replace

3 participants