Repository navigation
fix(web): colors and appearance classes come from theme tokens - #942
Merged
Merged
Conversation
rynfar
force-pushed
the
upstream/2026-09-30-web-theme-tokens
branch
from
September 30, 2026 15:47
7720f5e to
ff211f1
Compare
Ports the remaining chat, settings, pull request and Usage hunks of upstream 315fcca10a826d8aa1cbdffc3ef5b5eb5a1e2f9d (#13371). The thread-status subset landed earlier in #908. Raw palette classes become semantic theme tokens so status tones follow custom themes; the macOS permission and Computer Use marks move into Icons.tsx. The upstream shadcn/no-raw-colors lint rule is not ported because Pylon does not carry the @shadcn/lint plugin.
Ports upstream f26ee083fe41720207fb10616359500dcecc19d3 (#13397). Adds the text-2xs/text-3xs sizes, the drawer easing, the composer shadow and seam tokens and the workspace gutter variables, registers the new sizes with tailwind-merge, and replaces arbitrary appearance values with those tokens and Tailwind's scales. Upstream hunks were applied to Pylon's own versions of each file; the same exact-equivalent substitutions were applied to Pylon-only components. Three keyframes give way to starting-style transitions. The upstream shadcn/no-arbitrary-values lint rule is not ported because Pylon does not carry the @shadcn/lint plugin.
Ports upstream ed809f7ad274ebccdfbf029ccfd7ff2582fd486a (#13700). Adds the text-4xs (8px) and text-5xs (7px) sizes and registers them with tailwind-merge, so provider instance badges keep the size they had before the scale migration snapped them to 10px. The pull request author-initial avatar, 8px in Pylon, also uses text-4xs.
rynfar
force-pushed
the
upstream/2026-09-30-web-theme-tokens
branch
from
September 30, 2026 15:50
ff211f1 to
21ae282
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Web components styled status tones with raw palette classes (
text-amber-600 dark:text-amber-300,bg-sky-500, ...) and appearance values with arbitrary literals (text-[11px],text-[10px],ease-[cubic-bezier(...)],shadow-[...]). Raw colours ignore custom themes, and the literals bypass the type, motion and elevation scales. Upstream moved both onto theme tokens; Pylon had only taken the thread-status subset (#908).Fix
Three commits, one per upstream source, for #865.
315fcca10a826d8aa1cbdffc3ef5b5eb5a1e2f9df26ee083fe41720207fb10616359500dcecc19d3ed809f7ad274ebccdfbf029ccfd7ff2582fd486a--text-4xs(8px) and--text-5xs(7px), line-height 1, registered with tailwind-merge; provider instance badges return to their pre-migration size.Token definitions (
apps/web/src/index.css,apps/web/src/lib/utils.ts)--text-2xs(11px / 16px line) and--text-3xs(10px / 14px line), registered with tailwind-merge socn()treats them as font sizes.--ease-drawer,--shadow-composer,--shadow-composer-dark,--background-image-composer-seam-below/above.--font-size-prompt-touch,--workspace-gutter,--workspace-gutter-start/end.prompt-stash-count-enter,snap-shot-contents-enterandprovider-update-pill-countdownkeyframes are removed; their three users now usestarting:transitions (no remaining references).Neither source touches mobile or any generated theme file, so nothing was regenerated.
How the class changes were applied
No file was taken from upstream. Each upstream hunk was applied only where Pylon's context matched exactly; every other hunk was re-targeted by hand or script onto the Pylon line carrying the same class, or skipped.
315fcca10af26ee083feSkipped as absent: the "Changed" stale label in
PullRequestCodeTaband its twotext-[11px]header lines;ComposerPromptEditorTiptap.tsxandContextChip.tsx(files Pylon does not have, 5 hunks); the reasoning-tracestroke-[1.8]chevrons and one agent-spawn label inMessagesTimeline; the glass-surface badge inProviderModelPicker. Partial:ComposerControlis structured differently in Pylon (it wrapsButton), so only therounded-(--control-radius)syntax change applies; the--control-icon-colorremoval does not.Pylon-only code
The same substitutions were applied to Pylon-only components where the token is an exact equivalent:
text-[10px]→text-3xs,text-[11px]→text-2xs,text-[12px]→text-xs,px-[calc(--spacing(2)-1px)]→px-1.75,leading-[1.125rem]→leading-4.5(18 further files, e.g.SessionGoalControl,SessionInputQueueControl,providerUsage/*,PairingRouteSurface). Left alone:components/ui/*(upstream leaves these too),composerInlineChip.ts(text-[12px]on an inline chip, where a token line-height would change the line box), and non-exact literals (text-[9px],text-[13px],text-[.65rem],leading-[1.45]) that upstream did not touch on lines Pylon has.Intentional visual changes (all from upstream)
warning, sky/blue →info, emerald →success, red →destructive; favourite staryellow-500→warning; attachment badgefuchsia-500→primary; quit-hold overlayneutral-700/white →foreground/background; provider radio hoverzinc-50→accent.text-2xs/text-3xscarry a line-height (16px / 14px). Text that used a baretext-[11px]/text-[10px]without an explicitleading-*previously inherited its line-height.text-[9px],text-[.6rem],text-[.65rem]→text-3xs(10px), matching upstream's final head for each of those lines. Formertext-[7px]badges usetext-5xsand formertext-[8px]usetext-4xs, so they do not change size. This includes the pull request author-initial avatar (pullRequestPresentation.tsx), which upstream's head renders attext-3xs; Pylon keeps its 8px there.text-[.7rem]→text-2xs(11px);text-[13px]/text-[0.8125rem]→text-smortext-xs;text-[1.4rem]→text-2xl.tracking-[0.08em]→tracking-widest(0.1em);tracking-[-0.005em]dropped;leading-[1.45]→leading-normal.blur-[2px]→blur-xs(4px) on redacted text;rounded-[20px]→rounded-3xl;rounded-[5px]→rounded-sm;stroke-[1.8]→stroke-2; several one-offshadow-[...]→ scale shadows.scrollbar-thumb-*/scrollbar-track-*on theme colours; citation chip focus outline and hover tint use theme colours.starting:transitions instead of keyframes (one-shot,motion-reducestill disables them).Icons.tsx(no visual change).Exclusions
shadcn/no-raw-colorsandshadcn/no-arbitrary-valueslint rules (vite.config.ts) are not ported: Pylon does not carry the@shadcn/lintplugin those rules come from, and adopting it is a separate dependency decision. Without the rule, Pylon-only code still holds some raw colours and arbitrary values.Verification
Run on the rebased head:
vp run -F @t3tools/web typecheck: passed (exit 0).cd apps/web && vp test run: 474 files, 6079 tests passed. Two assertions updated to follow their class (ProviderInstanceCard.test.ts,blur-[2px]→blur-xs, as upstream did;ProviderModelPicker.test.tsx,text-[7px]→text-5xs).vp linton the 131 changed files: 0 errors (warnings only, none from these class-name edits).vp fmt --check: clean.Limits: no rendered-client pass was done. Surfaces worth a human look, in light, dark and one custom theme: chat composer (elevation, attached banners and the context strip seam, stash count, approval/user-input panels); messages timeline work log and changed-files tree; sidebar thread rows and the provider-update pill countdown; Settings → Diagnostics and resource telemetry tables; Settings → Providers (instance card, redacted text blur, add-provider dialog); Settings → Keybindings and Theme; pull request detail, summary, timeline and code tabs; Usage page and pooled limits legend; Agents panel; context-window meter popover; onboarding wizard.
Model: Claude Opus 5.5. Harness: Claude Code in Pylon. Workflow: review-t3-upstream skill.