Skip to content

N°9681 cannot be installed fix edge case#969

Merged
Timmy38 merged 2 commits into
developfrom
issue/9681_cannot_be_installed__Fix_edge_case
Jul 9, 2026
Merged

N°9681 cannot be installed fix edge case#969
Timmy38 merged 2 commits into
developfrom
issue/9681_cannot_be_installed__Fix_edge_case

Conversation

@Timmy38

@Timmy38 Timmy38 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 9, 2026 14:23
@Timmy38 Timmy38 self-assigned this Jul 9, 2026
@Timmy38 Timmy38 added the internal Work made by Combodo label Jul 9, 2026

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.

Pull request overview

This PR fixes an edge case (issue N°9681) in the combodo-data-feature-removal setup UI where an already-installed extension whose dependencies can no longer be fulfilled was not treated as "cannot be installed". It generalizes the cannot-be-installed flag so it applies regardless of installation status, and updates the ExtensionDetailsUIBlockFactory so the corresponding badge is shown and the toggler is disabled for both installed and not-installed extensions in that state.

Changes:

  • Compute cannot-be-installed purely from missing dependencies (no longer gated on the extension being uninstalled).
  • Handle cannot-be-installed in MakeInstalled (disable + untoggle the toggler, add the orange badge) by threading the flag through AddExtraBadges.
  • Refactor MakeNotInstalled to add the badge via the shared AddExtraBadges helper and untoggle/disable the toggler consistently.

Reviewed changes

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

File Description
sources/Application/UI/Base/Layout/Extension/ExtensionDetailsUIBlockFactory.php Threads the cannot-be-installed flag into AddExtraBadges, disables the toggler for installed extensions in that state, and centralizes the orange badge creation.
datamodels/2.x/combodo-data-feature-removal/src/Controller/DataFeatureRemovalController.php Sets cannot-be-installed based solely on missing dependencies so installed extensions with unmet dependencies are also flagged.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@greptile-apps

greptile-apps Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes issue #9681 where an already-installed extension with missing dependencies was not being flagged as uninstallable. The root cause was a !$oExtension->bInstalled && guard in the controller that suppressed the cannot-be-installed flag for installed extensions; removing it lets the flag propagate correctly. The UI layer is updated to handle this new state in both MakeInstalled and MakeNotInstalled, and the badge-building logic is centralised into AddExtraBadges.

  • DataFeatureRemovalController.php: the cannot-be-installed condition now applies to all extensions with missing dependencies, regardless of their installed state.
  • ExtensionDetailsUIBlockFactory.php: bCannotBeInstalled is now threaded through AddExtraBadges, MakeInstalled, and MakeNotInstalled; however, the ordering of the if ($bCannotBeInstalled) / if ($bSelected) blocks in MakeNotInstalled allows $bSelected=true to re-enable the toggler after it was explicitly disabled.

Confidence Score: 3/5

The controller-side fix is correct, but the UI factory has a toggler ordering bug where a selected-but-uninstallable extension ends up visually checked.

The controller change is clean and intentional. The UI refactor drops the old $bSelected = false guard, so bCannotBeInstalled no longer unconditionally wins over $bSelected — an extension with missing dependencies can appear visually checked despite showing the orange warning badge.

sources/Application/UI/Base/Layout/Extension/ExtensionDetailsUIBlockFactory.php — specifically the MakeNotInstalled method's toggler ordering logic.

Important Files Changed

Filename Overview
sources/Application/UI/Base/Layout/Extension/ExtensionDetailsUIBlockFactory.php Propagates bCannotBeInstalled to MakeInstalled and centralises badge logic in AddExtraBadges; ordering issue in MakeNotInstalled allows $bSelected=true to override the toggler-off state set by bCannotBeInstalled.
datamodels/2.x/combodo-data-feature-removal/src/Controller/DataFeatureRemovalController.php Removes the !bInstalled guard from the cannot-be-installed condition so that already-installed extensions with missing dependencies are also flagged correctly.

Reviews (1): Last reviewed commit: "N°9681 Small fix & refactor" | Re-trigger Greptile

@Timmy38 Timmy38 merged commit a68c017 into develop Jul 9, 2026
3 checks passed
@Timmy38 Timmy38 deleted the issue/9681_cannot_be_installed__Fix_edge_case branch July 9, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Work made by Combodo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants