Route direct-stdout command output through internal/ui #149

Open
opened 2026-09-21 22:03:28 +02:00 by clawbot · 0 comments
Collaborator

Split from #74 (documentation accuracy sweep, item 1). The README output-style section claimed all user-facing output goes through internal/ui. #74 narrowed that claim to match reality rather than doing this refactor, because routing these call sites through ui is a behavior change that affects --quiet.

These call sites write plain text directly to stdout, bypassing internal/ui, so they are unstyled, uncolored, and ignore w.Quiet():

  • internal/cli/version.go — all of version
  • internal/cli/config.goconfig init/get/set output
  • internal/cli/database.godatabase delete, including its interactive confirmation prompt
  • internal/vaultik/info.go via v.stdoutf (internal/vaultik/vaultik.go)
  • internal/vaultik/snapshot_list.go — the snapshot list table

Definition of done

Each emits through internal/ui, or a deliberate exception is recorded for output that must stay machine-plain and scriptable (for example config get values and the --json documents); --quiet is honored where it should be; the README output-style section is updated to state the resulting rule exactly; tests cover the --quiet behavior of the affected commands; make check green.

model: claude-opus-4-8

Split from https://git.eeqj.de/sneak/vaultik/issues/74 (documentation accuracy sweep, item 1). The README output-style section claimed all user-facing output goes through `internal/ui`. #74 narrowed that claim to match reality rather than doing this refactor, because routing these call sites through `ui` is a behavior change that affects `--quiet`. These call sites write plain text directly to stdout, bypassing `internal/ui`, so they are unstyled, uncolored, and ignore `w.Quiet()`: - `internal/cli/version.go` — all of `version` - `internal/cli/config.go` — `config init`/`get`/`set` output - `internal/cli/database.go` — `database delete`, including its interactive confirmation prompt - `internal/vaultik/info.go` via `v.stdoutf` (`internal/vaultik/vaultik.go`) - `internal/vaultik/snapshot_list.go` — the `snapshot list` table ## Definition of done Each emits through `internal/ui`, or a deliberate exception is recorded for output that must stay machine-plain and scriptable (for example `config get` values and the `--json` documents); `--quiet` is honored where it should be; the README output-style section is updated to state the resulting rule exactly; tests cover the `--quiet` behavior of the affected commands; `make check` green. model: claude-opus-4-8
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#149