feat: show docker.versions changelogs in the update dialog#116
Merged
Conversation
When docker.versions is installed, a Changelog link appears next to the SHA comparison for each container with a pending update. Clicking it opens the docker.versions changelog in a sized iframe modal via Nchan, matching the existing Docker tab experience. docker.versions is an optional dependency: the PHP endpoint detects it via is_dir(), the JS flag defaults false, and the NchanSubscriber guard prevents any breakage if the plugin is absent or removed while the page is open. A 10-second timeout shows a fallback message if no data arrives. Dialog sizing is applied via inline styles rather than borrowing docker.versions' CSS classes.
Tests cover all three response paths (no file, valid file, invalid file) against both the docker.versions-installed and not-installed states. Uses UnraidStreamWrapper to map the plugin directory to a controlled temp path without touching the real filesystem.
When the user closes the changelog modal (OK button or outside click), re-open the Update Stack dialog for the same stack so they can continue reviewing other containers or proceed with the update. Pass path and profile through to showComposeChangelog via data attributes so the callback has enough context to reopen the dialog.
/sub/changelog is a shared channel: Nchan delivers the last buffered message to every new subscriber, and docker.versions' own subscriber may be actively publishing output for other containers concurrently. Both cases caused wrong containers' changelogs to appear in the dialog. GetChangelog.php always publishes <h3 class='loading'> as its first message. Use that as a start-of-stream marker: discard everything received before it, clear the iframe on arrival, and suppress loadingInfo progress messages that are noise in this context.
docker.versions publishes many message types — Container: headers, URL links, warnings, empty <pre> containers, loadingInfo progress — that are structural scaffolding for its own full-page view and are noise in our modal. Replace the loadingInfo-only blacklist with a whitelist: accept only class='releasesInfo' release entries and the version-summary <h3> containing '---->', and discard everything else.
Replace the custom NchanSubscriber, message filtering, and markdown renderer with a direct call to docker.versions' own showChangeLog() function, which already handles all of that correctly. Hide the OK/confirm button (it would call updateContainer, bypassing compose_plugin's update mechanism) and poll for dialog close to reopen the Update Stack dialog afterward.
…abled Two bugs found in code review: 1. The setInterval poll had no escape hatch when showChangeLog() opened no SweetAlert dialog (e.g. container unknown to docker.versions), so the 'appeared' flag never flipped true and clearInterval was never reached. Cap at 300 ticks (30 s) so it always self-cleans. 2. When DISABLE_ACTION_WARNINGS is true, renderStackActionDialog() has a fast-path that calls UpdateStackConfirmed() directly without showing a dialog. Reopening the update dialog after changelog dismiss would trigger an immediate update rather than a confirmation prompt. Skip the reopen in that mode by checking the setting via getConfig().
There was a problem hiding this comment.
Pull request overview
Adds optional integration between Compose Manager’s “Update Stack” dialog and the external docker.versions Unraid plugin so users can open per-container changelogs when updates are available, while keeping the UI unchanged when docker.versions is not installed.
Changes:
- Server-side detection of docker.versions via
is_dir()and inclusion of adockerVersionsInstalledflag in thegetSavedUpdateStatusresponse. - UI update to conditionally render a Changelog link per updatable container and delegate display to docker.versions’ global
showChangeLog()(with logic to return to the Update Stack dialog). - Added/updated unit tests and user guide documentation for update checking + changelog behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/unit/ExecActionsTest.php | Adds unit tests covering getSavedUpdateStatus including the new dockerVersionsInstalled response flag. |
| source/compose.manager/javascript/composeManagerMain.js | Tracks docker.versions availability from the server and adds a per-container Changelog link + handler to invoke docker.versions UI. |
| source/compose.manager/include/Exec.php | Detects docker.versions plugin presence and returns dockerVersionsInstalled in getSavedUpdateStatus. |
| docs/user-guide.md | Documents update checking flow and the optional changelog link behavior when docker.versions is installed. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
mstrhakr
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adds optional integration with the docker.versions Unraid plugin. When docker.versions is installed, a Changelog link appears beneath the digest arrow for each container with a pending update in the Update Stack dialog. Clicking it opens the release notes via docker.versions' own
showChangeLog()function. Dismissing the changelog returns to the Update Stack dialog.docker.versions is detected server-side with
is_dirand reported via thegetSavedUpdateStatusresponse; the feature is entirely absent when the plugin is not installed (no JS errors, no UI changes).Related issues
N/A
Checklist
Testing notes
With docker.versions installed:
Without docker.versions: no visible change, no JS errors.
PHPStan and PHPUnit both pass.
Notes
showChangeLog()— no duplicated Nchan subscription or message routing logicupdateContainer(), bypassing compose_plugin's update mechanism) is hidden so Cancel is the only exitDISABLE_ACTION_WARNINGSis true, sincerenderStackActionDialogwould fast-path directly toUpdateStackConfirmedin that modeshowChangeLog()opens no dialogdata-attributes to avoid HTML attribute quoting issues with inlineonclickstring interpolation