feat: add engagement CLI commands #94

Merged
erik merged 1 commit from feat/task-f39b82a4-engagement-cli into main 2026-06-04 07:55:15 -05:00
Owner

Summary

Implement Slugkit engagement inspection commands in the CLI using the approved resource/filter command structure.

Task

#task-f39b82a4

Changes

  • Add slug engagement summary --post <slug> [--json]
  • Add slug engagement list --post <slug> --type like|boost [--json]
  • Call post-scoped engagement summary, likes, and boosts API routes
  • Render human-readable engagement counts and actor/activity rows
  • Add useful empty-list messages for likes and boosts
  • Add mocked CLI tests for summary, likes, boosts, empty lists, JSON output, missing post, auth/network/API/501 failures, and invalid usage

Testing

  • Unit tests added/updated
  • Manual testing performed

Checklist

  • ./scripts/pre-pr.sh passes
  • Documentation updated (CLI help)
  • No unrelated changes included
## Summary Implement Slugkit engagement inspection commands in the CLI using the approved resource/filter command structure. ## Task #task-f39b82a4 ## Changes - Add `slug engagement summary --post <slug> [--json]` - Add `slug engagement list --post <slug> --type like|boost [--json]` - Call post-scoped engagement summary, likes, and boosts API routes - Render human-readable engagement counts and actor/activity rows - Add useful empty-list messages for likes and boosts - Add mocked CLI tests for summary, likes, boosts, empty lists, JSON output, missing post, auth/network/API/501 failures, and invalid usage ## Testing - [x] Unit tests added/updated - [ ] Manual testing performed ## Checklist - [x] `./scripts/pre-pr.sh` passes - [x] Documentation updated (CLI help) - [x] No unrelated changes included
feat: add engagement CLI commands
All checks were successful
CI / build-lint-test (pull_request) Successful in 31s
3f8cd8926e
Task: #task-f39b82a4
Author
Owner

PR Review

Summary

Reviewed PR #94 against task task-f39b82a4 and the user-approved command-structure update for slug engagement .... The PR adds engagement summary/list commands, calls post-scoped engagement APIs, supports human and JSON output, and adds mocked CLI tests for success and failure cases.

Acceptance criteria

  • Can show engagement summary for a post. — slug engagement summary --post <slug> calls /posts/{slug}/engagement; tests assert path, auth, and count output.
  • Can list likes for a post. — slug engagement list --post <slug> --type like calls /posts/{slug}/likes; tests assert actor/activity output.
  • Can list boosts for a post. — slug engagement list --post <slug> --type boost calls /posts/{slug}/boosts; tests assert path and empty output.
  • Missing posts display a clear error. — tests assert Post not found: missing is surfaced.
  • --json output is valid. — tests parse JSON engagement output.
  • 501 Not Implemented responses are displayed clearly. — tests assert standardized message.
  • Tests cover success and common API errors. — tests cover summary, likes, boosts, empty list, missing post, auth, API, network, 501, and invalid usage.
  • Relevant lint/test checks pass. — ./scripts/pre-pr.sh passed locally and Forgejo CI succeeded.

Blocking issues

None.

Warnings

None.

Verification

  • ./scripts/pre-pr.sh passed locally.
  • Forgejo CI status for CI / build-lint-test (pull_request) is success.

Verdict

Approved. Ready for human merge approval.

## PR Review ### Summary Reviewed PR #94 against task `task-f39b82a4` and the user-approved command-structure update for `slug engagement ...`. The PR adds engagement summary/list commands, calls post-scoped engagement APIs, supports human and JSON output, and adds mocked CLI tests for success and failure cases. ### Acceptance criteria - [x] Can show engagement summary for a post. — `slug engagement summary --post <slug>` calls `/posts/{slug}/engagement`; tests assert path, auth, and count output. - [x] Can list likes for a post. — `slug engagement list --post <slug> --type like` calls `/posts/{slug}/likes`; tests assert actor/activity output. - [x] Can list boosts for a post. — `slug engagement list --post <slug> --type boost` calls `/posts/{slug}/boosts`; tests assert path and empty output. - [x] Missing posts display a clear error. — tests assert `Post not found: missing` is surfaced. - [x] `--json` output is valid. — tests parse JSON engagement output. - [x] `501 Not Implemented` responses are displayed clearly. — tests assert standardized message. - [x] Tests cover success and common API errors. — tests cover summary, likes, boosts, empty list, missing post, auth, API, network, `501`, and invalid usage. - [x] Relevant lint/test checks pass. — `./scripts/pre-pr.sh` passed locally and Forgejo CI succeeded. ### Blocking issues None. ### Warnings None. ### Verification - `./scripts/pre-pr.sh` passed locally. - Forgejo CI status for `CI / build-lint-test (pull_request)` is `success`. ### Verdict Approved. Ready for human merge approval.
erik merged commit cc4f262721 into main 2026-06-04 07:55:15 -05:00
erik deleted branch feat/task-f39b82a4-engagement-cli 2026-06-04 07:55:15 -05:00
Sign in to join this conversation.
No description provided.