compose/cmd/compose
Nicolas De Loof 9fc38cce0e refactor(display): rebuild the TTY progress renderer on a model/layout/screen split
The TTY renderer accumulated display-corruption fixes (truncation of
details, then progress sizes, then task ids; timer alignment; rune-based
measurement) that each patched one symptom of the same structural gap:
nothing guaranteed a rendered line fits the terminal, and once a line
wraps, cursor arithmetic desyncs and the block corrupts.

Replace it with three separable units:

- tty_model.go: pure event reducer with an injected clock, preserving
  first-parent-wins updates, monotonic progress and header counters
- tty_layout.go: pure (model, size, now) -> lines function; all widths
  are measured in terminal cells (go-runewidth, so CJK is correct) on
  plain text before coloring, and every line is clipped to the terminal
  width by construction, status text included
- tty_screen.go: diff-based repaint; unchanged rows are skipped,
  identical frames write nothing, a frame is a single Write; a shrinking
  terminal abandons the block instead of moving the cursor over reflowed
  rows

The writer coordinates them behind a mutex and stops the refresh
goroutine through context cancellation, so Done cannot block when the
operation context was cancelled first (Ctrl-C during pull). The spinner
frame is derived from the clock instead of advancing on every call, and
truncation can no longer split multi-byte runes. Visual output is
unchanged: the snapshot test reproduces the previous renderer's golden
output character for character.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-09-09 16:50:05 +02:00
..
alpha.go
attach.go
backend.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
bridge.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
bridge_test.go fix(compose): reject unknown subcommands under bridge/transformations 2026-08-31 17:08:47 +02:00
build.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
build_test.go fix(build): hand unresolved 'auto' progress mode to bake 2026-09-07 14:11:12 +02:00
commit.go
completion.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
compose.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
compose_oci_test.go
compose_progress_test.go refactor(display): rebuild the TTY progress renderer on a model/layout/screen split 2026-09-09 16:50:05 +02:00
compose_test.go
config.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
config_test.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
cp.go
create.go chore: inline needless single-use helpers 2026-08-14 22:49:53 +02:00
down.go
events.go fix(events): validate service names before subscribing to events 2026-08-18 10:48:59 +02:00
exec.go
export.go
generate.go
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
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
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 feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
pull.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
pullOptions_test.go
push.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
remove.go
restart.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
run.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
scale.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
start.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
stats.go
stop.go refactor: fix lint issues from cleanup changes 2026-05-12 11:31:40 +02:00
top.go
top_test.go
unsupported_attributes.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
unsupported_attributes_test.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +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
version_test.go
viz.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00
viz_test.go
volumes.go
wait.go
watch.go feat(compose): warn on unsupported compose-file attributes 2026-09-09 16:32:04 +02:00