Skip to content

feat(frontend): retheme to warm brand palette (token-level, light + dark)#5392

Open
mmabrouk wants to merge 1 commit into
mainfrom
retheme-warm-palette
Open

feat(frontend): retheme to warm brand palette (token-level, light + dark)#5392
mmabrouk wants to merge 1 commit into
mainfrom
retheme-warm-palette

Conversation

@mmabrouk

Copy link
Copy Markdown
Member

Context

The web app shipped in a cool navy/zinc palette that no longer matches the Agenta brand. This PR retheme it to the warm brand palette in both light and dark mode, at the token level, so the change flows through the whole app rather than being painted on per screen.

What a user sees:

  • Light mode: the canvas becomes a warm off-white (#F6F5F3), chrome sits one step brighter (#FCFBFA), text is near-black (#242424), and the brand yellow (#F2F25C / #E7E712) appears sparingly as an accent.
  • Dark mode: warm near-blacks (#1E1C1D / #2A2828) replace the old cool grays, and the primary CTA (Send / submit) is the brand yellow.

Screenshots and a screen recording of the walkthrough follow in the first comment.

Why the diff is larger than "edit palette.ts and regenerate"

The intent was a pure token swap. An audit of every hardcoded color under web/ found three reasons that wasn't enough:

  1. The two token JSONs are hand-maintained, not generated. tokens/antd-themeConfig.json (593 values) and tokens/antd-tailwind.json (66 values) feed antd's ConfigProvider and Tailwind's color scale directly. Regenerating theme-variables.css does not touch them, so they were remapped by hand, key-aware, with the file structure otherwise byte-identical.
  2. The Tremor brand block was never seeded. tailwind.config.ts called antd's theme.getDesignToken() with no seed, so Tremor's brand colors were antd's stock blue (#1677ff), not Agenta's color, in both light and dark. This was already wrong before the retheme. It is now seeded from the real design tokens.
  3. ~35 component and CSS files hardcoded old-palette hex that a token regeneration can never reach (inline styles, Recharts stroke props, .dark-scoped CSS rules, Tailwind arbitrary values). Those were switched to tokens.

Hardcoded-hex audit

A case-insensitive sweep of web/ for the old palette's literals (outside the token source files) found 255 matching lines across 50 files:

  • ~49 lines tokenized in this PR (inline styles, chart strokes, dark-scoped CSS, arbitrary Tailwind values).
  • ~78 lines intentionally left as inert var(--ag-c-*, #fallback) fallbacks (the var is always defined, so the hex never paints), JSDoc token-reference comments, or fixed decorative palettes (avatar initials pairs, template accent crayons) where the navy hex is coincidental, not a theme role.
  • 132 raw occurrences left untouched in two byte-identical, orphaned onboarding SVGs (onboard-page-grids.svg, OSS + EE) that no page imports. A static SVG in public/ cannot consume CSS vars, so these need a re-export or deletion (follow-up).

Deliberate skips, called out so a reviewer does not think they were missed:

Judgement calls flagged for review

  • Selected-state tint #FBFBE9 (with one minted hover step #F5F5D8) for controlItemBgActive, Table.rowSelectedHoverBg, and templateStrip.selectedBg.
  • Neutral user chat bubble kept neutral rather than tinted brand.
  • Dark primary derivation limit. antd's dark algorithm derives #D1D151 from the #F2F25C seed and no seed can derive a true #F2F25C (the cap is ~#DCDC61). So the primary Button (CTA / Send) is pinned to #F2F25C with #1E1C1D text, while other primary-tinted controls use the derived #D1D151 family (still AA). A global true-yellow needs a custom derivative algorithm (follow-up).
  • Generator DARK_TOKEN_OVERRIDES. The generator gained overrides for colorBgContainer/BgLayout/BgSpotlight/Border/BorderSecondary/Split/controlItemBgActive/colorPrimaryText so the antd dark layer matches the vars instead of staying cool (#141414/#424242).
  • colorBgBase stays #000000 in dark at the antd map level. It is a seed token (antd strips seed overrides) and seeding it warm derives off-hue outputs, so the antd value stays #000000 while --ag-colorBgBase is #171516.
  • Spotlight tiles, not colorPrimary, for white-monogram chips (harness selector, gateway-tool descriptor, agent-home templates, sticky banner). colorPrimary would flip to yellow in dark under fixed white text; colorBgSpotlight stays dark in both themes.

QA evidence

  • A computed-style sweep of the running app found zero old-navy values remaining.
  • Tags, semantic colors, and chart series colors were verified unchanged.
  • Contrast (WCAG), all AA or better:
Pair Ratio Grade
#242424 on #F6F5F3 14.25 AAA
#676770 on #FCFBFA 5.42 AA
rgba(2,1,17,0.6) on #FFFFFF 5.60 AA
#FFFFFF on #242424 (primary button) 15.52 AAA
#1E1C1D on #F2F25C (dark primary button) 14.23 AAA
#1E1C1D on #D1D151 (derived dark family) 10.45 AAA
#FFFFFF on #1E1C1D 16.95 AAA
#242424 on #FBFBE9 (selected tint) 14.84 AAA
White on spotlight (light / dark) 17.12 / 10.80 AAA

Yellow is never used as a text color. The #9C9C9A placeholder (2.75 on white) is exempt as a placeholder/disabled role and still improves on the old #BDC7D1 (1.79).

Two QA nits, left as-is:

  • The dark modal mask is antd's default rgba(0,0,0,0.45), not a warm ink.
  • A dark modal can briefly stack three yellow accents when an input inside it is focused.

Follow-ups

  • Rename the --ag-rgba-051729-* and --ag-c-* var stems (values are repointed; the names still carry the old navy hex).
  • A custom dark derivative algorithm in ThemeContextProvider for a true global #F2F25C.
  • A warm drawerDark tier (still cool-gray apart from the focus accent).
  • Re-export or delete the orphaned onboard-page-grids.svg (OSS + EE).
  • Repoint the zinc-4 text-class divergence in agenta-ui/utils/styles.ts (text-zinc-4 paints #D6D6D3 while the role token is #9C9C9A).

Tests

  • pnpm lint-fix green, tailwind config tsc exit 0.
  • The dev web container hot-reloaded every change with clean compiles.
  • Computed-style sweep on the live app (zero old-navy), contrast table above.

What to QA

  • Load the app in light mode. Canvas is warm off-white, chrome one step brighter, text near-black, yellow only on the primary CTA. No cool navy or blue anywhere.
  • Toggle dark mode. Surfaces are warm near-blacks, the Send / submit button is brand yellow with dark text.
  • Open a trace and an evaluation. Chart strokes, tags, and semantic (success/error) colors are unchanged.
  • Open the playground and a drawer/modal. Selected rows use the warm yellow tint; nothing regresses to navy.
  • Regression: confirm tag colors, chart series colors, and status badges look the same as before.

https://claude.ai/code/session_016gbn9cBfQdP7Sexn2sxJCk

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 19, 2026
@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment Jul 19, 2026 1:50pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: af4d4315-7ac8-4e20-a5c9-30f758602ccb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This change replaces hardcoded UI colors with theme variables, revises light and dark palette definitions, updates generated Ant Design and Tailwind tokens, and applies the new tokens across OSS components, shared packages, global styles, charts, editors, overlays, and icons.

Changes

Theme token migration

Layer / File(s) Summary
Palette and legacy token definitions
web/oss/src/styles/theme/*, web/oss/src/styles/theme-variables.css
Light and dark semantic colors, surface roles, alpha fills, zinc scales, component overrides, and legacy token mappings are updated.
Generated Ant Design and Tailwind tokens
web/oss/src/styles/tokens/*, web/oss/tailwind.config.ts, web/scripts/generate-tailwind-tokens.ts
Generated theme values and Tailwind seeding now use the revised palette and explicit dark-token overrides.
Global and editor style migration
web/oss/src/styles/*.css
Animations, editor surfaces, table borders, evaluation controls, dark-mode overrides, and stripe colors reference theme variables.
OSS component token adoption
web/oss/src/components/*, web/oss/src/lib/helpers/colors.ts
Component borders, shadows, charts, overlays, icons, layouts, templates, and color helpers use theme-driven values.
Shared package token adoption
web/packages/*
Shared annotation, entity, and UI components adopt updated theme variables for borders, avatars, metric bars, chips, icons, and style mappings.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 60.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed It clearly summarizes the main change: a token-level warm brand retheme across light and dark modes.
Description check ✅ Passed It directly describes the palette retheme and the broader token-level updates in scope.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch retheme-warm-palette

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mmabrouk

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
web/oss/src/styles/globals.css (1)

868-873: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Update the adjacent hardcoded colors to use theme variables.

While migrating border-color to a theme variable, the background-color on line 871 remains a hardcoded #1f1f1f, and color on line 870 uses a hardcoded rgba value. To ensure full theme consistency and responsiveness to future palette updates, consider updating these to appropriate theme variables (such as var(--ag-colorBgContainerDisabled) and var(--ag-colorTextDisabled)).


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d990562a-de49-4e59-9d82-f14e05e665d5

📥 Commits

Reviewing files that changed from the base of the PR and between 3b0c0cb and b8a16d1.

⛔ Files ignored due to path filters (1)
  • web/oss/src/styles/theme/antd-overrides.generated.ts is excluded by !**/*.generated.*
📒 Files selected for processing (42)
  • web/oss/src/components/DeploymentsDashboard/components/DeploymentCard/index.tsx
  • web/oss/src/components/DrillInView/DrillInFieldHeader.tsx
  • web/oss/src/components/DrillInView/TraceSpanDrillInView.tsx
  • web/oss/src/components/EvalRunDetails/components/EvaluatorMetricsChart/BarChart.tsx
  • web/oss/src/components/EvalRunDetails/components/EvaluatorMetricsChart/HistogramChart.tsx
  • web/oss/src/components/EvalRunDetails/components/views/ConfigurationView/components/EvaluatorSection.tsx
  • web/oss/src/components/EvalRunDetails/components/views/ConfigurationView/index.tsx
  • web/oss/src/components/EvalRunDetails/components/views/OverviewView/components/OverviewPlaceholders.tsx
  • web/oss/src/components/EvalRunDetails/components/views/SingleScenarioViewerPOC/ScenarioAnnotationPanel/RunOverlay.tsx
  • web/oss/src/components/Evaluations/MetricDetailsPopover/assets/ResponsiveMetricChart.tsx
  • web/oss/src/components/Layout/assets/styles.ts
  • web/oss/src/components/Onboarding/OnboardingCard.tsx
  • web/oss/src/components/TemplateStrip/components/CopiedToast.tsx
  • web/oss/src/components/pages/agent-home/assets/templates.ts
  • web/oss/src/components/pages/app-management/modals/CustomAppCreationLoader.tsx
  • web/oss/src/components/pages/observability/components/ObservabilityHeader/useBatchAddTracesToQueue.tsx
  • web/oss/src/components/pages/prompts/components/PromptsHouseIcon.tsx
  • web/oss/src/components/pages/prompts/components/SetupWorkflowIcon.tsx
  • web/oss/src/components/pages/prompts/hooks/usePromptsColumns.tsx
  • web/oss/src/components/pages/prompts/modals/DeleteFolderModal.tsx
  • web/oss/src/components/pages/settings/Secrets/SecretProviderTable/index.tsx
  • web/oss/src/lib/helpers/colors.ts
  • web/oss/src/styles/animations.css
  • web/oss/src/styles/code-editor-styles.css
  • web/oss/src/styles/editor-theme.css
  • web/oss/src/styles/evaluations.css
  • web/oss/src/styles/globals.css
  • web/oss/src/styles/human-evals.css
  • web/oss/src/styles/theme-variables.css
  • web/oss/src/styles/theme/legacy-shim.ts
  • web/oss/src/styles/theme/palette.ts
  • web/oss/src/styles/tokens/antd-tailwind.json
  • web/oss/src/styles/tokens/antd-themeConfig.json
  • web/oss/tailwind.config.ts
  • web/packages/agenta-annotation-ui/src/components/AnnotationSession/ConfigurationView.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/HarnessSelectControl.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/itemDescriptors.tsx
  • web/packages/agenta-ui/src/CellRenderers/EvaluatorMetricBar.tsx
  • web/packages/agenta-ui/src/components/presentational/avatar/utils.ts
  • web/packages/agenta-ui/src/type-chip/TypeChip.tsx
  • web/packages/agenta-ui/src/utils/styles.ts
  • web/scripts/generate-tailwind-tokens.ts

const RunOverlay = ({isRunning, onRun}: RunOverlayProps) => {
return (
<div className="absolute inset-0 z-10 flex flex-col items-center justify-center bg-white/90 dark:bg-[#141414]/90 backdrop-blur-md rounded-lg">
<div className="absolute inset-0 z-10 flex flex-col items-center justify-center bg-[var(--ag-rgba-fff-78)] backdrop-blur-md rounded-lg">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Preserve a dark-theme overlay background.

--ag-rgba-fff-78 is a fixed white 78% overlay, so this change makes the overlay bright white in dark mode instead of retaining the previous dark appearance. Add a dark-theme override backed by a dark token.

Proposed fix
-        <div className="absolute inset-0 z-10 flex flex-col items-center justify-center bg-[var(--ag-rgba-fff-78)] backdrop-blur-md rounded-lg">
+        <div className="absolute inset-0 z-10 flex flex-col items-center justify-center bg-[var(--ag-rgba-fff-78)] dark:bg-[var(--ag-rgba-000-45)] backdrop-blur-md rounded-lg">
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div className="absolute inset-0 z-10 flex flex-col items-center justify-center bg-[var(--ag-rgba-fff-78)] backdrop-blur-md rounded-lg">
<div className="absolute inset-0 z-10 flex flex-col items-center justify-center bg-[var(--ag-rgba-fff-78)] dark:bg-[var(--ag-rgba-000-45)] backdrop-blur-md rounded-lg">

Comment on lines 1 to +2
body {
--not-available-stripe: #eaeff5;
--not-available-stripe: var(--ag-zinc-2);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Remove the redundant and conflicting dark mode override.

Because var(--ag-zinc-2) automatically resolves to the correct dark color (#302e2d) via theme-variables.css, the explicit .dark body block at the bottom of this file is no longer needed. Leaving it in place will overwrite your new CSS variable with the stale, hardcoded #2a2a2a value in dark mode, preventing the new palette from applying correctly.

Please delete the following block from lines 83-85:

.dark body {
    --not-available-stripe: `#2a2a2a`;
}

Comment on lines +28 to +36
"--ag-c-394857": {light: "#4a4a50", dark: "var(--ant-color-text-secondary)"},
"--ag-c-475467": {light: "#475467", dark: "var(--ant-color-text-tertiary)"},
"--ag-c-475569": {light: "#475569", dark: "var(--ant-color-text-tertiary)"},
"--ag-c-586673": {light: "#586673", dark: "var(--ant-color-text-tertiary)"},
"--ag-c-586673": {light: "#676770", dark: "var(--ant-color-text-tertiary)"},
"--ag-c-64748B": {light: "#64748b", dark: "var(--ant-color-text-tertiary)"},
"--ag-c-667085": {light: "#667085", dark: "var(--ant-color-text-tertiary)"},
"--ag-c-667085BF": {light: "#667085bf", dark: "rgba(255, 255, 255, 0.749)"},
"--ag-c-6B7280": {light: "#6b7280", dark: "var(--ant-color-text-tertiary)"},
"--ag-c-758391": {light: "#758391", dark: "var(--ant-color-border)"},
"--ag-c-758391": {light: "#9c9c9a", dark: "var(--ant-color-border)"},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Use correct CSS variable prefixes and avoid hand-editing generated files.

The dark values specified here use the var(--ant-...) prefix (e.g., var(--ant-color-text-secondary)), but the generated theme-variables.css (e.g., line 539) contains var(--ag-...) for these exact same variables. This indicates that theme-variables.css was hand-edited to fix the prefixes, which violates the coding guideline to never hand-edit generated files.

If pnpm generate:tailwind-tokens is run again in the future, it will overwrite the CSS with these broken --ant- prefixes. Please update the source values in this file to use the correct --ag- prefixes (e.g., var(--ag-colorTextSecondary)) across all entries, and re-run the generation script to output the CSS cleanly.

Source: Coding guidelines

@github-actions

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Preview URL https://gateway-production-4545.up.railway.app/w
Project agenta-oss-pr-5392
Image tag pr-5392-78d2ad2
Status Deployed
Railway logs Open logs
Workflow logs View workflow run
Updated at 2026-07-19T14:00:07.708Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend size:L This PR changes 100-499 lines, ignoring generated files. UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant