Skip to content

fix: stop re-enabling the package downloads widget on integration changes - #5173

Merged
joanagmaia merged 2 commits into
mainfrom
fix/issue-976-disable-package-downloads-widget
Nov 2, 2026
Merged

joanagmaia merged 2 commits into
mainfrom
fix/issue-976-disable-package-downloads-widget

Conversation

@joanagmaia

Copy link
Copy Markdown
Contributor

Summary

The Package downloads widget was turned off for every Insights project, but it kept coming back. 1,107 projects in prod have it again. DEFAULT_WIDGET_VALUES still enabled it for GitHub and GitHub Nango. Every integration create, update, delete or GitHub Nango connect rebuilds a project's widgets from those defaults, so any project with GitHub got the widget back.

Changes

  • Set PACKAGE_DOWNLOADS to enabled: false in DEFAULT_WIDGET_VALUES. Integration changes no longer add it, and the admin "add project" form no longer ticks it when it loads a segment's widgets. Admins can still turn it on by hand.
  • Add a migration that removes packageDownloads from every insightsProjects row that has it.

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Performance improvement
  • Chore / dependency update
  • Documentation

Related issue

Closes linuxfoundation/lfx-cdp-insights-ops#976

…nges

Refs linuxfoundation/lfx-cdp-insights-ops#976

Signed-off-by: Joana Maia <jmaia@contractor.linuxfoundation.org>
Copilot AI balanced review requested due to automatic review settings November 2, 2026 17:55
@cursor

cursor Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Configuration and a targeted SQL cleanup on Insights widget lists; no auth or payment paths, with manual re-enable still available.

Overview
Package downloads was being re-added to Insights projects whenever integrations were synced because DEFAULT_WIDGET_VALUES still had PACKAGE_DOWNLOADS enabled for GitHub platforms. This PR turns that default off, so widget rebuilds in collectionService no longer inject packageDownloads on create/update/delete or Nango connect (admins can still enable it manually).

A one-time migration V1793641911__removePackageDownloadsWidget.sql removes 'packageDownloads' from the widgets array on every insightsProjects row that still has it and bumps updatedAt.

Reviewed by Cursor Bugbot for commit 4fa960a. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are recorded for the Package downloads widget default and migration changes.

No open issues 🎉

What changed in this PR

Prevents integration changes from restoring the disabled Package downloads widget in Insights projects and removes existing instances.

Changes:

  • Disable PACKAGE_DOWNLOADS in shared widget defaults while preserving manual enablement.
  • Add a migration to remove packageDownloads from affected projects and update their modification timestamps.
File Description
services/​libs/​types/​src/​enums/​widgets.ts Disables Package downloads by default.
backend/​src/​database/​migrations/​V1793641911__removePackageDownloadsWidget.sql Removes the widget from existing project configurations.

Review effort: Balanced

@greptile-apps

greptile-apps Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with the previous finding fully addressed.

Summary

Disables PACKAGE_DOWNLOADS in DEFAULT_WIDGET_VALUES and adds a migration to remove packageDownloads from existing projects.

  • GitHub integration changes no longer restore package downloads to project widgets.

Reviews (2) · Last reviewed commit: "fix: drop the redundant comment from the..." · Reviewed by Greptile

Refs linuxfoundation/lfx-cdp-insights-ops#976

Signed-off-by: Joana Maia <jmaia@contractor.linuxfoundation.org>
Copilot AI balanced review requested due to automatic review settings November 2, 2026 18:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the Package downloads default change and cleanup migration.

No open issues 🎉

Review effort: Balanced

@joanagmaia
joanagmaia merged commit d821b95 into main Nov 2, 2026
15 checks passed
@joanagmaia
joanagmaia deleted the fix/issue-976-disable-package-downloads-widget branch November 2, 2026 18:21
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.

2 participants