Skip to content

bug(platform): Inbox Unassign sends null that the assignment API rejects #3732

Closed

Description

@yannickmonney

An administrator cannot remove a conversation's person assignment with Unassign. The real picker sends an absent assignee through the HTTP adapter, which serializes it as {"assigneeUserId":null}. The native route only accepts an optional string and returns 400; the existing assignment remains.

Reproduce locally

  1. Sign in as an owner/admin in a local organization with Inbox configured. Assign a synthetic conversation to a member.
  2. Open that conversation's assignment picker and choose Unassign.
  3. Inspect POST /api/app/conversations/{id}/assign?orgId={org} and read the conversation again.

Expected: the person assignment is cleared while any independent team assignment is preserved.

Observed: the body is {"assigneeUserId":null}; the server responds 400, assigneeUserId: Invalid input: expected string, received null. The person remains assigned.

Independent evidence and controls

The parent replay rendered the actual ConversationAssigneePicker, mutation hook and HTTP adapter against the authenticated localhost:3078 native route and real PostgreSQL. A native valid user assignment returned 200 and persisted. The real UI Unassign returned 400 and retained that assignment. Sending {} to the same native endpoint returned 200 and cleared it. No provider or message send was involved. Shell identity/member/team reads were supplied by the component harness; this is a component-to-native-HTTP reproduction, not a full browser-flow claim.

Cause and repair boundary

  • app/features/conversations/components/conversation-assignee-picker.tsx:238 passes an undefined assignee for Unassign.
  • app/lib/backend/conversations.ts:221 turns that absence into null.
  • backend/domains/conversations/routes.ts:341 accepts only z.string().max(128).optional().

Align the documented clear gesture across the wire contract, and cover both person and team clears while preserving the other dimension. Reject malformed JSON explicitly.

This is distinct from #3708: that report concerns malformed JSON being treated as an empty body and silently unassigning. Here a valid JSON body generated by the product's own Unassign control is refused. Both need tests; accepting malformed JSON is not the remedy.

Audit scope and reproduction record

  • Tested source: 480ee6a3e6d33c3414a2c0f8a52fded1ddc4ca2d; local-only audit on 2026-09-28.
  • Relevant source compared with origin/main 2be6c267eaf8b7a67d0e5abe1b0b3d655eb2ca25. The cause remains present; the only changes in the compared Inbox UI files are unrelated accent/filter-error affordances.
  • Full-body dedup reviewed against the all-state issue snapshot and the existing 102-finding baseline. This is one distinct cause, not an endpoint/locale variant or documented debt.
  • Parent replay log: /Users/yannick/.codex/notes/tale-1000-additional/inbox-next/parent-boundaries.log. Retained proof code lives in the same notes directory outside the repository. No production testing, real customer data, provider calls or application source edits.
  • Source links are rooted at the tested commit.
  • Severity: P2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions