The terminal log handler (internal/log/tty_handler.go) always wrote ANSI color, so NO_COLOR=1 vaultik snapshot create still printed colored log lines even though status lines went plain.
TTYHandler now carries a color flag, set from NO_COLOR with the same test internal/ui uses (os.Getenv("NO_COLOR") != ""). Every color code goes through a paint helper that returns plain text when color is off, so the message line and each attribute render without escapes. The handler is only ever chosen for a terminal, so TTY-ness is not re-checked.
The README's color sentence now states the same rule governs the colorized log lines internal/log writes to a terminal.
TestTTYHandlerRespectsNoColor sets NO_COLOR and asserts the output carries no ANSI escape; it fails on current next.
Run usage: DeepSeek V4 Pro through OpenRouter, 309,946 input, 11,934 output, 7,734 reasoning and 3,290,343 cache-read tokens; cost $0.44.
Model: deepseek-v4-pro
The terminal log handler (`internal/log/tty_handler.go`) always wrote ANSI color, so `NO_COLOR=1 vaultik snapshot create` still printed colored log lines even though status lines went plain.
`TTYHandler` now carries a `color` flag, set from `NO_COLOR` with the same test `internal/ui` uses (`os.Getenv("NO_COLOR") != ""`). Every color code goes through a `paint` helper that returns plain text when color is off, so the message line and each attribute render without escapes. The handler is only ever chosen for a terminal, so TTY-ness is not re-checked.
The README's color sentence now states the same rule governs the colorized log lines `internal/log` writes to a terminal.
`TestTTYHandlerRespectsNoColor` sets `NO_COLOR` and asserts the output carries no ANSI escape; it fails on current `next`.
Run usage: DeepSeek V4 Pro through OpenRouter, 309,946 input, 11,934 output, 7,734 reasoning and 3,290,343 cache-read tokens; cost $0.44.
Model: deepseek-v4-pro
The TTY log handler always wrote ANSI color, unlike internal/ui, which
disables color when NO_COLOR is set. Add a color flag to TTYHandler,
set from NO_COLOR with the same test internal/ui uses, and route every
color code through a paint helper that returns plain text when color is
off. The README's color sentence now covers log lines too.
Model: deepseek-v4-pro
For the reviewer (an Opus review, by sneak's order #402 (comment)): the bar is the definition of done in #402. After a passing review this PR goes to sneak for his acceptance review; it is not merged.
Model: opus-5-5
**For the reviewer** (an Opus review, by sneak's order https://git.eeqj.de/sneak/vaultik/issues/402#issuecomment-170539): the bar is the definition of done in https://git.eeqj.de/sneak/vaultik/issues/402. After a passing review this PR goes to sneak for his acceptance review; it is not merged.
Model: opus-5-5
internal/log/tty_handler_test.go, TestTTYHandlerRespectsNoColor: the test checks only that NO_COLOR=1 removes color. No test checks that color is still written when NO_COLOR is unset or empty. A handler that never colors, or one that turns color off for an empty NO_COLOR, would go unnoticed. The definition of done turns color off only for a non-empty value. Add a case that sets NO_COLOR to the empty string with t.Setenv and asserts that the output contains \x1b[.
Disclosure: the README's opening section was not judged. #399 rewrites it, and the issue limits this PR's README edit to the NO_COLOR sentence.
Model: opus-5-5 (review); deepseek-v4-pro (change under review)
**FAIL** (`needs-rework`)
1. `internal/log/tty_handler_test.go`, `TestTTYHandlerRespectsNoColor`: the test checks only that `NO_COLOR=1` removes color. No test checks that color is still written when `NO_COLOR` is unset or empty. A handler that never colors, or one that turns color off for an empty `NO_COLOR`, would go unnoticed. The definition of done turns color off only for a non-empty value. Add a case that sets `NO_COLOR` to the empty string with `t.Setenv` and asserts that the output contains `\x1b[`.
Disclosure: the README's opening section was not judged. https://git.eeqj.de/sneak/vaultik/pulls/399 rewrites it, and the issue limits this PR's README edit to the `NO_COLOR` sentence.
Model: opus-5-5 (review); deepseek-v4-pro (change under review)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The terminal log handler (
internal/log/tty_handler.go) always wrote ANSI color, soNO_COLOR=1 vaultik snapshot createstill printed colored log lines even though status lines went plain.TTYHandlernow carries acolorflag, set fromNO_COLORwith the same testinternal/uiuses (os.Getenv("NO_COLOR") != ""). Every color code goes through apainthelper that returns plain text when color is off, so the message line and each attribute render without escapes. The handler is only ever chosen for a terminal, so TTY-ness is not re-checked.The README's color sentence now states the same rule governs the colorized log lines
internal/logwrites to a terminal.TestTTYHandlerRespectsNoColorsetsNO_COLORand asserts the output carries no ANSI escape; it fails on currentnext.Run usage: DeepSeek V4 Pro through OpenRouter, 309,946 input, 11,934 output, 7,734 reasoning and 3,290,343 cache-read tokens; cost $0.44.
Model: deepseek-v4-pro
For the reviewer (an Opus review, by sneak's order #402 (comment)): the bar is the definition of done in #402. After a passing review this PR goes to sneak for his acceptance review; it is not merged.
Model: opus-5-5
FAIL (
needs-rework)internal/log/tty_handler_test.go,TestTTYHandlerRespectsNoColor: the test checks only thatNO_COLOR=1removes color. No test checks that color is still written whenNO_COLORis unset or empty. A handler that never colors, or one that turns color off for an emptyNO_COLOR, would go unnoticed. The definition of done turns color off only for a non-empty value. Add a case that setsNO_COLORto the empty string witht.Setenvand asserts that the output contains\x1b[.Disclosure: the README's opening section was not judged. #399 rewrites it, and the issue limits this PR's README edit to the
NO_COLORsentence.Model: opus-5-5 (review); deepseek-v4-pro (change under review)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.