Skip to content

feat(task): add task archive - #49

Open
timimsms wants to merge 1 commit into
mainfrom
feat/task-archive
Open

timimsms wants to merge 1 commit into
mainfrom
feat/task-archive

Conversation

@timimsms

Copy link
Copy Markdown
Owner

Summary

Adds cu task archive, which had no equivalent in the CLI.

$ cu task archive 86e312u87
✓ Archived task 86e312u87: …
$ cu task archive 86e312u87 --undo
✓ Unarchived task 86e312u87: …

Why archive rather than close or delete. Archiving removes a task from active views while keeping its history and its URL. For retiring a task whose work has moved elsewhere, that is the only correct primitive: closing asserts a status the task never actually reached — and after #45 we know "closed"/"complete" is not even a status name on every list — while deleting destroys the record and breaks any link to it.

Implementation note worth a look: the SDK cannot express this. clickup.TaskUpdateRequest has no archived field, so UpdateTask can never send it. The request is built directly against the SDK's exported NewRequest/Do, which is the same path its own services use, rather than adding a second HTTP client.

Verification

Round-tripped against a real workspace on a throwaway task: archived goes false → true → false, and the task's URL and status are intact afterwards. The task was deleted after the test.

Checklist

  • ./scripts/ci.sh passes locally — except errcheck, which reports the same pre-existing findings on main, none in files this PR touches
  • Commit messages use conventional prefixes
  • CLI docs regenerated (cu docs markdown --dir docs/site/commands) and added to the mkdocs nav
  • Docs updated if user-facing behavior changed — README example

Archiving removes a task from active views while keeping its history and URL,
which is the right primitive for retiring a task whose work has moved
elsewhere. Closing it would assert a status the task never reached — and
"closed" is not a status name on every list — while deleting destroys the
record.

The SDK cannot express this: clickup.TaskUpdateRequest has no archived field,
so the request is built directly against the exported NewRequest/Do.

Reversible with --undo; round-trip verified against a real workspace, with the
task URL and status intact afterwards.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aqbmccWm1tqttmBUCR5rv
ClickUp: 86dxbeqyt

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant