Add deprecation banner to Flutter desktop app#5110
Conversation
Adds a red closable banner at the top of the desktop app directing users to migrate to the v2 Desktop app at https://macos.omi.me. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request adds a deprecation banner to the Flutter desktop app. The implementation correctly uses a StatefulWidget to manage the banner's visibility and places it at the top of the app. My main feedback is to remove the debug print statements from the DesktopApp widget, as they log potentially sensitive user information and are not suitable for a production environment. I've included a suggestion to clean this up.
| print('DEBUG DesktopApp: isSignedIn=$isSignedIn, onboardingCompleted=$onboardingCompleted'); | ||
| print('DEBUG DesktopApp: currentUser=${currentUser?.uid}, isAnonymous=${currentUser?.isAnonymous}'); | ||
|
|
||
| if (isSignedIn) { | ||
| if (onboardingCompleted) { | ||
| print('DEBUG DesktopApp: -> DesktopHomePageWrapper'); | ||
| return const DesktopHomePageWrapper(); | ||
| } else { | ||
| print('DEBUG DesktopApp: -> DesktopOnboardingWrapper (not completed)'); | ||
| return const DesktopOnboardingWrapper(); | ||
| } | ||
| } else if (SharedPreferencesUtil().hasOmiDevice == false && | ||
| SharedPreferencesUtil().hasPersonaCreated && | ||
| SharedPreferencesUtil().verifiedPersonaId != null) { | ||
| print('DEBUG DesktopApp: -> PersonaProfilePage'); | ||
| return const PersonaProfilePage(); | ||
| } else { | ||
| print('DEBUG DesktopApp: -> DesktopOnboardingWrapper (not signed in)'); | ||
| return const DesktopOnboardingWrapper(); | ||
| } |
There was a problem hiding this comment.
There are several print statements that seem to be for debugging purposes. These should be removed before merging to avoid logging potentially sensitive information (like user IDs) and cluttering the console in production builds. Consider using a dedicated logger that can be disabled in release builds if logging is needed.
| print('DEBUG DesktopApp: isSignedIn=$isSignedIn, onboardingCompleted=$onboardingCompleted'); | |
| print('DEBUG DesktopApp: currentUser=${currentUser?.uid}, isAnonymous=${currentUser?.isAnonymous}'); | |
| if (isSignedIn) { | |
| if (onboardingCompleted) { | |
| print('DEBUG DesktopApp: -> DesktopHomePageWrapper'); | |
| return const DesktopHomePageWrapper(); | |
| } else { | |
| print('DEBUG DesktopApp: -> DesktopOnboardingWrapper (not completed)'); | |
| return const DesktopOnboardingWrapper(); | |
| } | |
| } else if (SharedPreferencesUtil().hasOmiDevice == false && | |
| SharedPreferencesUtil().hasPersonaCreated && | |
| SharedPreferencesUtil().verifiedPersonaId != null) { | |
| print('DEBUG DesktopApp: -> PersonaProfilePage'); | |
| return const PersonaProfilePage(); | |
| } else { | |
| print('DEBUG DesktopApp: -> DesktopOnboardingWrapper (not signed in)'); | |
| return const DesktopOnboardingWrapper(); | |
| } | |
| if (isSignedIn) { | |
| if (onboardingCompleted) { | |
| return const DesktopHomePageWrapper(); | |
| } else { | |
| return const DesktopOnboardingWrapper(); | |
| } | |
| } else if (SharedPreferencesUtil().hasOmiDevice == false && | |
| SharedPreferencesUtil().hasPersonaCreated && | |
| SharedPreferencesUtil().verifiedPersonaId != null) { | |
| return const PersonaProfilePage(); | |
| } else { | |
| return const DesktopOnboardingWrapper(); | |
| } |
Summary
DesktopAppTest plan
🤖 Generated with Claude Code