compose/cmd/compose
Nicolas De Loof cccb9f1f7e cli: display.Mode always resolves to the mode actually rendered
The display.Mode package global was left as "auto" on the most common
path (auto mode with an interactive or redirected terminal), so readers
like `up`'s NavigationMenu gate saw an unresolved value; that gate also
compared against the string literal "plain" instead of the constant.
applyDisplayMode wrote a mode that selectEventProcessor could then
contradict (--ansi always with a redirected stderr rendered Plain while
Mode said tty).

selectEventProcessor becomes the single resolution point: every branch
assigns the mode matching the renderer it returns, so after command
setup the global never holds ModeAuto. applyDisplayMode loses its
redundant writes and its misleading name (now applyAnsiMode); the
contract is documented on the Mode variable, and the existing
selectEventProcessor tests now pin the resolved mode for every branch.

Side effect, deliberate: with stderr redirected (auto -> plain
rendering) the navigation menu is no longer offered; it used to slip
through because Mode still read "auto".

Part of #14074 (section E).

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-08-20 15:10:15 +02:00
..
alpha.go Setup Compose service using functional parameters 2025-10-24 18:24:21 +02:00
attach.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
backend.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
bridge.go fix(bridge): validate arguments of bridge subcommands 2026-08-13 11:45:46 +02:00
bridge_test.go fix(bridge): validate arguments of bridge subcommands 2026-08-13 11:45:46 +02:00
build.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
commit.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
completion.go fix: tolerate missing env file on scale, watch and shell completion 2026-07-30 11:38:47 +02:00
compose.go cli: display.Mode always resolves to the mode actually rendered 2026-08-20 15:10:15 +02:00
compose_oci_test.go Fix invalid path error when using OCI artifacts on Windows 2026-02-09 09:15:37 +01:00
compose_progress_test.go cli: display.Mode always resolves to the mode actually rendered 2026-08-20 15:10:15 +02:00
compose_test.go update compose-go to version using immutable Project functions 2024-01-11 10:44:42 +01:00
config.go chore: inline needless single-use helpers 2026-08-14 22:49:53 +02:00
config_test.go fix(config): pin type:image volume sources and pre_start hook images 2026-07-24 15:33:21 +02:00
cp.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
create.go chore: inline needless single-use helpers 2026-08-14 22:49:53 +02:00
down.go add service name completion to down command 2026-01-05 09:32:39 +01:00
events.go fix(events): validate service names before subscribing to events 2026-08-18 10:48:59 +02:00
exec.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
export.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
generate.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
hooks.go feat: pre-filter Desktop Logs view by Compose project 2026-05-18 17:28:03 +02:00
hooks_test.go feat: pre-filter Desktop Logs view by Compose project 2026-05-18 17:28:03 +02:00
images.go go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2 2026-02-11 12:32:37 +01:00
kill.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
list.go chore: inline needless single-use helpers 2026-08-14 22:49:53 +02:00
logs.go docs: compose logs: add more links for flag descriptions 2026-06-10 09:36:31 +02:00
options.go chore: inline needless single-use helpers 2026-08-14 22:49:53 +02:00
options_test.go Skip validation when extracting config variables 2026-06-12 15:34:20 +02:00
pause.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
port.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
ps.go fix(ps): honor psFormat from Docker CLI config when no --format flag given 2026-08-20 14:05:34 +02:00
publish.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
pull.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
pullOptions_test.go update compose-go to version using immutable Project functions 2024-01-11 10:44:42 +01:00
push.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
remove.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
restart.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
run.go fix: address image-identity review findings 2026-08-13 12:03:29 +02:00
scale.go api: ScaleOptions carries the replica counts it always pretended to 2026-08-20 10:16:06 +02:00
start.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
stats.go go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2 2026-02-11 12:32:37 +01:00
stop.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
top.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
top_test.go fix mixed assertion libraries in tests 2026-03-31 17:32:51 +02:00
up.go cli: display.Mode always resolves to the mode actually rendered 2026-08-20 15:10:15 +02:00
up_test.go test: cover up remote-stack variable prompt 2026-06-12 15:34:20 +02:00
version.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
version_test.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
viz.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
viz_test.go fix mixed assertion libraries in tests 2026-03-31 17:32:51 +02:00
volumes.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
wait.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
watch.go fix: tolerate missing env file on scale, watch and shell completion 2026-07-30 11:38:47 +02:00