Skip to content

Conversation

@nick-y-snyk
Copy link
Contributor

Description

Provide description of this PR and changes, if linked Jira ticket doesn't cover it in full.

Checklist

Screenshots / GIFs

Visuals that may help the reviewer. Please add screenshots for any UI change. GIFs are most welcome!

@nick-y-snyk nick-y-snyk requested review from a team as code owners November 10, 2025 13:10
@snyk-io
Copy link

snyk-io bot commented Nov 10, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@gemini-code-assist
Copy link

Summary of Changes

Hello @nick-y-snyk, 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 implements the ability to read and apply the 'inline ignore' feature flag for Snyk Code based on individual folder configurations. This change moves the control of this feature from a global setting to a more localized, folder-specific one, providing greater flexibility for users. The modifications involve updating data structures to include feature flags in folder configurations, adjusting service constructors to pass these configurations, and refining the logic that determines when the inline ignore functionality is available.

Highlights

  • Folder-Specific Feature Flags: Introduced a featureFlags property to the FolderConfig type, allowing for the configuration of feature flags on a per-folder basis.
  • Granular Inline Ignore Control: Modified the SnykCodeActionsProvider to check the snykCodeInlineIgnore feature flag from the folder-specific configuration, enabling more granular control over this functionality.
  • Dependency Injection Updates: Updated the SnykExtension and SnykCodeService to pass folderConfigs to relevant components, ensuring that folder-specific configurations are accessible where needed.
  • Webview Refactoring: Removed the global snykCodeInlineIgnore feature flag check from the CodeSuggestionWebviewProvider and related Suggestion types, as this logic is now handled by the CodeActionsProvider.
  • Unit Test Enhancements: Updated unit tests for SnykCodeActionsProvider and SnykCodeService to properly reflect and validate the new folder-specific feature flag handling.
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

@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 refactors the handling of the snykCodeInlineIgnore feature flag to be folder-specific. The flag is now read from the folderConfig, which allows for more granular control over this feature in multi-root workspaces.

The changes involve:

  • Adding a featureFlags property to the FolderConfig type.
  • Plumbing the folderConfigs service down to SnykCodeActionsProvider.
  • Updating SnykCodeActionsProvider to check the per-folder feature flag before adding ignore-related code actions.
  • Removing the now-redundant feature flag check from the CodeSuggestionWebviewProvider, presumably because this logic is now handled by the Language Server which generates the webview content.
  • Updating unit tests to reflect these changes, including tests for both enabled and disabled states of the feature flag.

The implementation is clean and the changes are consistent across the codebase. The updated tests provide good coverage for the new logic. Overall, this is a solid improvement.

Copy link
Contributor

@rrama rrama left a comment

Choose a reason for hiding this comment

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

LGTM, just fix the lint issues.

codeActionKindAdapter: ICodeActionKindAdapter,
private readonly languages: IVSCodeLanguages,
private readonly configuration: IConfiguration,
private readonly folderConfigs: IFolderConfigs,
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, this would not change if LS changes the value, but since we are only using it for the code action, good enough.
In the other PR branch you could have got it from the configuration, but this is fine.


private mapToModel(issue: Issue<CodeIssueData>): Suggestion {
const parsedDetails = marked.parse(issue.additionalData.text) as string;
const showInlineIgnoresButton = configuration.getFeatureFlag(FEATURE_FLAGS.snykCodeInlineIgnore);
Copy link
Contributor

Choose a reason for hiding this comment

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

Like the linter says. Please remove unused imports.

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.

3 participants