mirror of
https://github.com/coder/coder.git
synced 2026-06-03 13:08:25 +00:00
16b8e6072f
## Problem With the new tasks data model, a task starts with an `initializing` status. However, the API returns `current_state: null` to represent the agent state, causing the frontend to display "No message available". This PR updates `codersdk.Task` to return a `current_state` when the task is initializing with meaningful messages about what's happening during task initialization. **Previous message** <img width="2764" height="288" alt="Screenshot 2025-11-07 at 09 06 13" src="https://github.com/user-attachments/assets/feec9f15-91ca-4378-8565-5f9de062d11a" /> **New message** <img width="2726" height="226" alt="Screenshot 2025-11-12 at 11 00 15" src="https://github.com/user-attachments/assets/2f9bee3e-7ac4-4382-b1c3-1d06bbc2906e" /> ## Changes - Populate `current_state` with descriptive initialization messages when task status is `initializing` and no valid app status exists for the current build - **dbfake**: Fix `WorkspaceBuild` builder to properly handle pending/running jobs by linking tasks without requiring agent/app resources **Note:** UI Storybook changes to reflect these new messages will be addressed in a follow-up PR. Closes: https://github.com/coder/internal/issues/1063