Skip to content

Fix path tool overlays#3810

Merged
TrueDoctor merged 2 commits intomasterfrom
fix-path-tool-overlays
Feb 23, 2026
Merged

Fix path tool overlays#3810
TrueDoctor merged 2 commits intomasterfrom
fix-path-tool-overlays

Conversation

@TrueDoctor
Copy link
Copy Markdown
Member

A change to the document metadata struct in #3727 added a new field which was then not part of the new metadata merge function introduced in render output caching pr and was missed during the rebase process. To avoid issues like this in the future, we are now destructuring the metadata struct so we get compiler warnings if the fields are modified again.
Fixes: #3807

Use destructuring to avoid issues like this in the future
@TrueDoctor TrueDoctor requested a review from Keavon February 23, 2026 08:29
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @TrueDoctor, 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 a critical bug where a recently introduced field in the RenderMetadata struct was not being properly handled during merge operations, leading to incorrect state. The fix not only rectifies the immediate issue by incorporating the missing field into the merge logic but also enhances the robustness of the codebase. By adopting struct destructuring, the system is now better equipped to detect and prevent future omissions of new fields, thereby improving maintainability and reducing the likelihood of regressions.

Highlights

  • Bug Fix: Missing vector_data in RenderMetadata merge: Resolved an issue where the vector_data field, added in a previous PR (Fix the Path tool adding a Path node but not applying the change until a second attempt due to wrong segment IDs #3727), was not being correctly merged within the RenderMetadata::merge function. This oversight occurred during a rebase process.
  • Defensive Programming Enhancement: Implemented struct destructuring within the RenderMetadata::merge function. This change ensures that if new fields are added to the RenderMetadata struct in the future, the compiler will issue warnings if they are not included in the merge logic, preventing similar bugs.
Changelog
  • node-graph/libraries/rendering/src/renderer.rs
    • Modified the RenderMetadata::merge function to include the vector_data field in the merge operation.
    • Refactored the RenderMetadata::merge function to use struct destructuring for self, ensuring compile-time checks for all fields.
Activity
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.

@Keavon
Copy link
Copy Markdown
Member

Keavon commented Feb 23, 2026

I like this approach. We should also do the destructuring idea for cases like our Hash trait impls, where it's also easy to miss those when adding new fields.

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 fixes a bug where vector_data was not being merged in RenderMetadata::merge. The change also refactors the merge function to use destructuring, which is a great way to ensure that future additions to RenderMetadata will cause a compile error if not handled in merge, preventing similar bugs. I've kept the suggestion for a small simplification to the extend calls for better conciseness, as it does not conflict with any provided rules.

Comment thread node-graph/libraries/rendering/src/renderer.rs Outdated
@github-actions github-actions Bot temporarily deployed to graphite-dev (Preview) February 23, 2026 08:34 Inactive
@github-actions github-actions Bot temporarily deployed to graphite-dev (Preview) February 23, 2026 08:48 Inactive
@TrueDoctor TrueDoctor added this pull request to the merge queue Feb 23, 2026
Merged via the queue into master with commit a1c1039 Feb 23, 2026
5 checks passed
@TrueDoctor TrueDoctor deleted the fix-path-tool-overlays branch February 23, 2026 09:17
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.

Path tool overlays no longer showing with Vello renderer active (regression)

2 participants