Skip to content

feat: add --app-name flag and fix macOS test symlink issue#2914

Merged
dgageot merged 2 commits into
docker:mainfrom
dgageot:board/d313b5e891bbb41a
May 28, 2026
Merged

feat: add --app-name flag and fix macOS test symlink issue#2914
dgageot merged 2 commits into
docker:mainfrom
dgageot:board/d313b5e891bbb41a

Conversation

@dgageot
Copy link
Copy Markdown
Member

@dgageot dgageot commented May 28, 2026

The docker agent run command now accepts an --app-name flag to override the default "docker agent" label shown in the TUI. This string is passed to the existing tui.WithAppName option, affecting the status bar, terminal window title, and "/exit" notifications.

We also fixed an unrelated test issue in pkg/snapshot/snapshot_test.go. The bootstrapRepo helper now resolves symlinks via filepath.EvalSymlinks on its temporary directory. This ensures test assertions pass on macOS, where t.TempDir() returns /var/folders/... (a symlink to /private/var/folders/...), while git rev-parse --show-toplevel returns the canonical resolved path. This unblocks TestTrackPatchFromSubfolder and TestOpenCanonicalizesSymlinkedDirectory.

dgageot added 2 commits May 28, 2026 14:12
t.TempDir() returns /var/folders/... on macOS, which is a symlink to
/private/var/folders/.... git rev-parse --show-toplevel resolves the
symlink, so test assertions comparing the temp dir to repo paths failed.
Resolve the symlink up front so all paths are canonical.
@dgageot dgageot requested a review from a team as a code owner May 28, 2026 12:36
Copy link
Copy Markdown

@docker-agent docker-agent left a comment

Choose a reason for hiding this comment

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

Assessment: 🟢 APPROVE

This is a clean, focused PR. The --app-name flag is correctly added to the runExecFlags struct and wired through tuiOpts() with an appropriate empty-string guard. The filepath.EvalSymlinks fix in the snapshot test is correct — there is no variable shadowing (the if-init err is scoped to that clause only), and t.TempDir() guarantees the directory exists for the test lifetime.

No confirmed bugs found in the changed code.

@aheritier aheritier added area/cli CLI commands, flags, output formatting area/testing Test infrastructure, CI/CD, test runners, evaluation area/tui For features/issues/fixes related to the TUI kind/feat PR adds a new feature (maps to feat: commit prefix) labels May 28, 2026
@dgageot dgageot merged commit 55b113d into docker:main May 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/cli CLI commands, flags, output formatting area/testing Test infrastructure, CI/CD, test runners, evaluation area/tui For features/issues/fixes related to the TUI kind/feat PR adds a new feature (maps to feat: commit prefix)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants