Repository navigation
Preserve expense workspace when creating a report from workspace chat - #107946
Conversation
Co-authored-by: Yauheni Horbach <ZhenjaHorbach@users.noreply.github.com>
|
🤖 Web test steps verification results: Steps 1–8 passed on development NewDot web: creating an expense from B preserved B, while global creation and editing retained default workspace A behavior. Console verification remains blocked.
|
|
@MelvinBot |
Co-authored-by: Yauheni Horbach <ZhenjaHorbach@users.noreply.github.com>
|
|
|
@MelvinBot |
|
Marked the PR as ready for review. |
|
@ZhenjaHorbach 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] |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@MelvinBot |
|
Added regression, validation, offline, and QA test cases to the PR description. Updated the author checklist, marking supported or not-applicable items complete and leaving unverified testing items unchecked with explanations. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-12-01.at.13.57.57.movAndroid: mWeb ChromeScreen.Recording.2026-12-01.at.13.57.57.moviOS: HybridAppScreen.Recording.2026-12-01.at.13.42.32.moviOS: mWeb SafariScreen.Recording.2026-12-01.at.13.42.32.movMacOS: Chrome / SafariScreen.Recording.2026-12-01.at.13.27.00.movScreen.Recording.2026-12-01.at.13.27.51.movScreen.Recording.2026-12-01.at.13.30.45.mov |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #107683 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
🚧 Gonals has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/Gonals in version: 9.5.58-0 🚀
|
|
No help site update needed — this bug fix keeps newly created reports in the originating workspace when adding an expense from its chat, restoring expected behavior without introducing a new workflow or making existing instructions incorrect. |
|
@ZhenjaHorbach Could you please clarify the step 4? It says to “Select Report → Create report,” but in a brand new non-default workspace, the Report field isn’t selectable at all. It seems expected since there are no open reports there. Should “Create report” still appear as an option? |








Explanation of Change
Apply the changes requested by
ZhenjaHorbachso Create report preserves the originating workspace during non-global expense creation instead of unexpectedly switching to the default workspace. Preserve existing global-create, own-expense editing, per-diem, and other-owner behavior.Add the three requested regression tests. The non-default-workspace test fails with the original condition and passes with the change.
AI Tests
Initial implementation validation (before the November 27 main merge):
npm run typecheck, spelling, React Compiler compliance for the changed hook, andnpm run storybook -- --smoke-test --ci.prettiernpm script.Contributor branch access
This draft uses an upstream branch because Melvin cannot push to
ZhenjaHorbach's fork. To copy it to your fork:You can then close this draft and open a PR from your fork if you prefer to push updates there.
Fixed Issues
$ #107683
PROPOSAL: #107683 (comment)
Tests
Repeatable test cases (expected results below are not claims of fresh execution). The first three flows passed on development web before the main merge; only the automated regression tests were rerun after the merge. See AI Tests for evidence and limitations.
Offline tests
Pending execution:
QA Steps
Run the numbered Tests cases and Offline tests above on staging once this change is available there. Cover native Android/iOS, mobile web, and desktop Chrome/Safari, including a narrow viewport. Confirm the initial-workspace fix and the global-create, own-expense editing, per-diem, and other-owner regressions. These staging/platform runs remain pending; the existing development-web results do not certify all platforms.
PR Author Checklist
Checklist status: Checked items are supported by the linked evidence or the test instructions added here. Conditional items checked below are not applicable: this PR changes workspace-selection logic and adds regression tests; it adds no user-facing copy, new code pattern, assets, message formatting, generic component, Storybook component, deeplink, visual layout, form styling, or interactive UI. Unverified execution items remain unchecked, including offline/high-traffic/all-platform testing, console inspection, accessibility execution, and post-merge manual retesting. Earlier Android verification was partial; development web did not establish macOS Chrome/Safari coverage.
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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.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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari