You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The role changes with no error when assign the Approve-only role to a member offline #104946
Version Number: v9.5.20-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#102933 Email or phone of affected tester (no customers):lekima20+628010@gmail.com Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Win 11/Chrome App Component: Workspace Settings
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Recommendation: demote and close. This is not a regression. The app behaves as designed. When you change a role offline, the change applies right away and no error shows until you reconnect. QA's expected result came from an outdated "Offline tests" section in [Payment due @Pujan92] Add approve-only workspace role. That section no longer matches the merged code.
Confidence: High. This is based on the code and the PR history. I did not run a live test.
Investigation details
The PR moved to the standard offline-first pattern before merge. Commit b97f3c5a9f changed the role update to a queued API.write. After that change, the author wrote on the PR: "now it would change the role optimistically and then check for the blockers when the user gets online. If there's at least one blocker, then it would show the modal as expected and revert the optimistic role change."
The PR description was never updated. The "Offline tests" section still says "Verify the role does not change and an error is shown on the member row." QA Steps says "Same as tests," so QA copied the stale text.
The optimistic update sets the new role with a pending marker. See Member.ts#L617-L632. The request is queued at Member.ts#L737. The role reverts and an error shows only if the server rejects the change after you reconnect (Member.ts#L651-L669).
The blocked-role modal depends on the server response.useApproveOnlyRoleBlockedModal.ts#L31-L74 reacts only to BLOCKED_ROLE_CHANGE from the server. Nothing in the app sets it locally, so the modal cannot appear offline.
QA tested a change that the server never blocks. QA changed Approve-only to Member. The server blocks a role change only when Approve-only is the role being assigned. So this change should succeed even after you reconnect.
Every offline role change already works this way in production. For example, Admin to Member also applies right away offline.
Suggested follow-up:ShridharGoel, please update the PR's "Offline tests" section to match the merged behavior. For example: "Go offline. Assign Approve-only to a member who has a blocker, such as a card on the workspace. Verify the role updates and shows as pending. Go back online. Verify the blocked-reasons modal appears and the role reverts."
Next Steps: Reply with @MelvinBot <your feedback> to refine this analysis.
Activity
melvin-bot commentedon Oct 26, 2026
@flodnv recently merged #102933, but they are OOO right now, so I'll auto-assign someone else.
applause-bot commentedon Oct 26, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/b87359f52863e16de0d03cafba3fffc8fc65ed286abef8474c521556ebcd4a94
melvin-bot commentedon Oct 26, 2026
Triggered auto assignment to @MariaHCD (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Oct 26, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
melvin-bot commentedon Oct 26, 2026
@flodnv @Pujan92 you have been assigned to this deploy blocker because you reviewed the offending PR: #102933
melvin-bot commentedon Oct 26, 2026
@ShridharGoel you have been assigned to this deploy blocker because you authored the offending PR: #102933
melvin-bot commentedon Oct 26, 2026
💬 A slack conversation has been started in #expensify-open-source
MelvinBot commentedon Oct 26, 2026
Deploy Blocker Analysis
Recommendation: demote and close. This is not a regression. The app behaves as designed. When you change a role offline, the change applies right away and no error shows until you reconnect. QA's expected result came from an outdated "Offline tests" section in [Payment due @Pujan92] Add approve-only workspace role. That section no longer matches the merged code.
Confidence: High. This is based on the code and the PR history. I did not run a live test.
Investigation details
b97f3c5a9fchanged the role update to a queuedAPI.write. After that change, the author wrote on the PR: "now it would change the role optimistically and then check for the blockers when the user gets online. If there's at least one blocker, then it would show the modal as expected and revert the optimistic role change."Member.ts#L617-L632. The request is queued atMember.ts#L737. The role reverts and an error shows only if the server rejects the change after you reconnect (Member.ts#L651-L669).useApproveOnlyRoleBlockedModal.ts#L31-L74reacts only toBLOCKED_ROLE_CHANGEfrom the server. Nothing in the app sets it locally, so the modal cannot appear offline.Suggested follow-up:
ShridharGoel, please update the PR's "Offline tests" section to match the merged behavior. For example: "Go offline. Assign Approve-only to a member who has a blocker, such as a card on the workspace. Verify the role updates and shows as pending. Go back online. Verify the blocked-reasons modal appears and the role reverts."Next Steps: Reply with
@MelvinBot <your feedback>to refine this analysis.view run
ShridharGoel commentedon Oct 26, 2026
Updated the outdated offline tests