hunk.code_window:   const [selectedChannel, setSelectedChannel] = useState<ChannelTypeEnum | null>(null);
     const [selectedStep, setSelectedStep] = useState<number>(-1);
     const [selectedNodeId, setSelectedNodeId] = useState<string>('');
     const onDragStart = (event, nodeType) => {
       event.dataTransfer.setData('application/reactflow', nodeType);
       event.dataTransfer.effectAllowed = 'move';
     };
  
hunk.labels: keep keep add keep keep keep keep
hunk.after_edit:   const [dragging, setDragging] = useState(false);
  
hunk.file_path: apps/web/src/pages/templates/workflow/WorkflowEditorPage.tsx
hunk.type: add
file: import { Injectable, Logger } from '@nestjs/common';
  import { ChangeRepository, EnvironmentRepository } from '@novu/dal';
  import { ChangeEntityTypeEnum } from '@novu/shared';
  import { PromoteChangeToEnvironmentCommand } from './promote-change-to-environment.command';
  import { PromoteTypeChangeCommand } from '../promote-type-change.command';
  import { PromoteNotificationTemplateChange } from '../promote-notification-template-change/promote-notification-template-change';
  import { PromoteMessageTemplateChange } from '../promote-message-template-change/promote-message-template-change';
  import { PromoteNotificationGroupChange } from '../promote-notification-group-change/promote-notification-group-change';
  import { applyDiff } from 'recursive-diff';
  
  @Injectable()
  export class PromoteChangeToEnvironment {
    constructor(
      private changeRepository: ChangeRepository,
      private environmentRepository: EnvironmentRepository,
      private promoteNotificationTemplateChange: PromoteNotificationTemplateChange,
      private promoteMessageTemplateChange: PromoteMessageTemplateChange,
      private promoteNotificationGroupChange: PromoteNotificationGroupChange
    ) {}
  
    async execute(command: PromoteChangeToEnvironmentCommand) {
      const changes = await this.changeRepository.getEntityChanges(command.type, command.itemId);
      const aggregatedItem = changes
        .filter((change) => change.enabled)
        .reduce((prev, change) => {
          return applyDiff(prev, change.change);
        }, {});
  
      const environment = await this.environmentRepository.findOne({
        _parentId: command.environmentId,
      });
  
      const typeCommand = PromoteTypeChangeCommand.create({
        organizationId: command.organizationId,
        environmentId: environment._id,
        item: aggregatedItem,
        userId: command.userId,
      });
  
      switch (command.type) {
        case ChangeEntityTypeEnum.NOTIFICATION_TEMPLATE:
          await this.promoteNotificationTemplateChange.execute(typeCommand);
          break;
        case ChangeEntityTypeEnum.MESSAGE_TEMPLATE:
          await this.promoteMessageTemplateChange.execute(typeCommand);
          break;
        case ChangeEntityTypeEnum.NOTIFICATION_GROUP:
          await this.promoteNotificationGroupChange.execute(typeCommand);
          break;
        default:
          Logger.error(`Change with type ${command.type} could not be enabled from environment ${command.environmentId}`);
      }
    }
  }
  