Conversation
…and rephrase section titles
…te UI accordingly
…ons object for parameters
…lection and custom intervals
…Test - Simplified IconTest by consolidating setup and teardown processes, removing unnecessary comments, and streamlining icon file handling. - Removed SettingsBackupTest, SettingsPageTest, and StackInfoSourceTest as they were deemed unnecessary. - Introduced ComposeListEndpointTest to validate the rendering of Docker Compose stacks and ensure proper handling of empty states.
- Created package.json and package-lock.json for e2e tests with Playwright dependencies. - Added Playwright configuration file (playwright.config.ts) for test setup. - Implemented script to create storage state for authentication (create-storage-state.mjs). - Developed comprehensive end-to-end tests for Compose Manager lifecycle and read-only checks. - Included TypeScript configuration for test files.
…lete notifications
…act shared helpers
…ith modal interactions and image validation
…nce image update accuracy
…hance WebSocket management for hidden tabs
There was a problem hiding this comment.
Pull request overview
This PR merges dev into main and focuses on improving Compose Manager reliability across stack lifecycle operations, update detection accuracy, UI column/layout behavior, and expanding automated coverage (unit + Playwright E2E).
Changes:
- Stabilizes stack operations by propagating real compose exit codes, hardening stack deletion, and refreshing/purging related caches.
- Improves update detection correctness (including plugin-local update checking and auto-update digest comparison + “only recreate when running” guard).
- Adds server-driven column layout bootstrapping and expands E2E testing utilities/specs plus supporting docs/scripts.
Reviewed changes
Copilot reviewed 49 out of 51 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/StackInfoTest.php | Updates stack-creation expectations around always creating override templates. |
| tests/unit/StackInfoSourceTest.php | Removes brittle source-string assertions. |
| tests/unit/SettingsPageTest.php | Removes settings-page source assertions. |
| tests/unit/SettingsBackupTest.php | Removes extensive settings backup/restore markup assertions. |
| tests/unit/IconTest.php | Reworks endpoint-level icon tests to assert headers/bytes from real include. |
| tests/unit/ExecActionsTest.php | Adds deleteStack traversal rejection coverage + stronger folder deletion assertion. |
| tests/unit/ComposeUtilTest.php | Updates expectations for ttyd viewer URL behavior. |
| tests/unit/ComposeManagerMainSourceTest.php | Removes wide set of source-level regression checks for main page + JS. |
| tests/unit/ComposeListHtmlTest.php | Removes source-level HTML structure tests for ComposeList markup. |
| tests/unit/ComposeListEndpointTest.php | Adds endpoint-level ComposeList rendering tests (default/empty state). |
| tests/unit/compose.bats | Adds bats checks for compose.sh exit propagation + autoupdate digest/running guards. |
| tests/unit/AutoupdateRunnerTest.php | Updates mocks/config to align with ttyd-only output routing. |
| tests/e2e/tsconfig.json | Adds strict TS config for Playwright E2E suite. |
| tests/e2e/tests/helpers/composeE2eHelpers.ts | Adds shared helpers for CSRF/form posts and lifecycle waits/cleanup. |
| tests/e2e/tests/compose-ui-operation-flows.spec.ts | Adds bg/fg UI flow tests capturing ComposeUtil POST payloads. |
| tests/e2e/tests/compose-readonly.spec.ts | Adds guarded read-only smoke checks that abort on POST writes. |
| tests/e2e/tests/compose-isolated-lifecycle.spec.ts | Adds opt-in mutation-safe isolated lifecycle and settings round-trip tests. |
| tests/e2e/scripts/create-storage-state.mjs | Adds headless storage-state generator for environments without headed login. |
| tests/e2e/README.md | Documents E2E safety model, setup, and mutation opt-in. |
| tests/e2e/playwright.config.ts | Introduces Playwright config (workers=1, baseURL/storageState env-driven). |
| tests/e2e/package.json | Adds Playwright/TypeScript devDependencies and scripts. |
| tests/e2e/package-lock.json | Locks Playwright/TS dependency graph for reproducible installs. |
| tests/e2e/.gitignore | Ignores node_modules, reports, results, and auth state artifacts. |
| tests/e2e/.auth/.gitkeep | Keeps auth directory present without committing secrets/state. |
| tests/bootstrap.php | Adds COMPOSE_SKIP_TTYD_EXEC for test mode and removes OUTPUTSTYLE defaults. |
| source/compose.manager/sheets/ComboButton.css | Updates comments and supports hide-col-* column visibility rules. |
| source/compose.manager/scripts/header_menu_visibility.sh | Adds reusable header-menu visibility resolver script. |
| source/compose.manager/scripts/compose.sh | Adds explicit operation exit-code propagation for mutating commands. |
| source/compose.manager/scripts/compose_autoupdate.sh | Fixes digest comparison (config --images + .Id) and skips up -d when not running. |
| source/compose.manager/README.md | Updates plugin branding text to “(Beta)”. |
| source/compose.manager/nchan/compose_info | Fixes #130 by filtering docker stats to compose IDs and coalescing publishes. |
| source/compose.manager/javascript/composeColumnCustomizer.js | Uses server bootstrap for column model/layout; reapply on list refresh. |
| source/compose.manager/include/Util.php | Adds guarded stack-folder deletion helper and notification helper; ensures override template creation. |
| source/compose.manager/include/UpdateCheck.php | Adds plugin-local update checker using platform-specific image config digests. |
| source/compose.manager/include/Helpers.php | Simplifies compose command routing to ttyd (removes legacy compose.sh query URLs). |
| source/compose.manager/include/Exec.php | Centralizes column layout IO, adds compose_info publisher ensure, improves deleteStack + cache purge. |
| source/compose.manager/include/ComposeManager.php | Server-renders table headers/order + CSS vars from saved column layout bootstrap. |
| source/compose.manager/include/ComposeList.php | Server-renders stack rows in saved column order and adds structured row-failure payloads. |
| source/compose.manager/include/ColumnLayout.php | Introduces shared column defaults/normalization/width fraction model for server + client. |
| source/compose.manager/default.cfg | Removes OUTPUTSTYLE default. |
| source/compose.manager/Compose.page | Uses header_menu_visibility.sh to decide header menu visibility. |
| source/compose.manager/compose.manager.page | Uses header_menu_visibility.sh for the complementary menu condition. |
| README.md | Updates feature list to reflect ttyd-only terminal and new column customizer/layout model. |
| playwright.sh | Adds a deploy+run helper for Playwright E2E with auth-state generation support. |
| phpunit.xml | Removes HTML coverage output config (keeps clover/text). |
| phpstan.neon | Adjusts ignore patterns for new external symbol usage and runtime method_exists checks. |
| docs/testing.md | Documents Playwright E2E setup/run flow and fixes code-fence formatting. |
| compose.manager.plg | Updates pluginURL entity (branch reference changed in this PR). |
| .github/workflows/sync-plugin-url.yml | Adjusts sed escaping to correctly update pluginURL entity line. |
Files not reviewed (1)
- tests/e2e/package-lock.json: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+243
to
+257
| $targetReal = realpath($targetPath); | ||
| $meta['targetReal'] = $targetReal; | ||
| if ($targetReal === false || !Path::isAllowedPath($targetReal, [$composeRootReal]) || $targetReal === $composeRootReal) { | ||
| $errorMessage = 'Invalid stack path resolved for deletion.'; | ||
| return false; | ||
| } | ||
|
|
||
| if (is_link($targetPath)) { | ||
| if (!@unlink($targetPath) && file_exists($targetPath)) { | ||
| $errorMessage = 'Failed to remove stack symlink.'; | ||
| return false; | ||
| } | ||
| $appendRemovedPath($targetPath . ' [symlink]'); | ||
| return true; | ||
| } |
Comment on lines
+216
to
+220
| $args = []; | ||
| foreach (explode(',', $m[1]) as $arg) { | ||
| $kv = explode('=', $arg); | ||
| $args[$kv[0]] = trim($kv[1] ?? '', "\" \r\n"); | ||
| } |
| <!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"> |
| $header = ['Accept: ' . $accept]; | ||
| $basicUserPwd = null; | ||
|
|
||
| // Bearer challenge → fetch a token scoped to repository:<repo>:pull. |
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.
Summary
This PR merges
devintomainwith a reliability-focused update across stack operations, update detection, settings UX, and test coverage.The goal is to reduce stale or false states, make automation safer, clarify operator controls, and increase confidence through broader regression coverage.
Changes
1. Stack lifecycle reliability
2. Update detection and runtime behavior
3. Settings page modernization
4. Test strategy expansion
Bug Fixes
livemode — exhausts nginx nchan shared memory in ~70s #130: preventscompose_infofrom publishing full payloads per stats line in live mode, avoiding nchan shared-memory exhaustion.up -d: the digest check reads container images, whichpullcan't change #132: corrects the auto-update digest comparison and skipsup -dwhen the stack is not running.compose.shswallows the real exit code — autostart silently logs "success" for stacks that failed to start #135: preserves the real compose command exit status instead of reporting a false success.Scope
devnot inmainValidation