Commit 4c5237c
feat(webapp): themes refinement, new black & white themes, 2 accessibility toggles (#4547)
## What this does
Rounds out the theme work behind the existing `hasThemeSwitcher` flag.
**Two new themes.** Black and White sit alongside Dark and Light. They
inherit their neighbour's whole token set and only pin their surfaces
flat, so sections are separated by grid lines rather than layered fills.
**`System` is now configurable at both ends.** You choose which theme
the OS light setting lands on (Light or White) and which the dark
setting lands on (Dark or Black).
**Two accessibility toggles.**
- *Stronger colors* — swaps tinted status chips for solid fills, drops
decorative icon accents to monochrome, and darkens chart series that
didn't clear 3:1 on a white plot.
- *Underline links* — underlines body-text links, so an underline always
means the preference is on rather than being a hover style.
**Contrast slider.** Stores a 0–100 position within the active theme's
own range rather than a shared scale, so 35% stays 35% when you switch
themes. Each theme maps it in CSS, which keeps `system` working before
hydration.
**Appearance in the account popover.** A submenu listing the themes with
a check against the current one, plus a link through to the full set on
your profile. Picking one applies immediately rather than waiting for
the write to round-trip.
**Profile page.** Each row now saves on its own — no submit button. Name
and email show their value inline with an edit button; the email row is
read-only when an identity provider owns the address.
**A `/storybook/colors` audit page.** Renders every colour-carrying
pattern in the app once per theme plus once under Stronger colors, and
measures contrast ratios off the live DOM rather than a hard-coded
table, so it can't go stale.
---
## Demo
https://github.com/user-attachments/assets/d56cd4d8-719f-4ec5-a990-e04cdb98def1
---
## Compatibility
The stored preference shape is unchanged (`version: "1"`), and the four
new fields are all optional. The retired `classic` theme falls back to
Dark, whose palette at contrast 0 is what Classic shipped.
One deliberate change worth knowing: the default contrast moves from 50
to 0, so existing users who never touched the slider will see slightly
less contrast than before. That's what makes 0 mean "the base palette".
---
## Testing
Switched between every theme from both the account popover and the
profile page, in the expanded and collapsed rail, checking `data-theme`
follows and survives a reload. Dragged the contrast slider in each theme
and confirmed the percentage label tracks the handle and resnaps if a
save fails. Checked both accessibility toggles across the
`/storybook/colors` page, which is also where the contrast ratios were
read from. Confirmed the Appearance entry stays hidden for a non-admin
while the flag is off.
<!-- conductor-workspace-link -->
---
[Open workspace in
Conductor](https://app.conductor.build/workspace/fee50611-7623-4422-bada-ed1cba317ed1)
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent dd3a1c0 commit 4c5237c
154 files changed
Lines changed: 7801 additions & 2122 deletions
File tree
- .server-changes
- apps/webapp
- app
- assets
- icons
- images
- components
- billing
- dashboard-agent
- errors
- logs
- primitives
- charts
- runs/v3
- agent
- ai
- schedules
- hooks
- models
- presenters
- v3
- routes
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.apikeys
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.branches
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.concurrency
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments.$deploymentParam
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.deployments
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.query
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.queues
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.regions
- _app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.tasks.standard.$taskParam
- _app.orgs.$organizationSlug.settings.private-connections.new
- _app.orgs.$organizationSlug.settings.team
- account._index
- login._index
- login.mfa
- login.sso
- resources.account.mfa.setup
- resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam
- storybook.accordion
- storybook.agent-investigation
- storybook.agent-report
- storybook.agent-ui
- storybook.agent-view-blocks
- storybook.agent-watch
- storybook.ai-agent
- storybook.animated-panel
- storybook.avatar
- storybook.badges
- storybook.buttons
- storybook.callout
- storybook.charts
- storybook.checkboxes
- storybook.clipboard-field
- storybook.code-block
- storybook.colors
- storybook.copy
- storybook.date-fields
- storybook.dates-timers
- storybook.detail-cell
- storybook.dialog
- storybook.environment-label
- storybook.filter
- storybook.free-plan-usage
- storybook.icons
- storybook.indicators
- storybook.info-panel
- storybook.inline-code
- storybook.input-fields
- storybook.layout
- storybook.loading-bar-divider
- storybook.log-levels
- storybook.page-header
- storybook.pagination
- storybook.popover
- storybook.pricing-callout
- storybook.radio-group
- storybook.resizable
- storybook.run-and-span-timeline
- storybook.run-statuses
- storybook.search-fields
- storybook.segmented-control
- storybook.select
- storybook.settings-rows
- storybook.sheet
- storybook.shortcuts
- storybook.simple-form
- storybook.slider
- storybook.spinner
- storybook.stepper
- storybook.streamdown
- storybook.switch
- storybook.table
- storybook.tabs
- storybook.textarea
- storybook.timeline
- storybook.toast
- storybook.tooltip
- storybook.tree-view
- storybook.tsql-editor
- storybook.typography
- storybook.unordered-list
- storybook.usage
- storybook
- services
- utils
- v3
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
Binary file not shown.
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
| 343 | + | |
346 | 344 | | |
347 | 345 | | |
348 | 346 | | |
| |||
0 commit comments