Skip to content

feat(packages): Add Install All and Update All buttons to package grid#16909

Draft
Ibochkarev wants to merge 2 commits intomodxcms:3.xfrom
Ibochkarev:fix/5897-install-update-all
Draft

feat(packages): Add Install All and Update All buttons to package grid#16909
Ibochkarev wants to merge 2 commits intomodxcms:3.xfrom
Ibochkarev:fix/5897-install-update-all

Conversation

@Ibochkarev
Copy link
Collaborator

What does it do?

Adds "Install All" and "Update All" buttons to the package grid (Workspace → Packages) for bulk installation and updating of packages.

Backend:

  • Adds filter parameter to GetList processor; filter=uninstalled returns only not-installed packages
  • Extends listPackages() in modTransportPackage (base and mysql) with $filter argument
  • When filter === 'uninstalled', applies condition (installed IS NULL OR installed = '0000-00-00 00:00:00')

Frontend:

  • Two new toolbar buttons: Install All, Update All
  • Install All: fetches uninstalled packages via GetList with filter=uninstalled, then runs sequential Install for each
  • Update All: fetches all packages, filters by updateable === true, then for each runs CheckForUpdates → Rest/Download → Install
  • Uses loadConsole for progress; on completion shows summary (success/failed counts), refreshes grid and trees
  • Extracted helpers: parseGetListResponse(), getConnectorErrorMessage()

Lexicon:

  • New keys in core/lexicon/en/workspace.inc.php: package_install_all, package_update_all, confirmations, progress, completion messages

Why is it needed?

Speeds up fresh MODX installations and bulk package updates by allowing users to install or update all packages in one action instead of clicking each package individually.

How to test

  1. Go to Workspace → Packages
  2. Install All: With some uninstalled packages present, click "Install All", confirm, verify sequential installation and final summary
  3. Update All: With packages that have updates available, click "Update All", confirm, verify sequential update and final summary
  4. Test empty states: Install All with no uninstalled packages, Update All with no updateable packages should show appropriate messages
  5. Test error handling: if one package fails, queue should continue and report failed count in summary

Related issue(s)/PR(s)

Resolves #5897

- Add filter=uninstalled to GetList for bulk install
- Add listPackages filter param in Transport layer
- Add Install All / Update All buttons with sequential queue processing
- Add lexicon keys for confirmations, progress, and completion messages
- Use loadConsole for batch progress, refresh grid and trees on complete

Resolves modxcms#5897
@Ibochkarev Ibochkarev force-pushed the fix/5897-install-update-all branch from d7c6879 to 1a14035 Compare February 26, 2026 16:59
@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

❌ Patch coverage is 22.22222% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.67%. Comparing base (af7a969) to head (1a14035).
⚠️ Report is 10 commits behind head on 3.x.

Files with missing lines Patch % Lines
...Revolution/Transport/mysql/modTransportPackage.php 33.33% 4 Missing ⚠️
...volution/Processors/Workspace/Packages/GetList.php 0.00% 2 Missing ⚠️
...e/src/Revolution/Transport/modTransportPackage.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##                3.x   #16909      +/-   ##
============================================
+ Coverage     21.64%   21.67%   +0.03%     
- Complexity    10764    10785      +21     
============================================
  Files           566      566              
  Lines         33005    33153     +148     
============================================
+ Hits           7144     7186      +42     
- Misses        25861    25967     +106     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Added new test cases for listPackages method with and without filters.
- Included a new directory for Workspace tests in phpunit.xml.
@Ibochkarev Ibochkarev added the feature Request about implementing a brand new function or possibility. label Mar 1, 2026
@modxcommunity
Copy link

This pull request has been mentioned on MODX Community. There might be relevant details there:

https://community.modx.com/t/the-future-of-modx-ideas-roadmap-and-release-cycle/8995/32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Request about implementing a brand new function or possibility.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

package management: install all, update all

2 participants