Skip to content

4754 client - Fix fromAi tool parameter cleanup on toggle and mode switch#4763

Merged
ivicac merged 2 commits intomasterfrom
4754
Apr 14, 2026
Merged

4754 client - Fix fromAi tool parameter cleanup on toggle and mode switch#4763
ivicac merged 2 commits intomasterfrom
4754

Conversation

@ivicac
Copy link
Copy Markdown
Contributor

@ivicac ivicac commented Apr 14, 2026

Toggling the fromAi button off or switching out of dynamic mode now
clears the field value and persists the change so the backend removes
the path from the fromAi metadata array, dynamicPropertyTypes, and
parameters.

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

…itch

Toggling the fromAi button off or switching out of dynamic mode now
clears the field value and persists the change so the backend removes
the path from the fromAi metadata array, dynamicPropertyTypes, and
parameters.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
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

This PR updates the workflow editor’s property handlers so that turning fromAi off (or switching dynamic/constant modes while fromAi was active) clears the persisted parameter value and metadata, ensuring the backend removes the parameter path from fromAi metadata and related dynamic tracking.

Changes:

  • Update handleControlledModeSwitch to persist cleanup when switching modes while fromAi was previously enabled.
  • Update handleFromAiToggle to clear the field value when toggling fromAi off and persist the change via saveProperty.
  • Add unit tests covering the intended cleanup payload/value behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
client/src/pages/platform/workflow-editor/components/properties/hooks/useProperty.ts Persists fromAi cleanup on toggle-off and on mode switches via saveProperty.
client/src/pages/platform/workflow-editor/components/properties/hooks/tests/handleFromAiToggle.test.ts Adds tests validating computed field values and save payloads for fromAi toggle/mode-switch cleanup.

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

Copy link
Copy Markdown
Collaborator

@marko-kriskovic marko-kriskovic left a comment

Choose a reason for hiding this comment

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

works

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'client'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@ivicac ivicac merged commit 4d8bfb0 into master Apr 14, 2026
6 of 7 checks passed
@ivicac ivicac deleted the 4754 branch April 14, 2026 20:23
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.

[bug]: unable to delete the fromAi tool parameter

3 participants