Skip to content

Tasks: Activity bump on log viewing #1273

@mafredri

Description

@mafredri

Repo: coder/coder

Scope: Add workspace activity bump when users view task logs to prevent auto-pause during active monitoring.

Problem: Currently, viewing task logs via /logs endpoint does not bump workspace deadline. A user actively monitoring a task (checking logs every few minutes) will see the task auto-pause despite their engagement. This creates an inconsistent experience where UI interaction differs from CLI behavior.

Changes:

  • Modify GET /api/v2/tasks/{user}/{task}/logs in coderd/aitasks.go
  • Call ActivityBumpWorkspace when logs are fetched for an active task (not when paused - that's just viewing the snapshot)
  • Use the same activity bump logic as other user interactions

Files:

  • coderd/aitasks.go

Acceptance criteria:

  • Viewing logs for active task bumps workspace deadline
  • Viewing snapshot for paused task does NOT bump deadline
  • Activity bump uses same logic as other workspace interactions
  • No regression in log viewing performance

Dependencies: None

References:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions