**Repo**: `coder/coder` **Scope**: Show stored log snapshot in task view when task is paused. **Design notes**: - Use task-centric terminology, avoid "workspace" language (TBD, see Figma) - Header options: "Last N messages" (dynamic from API) or "Recent AI chat logs" - All states must handle missing snapshot gracefully **Changes**: - Modify `WorkspaceNotRunning` component in `TaskPage.tsx` - Fetch log snapshot from modified logs endpoint - Display in plain text scrollable container (per PRD specification) - Show message count (from API `total_count`) and snapshot timestamp - If no snapshot: "No logs available (snapshot may have failed during pause, resume your task to view logs)." **Message formatting** (implementation suggestion, verify with Figma/design): - Each message separated by blank line - Prefix with type indicator (e.g., `[user]` or `[agent]`, following CLI's TYPE column) - Preserve content whitespace/formatting - Example: ``` [user] What's the latest GH issue? [agent] I'll fetch that for you... The latest issue is #21309: Feature: Improve database migration... ``` **Files**: - `site/src/pages/TaskPage/TaskPage.tsx` **Acceptance criteria**: - [ ] Log snapshot displayed when task is paused - [ ] Scrollable text container for messages - [ ] Timestamp shown indicating snapshot age - [ ] Graceful handling when no snapshot exists - [ ] Plain text rendering (not chat bubbles) per PRD - [ ] Messages clearly distinguished by type prefix **Dependencies**: - #1254 <!-- Issue 4 --> **References**: - [PRD: Start/Pause/Resume the Task Workspace](https://www.notion.so/coderhq/Start-Pause-Resume-the-Task-Workspace-2aad579be59280e5a15ef6bb6a93f246) - [RFC: Tasks: Start/Pause/Resume Lifecycle](https://www.notion.so/coderhq/Tasks-Start-Pause-Resume-Lifecycle-2cdd579be592805a929fc36d0c82d65d): UI - [Figma: Tasks: Resume/stop/start](https://www.figma.com/design/KriBGfS73GAwkplnVhCBoU/Tasks?node-id=272-3909)
Activity