Skip to content

Add clickup changes command for tracking workspace updates#4

Merged
pikonha merged 3 commits into
mainfrom
claude/vigilant-carson-75wrng
Jun 10, 2026
Merged

Add clickup changes command for tracking workspace updates#4
pikonha merged 3 commits into
mainfrom
claude/vigilant-carson-75wrng

Conversation

@pikonha

@pikonha pikonha commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

Adds a new clickup changes command that lists tasks and docs updated in a workspace since a point in time. This enables users to quickly see what changed since their last visit, with automatic state tracking per workspace.

Changes

  • New clickup changes command (cmd/changes.go):

    • Lists tasks and docs updated since a specified point in time
    • --since flag accepts: last (tracked per workspace), durations (30m, 24h, 7d, 2w), dates (2026-06-09), RFC3339 timestamps, or Unix milliseconds
    • Tasks filtered server-side via date_updated_gt parameter with automatic pagination (up to 5,000 tasks)
    • Docs filtered client-side by date_updated (falling back to date_created) since the v3 Docs API lacks server-side filtering
    • Supports --skip-docs, --no-save, --space-ids, --folder-ids, --list-ids flags
    • Returns JSON with workspace ID, since/until timestamps, task/doc counts, and full objects
  • State management (internal/config/state.go):

    • New ~/.clickup-cli-state.json file to track the last successful changes --since last run per workspace
    • GetLastChangesCheck() and SetLastChangesCheck() functions for reading/writing state
    • First run defaults to a 24-hour window and sets "first_run": true in output
  • API enhancements (internal/api/docs.go):

    • Added DateUpdated field to Doc struct to support client-side filtering
  • Comprehensive test coverage (cmd/changes_test.go):

    • Tests for basic command functionality, task query parameters, doc skipping, state tracking, pagination, and error handling
    • Unit tests for parseSince() covering durations, dates, RFC3339, and Unix ms formats
    • Mock HTTP server for testing API interactions
  • Documentation:

    • Updated docs/api.md with full command reference, flags, and usage examples
    • Updated AGENTS.md with change tracking workflows and common patterns
    • Updated README.md and CHANGELOG.md with new command
  • Test infrastructure fix (cmd/integration_test.go):

    • Fixed potential deadlock in runCommand() by draining stdout concurrently to handle large outputs

Checklist

  • go build ./... passes
  • go test ./... passes
  • go vet ./... passes
  • New commands have table-driven tests (TestParseSince and comprehensive integration tests)
  • docs/api.md updated with new command, flags, and examples
  • Every API parameter has a corresponding CLI flag (--space-ids, --folder-ids, --list-ids, --skip-docs, --no-save)
  • Commit messages follow conventional commits

https://claude.ai/code/session_019Aexh4uFP9TfNcm8nD42fN

claude added 3 commits June 10, 2026 16:45
…in time

Adds 'clickup changes' — a what-changed-since-my-last-visit log for a
workspace. Tasks are filtered server-side via date_updated_gt (with
automatic pagination); docs have no server-side updated filter, so they
are fetched and filtered client-side by date_updated.

--since accepts 'last' (run timestamp tracked per workspace in
~/.clickup-cli-state.json, separate from config so the token file is
never rewritten), durations (30m/24h/7d/2w), dates, RFC3339, or Unix ms.
Also supports --skip-docs, --no-save, and space/folder/list scoping.

Also adds the date_updated field to the Doc model (returned by the v3
API but previously dropped during decoding), and fixes a test-harness
deadlock in runCommand when command output exceeds the 64KB pipe buffer.

https://claude.ai/code/session_019Aexh4uFP9TfNcm8nD42fN
@pikonha pikonha merged commit 8715215 into main Jun 10, 2026
3 checks passed
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.

2 participants