Skip to content

Conversation

@rfontanarosa
Copy link
Collaborator

fixes #2412

Registrazione.schermo.2026-02-09.alle.16.49.44.mov

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @rfontanarosa, 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 addresses an issue where the edit-survey component's header was potentially displaying incorrect survey information. By migrating to Angular signals and reactive programming with RxJS, the component now dynamically loads and displays the correct "still" survey using the SurveyService, ensuring data consistency and an accurate representation of the survey being edited in the header.

Highlights

  • Refactored Survey Header Display: The ground-survey-header component in edit-survey.component.html now utilizes an activeSurvey() signal to display survey information, ensuring the correct and up-to-date survey data is presented.
  • Introduced Angular Signals and RxJS for Reactive Data Loading: The edit-survey.component.ts file has been updated to incorporate Angular's new signal primitives (toSignal, toObservable) and RxJS operators (switchMap) for a more reactive and efficient way to load survey data.
  • Integrated SurveyService for Active Survey Retrieval: A new activeSurvey signal has been implemented, which leverages the SurveyService to dynamically load the active survey based on the surveyId input, replacing previous implicit survey handling for the header.

🧠 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.

Changelog
  • web/src/app/components/edit-survey/edit-survey.component.html
    • The ground-survey-header component now binds to activeSurvey() instead of the survey object and activeSurvey variable for its *ngIf condition and [activeSurvey] input.
  • web/src/app/components/edit-survey/edit-survey.component.ts
    • Added imports for toObservable, toSignal from @angular/core/rxjs-interop, and switchMap from rxjs.
    • Injected SurveyService to handle survey data loading.
    • Implemented an activeSurvey signal that reactively loads a survey using surveyService.loadSurvey$(id) whenever the surveyId input changes, using toObservable and switchMap.
Activity
  • No human activity (comments, reviews, etc.) has been recorded on this pull request yet.
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.

@rfontanarosa rfontanarosa changed the title passed still survey instead of draft one Prevent survey title live-sync before publication Feb 9, 2026
Copy link
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 aims to fix an issue where the survey header doesn't update during editing. The change introduces an Angular signal to improve reactivity, which is a good step. However, the implementation currently fetches the published survey data for the header, while the rest of the edit page operates on a draft version. This creates a data inconsistency and doesn't fully resolve the user-facing issue. My review includes a suggestion to refactor the new signal to use the draft survey data, which would provide a consistent and correct experience for the user.

@rfontanarosa rfontanarosa marked this pull request as ready for review February 9, 2026 16:12
@rfontanarosa rfontanarosa requested a review from gino-m February 9, 2026 16:12
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.17%. Comparing base (870e5c7) to head (9333503).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2425      +/-   ##
==========================================
+ Coverage   59.12%   59.17%   +0.04%     
==========================================
  Files         110      110              
  Lines        2733     2736       +3     
  Branches      397      397              
==========================================
+ Hits         1616     1619       +3     
  Misses       1060     1060              
  Partials       57       57              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

[Edit survey] Title in header reflects unsaved draft rather than actual survey title

2 participants