Skip to content

fix: sharpen first-run error and confirmation messages#77

Merged
deveshctl merged 1 commit into
mainfrom
fix/first-run-error-hints
Jul 12, 2026
Merged

fix: sharpen first-run error and confirmation messages#77
deveshctl merged 1 commit into
mainfrom
fix/first-run-error-hints

Conversation

@deveshctl

Copy link
Copy Markdown
Owner

Summary

Improves the messages a user sees on their first run — particularly when no container engine is available — and tightens a couple of related wording inconsistencies.

Changes

  • Daemon-down errors now point at archive mode. When Docker or Podman is not reachable, both the CLI message and the interactive error screen now note that a saved-image archive can be inspected straight from disk with no engine running, so a user without a live engine is no longer dead-ended.
  • Error screen wraps long messages. The interactive error view now bounds the message to the terminal width instead of overflowing on a single line in a narrow terminal.
  • Disk-space hint is now conditional. The archive infrastructure error only suggests freeing disk space / setting TMPDIR when the underlying cause is actually a full disk (ENOSPC); other I/O failures no longer show a misleading hint.
  • --json confirmation prefix. The write confirmation now reads layerx: wrote analysis to <path>, matching the layerx: prefix used elsewhere on stderr.

Testing

  • go build ./... and go vet ./... clean.
  • Unit tests added in cmd/errors_test.go and tui/model_test.go cover the new hint text, the ENOSPC-gated disk hint, and the message wrapping.

A user whose container engine is not running hit a dead end: the error
named the failure but never mentioned that layerx can read a saved-image
archive straight from disk, with no engine required. Both the CLI message
and the interactive error screen now point at that fallback, worded
engine-agnostically so it applies to Docker and Podman alike. The error
screen also wraps long messages to the terminal width instead of letting
them overflow on one line.

The archive-infra error previously suggested freeing disk space on every
failure, including I/O errors on network mounts where that advice is
wrong. It now shows the disk-space hint only when the cause is genuinely
a full disk (ENOSPC).

Finally, the --json write confirmation now reads as a complete sentence
with the layerx: prefix used elsewhere on stderr.
@deveshctl deveshctl merged commit 40d0c3a into main Jul 12, 2026
13 checks passed
@deveshctl deveshctl deleted the fix/first-run-error-hints branch July 12, 2026 12:24
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.

1 participant