Repository navigation
fix(platform): apply brand color to primary-action button token - #2483
Merged
Merged
Conversation
The org brand color was injected only as the legacy `--primary` HSL token, which the flagship primary `Button` variant does not consume — it styles with the canonical `@tale/ui` `--color-accent-base` / `--color-accent-fg` tokens. So setting a brand color left primary buttons (and other accent surfaces) unchanged. Also inject the brand color into `--color-accent-base` / `--color-accent-fg` (theme-adjusted, contrast-handled) so primary UI visibly restyles in both light and dark, while keeping `--primary` wired for the badges/chat cards that read it. Locks the behaviour with a regression test on the provider's CSS-variable injection. Co-authored-by: Cursor <[email protected]>
yannickmonney
force-pushed
the
fix/brand-color-2394
branch
from
July 4, 2026 13:12
3ae7ab6 to
93623ad
Compare
Co-authored-by: Cursor <[email protected]>
Wait longer for the create-org Skip step during worker bootstrap and give the docs Playwright webServer more time after the search-index build.
The chat-picker spec toggled visible-in-chat only when off but always waited for Save to enable; when a prior serial test already saved visibility, Save stayed disabled and the shard failed.
# Conflicts: # services/platform/tests/e2e/specs/external-agent.spec.ts
9 tasks done
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.
Summary
Setting an organization brand color had no visible effect on the flagship primary UI. The brand color was injected only as the legacy
--primaryHSL token (branding-provider.tsx), but the primaryButtonvariant in@tale/uistyles with the canonical tokens--color-accent-base/--color-accent-fg(bg-accent-base text-accent-fg) — which the provider never set. Two token vocabularies coexist (seepackages/ui/src/globals.cssheader) and only one was wired.This takes the issue's "if brand color stays" branch: map the brand color onto the token the design system actually uses for primary actions/highlights, in both themes, with contrast handling — without collapsing the two-field contract or a data migration (that broader redesign stays with #1960).
--color-accent-base(raw hex) and--color-accent-fg(#030712/#ffffffto match the globals.css accent-fg tokens) from the theme-adjusted, contrast-checked brand color, alongside the existing--primary/--primary-foreground.adjustColorForTheme/isLightColorhelpers — no new hex logic, no hardcoded brand color.accentColorkeeps its existing navigation-highlight effect; both branding fields now have a visible product effect.Contract / scope decision
brandColor→ primary-action surface:--primary(badges, chat cards) and--color-accent-base/--color-accent-fg(primaryButton+ accent surfaces).accentColor→ navigation highlight (unchanged; already wired inline innavigation.tsx/tab-navigation.tsx/mobile-bottom-nav.tsx).@tale/uiButtonchange (it's used by app/web/docs which have no brand color); the fix lives at the injection site.Closes #2394. Cross-linked with #1960 (the single-accent redesign + Convex migration remains that issue's scope).
Test plan
branding-provider.test.tsx— observed red on old code (--color-accent-baseempty), green after the fix; also asserts--primarystays wired and that nothing is injected when no brand color is set.bun run --filter @tale/platform test --project client app/components/branding app/features/settings/branding— 43 passed.bun run format,bun run lint— clean;@tale/platformtypecheck clean.Acceptance criteria
--color-accent-base, the primaryButton's token, theme-adjusted per resolved theme).brandColor→ primary/accent surfaces;accentColor→ nav highlight).Caveats
document.documentElement.style.setPropertycalls; the consumption side (bg-accent-base→--color-accent-base, defined inglobals.css) is source-verified. The existing--primaryinjection uses the identical CSSOM mechanism and is confirmed working in the issue.--color-accent-basein the dashboard tints all accent-base surfaces (buttons, checkbox-checked, slider, section, accordion) with the brand color — the intended semantics of a brand color; contrast is handled per theme. Only runs where an active org is set (login/shell untouched).Made with Cursor