Skip to content

feat(web): name the open page in the tab title, and tint text selection with the primary - #2570

Merged
Makisuo merged 2 commits into
mainfrom
feat/tab-titles-selection
Nov 13, 2026
Merged

Makisuo merged 2 commits into
mainfrom
feat/tab-titles-selection

fix(ui): selected text reads in foreground on the primary wash

2620f48
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review completed Nov 13, 2026 in 1m 37s

Confidence 6/10 · 1 issue to address

🟡 Confidence 6/10 · needs attention. Held at 6 because a correctness warning is open.
1 warning −1 · 1 note · tests covered · risk medium

Names the browser tab from the page's breadcrumb trail and repaints text selection with the primary wash. The title logic is sound and tested; the selection rule needs one fix before merge.

  • documentTitleOf builds <page> · <parent> · Maple, skipping a pending crumb
  • view's document title now follows titleOf(model) instead of the constant
  • ::selection in tokens.css takes primary-a4 behind foreground

Findings

🟠 Warning · F1 · Selected text inside a bg-primary fill drops to 2.1:1 in dark mode

correctness · packages/ui/src/styles/tokens.css:819-820

Forcing foreground on every selection overwrites the dark text that filled primary surfaces use. In dark mode foreground is oklch(0.955) and primary oklch(0.74 0.15 62), so selecting the label of a primary badge (badge.styles.ts:36), a selected choice-card (choice-card.ts:26) or a calendar day washes it to 2.1:1; primary-foreground was 7.9:1.

Keep the wash but exempt primary fills: `.bg-primary::selection, .bg-primary ::selection { color: var(--color-primary-foreground) }`, or pick `primary`/`primary-foreground` as the pair.
🔵 Note · F2 · New rule forbids a selection: utility that native-select.styles.ts still uses

convention · docs/design-rules.md:100-101

The bullet states no call site carries a selection: utility, but packages/views/src/ui/native-select.styles.ts:4 sets selection:bg-primary selection:text-primary-foreground. That select keeps a solid primary highlight instead of the new wash, and a later reader of this rule finds it contradicted in the kit.

Drop the two `selection:` utilities from `native-select.styles.ts`, or narrow the sentence to the primitives that override the token on purpose.
What was checked
  • Selection on ordinary surfaces: 12.9:1 light, 7.9:1 dark, tokens composed in oklab and measured
  • isPendingLabel covers every breadcrumb: all pending crumbs in apps/web/src are Loading… (U+2026)
  • .monumental-home ::selection (home-monument.css:14) still wins over the new base-layer rule

2620f48 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.

Annotations

Check warning on line 820 in packages/ui/src/styles/tokens.css

See this annotation in the file changed.

@maple-review-bot maple-review-bot / Maple / review

correctness: Selected text inside a `bg-primary` fill drops to 2.1:1 in dark mode

Forcing `foreground` on every selection overwrites the dark text that filled primary surfaces use. In dark mode `foreground` is oklch(0.955) and `primary` oklch(0.74 0.15 62), so selecting the label of a primary badge (`badge.styles.ts:36`), a selected `choice-card` (`choice-card.ts:26`) or a calendar day washes it to 2.1:1; `primary-foreground` was 7.9:1.

Check notice on line 101 in docs/design-rules.md

See this annotation in the file changed.

@maple-review-bot maple-review-bot / Maple / review

convention: New rule forbids a `selection:` utility that `native-select.styles.ts` still uses

The bullet states no call site carries a `selection:` utility, but `packages/views/src/ui/native-select.styles.ts:4` sets `selection:bg-primary selection:text-primary-foreground`. That select keeps a solid primary highlight instead of the new wash, and a later reader of this rule finds it contradicted in the kit.