Repository navigation
Add /contrast: a heavier, brighter rule for pane 0's control block - #78
Merged
Merged
Conversation
Glen uses macOS accessibility features at night and found "more contrast borders" in Windows helps immensely; this is the same idea for pane 0's own top/bottom rules from #75/#76. /contrast on swaps the rule's glyph from a single line ("─") to a double line ("═") and draws it bold and bright white instead of the terminal's default dim foreground - a stronger visual edge for a reader who needs one, not just a colour change. The colour escape is computed from the plain rule text, same discipline as the spectrum bars in #77, so the added bytes are never mistaken for display width by the row-counting math. Wired the same way /color already is, end to end: a Session.Options field and SetHighContrast method, a config.Config member with its own byte-preserving WriteHighContrast writer, a --high-contrast flag, a startup report line, and a /contrast command (on/off/report, saves to the configuration file) with a test mirroring /color's own. Verified in a real tmux pane with pipe-pane capturing raw bytes: with high contrast on from startup, both rules render as "═" and the bold/bright-white escape (\x1b[1;97m) appears around each one. gofmt, go vet, and make test all pass. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SQbqTt3wQsPbN6fbaryxkM
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
Glen uses macOS accessibility features at night and found "more contrast borders" in Windows helps immensely for visibility; this is the same idea applied to pane 0's own top/bottom rules from #75/#76.
/contrast onswaps the rule's glyph from a single line (─) to a double line (═) and draws it bold and bright white instead of the terminal's default dim foreground - a stronger visual edge, not just a different color. The color escape is computed from the plain rule text first, the same discipline the spectrum bars in #77 established, so the added escape bytes are never mistaken for display width by the row-counting math this file has fought hard to keep correct.Wiring
Mirrors
/colorend to end, since it's the closest existing precedent for a persisted session/config toggle:Session.Options.HighContrast+Session.SetHighContrastconfig.Config.HighContrast(high_contrastJSON key) + a byte-preservingconfig.WriteHighContrastwriter, same style asWriteColor--high-contrastCLI flag, plus a startup report line/contrastcommand (on/off/report, saves to the active configuration file), registered in the dispatcher and the command-help tableTestColorSetsTheSessionAndSavesTheChoiceVerification
gofmt -l .clean,go build ./...andgo vet ./...pass,make testis green (including the new/contrasttest). Verified in a real tmux pane withpipe-panecapturing raw bytes: with high contrast on from startup, both rules render as═and the\x1b[1;97mbold/bright-white escape appears around each one.Test plan
make testpassesTestContrastSetsTheSessionAndSavesTheChoicecovers the save path🤖 Generated with Claude Code
https://claude.ai/code/session_01SQbqTt3wQsPbN6fbaryxkM
Generated by Claude Code