fix: wrap console statements with __DEV__ guard in production code#1299
fix: wrap console statements with __DEV__ guard in production code#1299Deepakchwdhry wants to merge 42 commits into
Conversation
|
Thank you @, for creating the PR and contributing to our UltimateHealth project 💗. |
Automated Review FeedbackProvide actionable comments grouped by severity: CriticalThe following
Suggestions
|
|
@Deepakchwdhry For example, you could create a |
|
Hi @rushiii3 , thank you for the suggestion! I have implemented a centralized Also fixed the critical arrow function syntax errors in the 4 files mentioned in the automated review. Please review! 🙏 |
|
@Deepakchwdhry |
|
Hi @rushiii3, thank you for the suggestion! I have implemented a centralized Also fixed the critical arrow function syntax errors in the 4 files mentioned in the automated review. Please review! 🙏 |
|
@rushiii3 done |
|
Looks good to me. |
|
/review |
🤖 Gemini AI Code ReviewSummaryThis Pull Request aims to improve application performance, security, and reduce noise in production monitoring by wrapping all Overall, the intent and general approach of this PR are excellent, addressing critical production concerns. The introduction of a centralized 🔴 High Severity
🟡 Medium Severity
🟢 Low Severity / Nits
What's Good ✅
VerdictRequest Changes The PR introduces a critical bug with incorrect bare imports for the |
Headmaster Ji, why does your performance always peak here? |
🤖 Gemini AI Code ReviewSummaryThis Pull Request aims to address a critical production issue by wrapping all The overall intent and approach are excellent and directly tackle a common pitfall in frontend development. However, a deep dive into the changes reveals some critical issues that need to be addressed before merging. 🔴 High SeverityThese issues will cause runtime errors or prevent the application from building/running correctly.
🟡 Medium SeverityThese issues represent architectural concerns, redundant code, or minor bugs that should be addressed for better maintainability and efficiency.
🟢 Low Severity / NitsThese are minor suggestions for code style, consistency, or potential improvements.
What's Good ✅
VerdictRequest Changes The incorrect import paths for the |
SB2318
left a comment
There was a problem hiding this comment.
@Deepakchwdhry Please read the recent bot review and update logger import accordingly.
|
@SB2318 Fixed the following issues as per the bot review:
Please review! 🙏 |
…l not found errors
The mutationFn in useSendOtpMutation was forwarding res.data.otp directly as its return value, meaning the raw OTP token was surfaced to the React Query result object and any intermediate logging layer. Per maintainer scope (issue SB2318#1210): the frontend fix is to remove all client-side consumption of the OTP from the API response. The backend will separately stop including the otp field in the response body. Changes: - Change UseMutationResult type parameter from string to �oid - Replace eturn res.data.otp as string with �oid res so no token value is ever forwarded out of the mutation - Both call sites (OtpScreen, LoginScreen) already ignore the return value in their onSuccess callbacks — no changes needed there
Bumps [@lottiefiles/dotlottie-react](https://github.com/LottieFiles/dotlottie-web/tree/HEAD/packages/react) from 0.13.5 to 0.19.4. - [Release notes](https://github.com/LottieFiles/dotlottie-web/releases) - [Changelog](https://github.com/LottieFiles/dotlottie-web/blob/main/packages/react/CHANGELOG.md) - [Commits](https://github.com/LottieFiles/dotlottie-web/commits/@lottiefiles/dotlottie-react@0.19.4/packages/react) --- updated-dependencies: - dependency-name: "@lottiefiles/dotlottie-react" dependency-version: 0.19.4 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [react-native-safe-area-context](https://github.com/AppAndFlow/react-native-safe-area-context) from 5.6.2 to 5.8.0. - [Release notes](https://github.com/AppAndFlow/react-native-safe-area-context/releases) - [Commits](AppAndFlow/react-native-safe-area-context@v5.6.2...v5.8.0) --- updated-dependencies: - dependency-name: react-native-safe-area-context dependency-version: 5.8.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [react-native-svg](https://github.com/software-mansion/react-native-svg) from 15.12.1 to 15.15.5. - [Release notes](https://github.com/software-mansion/react-native-svg/releases) - [Commits](software-mansion/react-native-svg@v15.12.1...v15.15.5) --- updated-dependencies: - dependency-name: react-native-svg dependency-version: 15.15.5 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [expo/expo-github-action](https://github.com/expo/expo-github-action) from 8 to 9. - [Release notes](https://github.com/expo/expo-github-action/releases) - [Changelog](https://github.com/expo/expo-github-action/blob/main/CHANGELOG.md) - [Commits](expo/expo-github-action@v8...v9) --- updated-dependencies: - dependency-name: expo/expo-github-action dependency-version: '9' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
3da069a to
d447a1c
Compare
|
@Deepakchwdhry, please fix the conflicts |
Summary
Wrapped all unguarded console.log/error/warn statements with
__DEV__guard across 65 files in frontend/src.Changes
Why
Unguarded console statements run in production builds causing:
Closes #1257