Skip to content

chore(frontend): palette cleanup: hex migration, chart tokens, chip outlines, dark repairs - #5973

Merged
mmabrouk merged 3 commits into
release/v0.112.0from
chore/palette-cleanup
Aug 12, 2026
Merged

chore(frontend): palette cleanup: hex migration, chart tokens, chip outlines, dark repairs#5973
mmabrouk merged 3 commits into
release/v0.112.0from
chore/palette-cleanup

Conversation

@mmabrouk

Copy link
Copy Markdown
Member

What this does

Post-merge cleanup round for the recolor sprint, as agreed in the #5943 review: move raw hex to the palette system, tokenize the charts, restore reference-chip outlines, and repair the places dark mode was demonstrably broken.

Changes

Hex-to-palette migration (435 hex-bearing lines at the sprint's start, 136 now, survivors documented below)

  • The agent-accent chip that was copy-pasted across 6 files now reads --ag-type-agent-bg/-text.
  • #ff4d4f / #52c41a / #faad14 moved to antd semantic tokens (see veto table 1).
  • 34 dead #hex fallbacks stripped from var(--ag-c-*, #hex) across 11 files (each token verified defined in both themes first).
  • New runStatus palette role replaces the status-dot table that was byte-identical in three files (theme-blind by design: zero rendered change).

Chart tokenization

  • palette.ts now owns chartSeries (5 ordered light/dark pairs) and chart chrome roles (grid/axis/reference/track), emitted as --ag-chart-*.
  • chartPalette.ts derives from the palette instead of holding literals; chart components consume the CSS variables directly.

Reference-chip outlines (review follow-up from #5943)

  • referenceTag uses a new outlinedTagTone(): border = the slot's own text color at 0.22 alpha light / 0.30 dark. Flat environmentTag/presetTag unchanged.

Dark-mode repairs (founder-approved exception to the dark freeze: fix only what is demonstrably broken)

  • 31 sites pointed at --ag-c-97A4B0, which was never emitted anywhere, so their hardcoded pre-recolor fallback was painting in BOTH themes. Now --ag-zinc-5 per the palette's own alias table. 4 more sites on undefined --ag-c-D6DEE6--ag-zinc-3.
  • 6 drill-in header links: raw Tailwind blue (light) / #58a6ff (dark) → --ag-btn-link. This makes palette.ts's existing "absorbs the 6× #58a6ff literal" comment true for the first time.
  • 5 foreground uses of retired navy #1c2c3d (invisible on the dark surface: Prompts-page icons, observability progress fill, deployment-card border, eval swatch) → colorText.
  • #BDC7D1 folder glyphs → colorTextQuaternary; EnvironmentStatus dots → --ag-env-*-text (matches the approved environment tag tones).
  • junit.xml untracked and ignored; dead editorChip palette family deleted (generated nowhere, imported by nobody).

Veto table 1 — seed-token dark shifts (each is a one-line revert)

antd derives dark values for colorError/Success/Warning from the seed, so these three migrations shift dark slightly:

file change dark before → after
ResultComponent.tsx:18, SkillUploadZone.tsx:82, SkillFormView.tsx:140, ItemRow.tsx:173,252 #ff4d4fcolorError #ff4d4f#dc4446
ResponsiveMetricChart.tsx (4 marker attrs) #52c41acolorSuccess #52c41a#49aa19
ResponsiveFrequencyChart.tsx:234,274 #faad14colorWarning #faad14#d89614

Veto table 2 — dark repairs (rendered values, read live)

group old (light | dark) new (light | dark)
A: 31 sites on undefined --ag-c-97A4B0 (DrillIn/SchemaControls cluster) #97a4b0 | #97a4b0 #a3a19f | #5c5c5c
B: 4 sites on #D6DEE6 (SkillUploadZone, CustomAppCreationLoader) #d6dee6 | #d6dee6 #e5e5e3 | #383838
C: 6 link sites (both DrillInFieldHeader files) #2563eb | #58a6ff #5e5e08 | #8ccfff
D: 5 navy foregrounds (Prompts icons, observability, DeploymentCard, ConfigurationView) #1c2c3d | #1c2c3d #242424 | rgba(255,255,255,0.85)
D*: Layout banner background (styles.ts:31) — brand alignment, NOT a broken-dark fix, separately vetoable #1c2c3d | #1c2c3d rgba(36,36,36,0.9) | #424242 (white text stays legible in both)
E: 2 folder glyphs (Prompts page) #bdc7d1 | #bdc7d1 #a3a19f | rgba(255,255,255,0.25)
F: EnvironmentStatus dots #73D13D/#FF7A45/#9254DE both themes env-tag text tones per theme

Verification

  • Generated-file purity: across all regenerations, theme-variables.css changed on exactly the 12 reference-border lines plus the 17 new --ag-chart-* / --ag-run-status-* additions; no other pre-existing value changed in either theme. The final dark-repair round was a pure generator no-op (only existing roles consumed).
  • Dark freeze honored everywhere except the two veto tables above.
  • Live-verified in the running app, both themes: reference-chip borders paint, chart vars resolve in SVG attributes, the two worst dark repairs read the new values off rendered elements.
  • tsc --noEmit clean (oss + touched packages), prettier/eslint clean, dev stack healthy throughout.

Deliberately left (documented for the next round)

  • 62 hex lines that are correct as-is (avatar/template ramps, brand logo colors, mask-luminance stops).
  • ~72 lines needing a real design decision, sharpest: chart grid/axis greys diverge across four chart families, and the two that look wrong in light (#f0f0f0/#d9d9d9) are the only grids VISIBLE in dark, so converging them blindly would regress dark. Needs one intentional grid-strength decision per theme.
  • The --ag-c-* shim crosses roles between themes (--ag-c-EAEFF5 = border in light but elevated surface in dark), so remaining shim sites need per-site human decisions; there is no safe find-and-replace.

…outline reference chips

- Hex-to-palette migration: agent-accent chip deduped onto --ag-type-agent-* (6 files), #ff4d4f/#52c41a/#faad14 onto antd semantic tokens, dead var() fallbacks stripped (34 across 11 files)
- chartSeries + chart chrome roles in palette.ts, emitted as --ag-chart-*; chartPalette.ts derives from the palette
- runStatus role consolidates the status-dot table duplicated across three files (byte-identical both themes)
- Reference chips regain a subtle outline (slot text colour at low alpha)
- junit.xml removed from tracking and ignored
- 31 sites on undefined --ag-c-97A4B0 (fallback was painting pre-recolor navy grey in both themes) -> --ag-zinc-5; 4 sites on undefined --ag-c-D6DEE6 -> --ag-zinc-3
- 6 drill-in header links from raw Tailwind blue / #58a6ff -> --ag-btn-link (makes palette.ts's absorb claim true)
- 5 foreground #1c2c3d navy sites (invisible on dark) -> colorText; layout banner bg -> colorBgSpotlight (brand alignment, separately vetoable)
- #BDC7D1 folder glyphs -> colorTextQuaternary; EnvironmentStatus dots -> --ag-env-*-text
Per-line before/after table in the PR description; generator run was a pure no-op (only existing roles consumed)
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Aug 12, 2026
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
agenta-documentation Blocked Blocked Aug 12, 2026 11:07am

Request Review

@mmabrouk
mmabrouk merged commit 74b89c2 into release/v0.112.0 Aug 12, 2026
31 of 33 checks passed
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: ad8856c2-8786-40da-9253-fa8e50ffd016

📥 Commits

Reviewing files that changed from the base of the PR and between 50da580 and aeae0b6.

📒 Files selected for processing (51)
  • .gitignore
  • web/oss/src/components/DeploymentsDashboard/components/DeploymentCard/index.tsx
  • web/oss/src/components/DrillInView/DrillInFieldHeader.tsx
  • web/oss/src/components/Drives/OriginTag.tsx
  • web/oss/src/components/EntityIdentity/fields.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/EvaluatorMetricsChart/index.tsx
  • web/oss/src/components/EvalRunDetails/components/FocusDrawerSidePanel.tsx
  • web/oss/src/components/EvalRunDetails/components/views/ConfigurationView/components/RunSummaryCard.tsx
  • web/oss/src/components/EvalRunDetails/components/views/ConfigurationView/index.tsx
  • web/oss/src/components/EvalRunDetails/components/views/OverviewView/components/MetadataSummaryTable.tsx
  • web/oss/src/components/EvaluationRunsTablePOC/components/cells/StatusCells.tsx
  • web/oss/src/components/Evaluations/MetricDetailsPopover/assets/ResponsiveFrequencyChart.tsx
  • web/oss/src/components/Evaluations/MetricDetailsPopover/assets/ResponsiveMetricChart.tsx
  • web/oss/src/components/Layout/assets/styles.ts
  • web/oss/src/components/Playground/Components/AgentCommitNotice.tsx
  • web/oss/src/components/Playground/Components/PlaygroundHeader/index.tsx
  • web/oss/src/components/PlaygroundRouter/PlaygroundLoadingShell.tsx
  • web/oss/src/components/ResultComponent/ResultComponent.tsx
  • 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/lib/helpers/chartPalette.ts
  • web/oss/src/styles/theme-variables.css
  • web/oss/src/styles/theme/palette.ts
  • web/oss/test-results/junit.xml
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/AddTextLink.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/CodeEditor.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/ConfigItemDrawer.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/InstructionsDrawer.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/JsonObjectEditor.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/MarkdownEditor.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/SectionDrawer.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/SkillFormView.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/SkillUploadZone.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/TriggerManagementSection.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/WorkflowReferenceSelector.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/AgentIntegrationDrawer.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ConfigItemList.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ItemRow.tsx
  • web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/agentTemplate/ToolManagementList.tsx
  • web/packages/agenta-entity-ui/src/variant/components/EnvironmentStatus.tsx
  • web/packages/agenta-ui/src/CellRenderers/EvaluatorMetricBar.tsx
  • web/packages/agenta-ui/src/Editor/MarkdownToolbar.tsx
  • web/packages/agenta-ui/src/components/presentational/section/ConfigAccordionSection.tsx
  • web/packages/agenta-ui/src/drill-in/core/DrillInFieldHeader.tsx
  • web/scripts/generate-tailwind-tokens.ts

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

  • Style
    • Improved light and dark theme consistency across dashboards, editors, badges, forms, icons, banners, and controls.
    • Updated chart colors, grids, axes, reference lines, metric bars, and status indicators to adapt to the active theme.
    • Refined reference-tag borders and environment/status colors for clearer visual distinction.
    • Standardized error, success, warning, and agent-related visual states.
  • Chores
    • Excluded JUnit test report artifacts from version control.
    • Removed an obsolete generated test-results report.

Walkthrough

The PR centralizes interface colors in theme palettes and CSS variables. It updates charts, status indicators, icons, controls, editors, and drill-in components. It also removes obsolete palette exports, removes CSS fallbacks, and ignores generated JUnit reports.

Changes

Theme Token Migration

Layer / File(s) Summary
Palette and generated theme variables
web/oss/src/styles/theme/palette.ts, web/oss/src/styles/theme-variables.css, web/oss/src/lib/helpers/chartPalette.ts, web/scripts/generate-tailwind-tokens.ts
Adds chart and run-status palettes, updates reference-tag borders, and generates matching CSS variables.
Chart and status token adoption
web/oss/src/components/EvalRunDetails/..., web/oss/src/components/Evaluations/..., web/oss/src/components/EvaluationRunsTablePOC/..., web/packages/agenta-ui/src/CellRenderers/...
Replaces fixed chart, status, reference-line, and metric-bar colors with theme tokens.
OSS component token adoption
web/oss/src/components/**
Updates deployment, agent, playground, prompt, loader, banner, result, and drill-in component colors.
Entity UI token cleanup
web/packages/agenta-entity-ui/src/DrillInView/SchemaControls/..., web/packages/agenta-entity-ui/src/variant/...
Removes hardcoded CSS fallbacks and uses current text, border, error, environment, and zinc tokens.
Shared UI adoption and cleanup
web/packages/agenta-ui/src/..., .gitignore, web/oss/test-results/junit.xml
Removes color fallbacks from shared controls, adds junit.xml to .gitignore, and deletes the generated JUnit report.

Estimated code review effort: 3 (Moderate) | ~20 minutes

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/palette-cleanup

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.

@github-actions

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Preview URL https://gateway-pr-5973.up.railway.app/w
Project agenta-oss-clone-spike
Image tag pr-5973-ff833f9
Status Deployed
Railway logs Open logs
Workflow logs View workflow run
Updated at 2026-08-12T11:20:18.693Z

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