Repository navigation
Give each of Leaf's mark colours one meaning, with green only for the user's move - #6098
Conversation
… On me in the turn's colour Leaf's marks read hues directly: green (`--ok`) for the user's turn, a changed section, a chosen option and a done step; the accent for a thread, the agent's work, an unread reply and where the user is. So no one place says what a colour means, and a change to one meaning recolours the others. tokens.css now declares one token per thing a mark tells the user: `--turn` (with `-ink`, `-wash`), `--thread`, `--work`, `--news`, `--change` and `--settled` (with `-ink`, `-tint`), each defaulting to the hue it wore. The margin, the contents, the panel, the leaf, a plan's steps, a chosen option, a pressed answer or Done, an answered tab and a resolved thread's Reopen read the meaning. A theme restates a meaning in one place, and `package-themes.md` lists them. One visible change: the On me count on the panel's mark and on the folded leaf was the accent's blue, while the margin, Threads and the contents mark the user's turn green, as browser/AGENTS.md asked. Both now wear the turn's colour (`--badge-fill` becomes the turn's fill and ink pair). `leaf-dev stills` over 20 states that show these marks found no other computed style changed. Also: the tooltip's turn colour had two homes, an unused `--tip-turn-ink` and a mix in chrome.css; the token now holds the mix chrome.css drew and chrome.css reads it. Which colour each meaning should wear is a decision waiting on the user; this change keeps today's values.
# Conflicts: # browser/runtime/chrome.css # browser/styles/components/controls.css # browser/styles/floating-panel.css # browser/styles/tokens.css # packages/default/styles/options.css # packages/default/styles/tabs.css # packages/default/styles/toc.css # skills/leaf/references/package-themes.md # tests/browser/test_render_options.py
…ser's move Max picked "Green only for your move" on the colour question's page. Green now says only that a mark asks something of the user: their turn, what is On me, the agent waiting. A changed block's bar and its stretch of the contents (--lf-change) and a chosen option, pressed answer, done step, answered tab and resolved thread (--lf-settled, with its ink and tint) wear the page's second ink and the chip's ground. Blue keeps where the user is, a thread, the agent's work and unread replies. The tokens.css comment records why colour carries this one distinction: held to the chart palette's floors scaled to a mark's size by Stone, Szafir and Setlur's model, every reader tells apart at most four colours at a 7px dot.
…e page's second ink The ring test read the settled colour from its rgb() serialization and counted pixels within 40 of it down the cell's middle. The settled ring now wears --lf-ink-2, which computes in oklab and stands near the cell's words, so the colour read failed and the middle line met the words before the ring. It now paints the colour on a canvas, counts a pixel as the ring's where it stands nearer the ring than half the way to the cell's ground, and counts from each of the cell's edges inward. A hairline laid over the ring's lower edge still fails it (checked by adding one to the chosen option's shadow).
leaf-agent
left a comment
There was a problem hiding this comment.
A resolved thread's Reopen now looks the same at rest as an open thread's Resolve does under the pointer. Both draw the same check, and the colours now resolve to the same values:
- Reopen (
data-lf-tone="positive") draws--lf-settled-inkon--lf-settled-tint, which are--lf-inkon--lf-chip. - A hovered Resolve (
data-lf-tone="ink") also draws--lf-inkon--lf-chip.
The disc comment above these rules says "Resolve's disc under the pointer is the chip, so a hovered Resolve never looks already done", and this change breaks that. Before, the green tint kept the two apart. This is the one place where the settled tint, which is now the neutral chip, meets a hover ground that is also the chip. Fixing it means either giving --lf-settled-tint its own step away from --lf-chip, or giving Resolve a different hover disc. The choice is visual, so it's yours.
I found no backlog issue that this change settles.
…esolve doesn't look done Once the settled tint became the chip, a resolved thread's Reopen at rest (ink check on the chip) drew exactly what an open thread's Resolve draws under the pointer, which the disc's header says it must not. Every other settled face already carries an edge in the settled colour (a pressed Done's border, a chosen answer's border, a chosen option's ring), and in ink that edge, not the ground, is what says settled. Reopen's disc now takes the chosen answer's edge, 1px of the settled colour at 45%, and a hovered Resolve keeps the bare chip. Rejected: a settled tint a step deeper than the chip, which would darken every chosen option and pressed answer to fix one face, and Resolve hovering in the accent tint, which would make it the one symbol in a card's head that doesn't hover in the chip. Found by tend-review on #6098.
…in the muted ink
Two problems on the contents spine followed from drawing changes and settled marks in
ink. A changed stretch in the second ink stood at 10.9:1 against the light paper,
louder than the green mark that asks something of the user. And a thread and an On me
item were the same shape, a ring in a pale disc, apart only by blue against green,
which stand 5.2 apart for a deuteranope in the dark scheme even as solid discs, under
the chart floor of 8.
Now only an On me item's ring stands in a disc; a thread's ring keeps only its paper
hairline, so the two differ by shape. In forced colours, where the disc is a second
ring, only an On me item keeps it. `--lf-change` is the muted ink (5.8:1 light, 7.7:1
dark), which the margin's change bars read too.
max-sixty picked this ("Both") over keeping the build, the ring change alone and the
quieter change alone, each shown beside a deuteranope simulation.
…oin a changed run as one bar (#6113) Where the contents spine's lines meet its circles, several junctions drew badly at 2x in both Firefox and Chromium. This fixes four of them: - **Hairlines.** A thread's bare ring and the On me disc each had a paper hairline. The thread's hairline was left over from the disc that #6098 removed. Because of the hairlines, the spine, the lens and a changed stretch stopped a pixel short of those marks, while every other marker meets the line. Both halos now draw without the hairline. - **Centring.** A section's 6px marker sat half a pixel off the 1px spine, and both engines round that half pixel up. So plain rings, a section's thread ring and the On me disc sat one device pixel right of the line. Section markers are now 7px, so every marker is an odd number of pixels wide and centres on the line. - **Pinch.** Each changed section's stretch ended in round caps. Where two changed sections met, the bar pinched to a waist, on the map and in the outline. Each stretch now runs its caps half its width past its ends, so a changed run is one bar, and on the map those ends lie under markers. - **Fringe.** A ring's paper fill ran under its stroke, which left a dark fringe where a changed stretch leaves the ring in the dark scheme. The fill is now clipped inside the stroke. The filled marker for where you are is the exception, since clipping would show a seam there. Worth weighing: since #6098, the filled marker for where you are replaces a thread's ring, so a thread in the section being read shows only in its link's preview. The contents marks test used to find marks by the marker's box shadow. It now reads the ring colour and states that behaviour. max-sixty asked for this review on the contents marks Leaf page. The page shows each junction on main and fixed, magnified. A fresh reviewer, given only the magnified captures, found the hairline on the disc and the off-centre markers after my first pass, and then measured every marker within a tenth of a device pixel of the line. Tests: the two contents marks tests pass. Before-and-after stills cover the map and the outline, in both schemes, in Firefox and Chromium. > _This was written by Claude Code on behalf of max-sixty_
… oklab ink needs (#6138) Four option tests in `tests/browser/test_render_options.py` have failed on `main` since #6098 with "the selected mark has no filled centre". #6098 moved a chosen option's mark from `--lf-ok` to `--lf-settled`, an `--lf-ink-2` neutral whose computed colour is an `oklab(...)` string. `assert_selected_mark` pulled integers out of that string as though it were `rgb(...)`, so it compared the screenshot against `[0, 497097, 0]`, a colour no pixel can match. The mark itself paints as #6098 intended. The check now resolves the computed colour through a canvas, as the module's other colour reads do. It still fails on a mark with no fill or no cut-out check. The four tests (`test_a_card_group_taking_a_pick_reads_as_one_control`, `test_a_group_of_bare_labels_reads_as_a_question_about_the_page`, `test_a_live_card_pick_shows_the_check_and_remains_pressable` and `test_a_pick_the_page_only_reports_can_still_be_pointed_at`) fail on `main` at `e53ccd151`. With this change the whole module passes locally (49 passed). Bisecting `test_a_card_group_taking_a_pick_reads_as_one_control` over the range between push runs 43801680826 and 43812660964 lands on #6098 (`a0461d98d`). Refs #3985 — automated triage Co-authored-by: leaf-agent <[email protected]>
…6424) A picked option now stands on a neutral grey, the card mixed 18% toward the settled colour, instead of the chips' beige ground it took after #6098. On the reading theme that beige has three times the paper's chroma (OKLCH 0.937 / 0.017 against the card's 0.997 / 0.005), so across a whole card it reads as khaki, and as olive under the pointer right after the click. It also sat level with the pointer's grey wash, so a picked card differed from a hovered one only in hue, and a plain chip on the picked card lost its ground. Just picked, pointer still on the card, before → after (light, then dark): <img src="https://gist.githubusercontent.com/max-sixty/d9a0a9cafabfb36461ed5e4de524ecdc/raw/1cb714e936ce0b393496951be6aa04fa1a9e785b/picked-light-before.png" width="380"> <img src="https://gist.githubusercontent.com/max-sixty/d9a0a9cafabfb36461ed5e4de524ecdc/raw/1cb714e936ce0b393496951be6aa04fa1a9e785b/picked-light-after.png" width="380"> <img src="https://gist.githubusercontent.com/max-sixty/d9a0a9cafabfb36461ed5e4de524ecdc/raw/1cb714e936ce0b393496951be6aa04fa1a9e785b/picked-dark-before.png" width="380"> <img src="https://gist.githubusercontent.com/max-sixty/d9a0a9cafabfb36461ed5e4de524ecdc/raw/1cb714e936ce0b393496951be6aa04fa1a9e785b/picked-dark-after.png" width="380"> Worth weighing: the fill stays, rather than a ring alone, because with the keyboard on a group the blue focus ring covers the pick's ring and a digit replaces its check, so the fill is the only thing left saying which card is picked. The grey is a step deeper than the pointer's wash for that reason, which makes the picked card under the pointer the heaviest block on the page. An opened settled group now washes a hovered option in the same grey as a live one, and a picked card standing alone takes the picked ground too, so the pick is never the one card without a fill. The settled tint stays on answers, Done and the thread summary region (#6379). Max asked whether the brownish pick was intended; it came from reusing the chip token. The grey follows his lean away from it and is his to reverse. Tests: the picked-cell ring test now measures the ring against the cell's own ground, and still fails with the ring removed; `leaf-dev stills` shows only option picks and the settled hover changing. The `test` job's browser type check fails on the undefined `placement` and `reads` in `browser/runtime/anchor-placement.js`, inherited from main, which #6420 and #6422 fix. > _This was written by Claude Code on behalf of max-sixty_
Green on Leaf's marks said both that something needs the user (their turn, what is On me) and that something is finished (a changed block, a chosen option, a done step). The panel also counted On me in blue, while the margin and the contents drew it green.
Each thing a mark tells the user now reads one token in
tokens.css:--lf-turn,--lf-thread,--lf-work,--lf-news,--lf-changeand--lf-settled, with their-ink,-washand-tint. The margin, the contents, the panel, the leaf, plan steps, options, tabs and answers read the meaning instead of a hue, andpackage-themes.mdlists the tokens for themes. Green now marks only the user's move, the On me count included. Blue keeps where the user is, threads, the agent's work and unread replies. Settled marks wear--lf-ink-2on--lf-chip, with an edge in that ink, so a resolved thread's Reopen now wears a chosen answer's edge, which keeps it from looking like Resolve under the pointer. What changed wears the muted ink, so a changed stretch of the contents stays quieter than the green marks that ask.On the contents spine, only an On me item's ring keeps its pale disc, and a thread's ring stands alone. Blue and green stand 5.2 apart for a deuteranope in the dark scheme even as solid discs, under the chart floor of 8, so the shape now carries the difference. The
tokens.csscomment records why colour carries only one distinction: held to the chart palette's floors, scaled to a mark's size by Stone, Szafir and Setlur's model, every reader can tell apart at most four colours at a 7px dot.max-sixty picked both looks on the colour question's Leaf page, from captures that included a deuteranope simulation.
Tests: the theme token tests, the contents marks test, the change-bar test, and the chosen-option ring test, which now finds the ring from the cell's edges and still fails when a hairline covers the ring.
leaf-dev stillsshows only these marks changing.