Skip to content

Tasks: UI log snapshot display when paused #1268

@mafredri

Description

@mafredri

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:

References:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions