[codex] fix root help usage contrast#521
Open
supersylar wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the top-level
dws --helpUsage examples so the command text uses the terminal default foreground color instead of forcing bright white.Context
A user reported that the
Usage:examples in the root scaffold/help output were nearly invisible on a light terminal background. The selected-text screenshot confirmed that the text was present but rendered with very low contrast.Root cause:
renderRootHelpwrapped the two Usage example strings withtui.White(...), andtui.Whitemaps tocolor.FgHiWhite. That emits bright-white ANSI (\x1b[97m), which is unreadable in light themes.Screenshots:



Issue:
Fixed:
Change
tui.White(...)from the two top-level Usage example lines.Validation
Passed:
gofmt -w internal/app/root_help.go internal/app/visibility_test.go && git diff --checkgo test -count=1 ./internal/app -run 'TestRenderRootHelpIncludesLong|TestRootHelpDoesNotRequirePINOrLogin'go build -o /tmp/dws-root-help-contrast ./cmdenv -u NO_COLOR TERM=xterm-256color CLICOLOR_FORCE=1 /tmp/dws-root-help-contrast --help; the requester confirmed the output is readable.Known unrelated failures observed while validating:
make lintfails on existingstaticcheckfindings outside this change, including unused functions ininternal/app/auth_command.go,internal/helpers/devapp.go,internal/helpers/devdoc.go,internal/helpers/wiki.go,internal/transport/diagnostics.go, plusSA4017ininternal/helpers/connect_daemon_test.go.make testfails in existing integration/script suites: auth required inintegration/extensions, missing recovery temp file inintegration/recovery, and tar archive format errors intest/scripts.