Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7e774da
feat(icon): enhance icon caching and management for Docker containers
mstrhakr Sep 1, 2026
eda6b56
fix(icon): write icon cache and Docker Manager seeds atomically
mstrhakr Sep 1, 2026
42ea566
test(icon): remove both Docker Manager icon copies after seeding tests
mstrhakr Sep 1, 2026
3530e9d
chore(changelog): split concatenated refactoring entry
mstrhakr Sep 1, 2026
b483a55
Merge pull request #144 from mstrhakr/mstrhakr/issue129
mstrhakr Sep 1, 2026
f9d5df7
chore: sync pluginURL+README for dev branch [skip ci]
github-actions[bot] Sep 1, 2026
1f0f41d
fix(dashboard): load icon helpers on Dashboard tile (#143)
mstrhakr Sep 1, 2026
42a4ab5
fix(icon): pass data URIs straight to the browser instead of proxying
mstrhakr Sep 1, 2026
d3fe0de
Merge pull request #145 from mstrhakr/mstrhakr/issue143
mstrhakr Sep 1, 2026
bc85631
fix(identity): add fail-closed legacy project identity resolver
mstrhakr Sep 1, 2026
1117c18
fix(identity): block mutating actions until project identity is proven
mstrhakr Sep 1, 2026
32c8bc6
test(identity): add regression suite for legacy migration and fail-cl…
mstrhakr Sep 1, 2026
481157c
fix(identity): allow logs when identity unresolved
mstrhakr Sep 1, 2026
38b5280
fix(ui): show plain warning for multi-stack identity errors
mstrhakr Sep 1, 2026
d0bc116
Merge pull request #146 from mstrhakr/mstrhakr/issue140
mstrhakr Sep 1, 2026
3d9ebc9
fix(ui): escape identity chooser attributes and restore main channel
mstrhakr Sep 2, 2026
7585bf2
fix(icon): harden cache writes and reuse docker ps snapshot
mstrhakr Sep 2, 2026
cca208c
test(icon): cover icon cache regression cases
mstrhakr Sep 2, 2026
6c29ea5
fix(dashboard): improve handling of Docker container visibility durin…
mstrhakr Sep 2, 2026
e2e9ac3
refactor(dashboard): extract dashboard JS and hide Docker flash
mstrhakr Sep 2, 2026
7b3b466
feat(compose): add follow-logs functionality for live log streaming d…
mstrhakr Sep 2, 2026
f36ab73
feat(compose): add wait-for-healthy and wait-timeout settings for sta…
mstrhakr Sep 2, 2026
9e99a10
chore: sync pluginURL+README for dev branch [skip ci]
github-actions[bot] Sep 2, 2026
7f7371b
chore: update changelog for v2026.09.01.2251 [skip ci]
github-actions[bot] Sep 2, 2026
8f620c9
Release v2026.09.01.2251 [skip ci]
github-actions[bot] Sep 2, 2026
991a25f
Fix follow-logs CLI parsing and cleanup trap
mstrhakr Sep 4, 2026
16f6588
Escape dashboard stack folder attributes
mstrhakr Sep 4, 2026
7f3f706
Harden follow-session suspension and add regression checks
mstrhakr Sep 4, 2026
26e1402
fix(test): update follow-logs test to check for correct option syntax
mstrhakr Sep 4, 2026
b4618bd
chore: update changelog for v2026.09.03.2109 [skip ci]
github-actions[bot] Sep 4, 2026
5021b1c
Release v2026.09.03.2109 [skip ci]
github-actions[bot] Sep 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 11 additions & 94 deletions compose.manager.plg
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<!DOCTYPE PLUGIN [
<!ENTITY name "compose.manager">
<!ENTITY author "mstrhakr">
<!ENTITY version "2026.08.31">
<!ENTITY version "2026.09.03.2109">
<!ENTITY launch "Settings/&name;.settings">
<!ENTITY packageVER "&version;">
<!ENTITY packageMD5 "c0154198766fba55fb422b88db6382f6">
<!ENTITY pkgBUILD "2148">
<!ENTITY packageMD5 "46639645e7b624829fea5f0a4b21700c">
<!ENTITY pkgBUILD "2109">
<!ENTITY packageName "&name;-&packageVER;-noarch-&pkgBUILD;">
<!ENTITY packagefile "&packageName;.txz">
<!ENTITY github "mstrhakr/compose_plugin">
<!ENTITY pluginURL "https://raw.githubusercontent.com/&github;/main/&name;.plg">
<!ENTITY pluginURL "https://raw.githubusercontent.com/&github;/dev/&name;.plg">
<!ENTITY packageURL "https://github.com/&github;/releases/download/v&version;/&packagefile;">
<!ENTITY pluginsPATH "/boot/config/plugins">
<!ENTITY pluginLOC "&pluginsPATH;/&name;">
Expand All @@ -36,96 +36,13 @@
>

<CHANGES>
###2026.08.31
- Features (icon): cache and normalize icons, seed Docker Manager cache (#141)
- Features (icon): add debug logging for icon cache operations (#141)
- Features (icon): bundle resvg for SVG → PNG conversion, add GD to CI (#141)
- Features (tests): add GD extension to PHP setup in workflow
- Features (icon): seed Docker Manager cache during container icon resolution (#141)
- Features (icon): add fetch, convert, and DM-seed helpers (#141)
- Features (icon): add plugin icon cache path helper (#141)
- Features (settings): enhance effective command display with improved styling and structure
- Features (add-stack): inline validation, slug preview, gated Create button
- Features (add-stack): Automatic/Manual radio for Override File Management
- Features (add-stack): shared discovery-mode badge + toggle
- Features (add-stack): Compose Source radio group via shared helper
- Features (editor): promote Compose Sources &amp; Files to its own tab
- Features (editor): inline settings validation blocks Apply until resolved
- Features (editor): live effective docker compose command preview
- Features (editor): status badge + explicit toggle for compose file discovery
- Features (editor): merge External Compose Path &amp; File into Compose Source radio
- Features: enhance error handling and metadata retrieval in compose loading process
- Features: implement client-side control for compose_info publisher and enhance WebSocket management for hidden tabs
- Features: add additional ignored error messages for PHPStan analysis
- Features: implement plugin-local update check for Compose Manager to enhance image update accuracy
- Features (tests): enhance foreground operation tests for Compose Manager with modal interactions and image validation
- Features (tests): add UI operation flow tests for Compose Manager and extract shared helpers
- Features (notification): add composeSendNotification function for stack delete notifications
- Features (e2e): add Playwright end-to-end tests for Compose Manager
- Features (cache): add function to purge deleted stack caches and update UI accordingly
- Features (settings): enhance auto-check updates functionality with mode selection and custom intervals
- Features (settings-page): add functions to count changed settings and update UI accordingly
- Features (settings-page): enhance global actions and settings form handling
- Features (settings-page): enhance defaults with auto/manual verbage
- Features (settings-page): enhance settings tab with descriptive help text and rephrase section titles
- Features (settings-page): reorganize and enhance update checking section
- Features (column-layout): implement shared column layout and visibility helpers
- Bug Fixes (codeql): add sanitization for user-entered icon values in live preview
- Bug Fixes (codeql): avoid html sink in labels renderer
- Bug Fixes (build): add environment variables for RESVG version and SHA256 in Docker build
- Bug Fixes (icon): simplify PNG detection logic and enhance test environment setup for Docker Manager RAM icons
- Bug Fixes (icon): enhance PNG handling in icon processing functions and simplify tests by removing GD dependency checks
- Bug Fixes (stack): update orphan removal logic to handle stack mismatches
- Bug Fixes (icon): fix alpha transparency in GD PNG conversion; add global Clear Icon Cache button (#141)
- Bug Fixes (icon): serve icons through local cache proxy instead of remote URLs (#141)
- Bug Fixes (icon): clear plugin icon cache on clearIconCache action (#141)
- Bug Fixes (icon): guard fallback loop for invalid icons (#141)
- Bug Fixes: trim Bearer auth challenge keys and limit explode
- Bug Fixes: allow symlink deletion in composeDeleteStackFolder
- Bug Fixes: enhance WebSocket subscriber management to prevent stale connections and messages
- Bug Fixes: add composeResolveDockerHostIp function to retrieve Docker host IP across Unraid WebUI versions fixes #127
- Bug Fixes (tests): use PATH_SEPARATOR for COMPOSE_FILE in env file to support Windows development
- Bug Fixes (icons): resolve native Docker tab/Dashboard icons for local paths (#129)
- Bug Fixes: add missing Playwright dependencies installation step in E2E test setup
- Bug Fixes: ensure function definitions are wrapped in function_exists checks to prevent redeclaration errors
- Bug Fixes: remove HTML coverage report generation from PHPUnit configuration
- Bug Fixes: enhance image digest retrieval and add running container check in auto-update script to match manual update path Fixes #132
- Bug Fixes: ensure new stacks create app-managed project override templates and update tests accordingly Fixes #134
- Bug Fixes: ensure proper exit code propagation for compose commands and record operation exit status
- Bug Fixes (nchan): optimize docker stats publishing and address shared-memory exhaustion
- Bug Fixes: enhance stack update handling with improved reload queue management
- Bug Fixes (tests): ensure tests remove containers each time
- Bug Fixes (settings): remove unused referrer handling script for cleaner settings page
- Bug Fixes (settings): add debug logging functions for settings changes and state tracking
- Bug Fixes (stack): simplify removal logic in composeDeleteStackFolder function
- Bug Fixes (ui): make stack deletion dynamic without full reload
- Bug Fixes (stack): guard and harden deleteStack folder removal
- Bug Fixes (menu): centralize header menu visibility condition
- Bug Fixes (compose-pull): refactor ComposePullConfirmed function to use options object for parameters
- Bug Fixes (sync-plugin-url): correct escaping in sed command for pluginURL update
- Refactoring (build): reorganize cache path definitions in build scripts refactor(Exec): remove null coalescing for project name and directory refactor(pkg_build): enhance checksum handling in download function
- Refactoring (add-stack): section-based layout with editor vocabulary
- Refactoring (editor): split per-stack Advanced section into three subsections
- Refactoring (settings): move REMOVE_ORPHANS_DEFAULT to global settings page
- Refactoring: remove basic output style handling
- Refactoring (settings-page): reorganize settings and update help funcs
- Documentation: clarify registry authentication section in UpdateCheck
- Tests (icon): fix hardcoded cache path expectation to use COMPOSE_ICON_CACHE_DIR constant
- Tests (icon): add IconCacheTest and bootstrap COMPOSE_ICON_CACHE_DIR temp path (#141)
- Chores: update changelog for v2026.08.31.1552 [skip ci]
- Chores: update changelog for v2026.08.31.1513 [skip ci]
- Chores: update changelog for v2026.08.31.1142 [skip ci]
- Chores: update changelog for v2026.08.30.1848 [skip ci]
- Chores: update changelog for v2026.08.30.1823 [skip ci]
- Chores: update changelog for v2026.08.30.1818 [skip ci]
- Chores: update changelog for v2026.08.27.2133 [skip ci]
- Chores: update changelog for v2026.08.27.2113 [skip ci]
- Chores: update COMPOSE_VERSION to 5.5.0
- Chores: update changelog for v2026.08.23.2252 [skip ci]
- Chores: sync pluginURL+README for dev branch [skip ci]
- Chores (columns): cleanup advanced/basic view mode references and legacy logic
- Refactor IconTest and remove redundant tests; add ComposeListEndpointTest
- [View all changes](https://github.com/mstrhakr/compose_plugin/compare/v2026.07.02...v2026.08.31)
###2026.09.03.2109
- Bug Fixes (test): update follow-logs test to check for correct option syntax
- Harden follow-session suspension and add regression checks
- Escape dashboard stack folder attributes
- Fix follow-logs CLI parsing and cleanup trap
- [PR #147](https://github.com/mstrhakr/compose_plugin/pull/147)
- [beta release diff](https://github.com/mstrhakr/compose_plugin/compare/v2026.08.31...v2026.09.03.2109)
</CHANGES>

<!-- The 'pre-install' script. -->
Expand Down
44 changes: 27 additions & 17 deletions source/compose.manager/IconCache.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php
/**
* Serve a plugin-cached icon PNG to the browser.
* ?src=<url-encoded-source> — fetch/hit cache then output bytes.
* Falls back to 302 redirect for http(s) sources not yet cached.
* ?src=<url-encoded-source> — always answered from the plugin icon cache.
* ?ct=<container> — also repair that container's Docker Manager icon.
* ?refresh=1 — force a re-fetch before serving.
*/
require_once __DIR__ . '/include/Defines.php';
require_once __DIR__ . '/include/Util.php';
Expand All @@ -13,24 +14,33 @@
exit;
}

$cached = compose_fetch_icon_to_cache($src);
$containerName = isset($_GET['ct']) ? trim((string) $_GET['ct']) : '';
if ($containerName !== '' && preg_match('#^[a-zA-Z0-9][a-zA-Z0-9._-]*$#', $containerName) !== 1) {
$containerName = '';
}

if ($cached !== '' && file_exists($cached)) {
header('Content-Type: image/png');
header('Cache-Control: public, max-age=86400');
header('X-Content-Type-Options: nosniff');
readfile($cached);
exit;
$forceRefresh = isset($_GET['refresh']) && (string) $_GET['refresh'] === '1';
$cachePath = compose_get_icon_cache_path($src);

// Populate only when the cache is missing, stale, or holds non-PNG bytes; a
// failed refresh keeps serving the last known-good PNG.
if ($forceRefresh || compose_icon_cache_is_stale($src, $cachePath)) {
if (compose_fetch_icon_to_cache($src, true) === '' && compose_file_is_png($cachePath)) {
composeLogger('Icon refresh failed; serving cached copy', ['source' => $src], 'system', 'debug', 'icon-cache');
}
}

// Cache miss (conversion unsupported or fetch failed) — redirect to original
// Only follow through for http(s); anything else is a 404
if (
filter_var($src, FILTER_VALIDATE_URL) !== false
&& (strpos($src, 'https://') === 0 || strpos($src, 'http://') === 0)
) {
header('Location: ' . $src, true, 302);
if (!compose_file_is_png($cachePath)) {
header('Location: /plugins/compose.manager/images/question.png', true, 302);
exit;
}

http_response_code(404);
if ($containerName !== '') {
compose_seed_docker_manager_icon($cachePath, $containerName);
}

header('Content-Type: image/png');
header('Cache-Control: public, max-age=3600');
header('X-Content-Type-Options: nosniff');
header('Content-Length: ' . (string) filesize($cachePath));
readfile($cachePath);
2 changes: 1 addition & 1 deletion source/compose.manager/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
**Compose Manager Plus**
**Compose Manager Plus (Beta)**

A plugin for unRAID that installs Docker Compose and adds a management interface to the web UI.
Loading