Skip to content

Conversation

@fulleni
Copy link
Member

@fulleni fulleni commented Nov 3, 2025

Status

READY

Description

This pull request systematically removes the deprecated 'local ads' feature from the application. It ensures a clean transition by introducing a database migration to update existing configurations, eliminating all code related to LocalAd data handling, and updating dependencies. The changes span across dependency injection, data registries, model definitions, and initial database setup, ensuring the 'local ads' concept is fully purged from the codebase and database.

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

- Update core from v1.3.1 to e7c808c
- Update dart_frog from 1.2.4 to 1.2.5
- Update analyzer from 8.4.0 to 8.4.1
- Override core dependency to use specific git ref
- Remove unused localAdRepository from AppDependencies
- Delete DataMongodb initialization for LocalAd
- Remove the provider for DataRepository<LocalAd> in the middleware
- This change simplifies the middleware setup by removing an unused repository
…ation log

- Remove all references to 'local_ad' in DataOperationRegistry
- Add initialization log message for DataOperationRegistry
- Reorganize log and registry initialization order
- Removed the 'local_ad' model configuration from the model registry
- This change affects the ModelConfig map in model_registry.dart
- Remove local ads seeding process from database initialization
- Delete local_ads collection indexing by adType
- Set AdPlatformType.admob as the default primaryAdPlatform
- Add migration to delete 'local' ad platform from remote configs collection
- Remove 'local' key from adConfig.platformAdIdentifiers map
- Update primaryAdPlatform from 'local' to 'admob' where applicable
- Prevent deserialization errors after removing AdPlatformType.local
- Removed the initial comment section in the PR template
- This change simplifies the template and focuses on the actual content
@gemini-code-assist
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 systematically removes the deprecated 'local ads' feature from the application. It ensures a clean transition by introducing a database migration to update existing configurations, eliminating all code related to LocalAd data handling, and updating dependencies. The changes span across dependency injection, data registries, model definitions, and initial database setup, ensuring the 'local ads' concept is fully purged from the codebase and database.

Highlights

  • Local Ad Feature Removal: The entire 'local ads' feature has been deprecated and removed from the application, including its data repository, model registration, and associated CRUD operations.
  • Database Migration for Ad Platform Cleanup: A new database migration (RemoveLocalAdPlatform) has been introduced to clean up existing remote_configs documents. It removes the 'local' key from adConfig.platformAdIdentifiers and migrates any primaryAdPlatform set to 'local' to 'admob'.
  • Dependency and Configuration Updates: The pubspec.lock and pubspec.yaml files have been updated to reflect dependency changes, including an analyzer and dart_frog version bump, and a specific git reference override for the core package.
  • Middleware and Seeding Cleanup: The LocalAd data repository provider has been removed from the application middleware, and database seeding no longer includes local_ads data or its associated index, reinforcing the feature's removal.
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 effectively removes the deprecated local_ad feature. The changes are comprehensive, touching dependency injection, data registries, database seeding, and middleware. A new database migration is included to clean up related data from the remote_configs collection, which is a great practice. The migration itself is well-documented and its logic is sound. My only suggestion relates to the use of dependency_overrides in pubspec.yaml, which should be treated as a temporary measure to avoid long-term maintenance issues.

- Remove unnecessary comments about ownership checks
- Clarify that User may be null if not authenticated
- Simplify description of the final data operation
- Fix typo: "inner-most" should be "innermost"
@fulleni fulleni merged commit e141a59 into main Nov 3, 2025
1 check failed
@fulleni fulleni deleted the feat/deprecated-local-ads-db-migration branch November 3, 2025 08:17
@github-project-automation github-project-automation bot moved this from Backlog to Done in Flutter News App Project Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants