Skip to content

feat(users): add the pause_activity status effect - #103

Merged
lmjabreu merged 3 commits into
mainfrom
lmjabreu/brave-proskuriakova-d9a5fa
Oct 17, 2026
Merged

lmjabreu merged 3 commits into
mainfrom
lmjabreu/brave-proskuriakova-d9a5fa

Conversation

@lmjabreu

@lmjabreu lmjabreu commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Todoist now stores and returns a pause_activity status effect next to pause_notifications (Doist/Todoist#30665, #30666). UserStatusSchema strips it on read and SetStatusArgs has no way to send it. This adds pauseActivity to both, with the same optional scope as pauseNotifications.

The Comms backend still drops it in both directions, so this has no effect until Doist/comms-backend#1081 ships. Merging first only means the SDK is ready.

Reference

Doist/comms-backend#1081. Confirmed against production on 2026-10-14 that Comms omits pause_activity on read and erases it on set_status.

Changelog

Add the pauseActivity effect to the shared user status.

Test plan

  1. Check out this branch, restore src/types/entities.ts from main, and run npx vitest run src/clients/users-client.test.ts. The two pause_activity read tests fail, because the effect is stripped.
  • On this branch the same command passes, along with npm test, npm run type-check and npm run check.
  • setStatus({ effects: { pauseActivity: {} } }) type-checks and sends pause_activity.

Adversarial review

Reviewer Head Raised Fixed Refuted Deferred Reviewer tokens
Fable, Sonnet e441e01 8 4 4 0 438,947

All eight were P3. Fixes are in d8b2e4e.

🤖 Generated with Claude Code

lmjabreu and others added 2 commits October 15, 2026 00:27
Todoist now stores and returns a pause_activity effect next to
pause_notifications. Read it in UserStatusSchema and send it from
setStatus, with the same tolerant scope as pause_notifications.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Address the offline review: share one schema and one request type between
pauseNotifications and pauseActivity, guard both effects with a parametrized
scope test, and say in the pauseActivity comment that Comms drops it until
the backend carries it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@lmjabreu

Copy link
Copy Markdown
Contributor Author

@doistbot /review

@doistbot doistbot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR cleanly adds the pauseActivity status effect alongside pauseNotifications, reusing a shared StatusEffectSchema for the read side and mirroring the same optional scope shape in the request args, with tests covering the wire format in both directions. No inline issues were flagged — the change is consistent across schema, request types, and tests, and follows the repo's existing conventions.

I also left one optional follow-up note in the details below.

Optional follow-up note (1)
  • P3 src/clients/users-client.test.ts:187: The new parameterized describe.each block now covers exactly what the existing 'parses a pause_notifications effect stored without a scope' test (a few lines above) already checks — that test's case is identical to the ['pause_notifications', 'pauseNotifications'] / ['without a scope', {}] combination here. Consider deleting the older standalone test so the fixture matrix has a single source of truth.

Share Feedback • Review Logs

The parametrized scope guard covers the same case for both effects.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@lmjabreu
lmjabreu marked this pull request as ready for review October 15, 2026 12:15
@lmjabreu
lmjabreu requested review from a team, gnapse and scottlovegrove and removed request for a team and scottlovegrove October 15, 2026 12:20
@lmjabreu
lmjabreu merged commit 5364865 into main Oct 17, 2026
5 checks passed
@lmjabreu
lmjabreu deleted the lmjabreu/brave-proskuriakova-d9a5fa branch October 17, 2026 20:14
doist-release-bot Bot added a commit that referenced this pull request Oct 17, 2026
## [3.5.0](v3.4.1...v3.5.0) (2026-10-17)

### Features

* **users:** add the pause_activity status effect ([#103](#103)) ([5364865](5364865))
@doist-release-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants