chat header: one green, and it is the token
the connection dot was `bg-green-500` and the bell followed it there to match. both are `success` now — #16a34a where the palette value was #22c55e. the raw palette value was the wrong thing for either to hold. tone.ts already says why: once a view can reach for any of tailwind's twenty-two palettes, green stops reading as "open" and starts reading as "the author liked green here". two elements in one header meaning the same thing should say so by sharing a token, not by two people picking the same number.
This commit is contained in:
@@ -135,7 +135,7 @@ function DetailBar({
|
||||
) : isGenerating ? (
|
||||
<span className="inline-block h-2 w-2 rounded-full bg-duck-orange animate-pulse" />
|
||||
) : (
|
||||
<span className="inline-block h-2 w-2 rounded-full bg-green-500" />
|
||||
<span className="inline-block h-2 w-2 rounded-full bg-success" />
|
||||
)}
|
||||
<span>{!isConnected ? 'Disconnected' : isGenerating ? 'Working...' : ''}</span>
|
||||
{isConnected && onDisconnect && (
|
||||
|
||||
@@ -13,16 +13,16 @@ const OPTIONS: { value: NotifyPreference; label: string }[] = [
|
||||
/**
|
||||
* The bell says what it will do without being opened.
|
||||
*
|
||||
* Green is `green-500` on purpose rather than `text-success` — it has to be the SAME green as the
|
||||
* connection dot two elements away, and a semantic token that drifted from it would leave two greens in
|
||||
* one header meaning two different things.
|
||||
* `text-success`, and the connection dot two elements away is `bg-success` — the same token, so they
|
||||
* cannot drift into two greens in one header meaning two different things. Both were the raw `green-500`
|
||||
* until 2026-08-19; the token is `#16a34a` where the palette value was `#22c55e`.
|
||||
*
|
||||
* Amber for `input_needed` because it is the conditional setting: it will speak, but only sometimes.
|
||||
* Muted for `none`, which is also the only state that draws a struck-through bell — colour alone is not
|
||||
* a state anyone should have to learn.
|
||||
*/
|
||||
const BELL_TONE: Record<NotifyPreference, string> = {
|
||||
every_turn: 'text-green-500',
|
||||
every_turn: 'text-success',
|
||||
input_needed: 'text-warning',
|
||||
none: 'text-muted-foreground',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user