Skip to content

Conversation

fulleni
Copy link
Member

@fulleni fulleni commented Sep 29, 2025

Status

READY

Description

This pull request introduces a critical new feature for app version enforcement. It leverages remote configuration to determine if a user's app version is outdated and requires an update. If an update is necessary, the application will direct the user to a new dedicated page, providing clear instructions and links to the relevant app store. This ensures a consistent user experience and that all users are running on supported application versions.

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

- Add package_info_plus: ^9.0.0 to pubspec.yaml
- Update pub_semver to ^2.2.0 in pubspec.yaml
- Add package_info_plus and its dependency package_info_plus_platform_interface to pubspec.lock
- Update pub_semver version in pubspec.lock
- Add PackageInfoService import to bootstrap.dart
- Initialize PackageInfoServiceImpl in the bootstrap process
- Update AppGlobals to include packageInfoService
- Add new event to request application version check against remote config
- Include remoteConfig and isBackgroundCheck parameters
- Update props to include new parameters
…on enforcement

- Add currentAppVersion to AppState for version tracking
- Implement latestAppVersion getter for remote config access
- Update AppState constructor, copyWith method, and equatable props
- Add PackageInfoService to retrieve current app version
- Implement version comparison logic in AppBloc
- Handle version enforcement during app startup and background checks
- Transition app to 'updateRequired' state when version is outdated
- Log appropriate messages for version check outcomes
- Update imports and event handlers for new version check feature
…ality

- Add PackageInfoService to the app dependencies
- Inject PackageInfoService into App and _AppView widgets
- Update UpdateRequiredPage to use app status from remote config
- Enhance App widget to handle package info related features
- Introduce PackageInfoService abstract class for retrieving app version
- Implement PackageInfoServiceImpl using package_info_plus package
- Add logging for successful fetch and potential failures
- Ensure null safety and platform compatibility
- Add platform-specific update buttons for iOS and Android
- Implement conditional rendering for web platform
- Improve UI with better spacing and styling
- Remove dependency on AppBloc for update URLs
- Update imports and remove unused packages
…nd package updates

- Add `UpdateRequiredPage` for users with outdated app versions
- Integrate `package_info_plus` and `pub_semver` for version management
- Update CHANGELOG.md with new version details
- Adjust comment positioning in AppVersionCheckRequested event
- Ensure consistent code formatting and readability
Copy link

Summary of Changes

Hello @fulleni, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a critical new feature for app version enforcement. It leverages remote configuration to determine if a user's app version is outdated and requires an update. If an update is necessary, the application will direct the user to a new dedicated page, providing clear instructions and links to the relevant app store. This ensures a consistent user experience and that all users are running on supported application versions.

Highlights

  • App Version Enforcement: Implemented a new feature to enforce mandatory application updates based on remote configuration, ensuring users are always on a compatible app version.
  • Update Required Page: Introduced a dedicated UpdateRequiredPage to guide users through the update process, providing platform-specific links to app stores (iOS/Android) or a generic message for web.
  • Dependency Integration: Integrated package_info_plus for accurate retrieval of the current application version and pub_semver for robust semantic version comparison.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully implements app version enforcement by introducing a PackageInfoService for better testability and refactoring the AppBloc to handle version checks through a dedicated event. The UpdateRequiredPage is also improved to be more platform-aware and decoupled from the BLoC. I've identified a logical issue in the AppBloc where a state update could be lost, and a couple of improvements for the UpdateRequiredPage to enhance the user experience when opening store links. Overall, this is a solid feature addition with good architectural choices.

- Update AppBloc to set currentAppVersion in more states after version check
- Modify emit statements to include currentAppVersion when updating state
- Ensure consistent state updates for both version mismatch and up-to-date scenarios
…message

- Add Arabic translation for "couldNotOpenUpdateUrl" message in app_ar.arb
- Add English translation for "couldNotOpenUpdateUrl" message in app_en.arb
- Include description and placeholder for the new translation entries
- Add snackbar notification when iOS or Android update URL cannot be opened
- Change launch mode to external application for both URLs
- Check if context is mounted before showing snackbar
- Add 'currentAppVersionLabel' and 'latestRequiredVersionLabel' in Arabic and English localization files
- Include placeholders for version numbers in both languages
- These new labels will be used to display current and required app versions to users
- Add currentAppVersion and latestRequiredVersion parameters to UpdateRequiredPage
- Display current and latest required version information below the update message
- Use l10n for localized version labels
- Add conditional rendering to show version info only when both values are provided
- Add currentAppVersion and latestRequiredVersion to the update check process
- This allows for more precise version comparison and update handling
- Invert condition to check if current version is up to date or newer
- Move update required logic to else block
- Improve code readability and maintain the same functionality
@fulleni fulleni merged commit 361bdf8 into main Sep 29, 2025
0 of 2 checks passed
@fulleni fulleni deleted the feat/app-version-enforcement branch September 29, 2025 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant