Repository navigation
fix(users): send the name as full_name in users.update - #140
Conversation
Comms reads the name as full_name and ignores fields it does not know,
so users.update({ name }) returned 200 without changing anything.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
doistbot
left a comment
There was a problem hiding this comment.
This PR fixes users.update to send the rename as full_name, the field comms-backend actually reads, while keeping the public name argument unchanged — so a previously silent no-op now reaches Todoist, and new MSW tests pin the exact wire format including the no-name case. No inline issues were flagged; the mapping through the existing snakeCaseKeys serialization and the test coverage match the repo's established patterns.
I also included a few optional follow-up notes in the details below.
Optional follow-up notes (2)
src/clients/users-client.test.ts:246: These new tests instantiate
UsersClientdirectly, but the repository's write-tests convention and AGENTS.md's definition of done exercise clients through the public interface:new CommsApi(TEST_API_TOKEN)thenapi.users.update(...). Routing throughCommsApikeeps the tests on the public API and matches most other client test files.src/clients/users-client.test.ts:267: This test would still pass with the change undone (
update({ timezone })already sent exactly{ timezone }), so it adds no proof for this fix. It also cannot guard thename === undefinedbranch it seems to target: even{ ...rest, fullName: name }withnameundefined serializes to{"timezone":"Europe/London"}becauseJSON.stringify(snakeCaseKeys(...))dropsfull_name: undefinedbefore MSW parses the body. Drop it, or fold thetimezonepassthrough check into the first test.
…test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Done in 83093c0. The test now calls
Done in 83093c0. Dropped it, since the first test already checks |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
## [5.0.2](v5.0.1...v5.0.2) (2026-11-12) ### Bug Fixes * **users:** send the name as full_name in users.update ([#140](#140)) ([24a7472](24a7472))
|
@engfragui the release after this merged got stuck halfway: GitHub returned a 500 while semantic-release was pushing its notes, so the Would you be able to publish 5.0.2, or know who can? No rush if another release is due soon, #147 would carry it too. |
## [5.0.2](v5.0.1...v5.0.2) (2026-11-12) ### Bug Fixes * **users:** send the name as full_name in users.update ([#140](#140)) ([24a7472](24a7472))
|
🎉 This PR is included in version 5.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
@lmjabreu All done. |
Context
users.update({ name })sentname, but comms-backend'sUserUpdateBodyreadsfull_nameand ignores fields it does not know. The call returned 200 and changed nothing, so a rename from comms-mcp'supdate-user-infolooked like it worked.What was changed
update()sendsnameasfull_name. The publicnameargument is unchanged, so callers need no change.users-client.test.tsfails without the fix (namesent wherefull_nameis expected) and passes with it.npm run verifypasses.{"name": ...}returns 200 and writes nothing;{"full_name": ...}now reaches Todoist./user/update(Doist/comms-backend#518). That needs a backend change.Refs
🤖 Generated with Claude Code