Skip to content

fix: align compose project name handling - #13500

Merged
ssongliu merged 1 commit into
dev-v2from
fix/compose-project-name
Aug 7, 2026
Merged

fix: align compose project name handling#13500
ssongliu merged 1 commit into
dev-v2from
fix/compose-project-name

Conversation

@ssongliu

@ssongliu ssongliu commented Aug 7, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI lite review requested due to automatic review settings August 7, 2026 04:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.composePathHelper translations 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
}
@ssongliu
ssongliu merged commit e7ef357 into dev-v2 Aug 7, 2026
4 checks passed
@ssongliu
ssongliu deleted the fix/compose-project-name branch August 7, 2026 04:44
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