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
Copilot - Not here page opens on central pane when switching account on Subscription tab #48246
Version Number: v9.0.26-1 Reproducible in staging?: Y Reproducible in production?: N Email or phone of affected tester (no customers):applausetester+kh050806@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
Precondition:
Account has a subscription (activate by creating a workspace).
Go to staging.new.expensify.com
Log in as a copilot.
Go to Account settings.
Go to Subscription.
Click Account switcher.
Select another account.
Expected Result:
Not here page will not open on central pane.
Actual Result:
Not here page opens on central pane when switching account on Subscription page.
What changes do you think we should make in order to solve the problem?
We can show a loading indicator while the app is still loading.
if (!subscriptionPlan) {
if (isLoadingApp) {
return <FullScreenLoadingIndicator />
}
return <NotFoundPage />;
}
But this isn't enough because clearing the onyx happened first before the open app request, so not found will still show briefly.
We can optimistically set the IS_LOADING_APP when switching the account (connect & disconnect) knowing that we will call open app (set it to false when fails),
👋 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.
Closing this, @allgandalf I believe your review for the PR is being handled on another issue, but if that's NOT the case, please ping here and I can reopen/assign.
Activity
melvin-bot commentedon Aug 29, 2024
Triggered auto assignment to @mallenexpensify (
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.bernhardoj commentedon Aug 29, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Subscription page shows not found when switching account.
What is the root cause of that problem?
When we switch account, we clear the onyx and calls open app.
App/src/libs/actions/Delegate.ts
Lines 74 to 82 in b9af3d1
Because the data is cleared, the subscription data is gone and thus not found page is shown.
App/src/pages/settings/Subscription/SubscriptionSettingsPage.tsx
Lines 30 to 32 in b9af3d1
What changes do you think we should make in order to solve the problem?
We can show a loading indicator while the app is still loading.
But this isn't enough because clearing the onyx happened first before the open app request, so not found will still show briefly.
We can optimistically set the IS_LOADING_APP when switching the account (connect & disconnect) knowing that we will call open app (set it to false when fails),
App/src/libs/actions/Delegate.ts
Lines 23 to 38 in b9af3d1
and also we need to preserve the key so it won't be cleared.
App/src/libs/actions/Delegate.ts
Line 21 in b9af3d1
Or, we can introduce a new onyx key called IS_SWITCHING_ACCOUNT.
Or, we can just add it as a new property to ACCOUNT
melvin-bot commentedon Aug 29, 2024
Triggered auto assignment to @cristipaval (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Aug 29, 2024
👋 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:
IuliiaHerets commentedon Aug 29, 2024
Sorry, forgot to add
DeployBlockerCashlabelcristipaval commentedon Aug 29, 2024
This isn't a blocker, given that the Not found page shows briefly for a second only. Demoting
17 remaining items
mallenexpensify commentedon Sep 3, 2024
Checking on here, looks like it's part of control
https://expensify.slack.com/archives/C06ML6X0W9L/p1725317232367829
melvin-bot commentedon Sep 6, 2024
@dangrous, @mallenexpensify, @rushatgabhane Whoops! This issue is 2 days overdue. Let's get this updated quick!
mallenexpensify commentedon Sep 7, 2024
Made you issue owner @rushatgabhane , I think next action is either on you or will be. Comment if you disagree
dangrous commentedon Sep 24, 2024
This went to prod 9/19 - I believe we can close 9/26 - and no payment required I believe
dangrous commentedon Sep 30, 2024
Closing this, @allgandalf I believe your review for the PR is being handled on another issue, but if that's NOT the case, please ping here and I can reopen/assign.