Skip to content

Web Tasks: bulk delete reloads the task list once per deleted task (429 error, deleted tasks reappear) #22258

Closed

Description

@apoorvdarshan

Product impact (see PRODUCT.md and ISSUE_TRIAGE_GUIDE.MD)

  • Primary loop layer (pick one): Retrieval-Action
  • Involves data loss, failed capture, or broken sync/trust (call this out clearly below)

Trust: a delete that succeeded is shown as an error, and deleted tasks come back on screen.

Describe the bug
On the web Tasks page, every successful task delete invalidates the action-items cache (deleteActionItem). useActionItems answers each invalidation with its own full GET /v1/action-items?limit=500, and nothing stops these reads from running in parallel (hook). A bulk delete of N tasks (bulkDelete) therefore fires N list reads at once. The backend serves 12 list reads per minute per account (action_items:list).

To Reproduce

  1. Open the web app's Tasks page with 15 or more pending tasks.
  2. Select all pending tasks (Cmd/Ctrl+A), then press d or use Delete in the bulk action bar.
  3. Watch the network panel and the page.

Current behavior

  • One GET /v1/action-items?limit=500 follows each DELETE. The reads past the 12-per-minute limit return 429.
  • The page shows "API error: 429 Too Many Requests" although every delete succeeded.
  • Whichever read answers last is applied, even one issued before a later delete. Deleted tasks then show again until the next reload. Two single deletes in quick succession can hit the same race.
  • The limit is per account, so the user's other clients also get 429 on their task list for the rest of that minute.

Expected behavior
A bulk delete triggers a bounded number of list reloads, with no error when the deletes succeeded. A reload that started before a delete is never applied on top of it.

Smartphone + device (please complete the following information):

  • Device: web app (any browser)

Additional context
I have a fix with regression tests and will open a PR.

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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions