Skip to content

fix(desktop): read the --luke-* roles where CSS still named retired tokens - #3631

Merged
luke-agent[bot] merged 5 commits into
mainfrom
luke/fix-removed-design-tokens
Oct 18, 2026
Merged

luke-agent[bot] merged 5 commits into
mainfrom
luke/fix-removed-design-tokens

Conversation

@dastratakos

@dastratakos dastratakos commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

#3524 (and #3569 after it) deleted the desktop's compatibility token aliases. PRs that were already open then merged CSS that still reads them. Nothing failed, because a var() naming an undeclared property just makes its declaration invalid, so borders, gaps, padding and colours silently dropped.

  • Fix. Every one of the 41 reads on main when this PR opened, and 10 more that merged since, now reads the --luke-* role its alias pointed at, using refactor(desktop): remove the desktop's compatibility token aliases #3524's deleted alias block (--space-N→--luke-space-N, --hairline(-strong)→--luke-color-border(-strong), --text-primary/secondary/tertiary→--luke-color-text/-muted/-subtle, --raised→--luke-color-fill-hover, --control-height/gap/radius→--luke-control-*, --switch-on→--luke-color-switch-on, --focus-ring→--luke-color-focus-ring) and feat(ui): lift the window-level roles into the shared tokens #3569's (--focus-ring-width/offset→--luke-focus-ring-width/offset):
  • Guard. A new step in scripts/repository-checks.sh takes every tracked .css, .html, .ts and .tsx file under apps/ and packages/ (tests excluded). It treats a property as declared if it appears as a sheet's --name: or @property --name, or as a script's "--name" literal (setProperty, a style object's key, a constant). A --name-${…} template, such as ChartStyle's --color-${key}, declares the whole family. The step then fails on any var(--name) with no fallback that nothing declares, naming the file and line. The only name on the hand-kept list is --default-button-size, which comes from Excalidraw's own sheet. The step takes about 0.5s. Declarations are pooled across apps, so it catches a name that is gone everywhere, which is what a retired token is.
    • Why not Biome or stylelint: Biome's noUndeclaredCustomProperties is a nursery rule that needs Biome ≥ 2.5.11 (we pin 2.5.8). It runs the project scanner, follows CSS imports only, and cannot see properties set from TypeScript. Stylelint is not in the repo, and its plugin for this has the same blind spot.

Evidence

  • The guard on main's CSS, before the fix: fails with 41 reads (desktop.css ×4, settings.css ×19, tasks.css ×18), each named by file and line. After the fix: passes.
  • ./scripts/repository-checks.sh: passed. ./scripts/oxlint.sh: 0 warnings. pnpm knip: clean. biome check on the touched sheets: clean.
  • pnpm check:affected: ran out of memory in discarded-effect (a TypeScript-only check; this PR changes no TypeScript), so I ran the individual checks above instead.
  • Screenshots: see Screenshots below. They come from a throwaway esbuild harness with fakeAppBridge that renders the real components under the real built stylesheet, before and after, in dark and light. The harness is not committed.

Screenshots

Before, on main, and after, with the built desktop stylesheet. Dark first, then light.

Settings › Experimental › Avatar (picture choice). Before this fix, the faces have no gaps, the chosen face has no ring, the names are the wrong colour, and the stage has no inset or radius.

Before After
before after
before after

Pull request tab header (labels, branch row, stack). Before this fix, the label pills have no padding or gap, and the Stack button has no edge, gap or colour.

Before After
before after
before after

Invariants

  • ./scripts/check.sh green. (CI)
  • JSON Schema goldens unchanged (LUKE_UPDATE_FIXTURES not run, or diff explained line by line). (CI)
  • Every behavior change has, in this PR, the test that fails without it; no change-detector test added. The new repository check fails on main without the CSS fix.
  • Gateway envelope goldens unchanged. (CI)
  • No new as type assertion outside the allowlisted files. (CI via anti-slop)
  • No Effect.runPromise/runSync/runFork outside the runtime edges and the shims tools/anti-slop/effect-edges.json records. (CI via anti-slop/no-run-promise-outside-edges)
  • No new setTimeout/setInterval/new Promise/AbortController/fs.watch outside the files tools/anti-slop/effect-edges.json records. (CI via anti-slop/no-raw-async-primitives)
  • No Effect, Stream, or Layer written as a statement and dropped; a description a caller walks past runs nothing. (CI via pnpm discarded-effect)
  • Test count equals the pre-PR count or the delta is listed. Unchanged: the guard is a repository check, not a test.
  • Each hand-rolled file the PR replaces is deleted, or the part that remains is a permanent adaptor named in root AGENTS.md's "The permanent adaptors" with the reason it stays.
  • Every CLAUDE.md/AGENTS.md sentence naming a changed part is edited; root pair stays byte-identical.
  • PRIVACY.md unchanged.
  • Package package.json deps match what the sources import by bare specifier; effect via catalog:. (CI)
  • Barrel/door rule: no Node-reaching Effect module behind a barrel the renderer or a web function opens. (CI)

Notes

Made with Luke


Devin Review


Summary by cubic

Restores the desktop UI's borders, gaps, padding, and colors that silently dropped after #3524 and #3569 retired the CSS token aliases. All var() reads still naming a retired token now read the --luke-* role they pointed at, and a new repository check fails on any var(--name) with no fallback that nothing declares, so the regression can't repeat.

Bug Fixes

  • settings.css: the video avatar picture choice in Settings › Experimental › Avatar regains its spacing, borders, focus ring, and colors.
  • tasks.css: the Pull request tab's branch row, stack button, and labels regain their gaps, edges, and text colors, and the inline review threads in Files changed (feat(desktop): draw review threads on their lines in Files changed #3245) regain their padding, borders, and surface fill — the new check caught those reads on the merge with main.
  • desktop.css and breadcrumbs.css: the offline mark's size, the sidebar toggle's title-bar clearance, and the breadcrumb focus ring are restored; breadcrumbs now read the roles with no fallback, like sibling components, so the check can validate it.

New check

  • scripts/repository-checks.sh fails when a var(--name) has no fallback and no tracked .css, .html, .ts, or .tsx file under apps/ and packages/ declares --name (tests excluded), naming the file and line.
  • Sheets declare by --name: or @property --name; scripts only by writing the name (a style string, a style object key, a ["--name"] =, or setProperty), so reads like getPropertyValue don't count.
  • A --name-${…} template declares the whole family, and declarations are pooled across apps so the check catches a token gone everywhere.
  • The only hand-listed exception is --default-button-size, which Excalidraw's own stylesheet sets; the check adds about 0.5s to the run.

Written for commit f8bd39b. Summary will update on new commits.

View guided diff Turn on auto-fix

…okens

CSS merged after #3524 and #3569 retired the desktop's token aliases went
on reading --hairline, --space-*, --text-*, --raised, --control-*,
--switch-on and --focus-ring*, which nothing declares any more, so the
video avatar's faces, the Pull request tab's labels and stack, and the
offline mark's title-bar room lost their gaps, edges and colours. Each
now reads the role its alias pointed at.

repository-checks.sh now refuses a var() with no fallback whose custom
property no tracked sheet, page or script under apps/ or packages/
declares, naming the file and line.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
luke-web Ready Ready Preview Oct 18, 2026 4:58pm UTC

Request Review

luke-agent Bot added a commit that referenced this pull request Oct 18, 2026
Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
@luke-agent
luke-agent Bot enabled auto-merge October 18, 2026 16:46
dastratakos and others added 2 commits October 18, 2026 16:46
#3245 merged its review-thread rules on the retired names; the new
repository check caught them on this branch's merge with main.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
devin-ai-integration[bot]

This comment was marked as resolved.

dastratakos and others added 2 commits October 18, 2026 16:50
A getPropertyValue read quoted the name too, so a token whose CSS
declarations were gone still passed while a script read it (Devin's
review on #3631).

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
@luke-agent
luke-agent Bot added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit 6522dd1 Oct 18, 2026
12 checks passed
@luke-agent
luke-agent Bot deleted the luke/fix-removed-design-tokens branch October 18, 2026 17:08

This branch was successfully deployed

1 active deployment
Preview — f8bd39bc Deployed Oct 18, 2026 by vercel[bot]
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.

1 participant