Skip to content

feat(cli): add coder exp tasks list - #19496

Merged
mafredri merged 4 commits into
mainfrom
mafredri/feat-cli-add-exp-tasks-list
Aug 25, 2025
Merged

mafredri merged 4 commits into
mainfrom
mafredri/feat-cli-add-exp-tasks-list

Conversation

@mafredri

@mafredri mafredri commented Aug 22, 2025 •

Copy link
Copy Markdown
Member

Fixes coder/internal#892
Fixes coder/internal#896

Example output:

❯ ./scripts/coder-dev.sh exp tasks list
ID                                    NAME                         STATUS   STATE  STATE CHANGED  MESSAGE
a7a27450-ca16-4553-a6c5-9d6f04808569  task-hardcore-herschel-bd08  running  idle   5h22m3s ago    Listed root directory contents, working directory reset
50f92138-f463-4f2b-abad-1816264b065f  task-musing-dewdney-f058     running  idle   6h3m8s ago     Completed arithmetic calculation

@coder coder deleted a comment from coderabbitai Bot Aug 22, 2025
@mafredri
mafredri force-pushed the mafredri/feat-cli-add-exp-tasks-list branch from 4310e5d to b269f85 Compare August 22, 2025 15:41
@coder coder deleted a comment from coderabbitai Bot Aug 22, 2025
@mafredri
mafredri force-pushed the mafredri/feat-cli-add-exp-tasks-list branch from c1a203d to ea4b615 Compare August 22, 2025 15:51
@coder coder deleted a comment from coderabbitai Bot Aug 22, 2025
@mafredri
mafredri force-pushed the mafredri/feat-cli-add-exp-tasks-list branch 4 times, most recently from 5d1bd5b to 5d0a8cc Compare August 25, 2025 11:51
@mafredri
mafredri marked this pull request as ready for review August 25, 2025 11:52
Comment thread coderd/coderd.go Outdated

@mafredri mafredri Aug 25, 2025 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Review: This path was not conducive to listing other members tasks (e.g. owner).

Note: I don't think it is, but would appreciate validation if the above httpmw is needed for the list endpoint.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't see httpmw.OrganizationMemberParam in use in coderd/aitasks.go so I think you're good 👍

@mafredri
mafredri force-pushed the mafredri/feat-cli-add-exp-tasks-list branch from 5d0a8cc to 5665d32 Compare August 25, 2025 11:57
@mafredri
mafredri force-pushed the mafredri/feat-cli-add-exp-tasks-list branch from 5665d32 to 9a5f639 Compare August 25, 2025 11:58

@johnstcn johnstcn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

:shipit:

Comment thread cli/exp_tasklist.go Outdated
type taskListRow struct {
Task codersdk.Task `table:"t,recursive_inline"`

StateChanged string `table:"state changed"`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: suggest naming StateChangedAt or similar so that the semantics are clearer

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Since this is relative, how about StateChangeAgo?

@mafredri
mafredri enabled auto-merge (squash) August 25, 2025 12:53
@mafredri
mafredri merged commit 836324e into main Aug 25, 2025
@mafredri
mafredri deleted the mafredri/feat-cli-add-exp-tasks-list branch August 25, 2025 13:03
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 25, 2025
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: Add list command Tasks CLI: Implement coder task subcommand

2 participants