Skip to content

Conversation

@rllyy97
Copy link
Contributor

@rllyy97 rllyy97 commented Nov 7, 2025

Commit Type

  • feature - New functionality

Risk Level

  • Low - Minor changes, limited scope
  • Medium - Moderate changes, some user impact
  • High - Major changes, significant user/system impact

What & Why

Added global change count selector, this is incremented each time the dirty flag would be set.
Added isDraft designer option.

Impact of Change

  • Users: N/A
  • Developers: Adds a change count selector for use with autosaving
  • System: N/A

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in:

Contributors

@rllyy97

Screenshots/Videos

N/A

@rllyy97 rllyy97 added the risk:low Low risk change with minimal impact label Nov 7, 2025
Copilot AI review requested due to automatic review settings November 7, 2025 16:41
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

🤖 AI PR Validation Report

PR Review Results

Thank you for your submission! Here's detailed feedback on your PR title and body compliance:

PR Title

  • Current: feat(DesignerV2): Added global change count selector, isDraft designer option
  • Issue: None. The title uses a concise conventional feat prefix, references the relevant DesignerV2 context, and succinctly summarizes the primary changes.
  • Recommendation: None needed — your title is informative and follows best practices.

Commit Type

  • Properly selected (feature)
  • Only one selected, which is correct.

Risk Level

  • A single risk level selected: Low, matches the label Risk:Low and described changes.

What & Why

  • Current:

    Added global change count selector, this is incremented each time the dirty flag would be set.
    Added isDraft designer option.

  • Issue: None — short, relevant, and covers the essence of the change and reason.
  • Recommendation: No change needed. (For future: If applicable, briefly mention "enables future autosave features and draft handling.")

Impact of Change

  • Clear, justified (users: N/A, devs: "adds change count", system: N/A).
  • Recommendation:
    • Users: "N/A" (No front-end/UX impact currently)
    • Developers: "Adds change count selector for use with autosaving" (succinct and accurate)
    • System: "N/A" (as stated)

Test Plan

  • Manual testing completed (correct for a minor low-risk feature and infra update)
  • Properly left out test checkboxes if not applicable

⚠️ Contributors

  • Only the author self-attributed, but not required to mention others if none contributed.
  • Suggestion: Next time, acknowledge teammates, PMs, or designers if they contributed for better credits/collaboration.

Screenshots/Videos

  • Marked "N/A" — appropriate as there is no visual/UI change described.

Summary Table

Section Status Recommendation
Title
Commit Type
Risk Level
What & Why
Impact of Change
Test Plan
Contributors ⚠️ Credit collaborators if relevant (optional)
Screenshots/Videos

PR passes template and content review checks, and the advised risk matches your assignment (Low). No changes required. You may merge after code review. Thank you for helping maintain high-quality documentation and process!


Last updated: Fri, 07 Nov 2025 17:25:40 GMT

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

This PR adds a changeCount tracking mechanism across the designer state to monitor the number of modifications made to workflows, workflow parameters, and notes. This provides a counter that increments with each user action, complementing the existing isDirty boolean flag.

Key changes:

  • Added changeCount state property and increment logic to workflow, workflow parameters, and notes slices
  • Created selector hooks to access individual and combined change counts
  • Exported a consolidated useChangeCount hook that aggregates counts from all three state slices

Reviewed Changes

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

Show a summary per file
File Description
libs/designer-v2/src/lib/core/state/workflow/workflowInterfaces.ts Added changeCount property to WorkflowState interface
libs/designer-v2/src/lib/core/state/workflow/workflowSlice.ts Initialized changeCount to 0 and incremented it in reducers that set isDirty
libs/designer-v2/src/lib/core/state/workflow/workflowSelectors.ts Added useWorkflowChangeCount selector hook
libs/designer-v2/src/lib/core/state/workflowparameters/workflowparametersSlice.ts Added changeCount state and increment logic for parameter operations
libs/designer-v2/src/lib/core/state/workflowparameters/workflowparametersselector.ts Added useWorkflowParametersChangeCount selector hook
libs/designer-v2/src/lib/core/state/notes/notesSlice.ts Added changeCount state and increment logic for note operations
libs/designer-v2/src/lib/core/state/notes/notesSelectors.ts Added useNotesChangeCount selector hook
libs/designer-v2/src/lib/core/state/global.ts Created useChangeCount hook that aggregates all three change counts
libs/designer-v2/src/lib/core/index.ts Exported useChangeCount hook in public API
Comments suppressed due to low confidence (1)

libs/designer-v2/src/lib/core/state/workflowparameters/workflowparametersSlice.ts:92

  • The initializeParameters action replaces the entire definitions object but doesn't reset changeCount to 0. This could lead to an incorrect count if parameters are reinitialized (e.g., when loading a different workflow). Consider whether changeCount should be reset during initialization to maintain accurate tracking.
    initializeParameters: (state, action: PayloadAction<Record<string, WorkflowParameterDefinition>>) => {
      state.definitions = action.payload;
    },

@rllyy97 rllyy97 changed the title feat(DesignerV2): Added global change count selector feat(DesignerV2): Added global change count selector, isDraft designer option Nov 7, 2025
@rllyy97 rllyy97 enabled auto-merge (squash) November 7, 2025 17:29
@rllyy97 rllyy97 merged commit f2404e1 into main Nov 7, 2025
13 checks passed
@rllyy97 rllyy97 deleted the riley/change-count branch November 7, 2025 17:32
rllyy97 added a commit that referenced this pull request Nov 7, 2025
…ner option (#8546)

* Added global change count selector

* Added "isDraft" flag
rllyy97 added a commit that referenced this pull request Nov 7, 2025
…r option (#8548)

feat(DesignerV2): Added global change count selector, `isDraft` designer option (#8546)

* Added global change count selector

* Added "isDraft" flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-validated risk:low Low risk change with minimal impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants