Skip to content

fix: prevent crash on task assignee change (#85974)#86067

Closed
arlo-owls wants to merge 1 commit intoExpensify:mainfrom
arlo-owls:fix/85974-task-assignee-crash
Closed

fix: prevent crash on task assignee change (#85974)#86067
arlo-owls wants to merge 1 commit intoExpensify:mainfrom
arlo-owls:fix/85974-task-assignee-crash

Conversation

@arlo-owls
Copy link

Fixed Issues

$250 #85974

Tests

  1. Create a task with an existing user as assignee
  2. Open the task → assignee
  3. Select another existing user from contacts
  4. Verify app does NOT crash
  5. Verify assignee is updated correctly

Root Cause

PR #85539 moved participants: {[assigneeAccountID]: null} inside the isOptimisticPersonalDetail() conditional in getTaskAssigneeChatOnyxData. For existing users, isOptimisticPersonalDetail returns false, so the participant cleanup never runs on success. This leaves stale/duplicate participant data that crashes the app on Android when re-rendering.

Fix

Move the participant cleanup back outside the isOptimisticPersonalDetail conditional so it always runs for optimistic chat reports, while keeping the personal details cleanup inside the conditional (since that only applies to optimistic users). This restores the pre-#85539 behavior for participant cleanup.

…k to prevent crash on task assignee change

Fixes Expensify#85974. PR Expensify#85539 moved the participants cleanup into isOptimisticPersonalDetail conditional, but for existing users this check returns false, leaving stale participant data that causes the app to crash on Android.
@arlo-owls arlo-owls requested review from a team as code owners March 23, 2026 04:16
@melvin-bot melvin-bot bot requested review from trjExpensify and removed request for a team March 23, 2026 04:16
@github-actions
Copy link
Contributor

👋 Hi @arlo-owls, thanks for your interest in contributing to Expensify!

This PR has been automatically closed because it doesn't appear to meet our contribution requirements:

  • You are not a member of the Expensify GitHub organization
  • No linked GitHub issue was found in the PR description where you are listed as an assignee
  • No linked GitHub PR was found in the PR description where you are the author or a reviewer

If you'd like to contribute, please make sure to:

  1. Find an open issue you'd like to work on
  2. Get assigned to the issue by following our contribution process
  3. Link the issue in your PR description using the format: $ https://github.com/Expensify/App/issues/<issueID>

Please review our contributing guidelines for more details.

If you believe this was closed in error, please reach out in the #expensify-open-source Slack channel.

@github-actions github-actions bot closed this Mar 23, 2026
@github-actions github-actions bot locked as spam and limited conversation to collaborators Mar 23, 2026
@melvin-bot melvin-bot bot requested review from grgia and removed request for a team March 23, 2026 04:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant