fix(sidebar): resolve stacks showing unknown status when compose name field is set (#416)

* fix(sidebar): resolve stacks showing unknown status when compose name field is set

The bulk status endpoint matched containers to stacks using the
com.docker.compose.project Docker label, assuming it equals the stack
directory name. When a compose file declares a top-level name: field,
Docker Compose uses that as the project name instead, causing the
label lookup to miss those containers entirely.

The fix parses each stack's compose file to build a project-name-to-
directory mapping (cached with 60s TTL to avoid re-parsing on every
poll), with a fallback to the working_dir label for edge cases.
Also extracts compose file name variants into a shared constant and
fixes an ordering inconsistency in smartFallback.

* docs: add troubleshooting entry for stack status mismatch with name field
This commit is contained in:
Anso
2026-04-07 01:44:13 -04:00
committed by GitHub
parent c79f58d8dd
commit 88011e1b16
3 changed files with 83 additions and 9 deletions
+10
View File
@@ -222,6 +222,16 @@ To re-test connectivity after making changes, open **Profile > Settings > Nodes*
---
## Stack shows "--" instead of UP even though containers are running
**Symptom:** A stack appears in the sidebar with no status indicator (shown as "--"), but clicking on it reveals running containers with active stats.
**Cause:** This was a bug in versions before 0.40.0 where the sidebar status check matched containers by the Docker Compose project name, assuming it equals the stack's directory name. If your compose file declares a top-level `name:` field (e.g. `name: my-custom-name`), Docker Compose uses that as the project label instead, causing the mismatch.
**Fix:** Update to Sencho 0.40.0 or later. The status check now reads the `name:` field from compose files and matches correctly regardless of whether a custom project name is set.
---
## Network creation fails
**Symptom:** Clicking **Create** in the Create Network dialog returns an error about a missing or invalid name.