Skip to content

bug: task status update race condition on fast double-click #3

Description

@baskard

Describe the bug

When a user double-clicks the status dropdown on a task card rapidly, the optimistic UI update and the actual API response can conflict, causing the task to revert to its previous status unexpectedly.

Steps to reproduce

  1. Open Dashboard with several tasks
  2. Find a task in "To Do" status
  3. Rapidly click the status dropdown twice before the first request completes
  4. Observe: task flickers between states or gets stuck

Expected behavior

The last user action should win. The status should settle on whatever the user last selected.

Actual behavior

Task status reverts to previous value or shows a stale state.

Root cause hypothesis

useUpdateTask uses optimistic updates but doesn't cancel in-flight mutations. Two concurrent PATCH requests for the same task can resolve out of order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-specTrigger spec-agent to elaborate this issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions