Skip to content

Fix: Prevent docker installs / updates from blocking the GUI#2626

Merged
limetech merged 2 commits into
unraid:masterfrom
Squidly271:Fix-DockerBlocking
May 4, 2026
Merged

Fix: Prevent docker installs / updates from blocking the GUI#2626
limetech merged 2 commits into
unraid:masterfrom
Squidly271:Fix-DockerBlocking

Conversation

@Squidly271
Copy link
Copy Markdown
Contributor

@Squidly271 Squidly271 commented Apr 26, 2026

Allows other browser tabs to be able to access the WebGUI while an install / update of a container is in progress. AddContainer.page handles that. The code within CreateContainer.php preserves existing behaviour by blocking all clicks / navigations on the tab installing the container until after its finished, as navigating away from the page while the install is in progress does not abort the installation.

Summary by CodeRabbit

  • New Features

    • Added a fullscreen blocking overlay ("Working… please wait") during container create/update flows to prevent accidental interaction while operations run.
  • Bug Fixes

    • Released session locks earlier during create/update so concurrent browser tabs/requests remain responsive.
    • Overlay is now enabled/disabled appropriately for success, failure, and streaming update scenarios.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f058d97e-5ecc-48e6-9b81-76f8a2b0c32b

📥 Commits

Reviewing files that changed from the base of the PR and between 2511ed1 and 0700194.

📒 Files selected for processing (2)
  • emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
  • emhttp/plugins/dynamix.docker.manager/sheets/AddContainer.css
✅ Files skipped from review due to trivial changes (1)
  • emhttp/plugins/dynamix.docker.manager/sheets/AddContainer.css
🚧 Files skipped from review as they are similar to previous changes (1)
  • emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php

Walkthrough

The patch releases the PHP session before running container-creation logic, adds a server-side JS helper to toggle a fullscreen UI blocker in the parent document, and includes a new stylesheet for that blocker used during create/update flows.

Changes

Cohort / File(s) Summary
Session Management
emhttp/plugins/dynamix.docker.manager/AddContainer.page
Calls session_write_close() prior to including CreateDocker.php to release the PHP session lock before long-running create operations.
UI Blocker & Create/Update Flow
emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
Adds dockerUIBlockerScript($enable) generating JS to inject/remove a parent-window full-screen overlay; loads AddContainer.css; enables blocker for real (non-dry-run) creates and echo-driven updates; disables blocker on image-pull failure and after execCommand/update loop completion.
Stylesheet
emhttp/plugins/dynamix.docker.manager/sheets/AddContainer.css
Adds .docker-install-blocker CSS: fixed fullscreen overlay, top z-index, and cursor: wait to block UI during operations.

Sequence Diagram(s)

sequenceDiagram
    participant Browser as Browser Tab
    participant Parent as Parent Window (UI)
    participant Server as PHP Server (CreateDocker)

    Browser->>Server: POST create/update request
    Server->>Server: session_write_close()
    Server->>Parent: emit dockerUIBlockerScript(enable=true)
    Parent-->>Parent: inject `.docker-install-blocker` overlay (cursor wait)
    Server->>Server: perform image pull / execCommand / update stream
    alt image pull fails
        Server->>Parent: emit dockerUIBlockerScript(enable=false)
        Parent-->>Parent: remove overlay
    else success / completion
        Server->>Parent: emit dockerUIBlockerScript(enable=false)
        Parent-->>Parent: remove overlay
    end
    Server->>Browser: respond with completion/log stream
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 I closed the session, light and fleet,
A blocker rose to guard the seat,
No clicks could stir the Docker's art,
Till logs ran dry and tasks depart,
Then gentle leaves let users start. 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: preventing Docker installs/updates from blocking the GUI, which matches the primary objectives of releasing session locks and adding UI blockers.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 26, 2026

🔧 PR Test Plugin Available

A test plugin has been generated for this PR that includes the modified files.

Version: 2026.04.27.0317
Build: View Workflow Run

📥 Installation Instructions:

Install via Unraid Web UI:

  1. Go to Plugins → Install Plugin
  2. Copy and paste this URL:
https://preview.dl.unraid.net/pr-plugins/pr-2626/webgui-pr-2626.plg
  1. Click Install

Alternative: Direct Download

⚠️ Important Notes:

  • Testing only: This plugin is for testing PR changes
  • Backup included: Original files are automatically backed up
  • Easy removal: Files are restored when plugin is removed
  • Conflicts: Remove this plugin before installing production updates
  • Post-merge behavior: This preview stays available after merge until preview storage expires or it is manually cleaned up

📝 Modified Files:

Click to expand file list
emhttp/plugins/dynamix.docker.manager/AddContainer.page
emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php
emhttp/plugins/dynamix.docker.manager/sheets/AddContainer.css

🔄 To Remove:

Navigate to Plugins → Installed Plugins and remove webgui-pr-2626, or run:

plugin remove webgui-pr-2626

🤖 This comment is automatically generated and will be updated with each new push to this PR.

@Squidly271 Squidly271 added the 7.3 label Apr 26, 2026
@Squidly271 Squidly271 marked this pull request as draft April 26, 2026 20:02
@Squidly271 Squidly271 marked this pull request as ready for review April 27, 2026 17:26
@limetech limetech merged commit 5d477bb into unraid:master May 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants