#207

Remove optimistic task on error instead of refreshing all tasks

OpenS7331331337Swants to merge intofrom

Previously when task creation failed, the code would refresh all tasks from the server to remove the optimistic task. This was inefficient. Now we remove only the specific optimistic task that failed by adding a removeTaskOptimistically function to the TasksContext.

Changes:

  • Add removeTaskOptimistically function to app-layout.tsx
  • Update TasksContextType interface to include the new function
  • Use removeTaskOptimistically in home-page-content.tsx error handlers
  • Remove TODO comments that are now resolved

Activity

3
vercel[bot]11mo ago

@claude is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.