Skip to content

NXT-4577: Allow bendpoint deletion during execution#175

Open
hornm-knime wants to merge 1 commit intomasterfrom
todo/NXT-4577-allow-bendpoint-deletion-during-execution
Open

NXT-4577: Allow bendpoint deletion during execution#175
hornm-knime wants to merge 1 commit intomasterfrom
todo/NXT-4577-allow-bendpoint-deletion-during-execution

Conversation

@hornm-knime
Copy link
Contributor

NXT-4577 (Allow bendpoint deletion when connection cannot be deleted due to executing successors)

@hornm-knime hornm-knime requested a review from a team as a code owner March 9, 2026 14:48
@hornm-knime hornm-knime requested review from Copilot and knime-ghub-bot and removed request for a team March 9, 2026 14:48
NXT-4577 (Allow bendpoint deletion when connection cannot be deleted due to executing successors)
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Enables deleting selected connection bendpoints even when the connection itself cannot be deleted (e.g., due to execution state), aligning delete behavior with the intent of NXT-4577.

Changes:

  • Removes the allowedActions.canDelete gate for deleting bendpoints in deleteSelectedObjects.
  • Always forwards selected connectionBendpoints in the delete command payload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 127 to +133
const deleteableBendpoints = Object.keys(connectionBendpoints).reduce(
(acc, connectionId) => {
const connection = this.activeWorkflow!.connections[connectionId];
return connection.allowedActions?.canDelete
? {
...acc,
[connectionId]: connectionBendpoints[connectionId],
}
: acc;
return {
...acc,
[connectionId]: connectionBendpoints[connectionId],
};
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change alters deletion semantics by allowing bendpoints to be deleted even when the owning connection itself isn’t deletable. Please add/adjust a unit test to cover the case where a connection has allowedActions.canDelete === false but selected bendpoints are still sent in workflowCommand.Delete.connectionBendpoints.

Copilot uses AI. Check for mistakes.
Comment on lines 128 to +133
(acc, connectionId) => {
const connection = this.activeWorkflow!.connections[connectionId];
return connection.allowedActions?.canDelete
? {
...acc,
[connectionId]: connectionBendpoints[connectionId],
}
: acc;
return {
...acc,
[connectionId]: connectionBendpoints[connectionId],
};
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

connection is declared but never used, and the this.activeWorkflow!.connections[connectionId] lookup is now only introducing an unnecessary non-null assertion / potential runtime throw. Remove the unused variable and avoid dereferencing activeWorkflow here (or explicitly skip entries where the connection no longer exists).

Copilot uses AI. Check for mistakes.
@hornm-knime hornm-knime force-pushed the todo/NXT-4577-allow-bendpoint-deletion-during-execution branch from 31a2194 to 92c95ec Compare March 9, 2026 14:52
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2026

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.

2 participants