Skip to content

Conversation

@rfontanarosa
Copy link
Collaborator

closes #1669
towards #2256

Registrazione.schermo.2026-01-30.alle.18.00.45.mov

@rfontanarosa rfontanarosa self-assigned this Jan 30, 2026
@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 significantly modernizes the implementation of the secondary side panels by adopting Angular Signals. The change aims to improve the reactivity, maintainability, and performance of these components by moving away from traditional RxJS subscriptions for state management. This refactoring simplifies the component logic and aligns with the latest Angular best practices for reactive programming.

Highlights

  • Angular Signals Migration: The secondary side panels, specifically the Location of Interest (LOI) panel and the Submission panel, have been refactored to utilize Angular Signals for state management. This involves converting component properties and data streams into signals and computed signals.
  • Simplified Component Lifecycle: The OnInit and OnDestroy lifecycle hooks, along with manual Subscription management, have been removed from LoiPanelComponent and SubmissionPanelComponent. Data fetching and reactivity are now handled declaratively using toSignal and computed.
  • Template Updates: HTML templates for both loi-panel and submission-panel have been updated to reflect the signal-based approach, calling signals as functions (e.g., isLoading() instead of isLoading). Internationalization (i18n) attributes were also added to some static text.
  • Enhanced Testability: Unit tests for LoiPanelComponent and SubmissionPanelComponent have been updated to incorporate fakeAsync and tick from @angular/core/testing, ensuring proper testing of asynchronous operations and signal updates.
  • Improved Coordinate Formatting: The SubmissionPanelComponent now uses internationalized labels for displaying coordinate information (e.g., 'E'/'W', 'N'/'S', 'Altitude', 'Accuracy'), making the UI more adaptable to different languages.

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

@rfontanarosa rfontanarosa requested a review from gino-m January 30, 2026 17:05
@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2026

Codecov Report

❌ Patch coverage is 76.66667% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.53%. Comparing base (f389d7b) to head (cfe49ba).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...nel/submission-panel/submission-panel.component.ts 71.42% 10 Missing and 2 partials ⚠️
...ondary-side-panel/loi-panel/loi-panel.component.ts 88.88% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2420      +/-   ##
==========================================
- Coverage   59.58%   59.53%   -0.06%     
==========================================
  Files         111      111              
  Lines        2769     2768       -1     
  Branches      405      408       +3     
==========================================
- Hits         1650     1648       -2     
- Misses       1061     1063       +2     
+ Partials       58       57       -1     

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

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 migrates secondary side panels to use Angular Signals, which is a great step towards modernizing the application's state management. The changes are generally well-implemented, but there are a few critical issues and areas for improvement that I've identified. Specifically, there are potential null pointer exceptions in templates due to how signals are handled, a bug in a component method where a signal is not being accessed correctly, and some anti-patterns like side effects within signal definitions. I've provided detailed comments and suggestions for each of these points.

Comment on lines 62 to 76
switchMap(([survey, lois, loiId]) => {
const loi = lois?.find(l => l.id === loiId);
if (survey && loi) {
console.log(loiId);
this.iconColor = survey.getJob(loi.jobId)?.color ?? '';
this.loi = loi;
this.name = LocationOfInterestService.getDisplayName(loi);
this.icon = getLoiIcon(loi);
return concat(
of(undefined),
this.submissionService.getSubmissions$(survey, loi).pipe(delay(100))
);
}
return of(null).pipe(delay(100));
})
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This switchMap has a couple of issues:

  1. It contains a console.log which should be removed.
  2. It has side effects by modifying component properties (iconColor, loi, name, icon). This is an anti-pattern when working with signals, as it makes data flow implicit and harder to track.

A better approach would be to use computed signals to derive these properties from your inputs. This makes your component more declarative and aligned with the signal-based mindset.

return this.submission() === undefined;
});

submission = toSignal(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same question here.

})
);
}
submissions = toSignal(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need signals at all? Can't the loi and survey just be a component inputs? This seems much more complicated..

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.

[Submission list] Brief delay when selecting LOIs

3 participants