fix(app): keep task indent and order edits until saved

ST
2h ago
+362-46

Summary

Refs #5078. Fixes the "changes disappear" part only; parent links and moves are out of scope.

  • _flushIndentUpdates and _flushSortUpdates cleared pending edits before the PATCH and ignored its result, so a failed save was lost.
  • Any list read that landed before the save replaced rows with server values and reverted the indent on screen.
  • Pending indent/sort edits now stay pending until the server acknowledges that exact value. List, load-more, Home and saved-task reads overlay them, and a failed write is retried on the next edit or successful list read.
  • One layout write is in flight at a time, so an older value cannot land after a newer one, and a stale acknowledgement cannot clear a newer edit.
  • The layout write state now lives in app/lib/providers/task_layout_writes.dart, so action_items_provider.dart shrinks rather than growing past its line-count ratchet.

Implementation and verification were AI-assisted.

Verification

  • flutter test --no-pub test/providers/action_items_layout_persistence_test.dart: 3 new tests pass. All 3 fail against origin/main with only the request seam added.
  • flutter test --no-pub test/providers/action_item*_test.dart test/providers/deletion_consistency_test.dart test/providers/siri_authoritative_fetch_test.dart test/perf/scroll_task_cache_test.dart: 93 passed.
  • flutter analyze on the changed provider and test: only the existing material.dart deprecation info.
  • No device run.

UI-Evidence: none -- provider persistence fix; no layout change.

Product invariants affected

none

Failure-Class: none