mattermost-mobile-upstream/app/actions/remote
Guillermo Vayá 4b12bcec7b fix(drafts): Phase 5 review — capability re-read, disable epoch, commit ordering, overflow, reliable reconnect
Addresses 5 validated review findings on the Phase 5 trigger wiring:

- #3 Reconnect honored a stale cached capability: doReconnect now awaits
  handleCapabilityChange (re-reading the freshly-committed sync_drafts
  preference) before requestReconcile, so a persisted sync_drafts=false is
  respected on a fresh login.
- #4 Disable did not fence in-flight work: handleCapabilityChange's disable
  branch now bumps the lifecycle epoch (like invalidate) and resets the
  reconcile single-flight, so a GET/POST/DELETE crossing the disabled
  interval cannot apply results or set a baseline after re-enable.
- #5 Team reconcile ran before the switch committed: moved requestReconcile
  in handleTeamChange to after the new team is persisted (both the tablet
  fast-path and the normal path), so a concurrent DB-reading trigger can't
  coalesce the baseline back onto the previous team.
- #6a Reliable reconnect never reconciled: WebsocketManager.onReliableReconnect
  now calls DraftSyncManager.onReliableReconnect, which GET-reconciles the
  current team so silent (event-less) server-side deletions are caught.
- #7 Overflow could permanently stall event-triggered reconcile: enqueue now
  fires the reconcile trigger even on buffer overflow (dropping only the
  push), so a full buffer left by a transient current-team lookup failure
  cannot wedge reconciliation after the database recovers.

Pushed back (not changed): #1 (fence absent keys — would resurrect deleted
drafts; belongs to Phase 6 deleted_fingerprint) and #2 (drain during pending
GET is local-wins-safe, absence is 2-observation guarded). Deferred: #6b
suspend/resume, #8a Global-Drafts stale-on-open, #8b reconciliation deadline.

tsc + eslint clean; new manager tests for #4/#6a/#7 and a reconnect
capability/ordering assertion for #3. All affected suites green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 14:36:43 +02:00
..
entry fix(drafts): wake the coordinator on local mutations + init on DB-recreation paths (#7, #11) 2026-08-05 12:19:51 +02:00
apps.test.ts MM-59445 + others - Add tests for channel bookmarks, systems, apps and tos files in remote/actions (#8558) 2025-02-07 23:57:17 +08:00
apps.ts Remove tand prevent double tap (#9078) 2025-08-25 12:03:01 +02:00
category.test.ts [MM-68255] Enable mobile support for Managed Categories (#9683) 2026-04-16 10:01:51 -04:00
category.ts fix: app bugs surfaced by Detox RF migration (#9789) 2026-06-09 13:25:42 +05:30
channel_access_control_attributes.ts Mm 63935 abac end user indicators (#8848) 2025-05-19 15:34:03 +02:00
channel_bookmark.test.ts Only fetch bookmarks when the license allows to use them (#8616) 2025-02-28 10:25:32 +01:00
channel_bookmark.ts Only fetch bookmarks when the license allows to use them (#8616) 2025-02-28 10:25:32 +01:00
channel.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
channel.ts [MM-69457] Stop logging PII in exportable app logs (#9884) 2026-07-02 12:19:04 +02:00
classification.test.ts MM-68208 Implementing global and channel-level banners on mobile (#9752) 2026-07-08 12:47:01 +03:00
classification.ts MM-68208 Implementing global and channel-level banners on mobile (#9752) 2026-07-08 12:47:01 +03:00
command.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
command.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
custom_emoji.test.ts feat(iOS): Add Microsoft Intune MAM integration with multi-server support (#9312) 2025-12-10 13:07:28 +02:00
custom_emoji.ts Improve emoji picker performance introducing flashList (#8650) 2025-03-11 22:09:46 +08:00
custom_profile.test.ts [MM-62700] User Attribute types (#8903) 2025-06-12 10:59:13 +02:00
custom_profile.ts [MM-62700] User Attribute types (#8903) 2025-06-12 10:59:13 +02:00
draft.test.ts fix(drafts): close 3 residual gaps in Phase-4 review fixes (#1, #2, #6) 2026-08-07 12:34:56 +02:00
draft.ts fix(drafts): close 3 residual gaps in Phase-4 review fixes (#1, #2, #6) 2026-08-07 12:34:56 +02:00
file.test.ts test(MM-59431): file.ts unit test (#8424) 2025-01-08 20:19:24 -07:00
file.ts Channel Bookmarks (#7817) 2024-07-18 09:10:28 +08:00
general.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
general.ts Fix case-insensitive pre-auth header check in doPing (#9577) 2026-03-17 12:07:07 +01:00
groups.test.ts Add tests to actions/remote/groups (#8303) 2024-11-04 19:24:01 +08:00
groups.ts Request metrics improvements (#8420) 2025-01-16 13:55:29 -07:00
integrations.test.ts Mattermost Blocks (#9764) 2026-06-29 18:42:16 +02:00
integrations.ts Mattermost Blocks (#9764) 2026-06-29 18:42:16 +02:00
license.test.ts [MM-63728] Add license load metric to About screen (#8769) 2025-04-17 17:29:47 -03:00
license.ts [MM-63728] Add license load metric to About screen (#8769) 2025-04-17 17:29:47 -03:00
notifications.test.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
notifications.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
performance.test.ts Add Accept Header on ClientTracking (#8895) 2025-06-06 12:42:09 +02:00
performance.ts Add performance metrics to the app (#7953) 2024-06-12 09:45:27 +02:00
permalink.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
post.auxiliary.test.ts [MM-66467] Missing messages (#9827) 2026-06-15 11:20:58 +02:00
post.auxiliary.ts fix critical crashes on Android (#9871) 2026-06-23 02:40:21 +08:00
post.test.ts [MM-67889] Fix permalinks to unjoined channels (#9624) 2026-04-06 00:08:53 -07:00
post.ts [MM-67889] Fix permalinks to unjoined channels (#9624) 2026-04-06 00:08:53 -07:00
preference.test.ts Revert "e2e(detox): Rainforest to Detox migration (#9790)" (#9834) 2026-06-15 17:57:01 +02:00
preference.ts fix: app bugs surfaced by Detox RF migration (#9789) 2026-06-09 13:25:42 +05:30
reactions.test.ts Fix team sidebar not showing thread unreads (#8624) 2025-03-18 13:33:15 +01:00
reactions.ts [MM-42586] Reaction toggle behavior (#7674) 2023-11-22 21:05:58 +08:00
refresh.test.ts fix(drafts): wake the coordinator on local mutations + init on DB-recreation paths (#7, #11) 2026-08-05 12:19:51 +02:00
refresh.ts fix(drafts): wake the coordinator on local mutations + init on DB-recreation paths (#7, #11) 2026-08-05 12:19:51 +02:00
restore_server.test.ts Mm 68767 zero persistence (#9803) 2026-07-16 13:55:45 +02:00
restore_server.ts Mm 68767 zero persistence (#9803) 2026-07-16 13:55:45 +02:00
retry.test.ts MM-59433 Add unit tests to actions/remote/retry (#8445) 2025-01-08 12:30:16 -05:00
retry.ts Refactor errors around the app (#7306) 2023-05-03 13:08:55 +02:00
role.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
scheduled_post.test.ts feat(MM-63937): fetch initial team data only on entry (#8894) 2025-08-18 10:06:15 -06:00
scheduled_post.ts Unlicensed server should not show the tooltip on channel send button (#8806) 2025-04-29 17:21:09 +05:30
search.test.ts Fix team sidebar not showing thread unreads (#8624) 2025-03-18 13:33:15 +01:00
search.ts Keep users in archived channels when server omits ExperimentalViewArchivedChannels (MM-65820) (#9815) 2026-06-09 19:47:37 +00:00
session.test.ts Receive Mattermost Calls through iOS native incoming-call UI (#9780) 2026-06-16 12:08:14 -03:00
session.ts Receive Mattermost Calls through iOS native incoming-call UI (#9780) 2026-06-16 12:08:14 -03:00
systems.test.ts Mm 68767 zero persistence (#9803) 2026-07-16 13:55:45 +02:00
systems.ts Mm 68767 zero persistence (#9803) 2026-07-16 13:55:45 +02:00
team.test.ts feat(drafts): Phase 5 — WebSocket + lifecycle triggers make sync live 2026-08-15 16:50:19 +02:00
team.ts fix(drafts): Phase 5 review — capability re-read, disable epoch, commit ordering, overflow, reliable reconnect 2026-08-18 14:36:43 +02:00
terms_of_service.test.ts MM-59445 + others - Add tests for channel bookmarks, systems, apps and tos files in remote/actions (#8558) 2025-02-07 23:57:17 +08:00
terms_of_service.ts fix critical crashes on Android (#9871) 2026-06-23 02:40:21 +08:00
thread.test.ts Revert "e2e(detox): Rainforest to Detox migration (#9790)" (#9834) 2026-06-15 17:57:01 +02:00
thread.ts fix: app bugs surfaced by Detox RF migration (#9789) 2026-06-09 13:25:42 +05:30
user.test.ts Mm 68767 zero persistence (#9803) 2026-07-16 13:55:45 +02:00
user.ts Mm 68767 zero persistence (#9803) 2026-07-16 13:55:45 +02:00