Skip to content

Lighter lines: borders and dividers at 10% in light, 12% in dark - #2689

Merged
samjulien merged 6 commits into
mainfrom
claude/lighter-lines-9f8218
Dec 2, 2026
Merged

samjulien merged 6 commits into
mainfrom
claude/lighter-lines-9f8218

Conversation

@samjulien

@samjulien samjulien commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

What this changes

Every line in the apps (border, a field's input, the sidebar's sidebar-border) gets lighter. This is the agreed design-system change from the UX audit: at 20%/16% our cards and rows read heavy and boxed next to ChatGPT (a ring of about 4%), Claude (about 8–10%, or a fill with no line) and Grok (about 6%).

Light Dark
Before text color at 20% text color at 16%
After text color at 10% text color at 12%

All three tokens stay at one strength, so no line is fainter than another. Dark is a little stronger than light because a thin line on a dark ground fades faster; 12% lands close to light's weight.

Contrast of a line against what it sits on (WCAG 2 ratio, from tokens/src/color.ts):

card panel (background) frame (sidebar) popover
Light, before (20%) 1.59:1 1.59:1 1.58:1 1.59:1
Light, after (10%) 1.25:1 1.25:1 1.25:1 1.25:1
Dark, before (16%) 1.58:1 1.54:1 1.50:1 1.58:1
Dark, after (12%) 1.38:1 1.36:1 1.32:1 1.38:1

What stays visible, and why no new token

The rule in docs/design-system.md asks 3:1 for the edge of a control with no other cue, and for the focus ring. Neither moves here:

  • Checkbox and radio edges are already muted-foreground, not input (checkbox.tsx, questionnaire.tsx). checkbox-contrast.test.tsx measures 5.49–5.84:1 in light and 6.04–6.72:1 in dark on the page, a card, a muted row and a popover. Same numbers as before this change.
  • The switch shows its unchecked state with a muted-foreground knob; the bg-input track is not its only cue.
  • The focus ring is ring, untouched.
  • Fields (Input, Textarea, Select) keep border-input. They were 1.6:1 before, so they never met 3:1 and no test held them to it. They have a label, a placeholder or a value, and the focus ring. The screenshots show the resting edge is still clear in both themes.

So no control needed a stronger edge, and nothing is a one-off color. The one mark that did need one, the scrollbar thumb, is below. The rule text now says it outright: a line is never the only cue of a control.

This changes #2124's line strength on purpose

@guidovizoso, #2124 raised every line to the text color at 20% in light and 16% in dark (about 1.6:1), because the old border (1.37:1 light, 1.20:1 dark) all but vanished. This PR takes that strength down on purpose. Nothing else from #2124 changes: one strength for all three line tokens, the hairline on cards, the radius, the icons' line, the shadows and the slate greys all stay.

Why: the design and UX audit compared every OpenBot screen with ChatGPT, Claude, Grok and Muse. Next to all of them, our 1.6:1 lines make cards and rows read heavy and boxed. Their lines are about 4% (ChatGPT, as a shadow ring), 8–10% or a fill with no line (Claude) and 6% (Grok). 10%/12% puts us in that range.

Why fields and controls stay clear:

  • The light line is a little below the old border (1.25:1 vs 1.37:1). The dark line is well above it (1.38:1 vs 1.20:1), because dark is where it vanished.
  • Every mark that must be seen is off the line tokens. Checkbox and radio edges and the switch's knob are muted-foreground (5.5:1 or more). The focus ring is ring. The scrollbar thumb and OpenFuse's sheet handle move to muted-foreground in this PR (below).
  • Fields keep the line as their edge, as on main. They also have a label, a value or a placeholder, and the focus ring. The dialog screenshots show the resting edge in both themes.

The scrollbar thumb

The thumb was var(--border) (app/src/theme.css), so this change took it to about 1.25:1 and a list barely showed that it scrolls. It is muted-foreground now: an existing token, 4.5:1 or more on every surface, light and dark. OpenFuse's sheet grab handle (--openfuse-handle, also var(--border)) had the same problem and moves to muted-foreground too. ui-look-theme.test.ts holds both. Settings scrolled, right half of the window; left to right: main, this PR before the fix, now.

scroll-light

scroll-dark

Files

  • tokens/src/scheme.ts: the three tokens, light and dark, with a comment on why.
  • Regenerated copies (bun run tokens:generate): app/src/theme.css, app/src/lib/artifacts/tokens.css, desktop/src/styles.css, desktop/src-tauri/src/connected/sign_in.rs, desktop/src-tauri/src/first_paint.rs, mobile/src/scheme.ts.
  • first_paint.rs test: the two --border lines it reads from styles.css.
  • app/tests/ui-look-theme.test.ts: 20%/16% → 10%/12%, and a new test that the scrollbar thumb and OpenFuse's sheet handle are muted-foreground. Nothing else in it changed.
  • app/src/theme.css (outside the generated block): the scrollbar thumb.
  • app/src/skins/openfuse/skin.css: the sheet's grab handle.
  • docs/app-guidelines.md (The look › Surfaces) and docs/design-system.md: the strengths, the ratios, and the muted-foreground rule for edges that must reach 3:1.

No API, database or screen changes. It touches no primitive, so it doesn't overlap the type-scale or shared-row PRs.

Where it runs

  • New state that outlives a request? None. Colors only.
  • What happens on the second replica? Nothing different.
  • Anything serialised? No.
  • Anything fanned out to a browser? No.
  • New listener, port, or schedule? No.

Boundary and audit

  • No acting call changes.
  • No new refusals or failures.
  • Nothing new trusted from the client.

API and database

  • This changes nothing under api/, no app's requests, no database change and no release-policy.json.

Changelog

The look.

  • Lighter lines. Borders and dividers in the web app, OpenBot Desktop and the phone app are the
    text color at 10% in light and 12% in dark, down from 20% and 16%, so cards and rows read less
    boxed. A customer's theme that sets --border, --input or --sidebar-border keeps its own
    value. Checkboxes and radio buttons keep their stronger edge, and the scrollbar's thumb and
    OpenFuse's sheet handle are now drawn in the secondary text color so they stay easy to find.

Proof

Ran locally:

  • bun test tokens/tests app/tests/ui-look-theme.test.ts app/tests/design-tokens.test.ts app/tests/skins.test.ts app/tests/ui-look-guard.test.ts app/tests/ui-primitives-look.test.ts: 151 pass (includes generated.test.ts and contrast.test.ts).
  • OPENBOT_APP_BROWSER=1 bun test app/tests/checkbox-contrast.test.tsx: 2 pass.
  • cargo test --bin openbot-desktop the_cover_is and sign_in: pass.
  • bun run typecheck, bun run lint, bun run format:check: clean.

Looked at, in the workbench at 1280 × 820, light and dark, under every skin (OpenBot, OpenDuet, OpenDots, OpenFuse): Home (sidebar edge, message box, cards), Settings (cards, rows, selects, switch), Apps (cards, search field), a select menu and the Name dialog with its field at rest (OpenBot and OpenFuse). Each image is before | after. The traffic lights over the sidebar in some shots are the known workbench Trusted Types bug, not this change.

Settings, OpenBot, light and dark (cards, rows, selects)

openbot-light-settings

openbot-dark-settings

Dialog with a field at rest, light and dark

openbot-light-dialog

openbot-dark-dialog

Select menu, light and dark

openbot-light-menu

openbot-dark-menu

Home, sidebar edge and message box

openbot-light-home

opendots-dark-home

Other skins

openfuse-light-connections

openduet-dark-settings

All 32 pairs

The images live on the pr-assets/lighter-lines branch, which holds nothing else. Delete it after merge.

Every line (`border`, `input`, `sidebar-border`) was the text color at 20% in
light and 16% in dark, about 1.6:1 against a card. Cards and rows read heavy
and boxed next to ChatGPT, Claude and Grok, whose lines are 4% to 10%.

The lines are now 10% in light (about 1.25:1 on a card) and 12% in dark
(about 1.4:1). All three stay at one strength. Controls whose edge is their
only cue (checkbox, radio, the switch's knob) already draw it in
`muted-foreground`, so they keep 3:1 or more.

The scheme, every generated copy, the Desktop cover test, the look test and
the rule text in app-guidelines.md and design-system.md change together.
davidmckayv
davidmckayv previously approved these changes Dec 2, 2026

@davidmckayv davidmckayv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Token values changed only in tokens/src/scheme.ts and every copy is regenerated, with light and dark both and shadcn names intact. Contrast where an edge carries meaning (checkbox edge, unchecked switch knob, focus ring) is unchanged. Checked in Chromium and WebKit at 390, 1000 and 1440px. Merge first of the polish set.

@samjulien

Copy link
Copy Markdown
Collaborator Author

Closing: we're keeping the line strength Guido set in #2124 (20% light, 16% dark).

@samjulien samjulien closed this Dec 2, 2026
@samjulien

Copy link
Copy Markdown
Collaborator Author

Reopened: closed by mistake.

@samjulien samjulien reopened this Dec 2, 2026
…n the docs

The thumb was `border`, so lighter lines took it to about 1.25:1 and a list
barely showed that it scrolls. It is `muted-foreground` now, 4.5:1 or more on
every surface in light and dark, and ui-look-theme.test.ts holds it there.

design-system.md, app-guidelines.md and the scheme's comment give a line's
contrast for both themes: 1.25:1 on a card in light, 1.38:1 in dark.
The handle was `border`, so lighter lines took it to about 1.25:1, the same
problem as the scrollbar's thumb. It is `muted-foreground` now, and the test
that holds the thumb holds the handle too.
davidmckayv
davidmckayv previously approved these changes Dec 2, 2026

@davidmckayv davidmckayv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed the design-check fixes at 7619796: diff, copy, and Chromium/WebKit light and dark at 390 and 1440px. Holds.

@davidmckayv davidmckayv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approved: since my last approval this push only merges main and drops the CHANGELOG.md edit (the note is in the description). Nothing else changed.

@samjulien
samjulien added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit f97104b Dec 2, 2026
52 checks passed
@samjulien
samjulien deleted the claude/lighter-lines-9f8218 branch December 2, 2026 03:49
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.

2 participants