Repository navigation
Conversation
|
@codex review |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@MelvinBot review |
ReviewLooks good to merge. I found no correctness bugs. The filter fails open: it drops an event only when every condition matches, and App code ships only in dotted chunk files, so it cannot match our own errors. All CI checks pass except Optional nits:
What I checked
|
dariusz-biela
left a comment
There was a problem hiding this comment.
The manual test steps can't be run with a standard build. The third-party tag is only set in non-dev builds, but the Sentry debug toggle and the [SENTRY] logs only exist in dev. So in dev this filter has no tag to read and does nothing. Step 3 also does not say how to make Translate load twice, and the repro in the proposal needed a manual second injection. Please describe that repro with a local change that turns tagging on in dev. Or say that the check is the APP-M6P and APP-KFE event volume after deploy.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
mountiny
left a comment
There was a problem hiding this comment.
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 Issuessection 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
Testssection - I verified the steps for Staging and/or Production testing are in the
QA stepssection - 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 verified the steps for local testing are in the
- 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 that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
- I verified tests pass on all platforms & I tested again on:
- Android: HybridApp
- Android: mWeb Chrome
- iOS: HybridApp
- iOS: mWeb Safari
- MacOS: Chrome / Safari
- 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 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 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 either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
- 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 usingAvatarhave been tested & I retested again) - If a new component is created I verified that:
- A similar component doesn't exist in the codebase
- All props are defined accurately
- 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
- 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 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(theme.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
Avataris modified, I verified thatAvataris 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 the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
- I verified that all the inputs inside a form are aligned with each other.
- I added
Designlabel and/or tagged@Expensify/designso the design team can review the changes.
- If the PR adds or modifies the UI:
- I asked an AI agent to review the changes for accessibility issues and addressed its findings.
- I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
- I verified all new/changed elements have meaningful accessible names and roles.
- I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
- For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
- If the
mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps. - I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.
Screenshots/Videos
Android: HybridApp
Android: mWeb Chrome
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari
|
🚧 mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.5.8-0 🚀
|
|
No help site update needed. This PR only adds an internal Sentry filter that drops Google Translate stack-overflow noise from error reports, so nothing users see or do changes. |
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.5.8-5 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Adds
googleTranslateRecursionNoiseFilterIntegration, a web-only Sentry event processor that drops theRangeError: Maximum call stack size exceededraised when Chrome (iOS and desktop) injects Google Translate twice. It drops an event only when it is tagged as third-party, is a single stack-overflowRangeError, and every frame carries a line number and comes from a dot-less URL: the page URL or Translate's ownm=el_mainscript. Our bundle chunks all have a dot, so App errors never match, and a wasm frame compiled without a URL has no line number, so a stack overflow in our own wasm code is kept.The filter is intentionally wider than Translate: inline scripts also report under the page URL, so a stack overflow from the Ketch or GTM loaders in
web/index.htmlor a GTM Custom HTML tag is dropped too. None of that is App code, so there is nothing for us to fix there. The loop's line number is not checked, because it moves between Translate builds (226 in APP-M6P, 228 in APP-KFE).Registered after
thirdPartyErrorFilterIntegrationinsetupSentry, order pinned by a test.The
third_party_codetag both noise filters read now lives inCONST.TELEMETRY.TAGS.THIRD_PARTY_CODEinstead of being exported byclassCallCheckNoiseFilter, so neither filter depends on the other. The event builder, third-party tags and Sentry client stub the two filter tests shared by copy-paste are moved totests/utils/SentryEventTestUtils.ts.Fixed Issues
$ #102044 (comment)
PROPOSAL: #102044 (comment)
Tests
npx jest tests/unit/googleTranslateRecursionNoiseFilterTest.ts tests/unit/setupSentryIntegrationOrderTest.ts tests/unit/classCallCheckNoiseFilterTest.ts<anonymous>scripts, APP-ZF, APP-2NH, stack overflows with no frames, aRangeErrorwith a different message and a wasm frame with no line number are keptThe
third_party_codetag this filter reads is only written in non-dev builds (@sentry/webpack-pluginis skipped for.envand.env.development, so__SENTRY_APPLICATION_KEY_STAMPED__isfalseandthirdPartyErrorFilterIntegrationis not installed), while the Sentry debug toggle and the[SENTRY]console logs only exist in dev. To exercise the filter locally, turn tagging on in dev with this temporary change:config/rsbuild/rsbuild.common.ts, change the__SENTRY_APPLICATION_KEY_STAMPED__: !!sentryWebpackPlugindefine to__SENTRY_APPLICATION_KEY_STAMPED__: true. This installsthirdPartyErrorFilterIntegration. Since no dev chunk is stamped, it tags every event as third-party, which is enough to check that the filter drops the Translate shape and keeps everything elsenpm run web, open the app in desktop Chrome, sign in, go to Troubleshoot and enable the Sentry debug toggle so events are logged to the console with the[SENTRY]prefix instead of being sentweb/index.htmlUncaught RangeError: Maximum call stack size exceededwith two Translate functions repeating in the stack, and that no[SENTRY]event is logged for it[SENTRY]event, so only the Translate stack overflow is filteredPost-deploy check: the APP-M6P and APP-KFE event volume in Sentry should drop to zero on the first release that includes this filter.
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari