Skip to content

Conversation

@dsuren1
Copy link

@dsuren1 dsuren1 commented Nov 28, 2025

Description

This PR show pending indicator and show a confirmation message when unsaved resource is exited (Map, dashboard & Geostory)

Issue

@gemini-code-assist
Copy link

Summary of Changes

Hello @dsuren1, 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 user experience by adding a pending indicator when a user tries to navigate away from a newly created, but unsaved, Map, Dashboard, or GeoStory. This feature provides critical visual feedback, ensuring users are aware of unsaved changes and can choose to save their work before exiting. The implementation involves detailed state comparisons to accurately identify when a new resource has been modified.

Highlights

  • Pending Indicator for Unsaved Resources: Introduced a pending indicator to notify users when they attempt to exit a newly created, unsaved Map, Dashboard, or GeoStory resource, preventing accidental data loss.
  • Refined 'Dirty' State Detection: Implemented specific logic to accurately determine if a new Map, Dashboard, or GeoStory resource has been modified from its initial state, enabling the pending indicator to function correctly.
  • GeoStory Initial State Handling: Adjusted the GeoStory creation process to properly store the default configuration, which is crucial for comparing against subsequent user modifications to detect changes.
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.

@dsuren1 dsuren1 linked an issue Nov 28, 2025 that may be closed by this pull request
@dsuren1 dsuren1 removed their assignment Nov 28, 2025
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 logic to detect unsaved changes in new resources (Map, Dashboard, GeoStory) to show a pending indicator when exiting. The refactoring in the selectors to create specific 'isDirty' checks for each resource type is a good improvement. However, I've found a critical issue in how the initial state of a new GeoStory is stored, which will prevent correct detection of some changes. Please see my detailed comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a confirmation message when an unsaved Geostory is exited

2 participants