Skip to content

Conversation

@hongjr03
Copy link
Contributor

Adds font completion fixtures for let/for-loop/record/tuple and imported show transforms. Test-only changes.

Depends on #2388.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @hongjr03, 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 enhances the completion capabilities of the language server, particularly for font and path contexts. It introduces sophisticated type propagation logic to understand complex code patterns such as let bindings, destructuring assignments, string concatenations, and dynamic dictionary field access. These improvements ensure that completion suggestions are more accurate and context-aware across a wider range of programming constructs, leading to a better developer experience.

Highlights

  • Enhanced Completion Propagation: Improved font and path completion propagation across various language constructs, including let bindings, for loops, record/tuple destructuring, and imported show transforms.
  • Robust Constant String Resolution: Introduced new mechanisms to resolve unique constant string values from types and AST nodes, enabling more accurate type checking and completion for dynamic keys and string concatenations.
  • Improved Type Inference: Refined contextual type inference for array/dictionary elements and enhanced type variable constraint propagation, leading to more consistent and accurate type information.
  • Advanced Path Completion: Path completion now correctly handles string concatenations (e.g., "dir/" + "file.typ") and propagates path types through import and include statements.
  • Comprehensive Test Coverage: Added a wide array of new test fixtures and updated snapshots to validate the improved completion and type checking logic across many complex scenarios.

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

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 significantly enhances font and path completion by improving type propagation and handling more complex scenarios like string concatenation and dynamic dictionary keys. The changes are well-implemented and backed by a comprehensive set of new tests. The core logic for bi-directional type constraint propagation is a major step forward for the analysis engine. I have one minor suggestion for code simplification.

Comment on lines 124 to 127
let mut new_prefix = EcoString::new();
new_prefix.push_str(lhs.as_str());
new_prefix.push_str(prefix.as_str());
prefix = new_prefix;
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The logic for prepending to the prefix string can be simplified. Instead of creating a new EcoString and reassigning, you can use insert_str to prepend the lhs string directly to the existing prefix. This is more efficient and concise.

Suggested change
let mut new_prefix = EcoString::new();
new_prefix.push_str(lhs.as_str());
new_prefix.push_str(prefix.as_str());
prefix = new_prefix;
prefix.insert_str(0, lhs.as_str());

@hongjr03 hongjr03 force-pushed the split/06-font-tests branch from 77fd465 to 471d69a Compare January 29, 2026 09:53
@hongjr03 hongjr03 force-pushed the split/06-font-tests branch from 471d69a to 5e506d5 Compare January 29, 2026 10:42
@hongjr03 hongjr03 force-pushed the split/06-font-tests branch from 5e506d5 to ce42c42 Compare January 29, 2026 11:55
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