Skip to content

[codex] fix root help usage contrast#521

Open
supersylar wants to merge 1 commit into
DingTalk-Real-AI:mainfrom
supersylar:codex/fix-root-help-usage-contrast
Open

[codex] fix root help usage contrast#521
supersylar wants to merge 1 commit into
DingTalk-Real-AI:mainfrom
supersylar:codex/fix-root-help-usage-contrast

Conversation

@supersylar

@supersylar supersylar commented Jun 28, 2026

Copy link
Copy Markdown

Summary

Fix the top-level dws --help Usage 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: renderRootHelp wrapped the two Usage example strings with tui.White(...), and tui.White maps to color.FgHiWhite. That emits bright-white ANSI (\x1b[97m), which is unreadable in light themes.

Screenshots:
Issue:
image
Fixed:
image
image

Change

  • Remove tui.White(...) from the two top-level Usage example lines.
  • Keep the existing colored bullet while leaving the command text as plain terminal text.

Validation

Passed:

  • gofmt -w internal/app/root_help.go internal/app/visibility_test.go && git diff --check
  • go test -count=1 ./internal/app -run 'TestRenderRootHelpIncludesLong|TestRootHelpDoesNotRequirePINOrLogin'
  • go build -o /tmp/dws-root-help-contrast ./cmd
  • Manual root help check with env -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 lint fails on existing staticcheck findings outside this change, including unused functions in internal/app/auth_command.go, internal/helpers/devapp.go, internal/helpers/devdoc.go, internal/helpers/wiki.go, internal/transport/diagnostics.go, plus SA4017 in internal/helpers/connect_daemon_test.go.
  • make test fails in existing integration/script suites: auth required in integration/extensions, missing recovery temp file in integration/recovery, and tar archive format errors in test/scripts.

@supersylar supersylar marked this pull request as ready for review June 28, 2026 05:56
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