Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2024-03-20] App loads chats on the left with tag list on the right when refreshing tag list #37848

Closed
2 of 6 tasks
kavimuru opened this issue Mar 6, 2024 · 14 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering

Comments

@kavimuru
Copy link

kavimuru commented Mar 6, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.48-0
Reproducible in staging?: y
Reproducible in production?: new feature
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause internal team
Slack conversation:

Action Performed:

Precondition:

  • User is an admin of Collect workspace with tags.
  • The tags include tag in Parent: Child format and some regular
  1. Go to staging.new.expensify.com
  2. Go to Workspace settings > Collect workspace.
  3. Go to Tags.
  4. Refresh the page.

Expected Result:

Workspace settings on the left are preserved.

Actual Result:

App loads chats on the left with tag list on the right.

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6404680_1709765092472.bandicam_2024-03-07_06-33-01-755.mp4

View all open jobs on GitHub

@kavimuru kavimuru added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 6, 2024
Copy link

melvin-bot bot commented Mar 6, 2024

Triggered auto assignment to @JmillsExpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Mar 6, 2024
Copy link
Contributor

github-actions bot commented Mar 6, 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:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Mar 6, 2024

Triggered auto assignment to @thienlnam (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@bernhardoj
Copy link
Contributor

bernhardoj commented Mar 7, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

When refreshing on the workspace tags page, the left page shows LHN while the central page shows the workspace tags page.

What is the root cause of that problem?

When we refresh the page, it will call getAdaptedState and see what navigator is inside the nav stack. In our case, we have a central pane (workspace tags page).

const matchingBottomTabRoute = getMatchingBottomTabRouteForState(state);
routes.push(createBottomTabNavigator(matchingBottomTabRoute, policyID));

It will try to find the matching bottom tab navigator with the current central pane.

const tabName = CENTRAL_PANE_TO_TAB_MAPPING[topmostCentralPaneRoute.name];
if (tabName === SCREENS.WORKSPACE.INITIAL) {
return {name: tabName, params: topmostCentralPaneRoute.params};
}
return {name: tabName, params: paramsWithPolicyID};

However, we don't have a mapping for the workspace tags page and the bottom tab navigator page.

const TAB_TO_CENTRAL_PANE_MAPPING: Record<BottomTabName, CentralPaneName[]> = {
[SCREENS.HOME]: [SCREENS.REPORT],
[SCREENS.ALL_SETTINGS]: [SCREENS.SETTINGS.WORKSPACES],
[SCREENS.WORKSPACE.INITIAL]: [
SCREENS.WORKSPACE.PROFILE,
SCREENS.WORKSPACE.CARD,
SCREENS.WORKSPACE.WORKFLOWS,
SCREENS.WORKSPACE.REIMBURSE,
SCREENS.WORKSPACE.BILLS,
SCREENS.WORKSPACE.INVOICES,
SCREENS.WORKSPACE.TRAVEL,
SCREENS.WORKSPACE.MEMBERS,
SCREENS.WORKSPACE.CATEGORIES,
],
};

So, it will default to HOME, that is the LHN.

function createBottomTabNavigator(route: NavigationPartialRoute<BottomTabName>, policyID?: string): NavigationPartialRoute<typeof NAVIGATORS.BOTTOM_TAB_NAVIGATOR> {
const routesForBottomTabNavigator: Array<NavigationPartialRoute<BottomTabName>> = [{name: SCREENS.HOME, params: {policyID}}];
if (route.name !== SCREENS.HOME) {
// If the generated state requires tab other than HOME, we need to insert it.
routesForBottomTabNavigator.push(addPolicyIDToRoute(route, policyID) as NavigationPartialRoute<BottomTabName>);
}
return {
name: NAVIGATORS.BOTTOM_TAB_NAVIGATOR,
state: getRoutesWithIndex(routesForBottomTabNavigator),
};

What changes do you think we should make in order to solve the problem?

Add the mapping for workspace tags page.

[SCREENS.WORKSPACE.INITIAL]: [
    ...
    SCREENS.WORKSPACE.TAGS,
],

What alternative solutions did you explore? (Optional)

Or we can dynamically build the mapping.

const buildWorkspaceMapping = () => {
    return Object.keys(config['screens'][NAVIGATORS.CENTRAL_PANE_NAVIGATOR]['screens']).filter(screen => screen.startsWith('Workspace_'))
}

@luacmartins
Copy link
Contributor

@waterim since this came from the Tags PR. Let's fix this as part of the next settings PR.

@luacmartins luacmartins assigned luacmartins and unassigned thienlnam Mar 7, 2024
@luacmartins luacmartins added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Mar 7, 2024
@waterim
Copy link
Contributor

waterim commented Mar 7, 2024

@luacmartins this one is already fixed in settings PR!

@luacmartins
Copy link
Contributor

luacmartins commented Mar 7, 2024

Nice one! I added this list to the list of fixed issues of that PR.

@luacmartins luacmartins added the Reviewing Has a PR in review label Mar 7, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Mar 11, 2024
Copy link

melvin-bot bot commented Mar 12, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Mar 13, 2024
@melvin-bot melvin-bot bot added the Awaiting Payment Auto-added when associated PR is deployed to production label Mar 13, 2024
@melvin-bot melvin-bot bot changed the title App loads chats on the left with tag list on the right when refreshing tag list [HOLD for payment 2024-03-20] App loads chats on the left with tag list on the right when refreshing tag list Mar 13, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 13, 2024
Copy link

melvin-bot bot commented Mar 13, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Mar 13, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.51-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 2024-03-20. 🎊

Copy link

melvin-bot bot commented Mar 13, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@luacmartins] The PR that introduced the bug has been identified. Link to the PR:
  • [@luacmartins] 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:
  • [@luacmartins] A discussion in #expensify-bugs 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:
  • [@luacmartins] Determine if we should create a regression test for this bug.
  • [@luacmartins] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@JmillsExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Mar 20, 2024
Copy link

melvin-bot bot commented Mar 20, 2024

Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

@luacmartins
Copy link
Contributor

IMO there's no need for the BZ checklist since this is a new feature in development

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Mar 27, 2024
@luacmartins
Copy link
Contributor

luacmartins commented Apr 1, 2024

No payments due since it was fixed in this PR. I think we can close this one!

@melvin-bot melvin-bot bot removed the Overdue label Apr 1, 2024
@github-project-automation github-project-automation bot moved this from Polish to Done in [#whatsnext] #wave-collect Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering
Projects
No open projects
Archived in project
Development

No branches or pull requests

6 participants