Skip to content

Desktop: Open file dialogs in document parent folder#3934

Open
timon-schelling wants to merge 1 commit intomasterfrom
desktop-save-with-default-folder
Open

Desktop: Open file dialogs in document parent folder#3934
timon-schelling wants to merge 1 commit intomasterfrom
desktop-save-with-default-folder

Conversation

@timon-schelling
Copy link
Member

Open dialogs in documents parent folder if possible, to make Save As and exports more ergonomic.

@timon-schelling timon-schelling changed the title Desktop: Open save file dialogs in document parent folder Desktop: Open file dialogs in document parent folder Mar 22, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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 improves the usability of save and export operations by ensuring that file dialogs open in a more intuitive location. By passing the document's parent folder directly to the frontend, users will find it easier to save and export files to relevant directories without manual navigation, streamlining their workflow.

Highlights

  • Improved Save/Export Dialog Ergonomics: Save As and export dialogs now default to opening in the parent folder of the currently active document, enhancing the user experience by reducing navigation.
  • Explicit Folder Passing: The FrontendMessage::TriggerSaveDocument and FrontendMessage::TriggerSaveFile messages were updated to include an explicit folder argument, allowing the editor to specify the desired default directory for file dialogs.
  • Refined Document Path Handling: Internal logic for handling document paths was adjusted to ensure that only absolute paths are stored for documents, and the save state marking was updated for consistency.
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.

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
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 correctly implements opening file dialogs in the document's parent folder for "Save As" and export operations, which is a nice ergonomic improvement. I've found a regression in the save logic that could lead to an incorrect saved status for the document. My review includes a suggestion to fix this.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 6 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="editor/src/messages/portfolio/document/document_message_handler.rs">

<violation number="1" location="editor/src/messages/portfolio/document/document_message_handler.rs:840">
P1: `SaveDocument` no longer marks the document as saved, so the unsaved indicator can remain stale after a successful save.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@timon-schelling timon-schelling force-pushed the desktop-save-with-default-folder branch from 7a66494 to 4e90ea8 Compare March 22, 2026 01:43
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) March 22, 2026 01:47 Inactive
@github-actions github-actions bot temporarily deployed to graphite-dev (Preview) March 22, 2026 01:54 Inactive
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.

1 participant