Skip to content

[HOLD for payment 2023-10-09] [$500] After Logout, using CMD + J only generates 2 shortcuts in the pop-up (instead of the full list) #26829

Closed

Description

@kavimuru

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


Action Performed:

  1. sign-out if you are logged in.
  2. press cmd+j to open shortcut modal without page reload.
  3. now you see list off all shortcuts in modal.

Expected Result:

only ESC and Shortcut(" CMD+J") keys should be shown

Actual Result:

All Shortcuts are shown here
Platforms: MacOS / Chrome / Safari

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.64-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

with.bug.shortcut.mp4

Snip - New Expensify - Google Chrome (5)

Expensify/Expensify Issue URL:
Issue reported by: @Charan-hs
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692612279461809

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0124cd08463cfd5f26
  • Upwork Job ID: 1699578589047709696
  • Last Price Increase: 2023-09-15
  • Automatic offers:
    • ntdiary | Reviewer | 26826364
    • Charan-hs | Contributor | 26826367
    • Charan-hs | Reporter | 26826368

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 5, 2023
  2. melvin-bot commented on Sep 5, 2023

    @melvin-bot

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

  3. melvin-bot commented on Sep 5, 2023

    @melvin-bot

    Bug0 Triage Checklist (Main S/O)

    • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
    • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
      • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
    • This bug is reproducible using the reproduction steps in the OP. S/O
      • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
      • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
    • This issue is filled out as thoroughly and clearly as possible
      • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
    • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync
  4. kavimuru commented on Sep 5, 2023

    @kavimuru
    Author

    Proposal by @Charan-hs

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

    All keyboard shortcut shows up in modal after Logout

    What is the root cause of that problem?

    When we are logged in or logged out we are unsubscribing the event handlers here.

    */
    function unsubscribe(displayName, callbackID) {
    eventHandlers[displayName] = _.reject(eventHandlers[displayName], (callback) => callback.id === callbackID);
    }

    but When unsubscribing, we remove event listeners but not shortcuts from the variable documentedShortcuts. Even though I have unsubscribed, the shortcuts are still present in documentedShortcuts.

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

    Here,

    */
    function unsubscribe(displayName, callbackID) {
    eventHandlers[displayName] = _.reject(eventHandlers[displayName], (callback) => callback.id === callbackID);
    }

    When unsubscribed we can remove the values present in documentedShortcuts by displayname (key).

        lodashUnset(documentedShortcuts,displayName);
    //or
        documentedShortcuts = _.omit(documentedShortcuts,displayName);
    //or
       documentedShortcuts[displayName] = {} // here we can return null or {}
    //We can use the delete method also based on your request.

    What alternative solutions did you explore? (Optional)

  5. jliexpensify commented on Sep 6, 2023

    @jliexpensify
    Contributor

    Able to repro!

  6. changed the title [-]All keyboard shortcut shows up in modal after Logout[/-] [+]After Logout, using CMD + J only generates 2 shortcuts in the pop-up (instead of the full list)[/+] on Sep 6, 2023
  7. jliexpensify commented on Sep 6, 2023

    @jliexpensify
    Contributor

    @Charan-hs @kavimuru I am confused at this issue. Here is what you've written:

    Expected Result:
    only ESC and Shortcut(" CMD+J") keys should be shown

    Actual Result:
    All Shortcuts are shown here

    Should these 2 be reversed? i.e. when you're logged in, you see all the shortcuts, but when you're logged out, you only see 2 shortcuts. or are yousaying we should only ever see 2 shortcuts? (which doesn't sound right to me)

  8. ishpaul777 commented on Sep 6, 2023

    @ishpaul777
    Contributor

    @jliexpensify, I think there are 2 bugs here -

    1. after signing out all shortcut list shows in modal, if page reloaded and then only ESC and Shortcut(" CMD+J") options be shown, here as far as i know showing only 2 options is intententional why would we show other options if shortcut does nothing when used?

    Not reported here but i noticed, i believe can be handled with this issue.
    2. when reloaded and first time open shortcut modal with CTRL + j only one option shown, closing and reopening modal shows 2 options.

    Screen.Recording.2023-09-06.at.11.55.25.PM.mov
  9. jliexpensify commented on Sep 7, 2023

    @jliexpensify
    Contributor

    @ishpaul777 thanks for reporting this one:

    1. when reloaded and first time open shortcut modal with CTRL + j only one option shown, closing and reopening modal shows 2 options.

    I also noticed this in my testing!

    After chatting to @kadiealexander I think I got confused initially, so ignore this comment! Going to mark this as external, and I think we should also fix the 2nd issue outlined above.

  10. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Sep 7, 2023
  11. changed the title [-]After Logout, using CMD + J only generates 2 shortcuts in the pop-up (instead of the full list)[/-] [+][$500] After Logout, using CMD + J only generates 2 shortcuts in the pop-up (instead of the full list)[/+] on Sep 7, 2023
  12. melvin-bot commented on Sep 7, 2023

    @melvin-bot
  13. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 7, 2023
  14. 53 remaining items

  15. changed the title [-][$500] After Logout, using CMD + J only generates 2 shortcuts in the pop-up (instead of the full list)[/-] [+][HOLD for payment 2023-10-09] [$500] After Logout, using CMD + J only generates 2 shortcuts in the pop-up (instead of the full list)[/+] on Oct 2, 2023
  16. melvin-bot commented on Oct 2, 2023

    @melvin-bot

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

  17. melvin-bot commented on Oct 2, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.75-12 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 2023-10-09. 🎊

    After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

    • External issue reporter
    • Contributor that fixed the issue
    • Contributor+ that helped on the issue and/or PR

    For reference, here are some details about the assignees on this issue:

    As a reminder, here are the bonuses/penalties that should be applied for any External issue:

    • Merged PR within 3 business days of assignment - 50% bonus
    • Merged PR more than 9 business days after assignment - 50% penalty
  18. melvin-bot commented on Oct 2, 2023

    @melvin-bot

    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:

    • [@ntdiary] The PR that introduced the bug has been identified. Link to the PR:
    • [@ntdiary] 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:
    • [@ntdiary] 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:
    • [@ntdiary] Determine if we should create a regression test for this bug.
    • [@ntdiary] 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.
    • [@jliexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  19. jliexpensify commented on Oct 9, 2023

    @jliexpensify
    Contributor

    Payment Summary:

    • Reporter / Contributor: @Charan-hs $50 + $500 + $250 = $800
    • C+: @ntdiary $500 + $250 = $750

    Upworks Job

  20. jliexpensify commented on Oct 9, 2023

    @jliexpensify
    Contributor

    @ntdiary bump to complete the checklist please!

  21. ntdiary commented on Oct 9, 2023

    @ntdiary
    Contributor

    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:

    • [@ntdiary] The PR that introduced the bug has been identified. Link to the PR: N/A
    • [@ntdiary] 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: N/A
    • [@ntdiary] 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: No need
    • [@ntdiary] Determine if we should create a regression test for this bug. No need
    • [@ntdiary] 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. No need
    • [@jliexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

    Not a regression, just a tiny feature polish, don't need a regression test. : )

  22. jliexpensify commented on Oct 9, 2023

    @jliexpensify
    Contributor

    @Charan-hs - paying now. For future reference, there's no need to submit work for review. Thanks!

  23. jliexpensify commented on Oct 9, 2023

    @jliexpensify
    Contributor

    Everyone has been paid and job is closed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

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

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions