Skip to content

Conversation

@fulleni
Copy link
Member

@fulleni fulleni commented Dec 5, 2025

Status

READY

Description

This pull request enhances the application's user engagement and feedback mechanisms. It introduces a new PositiveInteractionType enum to define a broader range of user actions that can trigger in-app review prompts. The Engagement model is made more flexible by allowing engagements to be composed of either a reaction or a comment, or both. Additionally, a clearer naming convention is adopted for reporting user-generated content by renaming ReportableEntity.engagement to ReportableEntity.comment. These changes improve the configurability of user feedback prompts and the accuracy of content reporting.

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 Engagement class to allow null reaction or comment, but not both
- Add assertion in constructor to enforce at least one must be provided
- Update copyWith method to handle nullable reaction
- Adjust documentation to reflect new behavior
…ations

- Introduce diverse engagement scenarios in fixtures:
  - Both reaction and comment
  - Reaction only
  - Comment only
- Replace uniform pairing with a more realistic distribution
- Update Engagement model to support instances with only comment or only reaction
- Add new test cases for comment-only and reaction-only scenarios
- Modify existing tests to accommodate the new model structure
- Ensure JSON serialization and deserialization work correctly for all scenarios
- Define new enum for user actions considered positive interactions
- Includes actions like saving content, following entities, sharing content, and creating saved filters
- Prepares for implementing in-app review prompt functionality
- Replace positiveInteractionThreshold with interactionCycleThreshold
- Add eligiblePositiveInteractions list with specific interaction types
- Maintain other existing configuration values
- Rename 'positiveInteractionThreshold' to 'interactionCycleThreshold'
- Add 'eligiblePositiveInteractions' to specify counted user actions
- Update documentation to reflect new eligibility requirements
- Add unit tests for PositiveInteractionType enum
- Verify correct number of enum values
- Test serialization and deserialization from string values
- Ensure proper error handling for invalid string values
- Add test for non-empty eligiblePositiveInteractions in fixture
- Update property name from positiveInteractionThreshold to interactionCycleThreshold
- Add test for eligiblePositiveInteractions in copyWith method
- Change 'engagement' to 'comment' for ReportableEntity enum value
- Update documentation to reflect that the report is specifically for user engagement comments
- Replace engagement with comment in ReportableEntity tests
- Update containsAll, string values, and byName tests to reflect the change
- Updated Report entity type from engagement to comment in getReportsFixturesData function
- This change ensures that the report fixtures are consistent with the type of entity being reported (comment)
@gemini-code-assist
Copy link

gemini-code-assist bot commented Dec 5, 2025

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 enhances the application's user engagement and feedback mechanisms. It introduces a new PositiveInteractionType enum to define a broader range of user actions that can trigger in-app review prompts. The Engagement model is made more flexible by allowing engagements to be composed of either a reaction or a comment, or both. Additionally, a clearer naming convention is adopted for reporting user-generated content by renaming ReportableEntity.engagement to ReportableEntity.comment. These changes improve the configurability of user feedback prompts and the accuracy of content reporting.

Highlights

  • New Positive Interaction Type Enum: Introduced a new PositiveInteractionType enum to categorize various user actions (e.g., saving, following, sharing content, saving filters) that can be considered positive interactions within the application.
  • App Review Configuration Refinement: The AppReviewConfig model has been updated to utilize the new PositiveInteractionType enum. The positiveInteractionThreshold field was replaced with interactionCycleThreshold and a list of eligiblePositiveInteractions to provide more granular control over what actions contribute to triggering the in-app review prompt.
  • Engagement Model Flexibility: The Engagement model has been modified to allow for more flexible user engagements. Previously, a reaction was mandatory; now, an engagement can consist of a reaction only, a comment only, or both, enforced by a constructor assertion.
  • Reportable Entity Renaming: The ReportableEntity enum was updated, renaming the engagement type to comment to more accurately reflect that reports are typically made against specific comments within an engagement.
  • Fixture Data Updates: All relevant fixture data, including engagements, remote configurations, and reports, have been updated to align with the new enum definitions and model changes, ensuring consistency across test data.
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 introduces a significant refactoring of user-generated content models, making the Engagement model more flexible by allowing either a reaction or a comment. It also enhances the AppReviewConfig with more granular controls for triggering review prompts. The changes are well-structured and include corresponding updates to fixtures and tests. My review includes a suggestion to remove a duplicated file to improve maintainability and a recommendation to make the enum serialization tests more robust.

@fulleni fulleni merged commit e66e076 into main Dec 5, 2025
1 of 2 checks passed
@fulleni fulleni deleted the reactor/user-generated-content branch December 5, 2025 03:22
@github-project-automation github-project-automation bot moved this from Backlog to Done in Flutter News App Project Dec 5, 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