Skip to content

feat(cli): show snapshots in task logs#21787

Merged
mafredri merged 1 commit intomainfrom
mafredri/feat-cli-show-task-log-snapshot
Feb 2, 2026
Merged

feat(cli): show snapshots in task logs#21787
mafredri merged 1 commit intomainfrom
mafredri/feat-cli-show-task-log-snapshot

Conversation

@mafredri
Copy link
Member

@mafredri mafredri commented Jan 30, 2026

The CLI displays warnings when showing snapshot data with task status
and message count, detects missing snapshots via SnapshotAt nullability,
and provides actionable guidance when no snapshot is available.

Closes coder/internal#1255

@mafredri mafredri force-pushed the mafredri/feat-cli-show-task-log-snapshot branch 6 times, most recently from 56b41d4 to 4b27cb3 Compare January 30, 2026 12:18
@mafredri mafredri marked this pull request as ready for review January 30, 2026 12:19
@github-actions github-actions bot added the release/breaking This label is applied to PRs to detect breaking changes as part of the release process label Jan 30, 2026
@mafredri mafredri requested review from SasSwart and johnstcn January 30, 2026 12:19
@coder-tasks

This comment was marked as off-topic.

Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue that it's not strictly necessary to make a breaking change to the CLI output in this case. Users can still hit the API if they need to determine if it was a snapshot or not.

@mafredri
Copy link
Member Author

I would argue that it's not strictly necessary to make a breaking change to the CLI output in this case. Users can still hit the API if they need to determine if it was a snapshot or not.

I guess that's fair. Most of the metadata is available via "warn"ing instead. We could even add the snapshot timestamp for good measure to the output.

@mafredri mafredri force-pushed the mafredri/feat-cli-show-task-log-snapshot branch from 4b27cb3 to b8bc11d Compare January 30, 2026 13:36
@coder-tasks

This comment was marked as off-topic.

@mafredri mafredri force-pushed the mafredri/feat-cli-show-task-log-snapshot branch from b8bc11d to 04e0df8 Compare January 30, 2026 13:44
@mafredri mafredri changed the title feat(cli)!: show snapshot metadata in task logs feat(cli): show snapshot metadata in task logs Jan 30, 2026
@github-actions github-actions bot removed the release/breaking This label is applied to PRs to detect breaking changes as part of the release process label Jan 30, 2026
@mafredri mafredri changed the title feat(cli): show snapshot metadata in task logs feat(cli): show snapshots in task logs Jan 30, 2026
@coder-tasks

This comment was marked as off-topic.

@mafredri mafredri force-pushed the mafredri/feat-coderd-return-log-snapshot-for-paused-task branch from 7cfd7a5 to 9f11a56 Compare January 30, 2026 13:49
@mafredri mafredri force-pushed the mafredri/feat-cli-show-task-log-snapshot branch 2 times, most recently from 34bcb99 to 1b92853 Compare January 30, 2026 13:52
@coder-tasks

This comment was marked as off-topic.

Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really need to fix that test :(

Base automatically changed from mafredri/feat-coderd-return-log-snapshot-for-paused-task to main January 30, 2026 14:09
The CLI now displays warnings when showing snapshot data based on task
status and message count, detects missing snapshots via SnapshotAt
nullability, and provides actionable guidance when no snapshot is
available.

JSON output format remains unchanged (still returns logs array).
Warnings are shown on stderr while logs go to stdout.

Closes coder/internal#1255
@mafredri mafredri force-pushed the mafredri/feat-cli-show-task-log-snapshot branch from 1b92853 to 438b390 Compare January 30, 2026 14:19
@mafredri mafredri merged commit efcfee8 into main Feb 2, 2026
26 checks passed
@mafredri mafredri deleted the mafredri/feat-cli-show-task-log-snapshot branch February 2, 2026 13:50
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tasks: CLI shows snapshot for paused task logs

2 participants