mattermost-mobile-upstream/app
Guillermo Vayá 1013adb891 feat(drafts): Phase 2 — draft sync API DTOs, REST client, normalization, capability
Client, mapping, and capability layer only — intentionally NOT wired into any
lifecycle/trigger path yet (no coordinator, no workers).

- types/api/drafts.d.ts: add DraftApi (server response) and DraftUpsertRequest
  (POST body) DTOs alongside DraftProps.
- types/api/config.d.ts: add AllowSyncedDrafts to ClientConfig.
- client/rest/base.ts: add draft route helpers (drafts POST, user/team GET,
  channel/thread DELETE).
- client/rest/drafts.ts (+test): ClientDrafts mixin — getDrafts, upsertDraft,
  deleteDraft (channel vs thread by rootId), Connection-Id header on POST/DELETE.
  Mixed into client/rest/index.ts (also drops a pre-existing duplicate
  ClientScheduledPost entry in the .with() list).
- constants/preferences.ts: add ADVANCED_SYNC_DRAFTS ('sync_drafts').
- utils/draft/sync.ts (+test): pure bidirectional normalization. server->mobile
  maps update_at->server_update_at (never local update_at), priority, props
  passthrough, exact file_ids, files from metadata.files; mobile->server sends
  only channel_id/root_id/message/type/props/file_ids/priority and returns null
  for an empty message so it never POSTs. Fail-closed burn-on-read reconstruction
  (durations come from server config, not props; missing/invalid -> no enabled
  borConfig).
- queries/servers/drafts.ts: getIsDraftSyncEnabled / observeIsDraftSyncEnabled —
  enabled when AllowSyncedDrafts==='true' AND sync_drafts pref not 'false'
  (absent = enabled). No server-version gate.

Checks: npm run tsc clean; eslint --quiet clean; 69 focused Jest tests pass
across the new client/sync suites and the scheduled_post/post-handler/drafts
regression neighbors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 11:49:47 +02:00
..
actions fix: push notification navigation delay and stale in-app avatar (#9929) 2026-07-22 14:15:21 +02:00
client feat(drafts): Phase 2 — draft sync API DTOs, REST client, normalization, capability 2026-07-24 11:49:47 +02:00
components feat(e2e): Integrate TSIO reporting (#9925) 2026-07-23 06:43:28 +00:00
constants feat(drafts): Phase 2 — draft sync API DTOs, REST client, normalization, capability 2026-07-24 11:49:47 +02:00
context
database feat(drafts): Phase 1 synchronized-drafts storage foundation 2026-07-23 16:18:48 +02:00
helpers
hooks Mm 68767 zero persistence (#9803) 2026-07-16 13:55:45 +02:00
i18n
init Mm 68767 zero persistence (#9803) 2026-07-16 13:55:45 +02:00
keyboard resumes slide animation after stopping due to modal system dialog showing (#9792) 2026-05-29 06:50:57 +08:00
managers Mm 68767 zero persistence (#9803) 2026-07-16 13:55:45 +02:00
products [MM-68856] Respect default agent and persist last-selected agent in agent selectors (#9829) 2026-07-16 20:13:11 -04:00
queries feat(drafts): Phase 2 — draft sync API DTOs, REST client, normalization, capability 2026-07-24 11:49:47 +02:00
routes Route through usePropsFromParams for remaining stragglers (#9949) 2026-07-18 19:16:46 +03:00
screens fix: push notification navigation delay and stale in-app avatar (#9929) 2026-07-22 14:15:21 +02:00
store fix: push notification navigation delay and stale in-app avatar (#9929) 2026-07-22 14:15:21 +02:00
utils feat(drafts): Phase 2 — draft sync API DTOs, REST client, normalization, capability 2026-07-24 11:49:47 +02:00