Skip to content

Conversation

@nikhilsaikethe
Copy link
Contributor

No description provided.

@nikhilsaikethe nikhilsaikethe changed the title Fix/issue 9518 0.30 fix: pipeline condition UI fix Dec 10, 2025
@github-actions github-actions bot added the ☢️ Bug Something isn't working label Dec 10, 2025
@github-actions
Copy link
Contributor

Failed to generate code suggestions for PR

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 10, 2025

Greptile Overview

Greptile Summary

This PR fixes several issues with the pipeline condition UI:

  • Cancel behavior fixed: The cancel button in the pipeline condition form now properly opens a confirmation dialog and restores original values on cancel, instead of using v-close-popup which would close without prompting
  • Mutation prevention: Deep copies are now created for condition data to prevent unintended mutation of the original pipeline object when editing conditions
  • Custom columns support: Added allowCustomColumns prop to enable users to enter custom column names in the pipeline condition selector (useful when stream fields aren't loaded yet)
  • Delete button always visible: Removed the disableFirstCondition prop which was hiding the delete button for the first condition - users can now delete any condition including the first one
  • Cleanup: Removed unused disable-first-condition prop from RealTimeAlert and ScheduledAlert components

Confidence Score: 4/5

  • This PR is safe to merge - it fixes UI bugs with proper state management and introduces no regressions.
  • Score of 4 reflects that the changes are well-implemented UI fixes that correctly address state mutation issues and improve user experience. The deep copy approach prevents data corruption, and the cancel dialog properly handles unsaved changes. Minor note: there is slight inefficiency with double JSON serialization in originalConditionGroup initialization, but this has no functional impact.
  • No files require special attention - all changes are straightforward and follow existing patterns.

Important Files Changed

File Analysis

Filename Score Overview
web/src/components/pipeline/NodeForm/Condition.vue 4/5 Fixes cancel dialog behavior, prevents mutation of original pipeline data through deep copies, and enables custom columns in the filter selector.
web/src/components/alerts/FilterGroup.vue 5/5 Replaced disableFirstCondition prop with allowCustomColumns, now always shows delete button for all conditions.
web/src/components/alerts/FilterCondition.vue 5/5 Added allowCustomColumns prop to enable custom value entry mode on the column selector.
web/src/components/alerts/RealTimeAlert.vue 5/5 Removed unused disable-first-condition prop from FilterGroup component.
web/src/components/alerts/ScheduledAlert.vue 5/5 Removed unused disable-first-condition prop from FilterGroup component.

Sequence Diagram

sequenceDiagram
    participant User
    participant ConditionForm as Condition.vue
    participant FilterGroup
    participant FilterCondition
    participant PipelineObj as pipelineObj

    User->>ConditionForm: Opens condition editor
    ConditionForm->>PipelineObj: getDefaultConditionGroup()
    PipelineObj-->>ConditionForm: conditions (deep copy)
    ConditionForm->>ConditionForm: Store original in originalConditionGroup
    
    User->>FilterGroup: Edits conditions
    FilterGroup->>FilterCondition: Passes allowCustomColumns=true
    FilterCondition-->>User: Shows column selector with custom value mode
    
    alt User clicks Cancel (X button)
        User->>ConditionForm: openCancelDialog()
        ConditionForm->>ConditionForm: Compare original vs current
        alt Changes detected
            ConditionForm-->>User: Show confirmation dialog
            User->>ConditionForm: Confirms discard
            ConditionForm->>ConditionForm: Restore originalConditionGroup
        end
        ConditionForm->>PipelineObj: emit("cancel:hideform")
    else User clicks Save
        User->>ConditionForm: saveCondition()
        ConditionForm->>PipelineObj: addNode(conditionData)
        ConditionForm->>ConditionForm: Update originalConditionGroup
        ConditionForm->>PipelineObj: emit("cancel:hideform")
    end
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

5 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@nikhilsaikethe nikhilsaikethe merged commit 919305a into branch-v0.30.0 Dec 10, 2025
15 checks passed
@nikhilsaikethe nikhilsaikethe deleted the fix/issue-9518-0.30 branch December 10, 2025 07:58
nikhilsaikethe added a commit that referenced this pull request Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

☢️ Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants