Skip to content

fix: Notes flag#2817

Merged
zurdi15 merged 8 commits intomasterfrom
fix/notes-flag
Dec 30, 2025
Merged

fix: Notes flag#2817
zurdi15 merged 8 commits intomasterfrom
fix/notes-flag

Conversation

@zurdi15
Copy link
Copy Markdown
Member

@zurdi15 zurdi15 commented Dec 30, 2025

Description
Explain the changes or enhancements you are proposing with this pull request.
Re-added notes flag in gallery and migrated notes dialog to multi notes manager

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

Screenshots (if applicable)

@zurdi15 zurdi15 self-assigned this Dec 30, 2025
@zurdi15 zurdi15 requested review from Copilot and gantoine December 30, 2025 10:44
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @zurdi15, 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 re-establishes and enhances the visibility of user-specific notes within the application's gallery and table views. It achieves this by introducing a new 'has_notes' flag in the backend ROM schema, which is then consumed by the frontend to accurately display a notes indicator. Concurrently, the internal handling of notes has been streamlined by migrating the 'NoteDialog's functionality to a dedicated 'MultiNoteManager' component, improving modularity and maintainability.

Highlights

  • Backend 'has_notes' flag: A new 'has_notes' boolean field has been introduced in the 'SimpleRomSchema' on the backend. This flag is dynamically populated based on whether the current user has any notes associated with a specific ROM.
  • Frontend Notes Indicator: The frontend now correctly displays a 'notes' flag or chip in both the game card and virtual table views. This indicator directly leverages the new 'has_notes' property provided by the backend, ensuring accurate representation of user notes.
  • Note Dialog Refactor: The 'NoteDialog' component has undergone a significant refactor. Its core functionality for displaying and managing notes has been migrated to a new 'MultiNoteManager' component, centralizing note management logic and improving modularity.

🧠 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 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
Copy Markdown
Contributor

@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 has_notes flag for ROMs to indicate if a user has notes for a game, which is now displayed in the gallery. It also refactors the note viewing dialog to use a new MultiNoteManager component, improving code organization.

My review identifies a critical performance issue (N+1 query problem) when fetching the has_notes flag for a list of ROMs. I've also suggested a minor refactoring to improve code conciseness in one of the backend endpoints. The frontend changes and refactoring look good.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 30, 2025

Test Results

678 tests  ±0   677 ✅ ±0   1m 16s ⏱️ ±0s
  1 suites ±0     1 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit a7bda98. ± Comparison against base commit 7619b0b.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 30, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
11961 7729 65% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
backend/endpoints/responses/rom.py 96% 🟢
backend/handler/database/roms_handler.py 53% 🟢
TOTAL 74% 🟢

updated for commit: a7bda98 by action🐍

@zurdi15 zurdi15 added javascript Pull requests that update Javascript code python Pull requests that update Python code labels Dec 30, 2025
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR re-introduces the notes flag functionality in the gallery view and migrates the notes dialog to use the centralized MultiNoteManager component, improving code reusability and consistency.

Key Changes:

  • Added has_notes boolean field to SimpleRomSchema for displaying note indicators in gallery views
  • Refactored NoteDialog to use MultiNoteManager component instead of custom implementation
  • Updated backend endpoint to include username in note responses for proper display

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
backend/endpoints/rom.py Modified get_rom_notes endpoint to return username field in note schema
backend/endpoints/responses/rom.py Added has_notes field to SimpleRomSchema with database check for user notes
frontend/src/__generated__/models/SimpleRomSchema.ts Added optional has_notes boolean field to TypeScript schema
frontend/src/components/common/Game/Card/Base.vue Removed hasNotes computed property, now uses rom.has_notes from API
frontend/src/components/common/Game/VirtualTable.vue Removed hasNotes function, uses item.has_notes; changed chip-size prop to "small"
frontend/src/components/common/Game/Dialog/NoteDialog.vue Refactored to fetch full ROM details and delegate note display to MultiNoteManager component
Files not reviewed (1)
  • frontend/src/generated/models/SimpleRomSchema.ts: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zurdi15 zurdi15 merged commit 934bcd8 into master Dec 30, 2025
12 checks passed
@zurdi15 zurdi15 deleted the fix/notes-flag branch December 30, 2025 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants