Skip to content

fetch roles during entry to avoid UI observing inconsistent channel s…#9873

Draft
carlisgg wants to merge 1 commit into
mainfrom
MM-67855-read-only-channels
Draft

fetch roles during entry to avoid UI observing inconsistent channel s…#9873
carlisgg wants to merge 1 commit into
mainfrom
MM-67855-read-only-channels

Conversation

@carlisgg

Copy link
Copy Markdown
Contributor

Summary

Fetch roles during entry action alongside with channels when needed to avoid UI observing inconsistent channel states and showing channels as read only incorrectly.

Ticket Link

https://mattermost.atlassian.net/browse/MM-67855

Checklist

  • Added or updated unit tests (required for all new features)

Device Information

This PR was tested on: Android 16 and iOS 26.1 emulators

Release Note

fixes showing channels as read only on bad network conditions

…tates

first time channels are fetched for a team, roles should also be fetched at
the same time instead of only relying in deferred fetch. That avoids having
channels observed by the UI in an inconsistent state and rendering as read
only channels.

During reconnection the non forced entry fetch roles is a no-op since force is
set to false.
@github-actions github-actions Bot added the E2E/Run Triggers E2E tests on both iOS and Android via Matterwick label Jun 22, 2026
@github-actions

Copy link
Copy Markdown

Coverage Comparison Report

Generated on June 22, 2026 at 18:32:26 UTC

+-----------------+------------+------------+-----------+
| Metric          | Main       | This PR    | Diff      |
+-----------------+------------+------------+-----------+
| Lines           |     87.71% |     87.66% |    -0.05% |
| Statements      |     87.57% |     87.52% |    -0.05% |
| Branches        |     76.32% |     76.29% |    -0.03% |
| Functions       |     87.17% |     87.11% |    -0.06% |
+-----------------+------------+------------+-----------+
| Total           |     84.69% |     84.64% |    -0.05% |
+-----------------+------------+------------+-----------+

@github-actions github-actions Bot removed the E2E/Run Triggers E2E tests on both iOS and Android via Matterwick label Jun 22, 2026
prepareEntryModels({operator, teamData: initialTeamData, chData, prefData, meData, isCRTEnabled}).
then((proms) => Promise.all(proms)).
then((results) => results.flat()),
fetchRoles(serverUrl, teamData.memberships, chData?.memberships, meData?.user, false, false, groupLabel),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say is fine if you want to add them here, it does not really mean it will be more realiable, but in any case if you do this probably you want to remove the other fetch call that happens down the line

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, without this I can reproduce the issue in bad network conditions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants