Repository navigation
fix: use TRACK instead of SUBMIT for Teachers Unite expenses - #97858
Conversation
|
@QichenZhu 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] |
|
@ChavdaSachin @rlinoz One of you needs to 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: c6fe293d85
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@MelvinBot review |
ReviewThe fix is correct and minimal. Deriving the IOU type from the target report's own policy is the right approach, and it lines up with what A few non-blocking things worth a look: 1. A third "Add expense" entry point still hardcodes 2. No unit test in the diff. The author checklist has "I added unit tests" checked, but only the two source files changed. A tiny test for 3. PR description nit. The description says Runtime verificationI attempted to verify the fix end-to-end on web (create a Teachers Unite report → Add expense → Create expense / Track distance → confirm the RHP opens instead of the Not Found page). The test was blocked before reaching the report: the "I am a teacher" flow gates on validating a school-domain email as the default contact method via a magic code, which the test account can't receive. This is an environment/account-provisioning limitation, unrelated to the PR — the fix itself could not be exercised in the browser. The code path was verified by inspection instead. Overall this looks good to merge once the above are considered — none are blockers. |
|
@QichenZhu can you review this one please? |
|
@rlinoz sure thing! |
|
@huult, what's the agreed solution? This PR doesn't seem to align with your comment in the main thread.
|
@QichenZhu Initially, after a quick investigation, I thought hiding it was a reasonable solution. However, after implementing the PR, I found a better approach that matches the expected behavior described in the ticket, so I updated the implementation accordingly. |
@huult, is the restriction on the frontend or the backend? Is it intentional or a bug? |
|
I think this is intentional. I noticed that we already hide the Create Report option for isTeachersUniteReport. |
If the restriction is intentional, then your initial approach of hiding the options is probably the right solution. @rlinoz @heyjennahay, could you clarify the expected behavior? |
|
Yeah, coming from this internal issue https://github.com/Expensify/Expensify/issues/500617 and this other one #64271, I think we should hide create expense/create report. cc: @heyjennahay |
@huult, it's the only one so far, but I can't say for sure. That one, for example, didn't exist in my previous review, and was just introduced in yesterday's commits. |
Screen.Recording.2026-08-22.at.09.42.52.mov
@QichenZhu I still see “Add existing expense” on staging. Which issue are you referring to? Also, I don't think we have any requirement to hide it. |
|
@huult It wasn't in your previous version of this PR. See this video from 2 days ago. |
@QichenZhu But after checking staging again, I think keeping “Add existing expense” is correct. Do you mean we need to hide it? |
|
@huult, okay, I won't let the above block this PR since it's an existing issue on staging. Unfortunately, the issue below doesn't exist on staging. I should have pointed it out earlier, sorry about that. Hopefully it's the last one. Staging
PR
|
…e-not-here-rhp-add-expense
Screen.Recording.2026-08-22.at.23.38.56.mov#97858 (comment) it's done |
QichenZhu
left a comment
There was a problem hiding this comment.
Changes look good.
These test steps are outdated.
- Tap the FAB and select Create report.
- Click Add expense
- Verify the dropdown only shows "Add existing expense" — "Create expense" and "Track distance" are hidden.
Suggestion:
- Open the TU workspace chat.
- Tap the plus button next to the composer.
- Verify there are no Create expense or Create report options.
- Tap FAB > Create expense > Manual, enter any value, and tap Next.
- Tap the recipient and verify that the TU workspace is not in the list.
|
@rlinoz, this is ready for review. The checklist workflow should pass after a rerun. |
…e-not-here-rhp-add-expense
|
@rlinoz it's done |
|
Thanks! But we have conflicts now @huult |
…e-not-here-rhp-add-expense
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 rlinoz 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/rlinoz in version: 9.4.62-1 🚀
|
Help site review — no docs changes requiredI reviewed the changes in this PR against Expensify's help site files under Why: This is an internal bug fix. Teachers Unite reports don't support What I checked: The only help articles that touch Teachers Unite / "Save the World" are about donations and navigation, not the expense-adding flow:
None of these document the per-report "Create expense / Track distance / Add existing expense" dropdown or the Teachers Unite expense workflow, so there's nothing to correct. The help site doesn't describe the behavior this PR changed. Since no changes are required, I did not create a draft docs PR. @huult, please confirm you agree no help site changes are needed. If you think a specific article should document this behavior, let me know which one and I'll open a draft PR. |
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.4.62-4 🚀
Bundle Size Analysis (Sentry): |


Explanation of Change
Teachers Unite reports don’t support SUBMIT, but the “Add expense” entry points were still hardcoded to use SUBMIT, causing NotFoundPage to show instead of the expense form. The fix hides “Create expense” and “Track distance” for these reports, leaving only “Add existing expense.”
Fixed Issues
$ #97646
PROPOSAL:
Tests
Same QA step
Offline tests
QA Steps
Precondition
Create two Expensifail accounts:
Principal – "I know a teacher" flow
Teacher – "I am a teacher" flow
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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
Android: Native
Screen.Recording.2026-08-13.at.09.45.42.mov
Android: mWeb Chrome
Screen.Recording.2026-08-13.at.09.43.46.mov
iOS: Native
Screen.Recording.2026-08-13.at.09.51.23.mov
iOS: mWeb Safari
Screen.Recording.2026-08-13.at.09.48.31.mov
MacOS: Chrome / Safari
Screen.Recording.2026-08-13.at.09.39.38.mov