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
[Due for payment 2025-04-30] [$250] Android - Empty workspace name for first workspace created in new account #59776
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: v9.1.24-2 Reproducible in staging?: Yes Reproducible in production?: Unable to check If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Device used: Tecno spark 20/ Android 13 App Component: Workspace Settings
Action Performed:
Open app
Sign in with a new account
Finish the onboarding flow
Navigate to workspace > Create new workspace
Expected Result:
Confirm workspace page opens with a suggested workspace name
Actual Result:
Workspace name is empty in confirm page for new workspace in new account.
and render the input when metadata.status === 'loaded'
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add ui test to verify the input has data when render WorkspaceConfirmationPage
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
changed the title [-]Android - Empty workspace name for first workspace created in new account[/-][+][$250] Android - Empty workspace name for first workspace created in new account[/+]on Apr 15, 2025
But for the first time, the sessionEmail is empty because the value of sessionEmail is returned late, after generateDefaultWorkspaceName is called, causing generateDefaultWorkspaceName to be empty. sessionEmail is empty because Policy.ts has not been called to initialize, and the data is not ready to be used.
What changes do you think we should make in order to solve the problem?
To resolve this issue, we should initialize Policy.ts to ensure the callback from Onyx is ready, allowing the data to be available before being used inside a function/component.
And a way to implement a fix for this issue, similar to the solution above, would look something like this:
We call generateDefaultWorkspaceName in WorkspacesListPage to initialize sessionEmail before navigating to WorkspaceConfirmationPage
and call it at WorkspacesListPage.tsx#L452 to init Policy
useEffect(() => {
initPolicys();
}, []);
Screen.Recording.2025-04-17.at.11.15.45.mp4
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.31-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@jayeshmangwani@abekkala@jayeshmangwani The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: Not that CRITICAL
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Open the app.
Sign in using a new account.
Complete the onboarding flow.
Navigate to Workspace > Create New Workspace.
Confirm that the workspace page opens and displays a suggested workspace name.
Just a quick note regarding this comment: #59776 (comment), there was no regression. It’s possible the tester encountered an issue during testing, but the fix was verified in the next build by others.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Apr 8, 2025
Triggered auto assignment to @abekkala (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.nkdengineer commentedon Apr 8, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-04-08 05:06:24 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace name is empty in confirm page for new workspace in new account.
What is the root cause of that problem?
Here is the logic we used to get the default workspace name
App/src/libs/actions/Policy/Policy.ts
Lines 1628 to 1630 in 689e60c
if email is empty, we will use sessionEmail.
In native platform the currentUrl is empty, so the email is empty too.
sessionEmail is also empty at this point because it hasn't been loaded yet.
What changes do you think we should make in order to solve the problem?
We should get the sessionEmail in WorkspaceConfirmationForm
and render the input when metadata.status === 'loaded'
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add ui test to verify the input has data when render WorkspaceConfirmationPage
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
[-]Android - Empty workspace name for first workspace created in new account[/-][+][$250] Android - Empty workspace name for first workspace created in new account[/+]melvin-bot commentedon Apr 15, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021912156454024432800
melvin-bot commentedon Apr 15, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani (
External)nkdengineer commentedon Apr 17, 2025
@jayeshmangwani Do you agree with my proposal above?
huult commentedon Apr 17, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Empty workspace name for first workspace created in new account
What is the root cause of that problem?
In this case of the ticket, the
policyOwnerEmailis empty because the data is not available from the URL on the non-native platform.App/src/pages/workspace/WorkspaceConfirmationPage.tsx
Line 25 in ceeeaf6
App/src/components/WorkspaceConfirmationForm.tsx
Line 88 in adecd13
and with that, we will use
sessionEmailtogenerateDefaultWorkspaceNameApp/src/libs/actions/Policy/Policy.ts
Line 1631 in 76442fc
But for the first time, the
sessionEmailis empty because the value ofsessionEmailis returned late, aftergenerateDefaultWorkspaceNameis called, causinggenerateDefaultWorkspaceNameto be empty.sessionEmailis empty becausePolicy.tshas not been called to initialize, and the data is not ready to be used.What changes do you think we should make in order to solve the problem?
To resolve this issue, we should initialize
Policy.tsto ensure the callback fromOnyxis ready, allowing the data to be available before being used inside a function/component.And a way to implement a fix for this issue, similar to the solution above, would look something like this:
We call
generateDefaultWorkspaceNameinWorkspacesListPageto initializesessionEmailbefore navigating toWorkspaceConfirmationPageApp/src/pages/workspace/WorkspacesListPage.tsx
Line 487 in 785a0fd
onPress={() => interceptAnonymousUser(() => { generateDefaultWorkspaceName(); InteractionManager.runAfterInteractions(() => { Navigation.navigate(ROUTES.WORKSPACE_CONFIRMATION.getRoute(ROUTES.SETTINGS_WORKSPACES.route)); }); }) }or
App/src/pages/workspace/WorkspacesListPage.tsx
Line 452 in 785a0fd
useEffect(() => { generateDefaultWorkspaceName(); }, []);or
we create empty function in side
Policy.tshttps://github.com/Expensify/App/blob/76442fc4b42c0156c0ae9cf5e40449fb923467ec/src/libs/actions/Policy/Policy.ts
function initPolicys() {}and call it at WorkspacesListPage.tsx#L452 to init Policy
useEffect(() => { initPolicys(); }, []);Screen.Recording.2025-04-17.at.11.15.45.mp4
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
None
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
18 remaining items
melvin-bot commentedon Apr 23, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Apr 23, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.31-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2025-04-30. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Apr 23, 2025
@jayeshmangwani @abekkala @jayeshmangwani The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
rlinoz commentedon Apr 23, 2025
Looking here #60473 (comment)
jayeshmangwani commentedon Apr 30, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: feat: Provide education/confirmation before creating workspaces in New Workspace flows #53845 (comment)
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: Not that CRITICAL
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Do we agree 👍 or 👎
jayeshmangwani commentedon Apr 30, 2025
Just a quick note regarding this comment: #59776 (comment), there was no regression. It’s possible the tester encountered an issue during testing, but the fix was verified in the next build by others.
abekkala commentedon Apr 30, 2025
@rlinoz can you confirm that was not actually considered a regression (affecting payout)?
rlinoz commentedon Apr 30, 2025
Yep, no regression
abekkala commentedon Apr 30, 2025
PAYMENT SUMMARY FOR APRIL 30
Fix: @nkdengineer [$250] payment sent and contract ended - thank you! 🎉
PR Review: @jayeshmangwani [$250] payment via NewDot - thank you! 🎉
garrettmknight commentedon May 2, 2025
$250 approved for @jayeshmangwani