Fix issue where owner becomes both first and second approver after removing second approver#84728
Conversation
|
@Krishna2323 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5bea2c5dc3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@Krishna2323 Since there have been some changes since the proposal was posted, I noticed while working on the PR that fixing this bug only requires removing the forwardTo value if the approver has already been removed, similar to how we handle overLimitForwardsTo. This approach also resolves the issue. However, before proceeding with this change, we should request a backend update so that the BE response removes the forwardTo value when the corresponding approver is removed, instead of resetting it to the owner. The current changes in this PR work well in offline Screen.Recording.2026-03-10.at.18.43.21.mov |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good for product
|
checking... |
|
@cretadn22 Can you please share what's the issue with the approved proposal? I think we should fix this on the frontend only — the approved proposal is actually safer since it doesn't require a backend change. |
|
@cretadn22 bump |
|
Apologies for the delay, it was the weekend here. I am looking into this now. |
|
@Krishna2323 I’ve updated this to align with the original solution, so no backend changes are required |
|
Thanks! Will re-review today. |
|
Reviewing... |
|
@cretadn22 Two issues with the current PR:
|
|
@cretadn22 bump |
|
@Krishna2323 I updated |
|
@codex review |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid_hybrid.mp4Android: mWeb Chromeandroid_mWeb.mp4iOS: HybridAppios_native.mp4iOS: mWeb Safariios_mWeb.mp4MacOS: Chrome / Safariweb_chrome.mp4 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3533c07f4a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Reviewing... |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1bec469a08
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@cretadn22 I found a bug when bulk-removing multiple approvers from the same chain. Steps: Create a default workflow Expected: Workflow becomes Actual: Workflow briefly shows Monosnap.screencast.2026-04-09.03-48-46.mp4 |
|
@Krishna2323 Fixed Screen.Recording.2026-04-09.at.18.27.43.mov |
|
Reviewing... |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eaddece48e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @aldo-expensify has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/aldo-expensify in version: 9.3.59-0 🚀
Bundle Size Analysis (Sentry): |
|
After reviewing this PR and the help site articles under This PR is a bug fix to internal logic that adjusts approval workflows when a member (who is also an approver) is removed from a workspace. No new features, UI elements, or user-facing behaviors were introduced. Articles reviewed:
The existing documentation remains accurate as-is since the PR corrects a bug (owner appearing as both first and second approver) without changing any documented user-facing behavior. |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.3.59-4 🚀
|
Explanation of Change
Fixed Issues
$ #74319
PROPOSAL: #74319 (comment)
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos (I will make an update after the BE changes are implemented)
Android: Native
Screen.Recording.2026-03-17.at.21.49.25.mov
Android: mWeb Chrome
Screen.Recording.2026-03-17.at.21.53.29.mov
iOS: Native
Screen.Recording.2026-03-17.at.21.46.09.mov
iOS: mWeb Safari
Screen.Recording.2026-03-17.at.21.52.34.mov
MacOS: Chrome / Safari
Screen.Recording.2026-03-17.at.21.41.03.mov