eugenegujing opened a new issue, #8966:
URL: https://github.com/apache/texera/issues/8966

   ### What happened?
   
   The operator context menu disables "execute to this operator" with 
`nzDisabled` while keeping its `(click)` handler 
(`context-menu.component.html:159-165`):
   
   ```html
     <li
       nz-menu-item
       *ngIf="highlightedOperatorIds.length === 1 &&
     highlightedCommentBoxIds.length === 0 &&
     !hasHighlightedLinks()"
       [nzDisabled]="!canExecuteOperator()"
       (click)="operatorMenuService.executeUpToOperator()">
   ```
   
   `nzDisabled` on an `nz-menu-item` only greys the item and stops ng-zorro's 
own menu handling (`clickMenuItem` in ng-zorro-antd 21.3.2 calls 
`preventDefault` and `stopPropagation` and returns); it does not stop the 
template's `(click)` on the same element, and the disabled style does not set 
`pointer-events: none` on the `li`. So the item looks disabled but still runs 
`executeUpToOperator()`, which sends a new `WorkflowExecuteRequest` 
(`operator-menu.service.ts:250-260`).
   
   `canExecuteOperator()` is false whenever the workflow is not modifiable, 
which includes the whole time a run is in flight. Clicking the greyed item 
during a run therefore starts a second execution on top of the first. The 
backend handles the new request by shutting down the execution in progress and 
clearing its results before starting the new one 
(`WorkflowService.scala:245-258`).
   
   The same template pattern appears once more in the menu: the "reuse result" 
item at `context-menu.component.html:108-113` is hardcoded 
`[nzDisabled]="true"` and keeps a `(click)` that calls 
`reuseResultHighlightedOperator()`. The spec comment at 
`context-menu.component.spec.ts:527` ("so it can't be clicked") is wrong.
   
   **Expected:** a greyed-out menu item does nothing when clicked.
   
   ### How to reproduce?
   
   Reproduced on a local computing unit.
   
   1. Run a workflow that takes a while, for example Text Input -> Python UDF 
that sleeps in `process_tuple` -> Python Lambda Function.
   2. While it runs, right-click the last operator. "execute to this operator" 
is greyed out: <img width="1568" height="287" alt="Image" 
src="https://github.com/user-attachments/assets/33a75fbb-5e73-44e8-91fb-070d8de089bb";
 />
   3. Click it. 
   4. A second execution starts. `workflow_executions` for the workflow then 
holds two rows, the first started by Run and the second by the greyed click 34 
seconds later:
   
   ```text
    eid | status | starting_time       | last_update_time
   -----+--------+---------------------+---------------------
      9 |      1 | 2026-10-10 19:01:56 | 2026-10-10 19:02:00
     10 |      1 | 2026-10-10 19:02:30 | 2026-10-10 19:02:31
   ```
   
   The first row stays at status 1 (RUNNING) after its execution was shut down.
   
   ### Version/Branch
   
   1.4.0-incubating-SNAPSHOT (main)
   
   ### Commit Hash (Optional)
   
   _No response_
   
   ### What browsers are you seeing the problem on?
   
   _No response_
   
   ### Relevant log output
   
   ```shell
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to