Conversation
|
Hi there! Thank you for your contribution to Gemini CLI. To improve our contribution process and better track changes, we now require all pull requests to be associated with an existing issue, as announced in our recent discussion and as detailed in our CONTRIBUTING.md. This pull request is being closed because it is not currently linked to an issue. Once you have updated the description of this PR to link an issue (e.g., by adding How to link an issue: Thank you for your understanding and for being a part of our community! |
|
Hi @jacob314, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this. We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines. Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed. Thank you for your understanding and for being a part of our community! |
Summary of ChangesHello, 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 SVG snapshot generation process to include more detailed text styling from terminal output, specifically bold, italic, underline, and link rendering. This improvement ensures that visual tests more faithfully represent the intended display, addressing a previous limitation where these styles were not captured. While this change necessitates updating all existing SVG snapshots, it leads to more stable and accurate visual testing going forward. Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request enhances the SVG snapshot generation for tests to include bold, italic, underline, and link styles, which is a valuable improvement for visual regression testing. The changes are primarily in packages/cli/src/test-utils/svg.ts, with corresponding updates across numerous SVG snapshot files.
My review identifies a significant maintainability concern in svg.ts where private, internal properties of the xterm.js library are accessed to retrieve link information. This approach is brittle and risks breaking tests when dependencies are updated. I have provided a detailed comment suggesting an investigation into using public APIs to make the implementation more robust.
| // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment | ||
| const urlId = (cell as any).extended?._urlId; | ||
| let linkUri: string | null = null; | ||
| if (urlId !== undefined) { | ||
| /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-type-assertion, @typescript-eslint/no-explicit-any */ | ||
| linkUri = | ||
| (terminal as any)._core?._oscLinkService?.getLinkData(urlId)?.uri || | ||
| null; | ||
| /* eslint-enable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-type-assertion, @typescript-eslint/no-explicit-any */ | ||
| } |
There was a problem hiding this comment.
Accessing private properties of xterm.js objects, such as _urlId, _core, and _oscLinkService, makes this code fragile and likely to break with future updates to the xterm.js dependency. The multiple eslint-disable comments for unsafe type assertions highlight this maintainability risk.
To improve robustness, consider using a public API if one is available. For instance, could a custom link provider be used during tests to store and retrieve link information without accessing private properties?
If a public API is not a viable option, please add a comment explaining the necessity of this approach and acknowledging the associated risks.
|
Size Change: -2 B (0%) Total Size: 25.7 MB ℹ️ View Unchanged
|
|
Hi there! Thank you for your contribution to Gemini CLI. To improve our contribution process and better track changes, we now require all pull requests to be associated with an existing issue, as announced in our recent discussion and as detailed in our CONTRIBUTING.md. This pull request is being closed because it is not currently linked to an issue. Once you have updated the description of this PR to link an issue (e.g., by adding How to link an issue: Thank you for your understanding and for being a part of our community! |
Summary
SVG snapshots now include whether text is bold.
Unfortunately this does churn all snapshots so snapshots with no diff will still show up here. Hopefully once this is in snapshots will be stable. If we continue to have difficultly with them being stable we will need to add polish to ensure they are completely stable barring changes to actual colors of text. If that isn't easy we will need to switch the snapshots to use png and perform actual visual diffs.