mattermost-mobile-upstream/app
yasserfaraazkhan 6a269a9aec fix(custom-status): surface a failed local clear, and fix the patchPost mock
Two findings from an expert review pass over the run-32126493462 failures.

app/actions/remote/post.test.ts — the patchPost mock had the wrong signature. The
client takes a single object (`patchPost(postPatch: Partial<Post> & {id: string})`,
app/client/rest/posts.ts:64) and editPost calls it as
`client.patchPost({message, id, file_ids})`, but the mock destructured two
positional args `(message: string, postId: string)`. So it received the object as
`message`, `undefined` as `postId`, and every editPost test asserted against a
post whose id was undefined and whose message was an object. Corrected, and added
a test that asserts the edited body actually lands in the database — it fails with
the old mock (`Expected: "edited message content"  Received: ""`) and passes with
the new one, so the mock bug is real and now covered.

custom_status/index.tsx — clearCustomStatus discarded the result of
updateLocalCustomStatus. The call was not awaited and its `{error}` was dropped, so
a failed local write left the row showing a status the server had already cleared,
with no retry affordance and nothing logged. Await it and raise the existing retry
message, matching the branch above it that already does this for unsetCustomStatus.

To be clear about scope: this is the dropped-error path, not a root cause for
MM-T4990_4 / MM-T3891. Awaiting does not make observeCurrentUser emit any sooner,
so it cannot by itself explain a 20s assertion failure. Those two remain open.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 02:13:30 +05:30
..
actions fix(custom-status): surface a failed local clear, and fix the patchPost mock 2026-08-19 02:13:30 +05:30
client fix(network): retry a lost pooled connection once, and use the options helper in mentions 2026-08-18 15:49:56 +05:30
components Drop snapshot lines nothing renders 2026-08-17 19:44:25 +05:30
constants Classification Markings: Cached request timer and PSv2 Implementation (#9926) 2026-08-13 15:24:07 +03:00
context Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
database Classification Markings: Cached request timer and PSv2 Implementation (#9926) 2026-08-13 15:24:07 +03:00
helpers Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
hooks test(e2e): WIP remaining unverified unskips and fixes (failing/not-run) 2026-08-14 22:43:40 +05:30
i18n Add autotranslations (#9324) 2026-02-10 17:50:39 +01:00
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 replace react-native-incall-manager with @mattermost/calls-native for audio management (#9973) 2026-08-06 07:38:54 +08:00
queries test(queries): cover user props propagation through observeUser 2026-08-17 14:02:24 +05:30
routes fix(bottom-sheet): do not crash when the render callback is cleared 2026-08-17 13:34:29 +05:30
screens fix(custom-status): surface a failed local clear, and fix the patchPost mock 2026-08-19 02:13:30 +05:30
store Classification Markings: Cached request timer and PSv2 Implementation (#9926) 2026-08-13 15:24:07 +03:00
utils fix(datetime): keep the scheduled label when the engine rejects timeZone 2026-08-17 13:41:37 +05:30