Repository navigation
Fix: prevent logout when pressing CMD+SHIFT+P after signing in from a public room - #96988
Conversation
Co-authored-by: Aimane Chnaif <aimane-chnaif@users.noreply.github.com>
|
The only failing check is PR Author Checklist / checklist, and it's not a code problem — nothing to push a fix for. It failed with:
This check just verifies that the author has ticked every box in the PR description's checklist. It's a manual step — Every other check is either passing or still pending ( |
DetailsExplanation of Change
This change moves the Fixed Issues$ #95455 Tests
Offline testsSame as Tests QA StepsSame as Tests
PR Author Checklist
@MelvinBot please set the PR body to the content in the details section above |
|
|
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
DetailsExplanation of Change
This change moves the Fixed Issues$ #95455 Tests
Offline testsSame as Tests QA StepsSame as Tests
PR Author Checklist
@MelvinBot please set the PR body to the content in the details section above |
|
✅ Updated the PR body with the content from your comment. |
|
@MelvinBot mark as ready for review |
|
@aimane-chnaif 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] |
|
✅ Marked this PR as ready for review. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari95455.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 NikkiWines has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/NikkiWines in version: 9.4.45-0 🚀
|
|
🤖 Help site review: no changes required I reviewed the changes in this PR and no updates to Expensify's help site ( Why: This is an internal bug fix to the I checked the help site for any related content — the only keyboard-shortcut references in Since no documentation changes are required, I did not create a draft help site PR. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.4.45-14 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
GoToWorkspaceHandlerevaluatedcallFunctionIfActionIsAllowed(...)once, at subscription time (inside auseEffectwith an empty dependency array) and passed its return value straight toKeyboardShortcut.subscribe. When a logged-out user opens a public room the session is anonymous, so the shortcut got permanently bound to the sign-out branch. After the user signed in within the same session,AuthScreens(and therefore the handler) never unmounted, so the stale binding remained — pressingCMD+SHIFT+Plogged the now-authenticated user out.This change moves the
callFunctionIfActionIsAllowed(...)call inside the subscribed callback so the anonymous check is re-evaluated on every key press, matching the pattern already used byNewChatHandlerandExpenseReportSearchHandler. A user who has signed in now runs the real "go to workspace" navigation instead of the stale sign-out binding.Fixed Issues
$ #95455
PROPOSAL: #95455 (comment)
Tests
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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.