Repository navigation
Conversation
doistbot
left a comment
There was a problem hiding this comment.
This PR adds --pause-activity to tdc status set, wiring the new effect through the SDK payload, dry-run preview, and the shared formatStatus helper so status, status set, and user output all show activity paused, while keeping it independent of --pause-notifications and preserving the existing --json shape when the effect is absent. No inline issues were flagged. The implementation follows the established --pause-notifications pattern closely (conditional-spread arg building, MutationOptions, printDryRun), the display label lives once in the shared formatter so all status surfaces pick it up without duplication, and SKILL_CONTENT and SKILL.md stay in sync as required. Tests cover the combined-effects case, dry-run output, text rendering, and the unchanged JSON path; the security surface is limited to a boolean flag adding a constant effect object and fixed display labels, with no changes to auth, parsing, or trust boundaries. Nothing blocking — the backend dependency is live in production and verified against it per the test plan.
I also included a few optional follow-up notes in the details below.
Optional follow-up notes (3)
src/commands/status/status.test.ts:428: This test's name promises to verify the help text does not claim Comms acts on
--pause-activity, but the assertions only check for--pause-activity,Karma,streaks, andindependent. It would still pass if the help text also said something like "pauses activity in Comms." Either add a scoped negative assertion against the--pause-activitydescription or drop the "without claiming Comms acts on it" part from the test name.src/commands/status/status.test.ts:98: The new JSON test only mocks
pauseNotifications, so it never provespauseActivitysurvives the--jsonpassthrough — yet machine consumers reading--jsonrely on seeing that effect. AddpauseActivity: {}to the mocked status (and the expected object) so this test also pins the new field's wire contract.src/commands/status/status.test.ts:178: This test re-covers what 'prints the expiry and the pause in the text output' already establishes: the set path prints
formatStatus(user.status), and the show tests above already coveractivity pausedrendering both alone and combined. Deleting it loses no failure mode; if you want one set-path check per effect, fold the assertion into the existing pause-notifications test instead.
Fixed in 467cf8b. Dropped that claim from the existing test's name and added a separate test that checks the
Done in 467cf8b. Added a
Keeping as-is. It is the only test that |
|
@doistbot /review |
doistbot
left a comment
There was a problem hiding this comment.
This PR updates feat(status): add --pause-activity to status set and show it. No issues were flagged in the reviewed diff.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
467cf8b to
47e5e39
Compare
Overview
Adds
tdc status set --pause-activity, which pauses your Todoist Karma and streaks while the status is active. It is independent of--pause-notifications: neither flag implies the other, and they can be combined.tdc status,tdc status setand thetdc userstatus line now showactivity paused. Comms only carries the effect; it does not act on it. The--jsonoutput is unchanged for statuses without it.Checked against production on 23 Oct with Doist/comms-backend#1092 live:
tdc status set "tdc live check" --pause-activity --for 10mreturnedeffects.pauseActivity, andtdc status,tdc user,tdc status --jsonandtd statusall showed it asactivity paused. Aftertdc status clear,tdcandtdboth reported no status.Reference
pause_activityon write), Doist/comms-backend#1081pauseActivityis in@doist/comms-sdk3.5.0 and up; this repo is on 3.8.1Test plan
Needs
tdc auth login --full-access.tdc status set "Holiday" --pause-activity --for 10m.activity paused.tdc statusandtdc user.activity paused.td statusshows it too.tdc status set "Focus" --pause-notifications --pause-activity --for 10m, thentdc status --json.effectshas bothpauseNotificationsandpauseActivity.tdc status set "Focus" --pause-notifications --for 10m.notifications pausedonly.tdc status set "x" --pause-activity --dry-run.Pause activity: yesand sends nothing.tdc status clear.Status cleared.🤖 Generated with Claude Code