Skip to content

refactor(ui): finish the primary-colour migration to the accent teal - #282

Merged
tyreseluo merged 1 commit into
mainfrom
refactor/primary-color-to-accent
Jul 31, 2026
Merged

refactor(ui): finish the primary-colour migration to the accent teal#282
tyreseluo merged 1 commit into
mainfrom
refactor/primary-color-to-accent

Conversation

@tyreseluo

Copy link
Copy Markdown

design_tokens.rs has described the teal RBX_ACCENT as "the single primary/CTA/focus color" for a while, with the legacy blue #0F88FE deprecated and slated to migrate "per surface as §5 refactors land". About 40 call sites were still on the blue — which is why login could show a teal primary button stacked directly on a bright blue one.

Why all at once, not per surface

Doing this a screen at a time would only have lengthened the stretch where the two colours sit side by side, and that mismatch is the bug. Staging it makes the symptom last longer, not shorter.

Two conditions made a single move safe, and I checked both before touching anything:

  • Every one of the ~40 sites means "primary", "active" or "focus"color, color_active, border_color_active, border_color_focus, mark_color_active, progress_color. That is precisely what the accent is defined to be, so no site wanted to stay blue.
  • RBX_LEGACY_BLUE had no users at all, so nothing depended on the old value.

The change

COLOR_ACTIVE_PRIMARY        #0f88fe -> #119FB3   (RBX_ACCENT)
COLOR_ACTIVE_PRIMARY_DARKER #106fcc -> #0E8C9E   (RBX_ACCENT_HOVER)

Not one call site is edited. All ~40 follow the alias, so they cannot drift apart or be half-migrated, and reverting is the same two lines.

One deliberate exception

COLOR_INFO_BLUE happened to share the retired value, but it marks an informational badge in the space lobby — not a primary action. It moves to the system's own info blue (#1E6FBF, mirroring RBX_INFO_FG) so it stays blue instead of being swept along with the primary.

Note for reviewers

The DSL side keeps literals rather than naming RBX_*. shared/mod.rs registers styles before design_tokens, so a token reference there resolves to nothing and silently falls back to grey at runtime — cargo check cannot see it. (That exact mistake produced grey day-dividers earlier in #276 and is now recorded in a comment beside each literal.) The Rust consts have no ordering constraint and name the tokens directly, which keeps the two sides tied together.

Comments in icon_button.rs and light_themed_dock.rs that described the colour as blue are updated, as is the migration note in design_tokens.rs.

Testing

cargo test --lib --features agent_chat — 586 pass. Ran the app and walked the affected surfaces: login, settings, room settings, invite and bot-binding modals, TSP wallet/DID modals, add-room, space lobby, the dock tab highlight, progress bar, mention autocomplete, and input focus rings — all now teal, with the space-lobby info badge still blue. Confirmed from the app log that no RBX_* property fails to resolve.

🤖 Generated with Claude Code

`design_tokens.rs` has described the teal `RBX_ACCENT` as "the single
primary/CTA/focus color" for a while, with the legacy blue `#0F88FE` deprecated
and slated to migrate "per surface as §5 refactors land". Roughly 40 call sites
were still on the blue, which is why a screen like login could show a teal
primary button stacked directly on a bright blue one.

Doing this a screen at a time would only have lengthened the stretch where the
two sit side by side — the mismatch *is* the bug. So the two aliases resolve to
the accent instead, and every call site moves together:

    COLOR_ACTIVE_PRIMARY        #0f88fe -> #119FB3   (RBX_ACCENT)
    COLOR_ACTIVE_PRIMARY_DARKER #106fcc -> #0E8C9E   (RBX_ACCENT_HOVER)

Not one call site is edited. All ~40 mean "primary", "active" or "focus" — which
is what the accent is defined to be — so there was no site that wanted to stay
blue, and `RBX_LEGACY_BLUE` had no users at all. Reverting is the same two lines.

`COLOR_INFO_BLUE` shared the retired value by coincidence: it marks an
informational badge in the space lobby, not a primary action. It moves to the
system's own info blue (`#1E6FBF`, mirroring `RBX_INFO_FG`) so it stays blue
rather than being swept along with the primary.

The DSL side keeps literals: styles.rs registers before design_tokens.rs, so
`RBX_*` is not resolvable there — referencing it fails silently at runtime and
falls back to grey. The Rust consts have no such constraint and name the tokens
directly. Comments in icon_button.rs and light_themed_dock.rs that described the
colour as blue are updated, as is the migration note.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tyreseluo
tyreseluo merged commit 8b68c40 into main Jul 31, 2026
12 checks passed
@tyreseluo
tyreseluo deleted the refactor/primary-color-to-accent branch July 31, 2026 07:13
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