fix: align compose project name handling - #13500
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aligns Docker Compose project-name handling between the UI and agent by clarifying the project-name priority rules to users and by resolving the effective project name using docker compose config while supporting an explicit env file.
Changes:
- Frontend: adjust compose create/edit form so the “name” input is only shown for
from=path, and enhance the path helper text to reflect project-name fallback behavior. - i18n: update
container.composePathHelpertranslations to include an additional placeholder describing the fallback name. - Agent: introduce env-aware compose command construction and refactor compose creation/testing to resolve and de-duplicate project names consistently (including reading a top-level
name:from compose config).
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/views/container/compose/index.vue | Updates compose form fields/labels and helper text to match project-name resolution rules. |
| frontend/src/lang/modules/zh.ts | Updates composePathHelper message to include fallback-name explanation. |
| frontend/src/lang/modules/zh-Hant.ts | Updates composePathHelper message to include fallback-name explanation. |
| frontend/src/lang/modules/tr.ts | Updates composePathHelper message to include fallback-name explanation. |
| frontend/src/lang/modules/ru.ts | Updates composePathHelper message to include fallback-name explanation. |
| frontend/src/lang/modules/pt-br.ts | Updates composePathHelper message to include fallback-name explanation. |
| frontend/src/lang/modules/ms.ts | Updates composePathHelper message to include fallback-name explanation. |
| frontend/src/lang/modules/lo.ts | Updates composePathHelper message to include fallback-name explanation. |
| frontend/src/lang/modules/ko.ts | Updates composePathHelper message to include fallback-name explanation. |
| frontend/src/lang/modules/ja.ts | Updates composePathHelper message to include fallback-name explanation. |
| frontend/src/lang/modules/fa.ts | Updates composePathHelper message to include fallback-name explanation. |
| frontend/src/lang/modules/es-es.ts | Updates composePathHelper message to include fallback-name explanation. |
| frontend/src/lang/modules/en.ts | Updates composePathHelper message to include fallback-name explanation. |
| agent/app/service/runtime_utils.go | Adds env-aware compose command builder to support --env-file for compose config resolution. |
| agent/app/service/container_compose.go | Refactors compose create/test flow to resolve project name with env support and adds duplicate checks by name/path. |
| agent/app/repo/common.go | Adds a reusable WithByPath DB option for path-based record lookup. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+398
to
+404
| if err := os.Mkdir(dir, os.ModePerm); err != nil { | ||
| if !errors.Is(err, os.ErrExist) { | ||
| return nil, err | ||
| } | ||
| } else { | ||
| created = true | ||
| } |
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.
No description provided.