Repository navigation
fix(ui): readable send, approve, review and toolbar chips; say sent after a send - #190
Merged
Merged
Conversation
Each state now takes its text and background from the 256-colour table instead of ANSI black, which terminal themes remap, and holds at least 4.5:1 in the dark and light themes. A unit test computes the ratio for every state and theme. Once everything is sent the button reads 'Sent ✓ ▸ target' instead of 'Send 0 new', and a blocked agent reads the same on the document and code review screens.
…st test for every chip The Approve button, the Review menu button, the floating toolbar's labels, the current search match and the light cursor drew ANSI colours on a background we paint. They now take both colours from the 256-colour table, per theme, at 4.5:1 or more; ui::chips holds them and one table-driven test checks every pair, the Send states included. The light toolbar grey moves from 252 to 253 so its comment label can reach 4.5:1. After a copy the Send button says Copied, and Sent when the notes went to an agent.
backnotprop
added a commit
that referenced
this pull request
Nov 23, 2026
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.
The Send button drew bold ANSI black (colour 0) on dark 256-colour backgrounds. Terminal themes remap colour 0, so the text often sat close to its background. After a send the button also kept reading
Send 0 new ▸ targetin the "sent" colour.Colours
Every state now takes both its text and its background from the 256-colour cube or grey ramp (16-255), never from the 16 ANSI colours. Ratios are WCAG 2 contrast with xterm's 256-colour values.
#008787#1e1e2eblack)#00afaf#005f00#d7ffd7on 22#005f00#5f5f00#ffaf00#7f7f7fon 252) before DIMNew notes stay the loud teal call to action, sent is a quiet green (dark chip on a dark terminal, pale chip on a light one), a blocked agent is amber, and nothing to send is muted grey on the toolbar grey like the Review button.
DIMis gone because terminals render it differently. The theme is read withtheme::theme(), as the diff viewer already does.Other chips (second commit)
The same fault was in other text we draw on a background we paint. All of these now take both colours from the 256-colour table, per theme:
#008700#1e1e2e)#00af00#45475ablackThe dark Review button changed too: ANSI cyan on 238 is only 3.1 to 3.3 with the macOS Basic or Solarized cyan. The light toolbar grey moves from 252 to 253, the darkest grey on which a dark amber comment label still reaches 4.5:1. The light nothing-to-send Send text is now 5.95 on 253. The text on these chips is not a
[colors]role; the README says so next totoolbar.ui::chipsholds the per-theme colours. One table-driven test computes the contrast of every pair in both themes (the four Send states, Approve, Review, the three toolbar labels, and every palette style that fixes both its text and its background) and fails below 4.5:1 or on an ANSI colour.ui::send_buttonkeeps a test that every Send state has its own background.Labels
Send 0 new ▸ T (E)→Sent ✓ ▸ TSent ▸ T→Sent ✓ ▸ TCopy 0 new→Copied ✓Copied→Copied ✓Send N new ▸ T (E)→T at a dialog · retry (E)T at a dialog · click to retry→T at a dialog · retry (E)A new or edited note brings back
Send N new ▸ T (E).Copied ✓shows when this session's last send went to the clipboard, including the picker's copy row. If the notes went to an agent and the target is back to asking (or a reopened review's notes are already marked sent), the button showsSent ✓. Tests cover both.Edoes what it did before. README, the crate README,docs/spec-herdr-integration.mdand decision 13 indocs/decisions.mdquote the new labels.Checked
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warningsandcargo test --workspacepass locally. I ran the binary in a private tmux with a scratch HOME and data dir and a delivery command that writes to a file, then captured every state on the document and code review screens, a gated review's Approve button and the floating toolbar, in both themes.