Skip to content

Conversation

@holtvogt
Copy link

@holtvogt holtvogt commented Dec 12, 2025

Previously, new opportunity types defaulted to URL-grouped behavior, which silently dropped suggestions without URL data. Now types must explicitly opt-in to URL grouping, making ungrouped the safe default.


Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description. Or if there's no issue created, make sure you
    describe here the problem you're solving.
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

If the PR is changing the API specification:

  • make sure you add a "Not implemented yet" note the endpoint description, if the implementation is not ready
    yet. Ideally, return a 501 status code with a message explaining the feature is not implemented yet.
  • make sure you add at least one example of the request and response.

If the PR is changing the API implementation or an entity exposed through the API:

  • make sure you update the API specification and the examples to reflect the changes.

If the PR is introducing a new audit type:

  • make sure you update the API specification with the type, schema of the audit result and an example

Copilot AI review requested due to automatic review settings December 12, 2025 18:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a critical issue with auto-fix suggestion handling by switching from a blacklist to a whitelist approach for URL grouping. Previously, new opportunity types defaulted to URL-grouped behavior, which could silently drop suggestions lacking URL data. The new approach makes ungrouped the safe default, requiring explicit opt-in for URL grouping.

Key Changes

  • Inverted the logic from AUTOFIX_UNGROUPED_OPPTY_TYPES (blacklist) to URL_GROUPED_OPPORTUNITY_TYPES (whitelist)
  • Added comprehensive test coverage for unknown opportunity types to validate the new default behavior
  • Updated test descriptions to reflect the correct behavior

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/controllers/suggestions.js Replaced blacklist with whitelist containing only 4 types that require URL grouping (alt-text, broken-internal-links, high-organic-low-ctr, meta-tags)
test/controllers/suggestions.test.js Added test for unknown opportunity types defaulting to ungrouped behavior; fixed test description for form-accessibility test

The changes are well-implemented with clear documentation and appropriate test coverage. The logic inversion is correct, and the whitelist properly includes only the types that need URL-based grouping. No issues were found during this review.

@holtvogt holtvogt requested a review from alinarublea December 12, 2025 18:12
@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Previously, new opportunity types defaulted to URL-grouped behavior,
which silently dropped suggestions without URL data. Now types must
explicitly opt-in to URL grouping, making ungrouped the safe default.
@holtvogt holtvogt force-pushed the fix/auto-fix-url-grouping branch from 239c5f9 to a12759e Compare December 15, 2025 09:05
@github-actions
Copy link

This PR will trigger a patch release when merged.

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