Implement slug engagement commands #8

Closed
opened 2026-05-19 19:51:44 -05:00 by erik · 3 comments
Owner

Goal

Implement slug commands for inspecting post engagement.

Spec: docs/cli-specs/10-engagement-commands.md

Requirements

  • Implement engagement summary, likes list, and boosts list commands from the spec.
  • Call the configured site's engagement API routes by post slug.
  • Render counts and actor/activity rows in readable human output.
  • Support valid JSON output where specified.
  • Surface missing post, auth, network, API, and 501 Not Implemented responses clearly.
  • Add CLI tests with mocked API responses for summary, likes, boosts, missing post, and unsupported behavior.

Acceptance criteria

  • Can show engagement summary for a post.
  • Can list likes for a post.
  • Can list boosts for a post.
  • Missing posts display a clear error.
  • --json output is valid.
  • 501 Not Implemented responses are displayed clearly.
  • Tests cover success and common API errors.
  • Relevant lint/test checks pass.

Dependencies

  • task-a3cd5595
  • task-b26679e3
## Goal Implement `slug` commands for inspecting post engagement. Spec: `docs/cli-specs/10-engagement-commands.md` ## Requirements - Implement engagement summary, likes list, and boosts list commands from the spec. - Call the configured site's engagement API routes by post slug. - Render counts and actor/activity rows in readable human output. - Support valid JSON output where specified. - Surface missing post, auth, network, API, and `501 Not Implemented` responses clearly. - Add CLI tests with mocked API responses for summary, likes, boosts, missing post, and unsupported behavior. ## Acceptance criteria - [ ] Can show engagement summary for a post. - [ ] Can list likes for a post. - [ ] Can list boosts for a post. - [ ] Missing posts display a clear error. - [ ] `--json` output is valid. - [ ] `501 Not Implemented` responses are displayed clearly. - [ ] Tests cover success and common API errors. - [ ] Relevant lint/test checks pass. ## Dependencies - task-a3cd5595 - task-b26679e3
Author
Owner

Synced from todu comment by @todu on 2026-06-04T12:50:56.769Z

Scope update

User decision: use a resource/filter command structure for engagement commands instead of slug posts engagement|likes|boosts <slug>.

Approved CLI shape:

  • slug engagement summary --post <slug> [--json]
  • slug engagement list --post <slug> --type like|boost [--json]

Rules:

  • --post <slug> is required because the current engagement API is post-scoped.
  • --type like|boost is required for engagement row listing.
  • summary returns counts from /posts/{slug}/engagement.
  • list --type like calls /posts/{slug}/likes.
  • list --type boost calls /posts/{slug}/boosts.
_Synced from todu comment by @todu on 2026-06-04T12:50:56.769Z_ ## Scope update User decision: use a resource/filter command structure for engagement commands instead of `slug posts engagement|likes|boosts <slug>`. Approved CLI shape: - `slug engagement summary --post <slug> [--json]` - `slug engagement list --post <slug> --type like|boost [--json]` Rules: - `--post <slug>` is required because the current engagement API is post-scoped. - `--type like|boost` is required for engagement row listing. - `summary` returns counts from `/posts/{slug}/engagement`. - `list --type like` calls `/posts/{slug}/likes`. - `list --type boost` calls `/posts/{slug}/boosts`.
Author
Owner

Synced from todu comment by @todu on 2026-06-04T12:54:16.458Z

PR Review

PR: #94

Review result: approved

Acceptance criteria: 8 total, 8 met, 0 missing

Blocking issues: 0
Warnings: 0

Notes:

  • Reviewed against the user-approved command structure: slug engagement summary --post <slug> and slug engagement list --post <slug> --type like|boost.

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.

_Synced from todu comment by @todu on 2026-06-04T12:54:16.458Z_ ## PR Review PR: https://forge.caradoc.com/erik/slugkit/pulls/94 Review result: approved Acceptance criteria: 8 total, 8 met, 0 missing Blocking issues: 0 Warnings: 0 Notes: - Reviewed against the user-approved command structure: `slug engagement summary --post <slug>` and `slug engagement list --post <slug> --type like|boost`. 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 2026-06-04 08:02:10 -05:00
Author
Owner

Synced from todu comment by @todu on 2026-06-04T12:57:42.364Z

Completed

  • Implemented engagement CLI commands for summary and actor lists using the approved slug engagement summary --post <slug> and slug engagement list --post <slug> --type like|boost command shape.
  • Verified acceptance criteria against merged PR evidence: PR #94 is merged into main at cc4f262, with implementation commit 3f8cd89 adding cli/src/commands.ts and cli/src/__tests__/commands.test.ts.
  • Verified review/quality evidence from the PR review comment: 8/8 acceptance criteria met, ./scripts/pre-pr.sh passed locally, and Forgejo CI CI / build-lint-test (pull_request) succeeded.
_Synced from todu comment by @todu on 2026-06-04T12:57:42.364Z_ ### Completed - Implemented engagement CLI commands for summary and actor lists using the approved `slug engagement summary --post <slug>` and `slug engagement list --post <slug> --type like|boost` command shape. - Verified acceptance criteria against merged PR evidence: PR #94 is merged into `main` at `cc4f262`, with implementation commit `3f8cd89` adding `cli/src/commands.ts` and `cli/src/__tests__/commands.test.ts`. - Verified review/quality evidence from the PR review comment: 8/8 acceptance criteria met, `./scripts/pre-pr.sh` passed locally, and Forgejo CI `CI / build-lint-test (pull_request)` succeeded.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
erik/slugkit#8
No description provided.