codeant-ai-for-open-source[bot] commented on code in PR #43557:
URL: https://github.com/apache/superset/pull/43557#discussion_r3864355011


##########
superset-frontend/src/pages/TaskList/index.tsx:
##########
@@ -411,9 +417,15 @@ function TaskList({ addDangerToast, addSuccessToast, user 
}: TaskListProps) {
       {
         Cell: ({
           row: {
-            original: { duration_seconds },
+            original: { duration_seconds, status },
           },
-        }: TaskCellProps) => formatDuration(duration_seconds, locale) ?? '-',
+        }: TaskCellProps) => (
+          <LiveDuration
+            durationSeconds={duration_seconds}
+            locale={locale}
+            live={realtimeEnabled && status === TaskStatus.InProgress}

Review Comment:
   **Suggestion:** Aborting tasks can still have an active `started_at` without 
an `ended_at`, and the server's `duration_seconds` continues measuring elapsed 
execution time during abort handling. Restricting live updates to 
`TaskStatus.InProgress` makes the Duration stop ticking as soon as cancellation 
enters `aborting`, leaving it stale until the task reaches a terminal state. 
Include aborting tasks in the live condition, or use the same running-state 
predicate as the backend. [incorrect condition logic]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ⚠️ Task List duration freezes during abort-handler cleanup.
   - ⚠️ Long-running cancellation displays an outdated execution duration.
   - ⚠️ Timeout-triggered aborts have the same stale display behavior.
   ```
   </details>
   
   [![Use CodeAnt 
Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill)
 [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=37b390100b32490ca5e30d5dc36f373b&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=37b390100b32490ca5e30d5dc36f373b&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset-frontend/src/pages/TaskList/index.tsx
   **Line:** 426:426
   **Comment:**
        *Incorrect Condition Logic: Aborting tasks can still have an active 
`started_at` without an `ended_at`, and the server's `duration_seconds` 
continues measuring elapsed execution time during abort handling. Restricting 
live updates to `TaskStatus.InProgress` makes the Duration stop ticking as soon 
as cancellation enters `aborting`, leaving it stale until the task reaches a 
terminal state. Include aborting tasks in the live condition, or use the same 
running-state predicate as the backend.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43557&comment_hash=fa757747ff67e65a3f82342fd5e942209f8e44b24f2f4fcee81372a41ce6af82&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F43557&comment_hash=fa757747ff67e65a3f82342fd5e942209f8e44b24f2f4fcee81372a41ce6af82&reaction=dislike'>👎</a>



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to