Skip to content

fix(dashboard): load icon helpers on Dashboard tile (#143) - #145

Merged
mstrhakr merged 2 commits into
devfrom
mstrhakr/issue143
Sep 1, 2026
Merged

fix(dashboard): load icon helpers on Dashboard tile (#143)#145
mstrhakr merged 2 commits into
devfrom
mstrhakr/issue143

Conversation

@mstrhakr

@mstrhakr mstrhakr commented Sep 1, 2026

Copy link
Copy Markdown
Owner

composeIconSrc/composeIconFallback lived in composeManagerMain.js, which is only
loaded on the Compose/Docker tab. On the Dashboard the stack render loop threw a
ReferenceError, so the tile stayed on 'Loading...' and compose containers were
never hidden from the Docker tile.

Move the icon helpers into composeIcons.js and load it from both the Compose page
and the dashboard tile. Also run container hiding before the render loop so a
render failure can no longer disable it.

Copilot AI lite review requested due to automatic review settings September 1, 2026 16:56
composeIconSrc/composeIconFallback lived in composeManagerMain.js, which is only
loaded on the Compose/Docker tab. On the Dashboard the stack render loop threw a
ReferenceError, so the tile stayed on 'Loading...' and compose containers were
never hidden from the Docker tile.

Move the icon helpers into composeIcons.js and load it from both the Compose page
and the dashboard tile. Also run container hiding before the render loop so a
render failure can no longer disable it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Several verified issues need addressing (data-URI proxying via query string, hash-compare edge case, repeated docker ps shell-outs, test cleanup gaps, and an out-of-scope pluginURL branch change).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR addresses a Dashboard tile regression where icon helper functions were not loaded (causing a ReferenceError and a stuck “Loading…” tile), and makes container-hiding run before the render loop so hiding can’t be disabled by a render failure. It also expands the icon caching/serving path and adds Docker Manager icon seeding/repair behaviors.

Changes:

  • Extract icon helper functions into a shared composeIcons.js and load it on both the Compose page and Dashboard tile.
  • Adjust Dashboard tile flow so compose-managed container hiding runs before stack rendering.
  • Extend icon cache/serve + Docker Manager icon seeding/repair logic, and add/adjust related unit tests and constants.
File summaries
File Description
tests/unit/StackInfoTest.php Updates DM icon seeding tests and adds new repair/metadata tests.
tests/bootstrap.php Adds test constants for Docker Manager icon/cache paths.
source/compose.manager/README.md Removes “(Beta)” from the name.
source/compose.manager/javascript/composeManagerMain.js Switches icon resolution to shared helpers and passes container name.
source/compose.manager/javascript/composeIcons.js New shared browser-side icon helper module for Compose + Dashboard.
source/compose.manager/include/Util.php Adds PNG validation + stale-cache checks; enhances cache write safety; adds DM seeding/metadata repair and sync hooks.
source/compose.manager/include/Exec.php Seeds Docker Manager icons during container icon resolution.
source/compose.manager/include/Defines.php Adds constants for DM icon dirs/metadata file and icon label key.
source/compose.manager/include/ComposeManager.php Loads composeIcons.js on the Compose page.
source/compose.manager/IconCache.php Makes icon serving consistently cache-backed, supports refresh, and optional DM repair via ct.
source/compose.manager/compose.manager.dashboard.page Loads composeIcons.js, passes container name to icon helper, and runs hiding pre-render.
compose.manager.plg Updates version/build metadata and switches pluginURL branch target.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread source/compose.manager/javascript/composeIcons.js
IconCache.php?src=<data URI> puts the whole base64 payload in the query string,
which trips browser/nginx URL length limits and breaks the icon. Data URIs are
already inline, so proxying gains nothing; Docker Manager seeding for them still
happens server-side in Exec.php.
@mstrhakr
mstrhakr merged commit d3fe0de into dev Sep 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants