compose/cmd/display
Guillaume Lours ef3238ab1f
Some checks are pending
ci / validate (lint) (push) Waiting to run
ci / validate (validate-docs) (push) Waiting to run
ci / validate (validate-go-mod) (push) Waiting to run
ci / validate (validate-headers) (push) Waiting to run
ci / binary (push) Waiting to run
ci / binary-finalize (push) Blocked by required conditions
ci / bin-image-test (push) Waiting to run
ci / test (push) Waiting to run
ci / e2e (plugin, oldstable) (push) Waiting to run
ci / e2e (standalone, oldstable) (push) Waiting to run
ci / e2e (plugin, stable) (push) Waiting to run
ci / e2e (standalone, stable) (push) Waiting to run
ci / coverage (push) Blocked by required conditions
ci / release (push) Blocked by required conditions
merge / bin-image-prepare (push) Waiting to run
merge / bin-image (push) Blocked by required conditions
merge / module-image (push) Waiting to run
merge / desktop-edge-test (push) Blocked by required conditions
Scorecards supply-chain security / Scorecards analysis (push) Waiting to run
fix(progress): measure taskID width in runes, not bytes
maxBeforeStatusWidth used len(l.taskID) (bytes) while applyPadding
used utf8.RuneCountInString (runes). For ASCII task IDs the two
agree and no symptom surfaces, but a taskID containing multi-byte
UTF-8 chars (CJK, emoji, accented Latin) reported a width larger
than its visual columns. computeOverflow then triggered truncation
where none was needed, and truncateLongestTaskID's byte-indexed
slice could land mid-multibyte sequence, corrupting the displayed
string.

Align the two measurements on rune count.

Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
2026-06-15 15:00:57 +02:00
..
colors.go move progress UI components into cmd 2025-11-12 11:17:28 +01:00
dryrun.go make DRYRUN_PREFIX a display attribute, move DryRunClient out of pkg/api 2025-11-12 11:17:28 +01:00
json.go next release will be major version v5.x 2025-11-13 09:32:43 +01:00
json_test.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
mode.go move progress UI components into cmd 2025-11-12 11:17:28 +01:00
plain.go next release will be major version v5.x 2025-11-13 09:32:43 +01:00
quiet.go next release will be major version v5.x 2025-11-13 09:32:43 +01:00
spinner.go move progress UI components into cmd 2025-11-12 11:17:28 +01:00
tty.go fix(progress): measure taskID width in runes, not bytes 2026-06-15 15:00:57 +02:00
tty_test.go fix(progress): measure taskID width in runes, not bytes 2026-06-15 15:00:57 +02:00