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

Fix Android camera permission prompt #28619

Merged
merged 9 commits into from
Oct 11, 2023

Conversation

zoontek
Copy link
Contributor

@zoontek zoontek commented Oct 2, 2023

Details

This PR simplifies the permission request flow to fix the #27442 issue and improve UX, closing #26499.

The new flow is:

  • At start, the permission status in undefined (to avoid rendering an invalid UI until the check is done)
  • We run a useEffect to check the status and store it in our state. As it's for camera permission, the result could be unavailable, denied or granted (not blocked, as it's a check() call)
  • If it's granted, display the camera. No extra step! ✨
  • If it's anything else, keep displaying the "request permission" button.
  • On request button press, systematically perform a request() call. Store the result in our state.
  • If request() returned blocked, show an alert that explain why it's needed, and offers to redirect to the app settings.
  • When the app gains focus (AppState status is active), refresh our state to handle possible permission status change.

Fixed Issues

$ #27442
$ #26499

Tests

For each of those tests, you have to open FAB, click on "Request money", then "Scan Receipt" to be on the correct screen.

Test n°1

  1. Click on the "Give permission" button
  2. Click on "Don't allow" (in the system modal)
  3. Repeat this operation a second time
  4. The status is now blocked: an alert is shown and explain to the user why it's needed + offers him to open settings to change that

Test n°2

  1. Be sure you blocked the permission by denying it two times (+ cancelling the settings alert)
  2. Click on the "Give permission" button
  3. An alert is shown and explain to the user why it's needed + offers him to open settings to change that
  4. Click on the settings alert button
  5. Update the camera permission to grant it
  6. Go back to the app
  7. Check that the camera is used

Test n°3

  1. Be sure you blocked the permission by denying it two times (+ cancelling the settings alert)
  2. Click on the "Give permission" button
  3. An alert is shown and explain to the user why it's needed + offers him to open settings to change that
  4. Click on the settings alert button
  5. Update the camera permission to allow the permission to be asked again (Ask every time)
  6. Go back to the app
  7. Click on the "Give permission" button again
  8. The system permission prompt is displayed, allowing the user to grant it or not

Test n°4

  1. Be sure you blocked the permission by denying it two times (+ cancelling the settings alert)
  2. Close app and remove it from recents
  3. Reopen the app, open FAB, click on "Request money", then "Scan Receipt"
  4. Click on the "Give permission" button
  5. An alert is shown and explain to the user why it's needed + offers him to open settings to change that

Offline tests

QA Steps

Same as tests

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • If we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS

Android

271995029-0cd203a2-53d5-47e7-9579-c7acd4a82126.mp4

@zoontek zoontek requested a review from a team as a code owner October 2, 2023 15:07
@melvin-bot melvin-bot bot requested review from ntdiary and removed request for a team October 2, 2023 15:07
@melvin-bot
Copy link

melvin-bot bot commented Oct 2, 2023

@ntdiary 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]

ios/Podfile Show resolved Hide resolved
@Julesssss
Copy link
Contributor

Generating native builds for testing

@OSBotify
Copy link
Contributor

OSBotify commented Oct 2, 2023

🧪🧪 Use the links below to test this build in android and iOS. Happy testing! 🧪🧪

android 🤖 iOS 🍎
https://ad-hoc-expensify-cash.s3.amazonaws.com/android/28619/index.html https://ad-hoc-expensify-cash.s3.amazonaws.com/ios/28619/index.html
Android iOS
desktop 💻 web 🕸️
❌ FAILED ❌ https://28619.pr-testing.expensify.com
The QR code can't be generated, because the Desktop build failed Web

@ntdiary
Copy link
Contributor

ntdiary commented Oct 4, 2023

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Web N/A
Mobile Web - Chrome N/A
Mobile Web - Safari N/A
Desktop N/A
iOS
28619-ios-system-allow.mp4
28619-ios-system-deny.mp4
28619-ios-settings-allow.mov
Android
28619-android-system-allow.mp4
28619-android-settings.mp4

Copy link
Contributor

@ntdiary ntdiary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just need to further clarify that the QA steps can be the same as the Tests steps. : )

@melvin-bot melvin-bot bot requested a review from Julesssss October 4, 2023 08:42
@zoontek
Copy link
Contributor Author

zoontek commented Oct 4, 2023

@ntdiary I edited the description accordingly 🙂

@Julesssss
Copy link
Contributor

Nice, testing perfectly for me

Copy link
Contributor

@Julesssss Julesssss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it would be great to make one small change if possible.

When the user blocks the permission for the second time, could we NOT show the 'Camera Access' modal?

Screenshot_20231004-110705

It feels a bit redundant as the user doesn't need to know this until they next try to use the camera. At that point, the modal makes total sense.

@zoontek
Copy link
Contributor Author

zoontek commented Oct 4, 2023

@Julesssss I agree, but this is kinda hard to achieve. I'm explaining myself:

To prevent some dark patterns, the system will fire a blur event, so there's no way to really determine if the permission has been prompted to the user.. Which means we can't rely on AppState to do this kind of thing:

let didNativeModalAppeared = false;

const subscription = AppState.addEventListener('blur', () => {
    console.warn('AppState blur event');
    didNativeModalAppeared = true;
});

CameraPermission.requestCameraPermission()
    .then((status) => {
        setCameraPermissionStatus(status);
        subscription.remove();

        if (!didNativeModalAppeared && status === RESULTS.BLOCKED) {
            showPermissionsAlert();
        }
    })
    .catch(() => {
        setCameraPermissionStatus(RESULTS.UNAVAILABLE);
    });
1000000044.mp4

Note that this also doesn't work with AppState.addEventListener('change', appState => {}) (it will fire background, then active:

1000000046.mp4

Sure, we could check how much time it took to perform the request and show the settings alert if we think it was too fast, but it's hacky, and could lead to unexpected behavior with fast users / slow phones. That's why I recommend keeping it that way (at least on Android - as the user has to deny twice or tick "Never ask again" on older Android versions, it's not that bad).

On iOS, we could add a simple check, as it's possible to determine if the permission is blocked without performing the request (but it introduces a small behaviour difference between the 2 platforms):

if (Platform.OS === 'ios' && cameraPermissionStatus === RESULTS.BLOCKED) {
    return showPermissionsAlert();
}

// On Android, there's no way we can check for the BLOCKED status without requesting the permission first
// https://github.com/zoontek/react-native-permissions/blob/a836e114ce3a180b2b23916292c79841a267d828/README.md?plain=1#L670
CameraPermission.requestCameraPermission()
    .then((status) => {
        setCameraPermissionStatus(status);

        if (Platform.OS === 'android' && cameraPermissionStatus === RESULTS.BLOCKED) {
            showPermissionsAlert();
        }
    })
    .catch(() => {
        setCameraPermissionStatus(RESULTS.UNAVAILABLE);
    });

WDYT? Should I add this? (I, personally, would not recommend it)

@Julesssss
Copy link
Contributor

Okay, thanks for explaining and taking a look. Given the complexity I agree we should just leave as is 👍

@Julesssss Julesssss self-requested a review October 4, 2023 12:59
ios/Podfile.lock Outdated Show resolved Hide resolved
Julesssss
Julesssss previously approved these changes Oct 9, 2023
@zoontek
Copy link
Contributor Author

zoontek commented Oct 9, 2023

@Julesssss The linting issue does not occur locally, and this variable doesn't even exist on the branch (it has been renamed cameraPermissionStatus, as it's more explicit)

Screenshot 2023-10-09 at 11 56 38 Screenshot 2023-10-09 at 11 58 12

It might be a CI cache issue (?)

Copy link
Contributor

@ntdiary ntdiary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approve this gain, so we can try to run lint gain.

@melvin-bot melvin-bot bot requested a review from Julesssss October 10, 2023 17:04
@ntdiary
Copy link
Contributor

ntdiary commented Oct 10, 2023

Eh, lint doesn't run again. @Julesssss, can we merge this pr? 😂

@Julesssss
Copy link
Contributor

Julesssss commented Oct 10, 2023

Seeing the same issue after a fresh re-run, could you maybe try merging main?

Screenshot 2023-10-10 at 18 39 11

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@zoontek
Copy link
Contributor Author

zoontek commented Oct 10, 2023

@Julesssss I merged main in this branch. Hope this will fix the linting cache issue.

EDIT: Fixed it, this was something else (one last missed occurence of permissions, sometimes I forget that TypeScript is not here to shout at me 😅).

A test fails, but it seems unrelated to the PR (it also fails on others PRs https://github.com/Expensify/App/actions/runs/6475630579/job/17582980641?pr=29242)

@Julesssss
Copy link
Contributor

Lol, fixed one unrelated check, broke another unrelated check.

Second time lucky 🎉

@Julesssss Julesssss merged commit 012538a into Expensify:main Oct 11, 2023
15 checks passed
@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/Julesssss in version: 1.3.81-2 🚀

platform result
🤖 android 🤖 failure ❌
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@github-actions github-actions bot added the DeployBlockerCash This issue or pull request should block deployment label Oct 11, 2023
@github-actions
Copy link
Contributor

Performance Comparison Report 📊

Significant Changes To Duration

Name Duration
App start TTI 1233.432 ms → 1297.470 ms (+64.038 ms, +5.2%) 🔴
Show details
Name Duration
App start TTI Baseline
Mean: 1233.432 ms
Stdev: 38.462 ms (3.1%)
Runs: 1146.7654480000492 1153.948655999964 1164.4773800000548 1165.975732000079 1169.4160569999367 1171.3434719999786 1171.5519900000654 1173.1587809999473 1174.7602619999088 1176.7003250000998 1181.102282000007 1188.5458289999515 1189.3910870000254 1191.2953029999044 1191.3190220000688 1191.3479810000863 1191.9404649999924 1193.3333870000206 1197.1629329998977 1199.8091790000908 1203.9755100000184 1204.1610799999908 1205.4980780000333 1206.146427999949 1207.6634410000406 1215.4966750000603 1215.5348499999382 1218.2035370001104 1218.6599039998837 1219.9339809999801 1220.3056059998926 1222.0607410001103 1222.5917690000497 1224.8916939999908 1225.456698999973 1225.4908129998948 1226.8979120000731 1226.9909429999534 1230.1548399999738 1230.1661239999812 1230.1907520000823 1231.5846460000612 1233.6419649999589 1233.8842780000996 1233.8995169999544 1234.424682999961 1235.3340429998934 1236.7072109999135 1237.898036000086 1238.6857139999047 1239.98589599994 1240.6503920000978 1241.0787450000644 1245.2016620000359 1246.5320150000043 1247.7457989999093 1248.6852609999478 1250.3119749999605 1253.5519830000121 1255.4722929999698 1255.513927000109 1255.949406000087 1257.658674000064 1258.4685110000428 1259.1828870000318 1259.3963880001102 1260.456053999951 1260.5833109999076 1260.8313819998875 1261.2972369999625 1261.359201000072 1263.7966889999807 1274.043577000033 1274.4293949999847 1277.1341860000975 1278.8837319999002 1281.483595999889 1281.598132000072 1282.276649999898 1284.374070999911 1284.6223889999092 1286.9122279998846 1287.1747600000817 1290.0727079999633 1292.9506989999209 1294.1670460000169 1297.70531999995 1303.6220569999423 1320.4367060000077

Current
Mean: 1297.470 ms
Stdev: 51.394 ms (4.0%)
Runs: 1210.3218499999493 1212.646585999988 1212.803464999888 1220.312002999941 1224.2173699999694 1224.7474229999352 1224.845379000064 1225.4685229999013 1227.795916999923 1236.7891579999123 1237.7434739999007 1239.4678040000144 1247.142945999978 1248.978213999886 1250.7866169998888 1251.5793890000787 1253.5300720001105 1253.766203999985 1254.2156740000937 1256.9155029999092 1258.414410999976 1258.481958999997 1258.7475739999209 1260.43494200008 1262.9148550000973 1262.9635050001089 1263.120767999906 1264.0983349999879 1264.5898510001134 1267.066473999992 1267.2726610000245 1267.287789999973 1269.7271839999594 1269.8730039999355 1270.7468069999013 1271.2067299999762 1271.912631999934 1272.2236780000385 1275.722758000018 1276.3912450000644 1278.1460130000487 1279.5980219999328 1287.32889600005 1288.918532999931 1289.3431319999509 1293.3984920000657 1294.6040779999457 1295.872204999905 1297.6777240000665 1300.873655000003 1301.0906299999915 1305.9629430000205 1312.1247360000852 1313.7756479999516 1318.0586190000176 1319.3644870000426 1319.6702580000274 1319.8639060000423 1319.8969380001072 1320.6906620000955 1321.4754200000316 1321.6399489999749 1323.4624429999385 1324.8720219999086 1325.1731710000895 1326.9406590000726 1327.1664710000623 1327.6392190000042 1327.7801220000256 1328.8913970000576 1335.3147970000282 1336.7130350000225 1339.8318970000837 1344.6116889999248 1345.5069669999648 1346.6894549999852 1349.0943090000656 1351.179567999905 1358.5112789999694 1358.8259729999118 1361.1619299999438 1363.538077000063 1375.1814039999153 1378.3040710000787 1387.8248759999406 1404.9159750000108 1413.1780059998855 1419.0626300000586 1419.441182000097 1424.8259499999695

Meaningless Changes To Duration

Show entries
Name Duration
App start runJsBundle 848.066 ms → 892.711 ms (+44.645 ms, +5.3%)
Open Search Page TTI 624.672 ms → 628.468 ms (+3.796 ms, +0.6%)
App start nativeLaunch 20.711 ms → 21.372 ms (+0.661 ms, +3.2%)
App start regularAppStart 0.015 ms → 0.016 ms (+0.001 ms, +7.7%)
Show details
Name Duration
App start runJsBundle Baseline
Mean: 848.066 ms
Stdev: 32.725 ms (3.9%)
Runs: 759 772 785 794 794 797 800 800 807 808 808 809 810 811 813 813 814 817 817 820 821 821 822 824 825 826 827 829 829 831 834 837 839 840 840 841 841 843 846 846 847 847 848 850 851 851 853 853 855 855 856 857 857 859 859 860 861 861 862 864 867 867 867 870 870 870 870 871 871 873 873 873 874 876 877 879 882 882 883 883 884 885 885 888 889 892 899 903 912 916 927

Current
Mean: 892.711 ms
Stdev: 37.601 ms (4.2%)
Runs: 832 832 838 839 842 843 845 845 847 848 849 852 853 853 854 856 856 858 858 859 861 863 864 867 868 869 870 871 872 872 872 873 874 878 879 879 880 880 880 881 883 884 884 886 886 886 887 889 890 892 893 893 894 895 897 899 900 901 904 905 906 906 911 911 912 912 912 914 916 918 919 923 924 925 926 929 930 939 943 944 948 949 949 954 955 956 981 986 992 994
Open Search Page TTI Baseline
Mean: 624.672 ms
Stdev: 20.666 ms (3.3%)
Runs: 589.7246509999968 594.0508630000986 597.9638269999996 599.7402759999968 600.6352540000807 600.9961749999784 601.7891039999668 603.5628660002258 604.553588999901 605.8819179998245 606.1149500000756 606.2700610000174 606.8780520001892 607.0981040000916 607.2468669998925 607.4458819997963 607.5856929998845 607.65897699981 608.1695960001089 608.1967779998668 608.3561599999666 608.3709309999831 608.9707440000493 609.3277590000071 609.3351649998222 609.3535570001695 610.0048829999287 610.8816329999827 611.0423179999925 611.0522049998399 611.8705649999902 612.032836999977 613.6788739999756 614.4042159998789 614.9012449998409 615.2259519998915 615.7578950000461 615.8196620000526 615.9059649999253 616.3600669999141 616.3864750000648 616.7390550000127 617.3229579997715 617.4345700000413 618.1675619999878 619.2682299998123 619.3692220000084 621.7661139999982 621.9503179998137 622.6322830000427 622.7858480000868 623.2885340000503 623.3224289999343 624.0141189999413 624.381550999824 624.4976400001906 624.5145680001006 624.9700519999024 625.3109129997902 626.0048829999287 629.9980880001094 630.3105059999507 632.1652829998638 632.9067379999906 632.9435630000662 634.143798999954 638.3913179999217 638.8600259998348 639.0443929999601 640.4833579999395 640.5566410000902 641.6104739999864 644.6493329999503 645.7738850000314 648.2124030000996 649.7124030000996 650.9479170001578 651.613241000101 652.6737059999723 654.5617269999348 655.9084479999729 655.99804700003 662.3959560000803 665.6912839999422 670.1328539999668 674.1232100001071 675.1343189999461 676.0919599998742 682.4454760001972

Current
Mean: 628.468 ms
Stdev: 22.443 ms (3.6%)
Runs: 599.1817220002413 599.3999840000179 599.5024009998888 599.8225100003183 601.7960610003211 602.3365489998832 605.274983999785 606.2750649999361 606.5838220000733 606.7916670003906 607.6925460002385 607.702432999853 607.7733559999615 608.0669360000174 608.0976969995536 608.5402430000249 608.5476889996789 609.1258139999118 609.4215910001658 609.5752369998954 609.935792000033 610.0101729999296 610.5772309999447 610.9333909996785 611.5691730000544 613.8015549997799 613.9896240001544 614.3000900000334 614.4130049999803 614.7575280000456 615.5059819999151 615.6750090001151 615.9677329999395 616.1528319998179 617.2969570001587 617.4772950001061 617.6314300000668 617.697834999999 617.6980790002272 617.7170819998719 618.0006510000676 618.0093999998644 618.0149750001729 618.3443199996836 618.4725750000216 618.7733159998897 619.1904299999587 619.9452309999615 620.7685960000381 621.9388840000611 623.3455819999799 623.8571369999554 623.8778080001939 624.194376999978 624.2067869999446 624.8833820000291 626.7236730000004 629.456135999877 632.3446460000705 632.3487960000057 633.5553379999474 633.6852220003493 633.794922999572 633.8546549999155 634.5994470003061 635.137369999662 636.2663169999141 639.2515060000587 640.1820070003159 640.3917239999864 641.9600830003619 644.9073079999071 649.8613289999776 650.0623780000024 650.4860030000564 655.2712809999939 656.807618000079 657.2831620001234 660.0935470000841 660.3865159996785 664.7279870000202 665.3718670001253 666.1851000001188 668.9132489999756 670.586222999962 672.2399899999145 672.883748000022 673.1581219998188 674.2433679997921 675.5122480001301 677.6482339999638 688.4152839998715
App start nativeLaunch Baseline
Mean: 20.711 ms
Stdev: 1.827 ms (8.8%)
Runs: 18 18 18 18 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 22 22 22 22 22 22 22 22 22 23 23 23 23 23 23 24 24 25 25 25 26 26

Current
Mean: 21.372 ms
Stdev: 2.252 ms (10.5%)
Runs: 18 18 18 19 19 19 19 19 19 19 19 19 19 19 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 22 22 22 22 22 22 22 22 22 23 23 24 24 24 24 25 25 25 25 26 27 27 27 27 27 27
App start regularAppStart Baseline
Mean: 0.015 ms
Stdev: 0.001 ms (5.5%)
Runs: 0.01293900003656745 0.01306200004182756 0.013101999880746007 0.013223999878391623 0.013224999886006117 0.013427000027149916 0.013469000114127994 0.013508999953046441 0.013550000032410026 0.013550000032410026 0.013671999797224998 0.013672000030055642 0.013712999876588583 0.013754000188782811 0.013794000027701259 0.013794000027701259 0.013794000027701259 0.013794000027701259 0.013833999866619706 0.0138349998742342 0.013875000178813934 0.013916000025346875 0.013916000025346875 0.013916000025346875 0.013916000025346875 0.013956000097095966 0.01395700010471046 0.01395700010471046 0.0139979999512434 0.014078000094741583 0.014078000094741583 0.014078999869525433 0.014118999941274524 0.014118999941274524 0.014201000100001693 0.014201000100001693 0.014201000100001693 0.014282000018283725 0.014282000018283725 0.01432300009764731 0.01432300009764731 0.014362999936565757 0.014405000023543835 0.014444999862462282 0.014445000095292926 0.014485000167042017 0.014527000021189451 0.014566999860107899 0.014607999939471483 0.014608000172302127 0.014648000011220574 0.014648000011220574 0.014688999857753515 0.014690000098198652 0.0147299999371171 0.0147299999371171 0.014730000169947743 0.014811000088229775 0.014811000088229775 0.014851000159978867 0.014933000085875392 0.014933000085875392 0.014973999932408333 0.015014000004157424 0.015014000004157424 0.015014000004157424 0.015054999850690365 0.01509599993005395 0.015137000009417534 0.015178000088781118 0.015217999927699566 0.01525900000706315 0.015299999853596091 0.015381000004708767 0.015421999851241708 0.015422000084072351 0.015503000002354383 0.015503000002354383 0.015544000081717968 0.015625 0.015666000079363585 0.015706999925896525 0.015828000148758292 0.015829000156372786 0.015829000156372786 0.015868999995291233 0.01595099992118776 0.017048999899998307

Current
Mean: 0.016 ms
Stdev: 0.001 ms (5.1%)
Runs: 0.01387499994598329 0.013916000025346875 0.013956000097095966 0.014079000102356076 0.014283000025898218 0.014322999864816666 0.014404000015929341 0.014526000013574958 0.01460699993185699 0.014648000011220574 0.014648000011220574 0.014648000011220574 0.014648000011220574 0.014770000008866191 0.014810999855399132 0.014851999934762716 0.014851999934762716 0.0148930000141263 0.014974000165238976 0.015054999850690365 0.015055000083521008 0.015137000009417534 0.015137000009417534 0.015217999927699566 0.01521800016053021 0.015299000078812242 0.015340999932959676 0.015421000076457858 0.015422000084072351 0.015422000084072351 0.015422000084072351 0.015463000163435936 0.015503000002354383 0.015503000002354383 0.015542999841272831 0.015542999841272831 0.015542999841272831 0.015543000074103475 0.015543999848887324 0.015625 0.015666000079363585 0.015666000079363585 0.015666000079363585 0.015705999918282032 0.015705999918282032 0.015705999918282032 0.015746999997645617 0.015746999997645617 0.01574800000526011 0.015786999836564064 0.0157880000770092 0.0157880000770092 0.01582799991592765 0.015828999923542142 0.015829000156372786 0.015868999995291233 0.015868999995291233 0.015868999995291233 0.015909999841824174 0.015909999841824174 0.015910000074654818 0.015949999913573265 0.01599099999293685 0.01599099999293685 0.015992000000551343 0.016032000072300434 0.016112999990582466 0.01615400006994605 0.016195000149309635 0.016234999988228083 0.016276000067591667 0.016316999914124608 0.016398000065237284 0.01656099990941584 0.01656099990941584 0.016601000213995576 0.016641999827697873 0.016642000060528517 0.016642000060528517 0.016723999986425042 0.01684599998407066 0.017090000212192535 0.017131000058725476 0.0174150001257658 0.017536999890580773 0.01761800004169345

@github-actions
Copy link
Contributor

@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker.

@zoontek zoontek deleted the fix-camera-permission-prompt branch October 11, 2023 09:48
@Julesssss
Copy link
Contributor

I find it hard to trust the performance regression test 🤷

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/Julesssss in version: 1.3.83-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀

platform result
🤖 android 🤖 skipped 🚫
🖥 desktop 🖥 skipped 🚫
🍎 iOS 🍎 skipped 🚫
🕸 web 🕸 skipped 🚫

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀

platform result
🤖 android 🤖 skipped 🚫
🖥 desktop 🖥 skipped 🚫
🍎 iOS 🍎 skipped 🚫
🕸 web 🕸 skipped 🚫

1 similar comment
@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀

platform result
🤖 android 🤖 skipped 🚫
🖥 desktop 🖥 skipped 🚫
🍎 iOS 🍎 skipped 🚫
🕸 web 🕸 skipped 🚫

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.83-11 🚀

platform result
🤖 android 🤖 failure ❌
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 failure ❌
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DeployBlockerCash This issue or pull request should block deployment Ready To Build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants