-
Notifications
You must be signed in to change notification settings - Fork 20.1k
refactor: port RecommendedApp( #31007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
refactor: port RecommendedApp( #31007
Conversation
Summary of ChangesHello @asukaminato0721, 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 focuses on refactoring the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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 refactors the RecommendedApp model to use TypeBase (which is a MappedAsDataclass), making the model definition more modern and type-safe. The changes correctly add Mapped type hints and init=False for generated fields.
I've found a few issues related to column types and nullability that could lead to runtime errors. Specifically, the description column has an incorrect type, and several non-nullable fields have null values in the seed data. My comments provide suggestions to fix these problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| copyright: Mapped[str] = mapped_column(String(255), nullable=False, default="") | ||
| privacy_policy: Mapped[str] = mapped_column(String(255), nullable=False, default="") | ||
| category: Mapped[str] = mapped_column(String(255), nullable=False, default="") | ||
| custom_disclaimer: Mapped[str] = mapped_column(LongText, default="") |
Copilot
AI
Feb 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The custom_disclaimer field should have nullable=False according to the migration d07474999927_update_type_of_custom_disclaimer_to_text.py (line 35). The migration explicitly sets this column to nullable=False, but the model definition is missing this constraint. Add nullable=False to match the database schema.
| custom_disclaimer: Mapped[str] = mapped_column(LongText, default="") | |
| custom_disclaimer: Mapped[str] = mapped_column(LongText, nullable=False, default="") |
| privacy_policy: Mapped[str] = mapped_column(String(255), nullable=False) | ||
| id: Mapped[str] = mapped_column(StringUUID, primary_key=True, default=lambda: str(uuid4()), init=False) | ||
| app_id: Mapped[str] = mapped_column(StringUUID, nullable=False) | ||
| description: Mapped[str] = mapped_column(LongText, nullable=False, default="") |
Copilot
AI
Feb 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description field type has been changed from sa.JSON() to LongText without a corresponding database migration. The original schema (see migrations/versions/64b051264f32_init.py lines 948 and 963) defines this column as sa.JSON(), but this change converts it to LongText. While the code usage suggests it should be a string (not JSON), changing the column type without a migration will cause issues for existing databases. A migration script is needed to alter the column type from JSON to TEXT/LONGTEXT before this model change can be safely deployed.
| description: Mapped[str] = mapped_column(LongText, nullable=False, default="") | |
| description: Mapped[str] = mapped_column(sa.JSON(), nullable=False, default="") |
Important
Fixes #<issue number>.Summary
part of #23579
Screenshots
Checklist
make lintandmake type-check(backend) andcd web && npx lint-staged(frontend) to appease the lint gods