Commit 3c84902
committed
fix(coderd): prevent idle state for non-active tasks
Previously, deriveTaskCurrentState would return "idle" state for all
tasks regardless of their status. This caused stopped or errored tasks
to incorrectly appear in the "Waiting for input" tab.
This fix specifically filters out only the "idle" state for non-active
tasks, while preserving other important states like "working", "complete",
or "failed" which remain meaningful even for stopped tasks.
The logic now checks: if the state is "idle" AND the task status is not
"active", skip setting that state. All other state/status combinations
pass through normally, ensuring we don't lose important state messages.
---
🤖 This change was written by Claude Code using Coder Tasks and reviewed by a human 🏂1 parent 02bac71 commit 3c84902
1 file changed
+14
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
355 | 364 | | |
356 | 365 | | |
357 | 366 | | |
| |||
0 commit comments