Copilot commented on code in PR #7944:
URL: https://github.com/apache/texera/pull/7944#discussion_r4068937652


##########
frontend/src/app/common/type/computing-unit-connection.interface.ts:
##########
@@ -24,5 +24,8 @@
 export enum ComputingUnitState {
   Running = "Running",
   Pending = "Pending",
+  Failed = "Failed",
+  Unknown = "Unknown",
+  Terminating = "Terminating",

Review Comment:
   These enum values are now emitted to every status consumer, but only 
`MenuComponent` was updated for them. `WorkflowFormComponent` still treats any 
selected non-`NoComputingUnit` state as `isConnecting` only when the socket is 
down, so `Failed`/`Unknown`/`Terminating` shows `Connecting` while disconnected 
and falls through to an enabled `Run` when connected; `OperatorMenu` and 
TimeTravel also call `ExecuteWorkflowService` directly. This lets users start 
or replay work on a unit the PR marks unavailable. Add a shared terminal-state 
guard in `ExecuteWorkflowService` and matching form labels/tests, preserving 
invalid/empty precedence.



##########
frontend/src/app/common/type/workflow-computing-unit.ts:
##########
@@ -46,7 +46,10 @@ export interface WorkflowComputingUnitMetrics {
 
 export interface DashboardWorkflowComputingUnit {
   computingUnit: WorkflowComputingUnit;
-  status: "Running" | "Pending";
+  status: "Running" | "Pending" | "Failed" | "Unknown" | "Terminating";
+  // User-friendly explanation of a failing/degraded status for authorized 
viewers. The backend
+  // omits it for ordinary shared users, so the UI falls back to generic 
"unavailable" text.
+  statusReason?: string;

Review Comment:
   The backend `Option[String]` field is documented and implemented as 
serializing to `null` for unauthorized/no-reason rows, but this DTO only 
permits `string` or an omitted property. Model the actual wire contract 
(including `null`) so consumers cannot rely on an impossible type.



##########
frontend/src/app/workspace/component/power-button/computing-unit-selection.component.html:
##########
@@ -198,7 +198,7 @@
           'unit-selected': isSelectedUnit(unit),
           'unit-connecting': unit.status === 'Pending',
         }"
-        [nz-tooltip]="cannotSelectUnit(unit) ? getUnitStatusTooltip(unit) + '. 
Cannot select.' : ''"
+        [nz-tooltip]="getRowTooltip(unit)"

Review Comment:
   This changes visible badge, tooltip, and run-button behavior, but the PR 
description still contains its TODO for the required before/after capture and 
only provides standalone screenshots. The repository frontend review rule in 
`AGENTS.md:212-215` requires a side-by-side before/after screenshot or GIF for 
visible UI changes (and manual interaction steps for this flow); please attach 
that evidence, including the Run button, before approval.



-- 
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