Skip to content

[OPIK-7250] [FE] feat: theme-aware waste-* callout tokens (AI Spend)#7430

Merged
andriidudar merged 1 commit into
mainfrom
sashaa/ai-spend-waste-tokens
Jul 13, 2026
Merged

[OPIK-7250] [FE] feat: theme-aware waste-* callout tokens (AI Spend)#7430
andriidudar merged 1 commit into
mainfrom
sashaa/ai-spend-waste-tokens

Conversation

@aadereiko

@aadereiko aadereiko commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Details

Adds a theme-aware waste-* design-token set for the AI-Spend "recoverable waste" callout, so it flips light/dark through the token system instead of hardcoded hex + manual dark: overrides. Follow-up to review feedback on opik-plugin-ai-spend#25.

  • apps/opik-frontend/src/main.scss--waste-bg / --waste-border / --waste-text in both :root and .dark (light: #fee8d7 fill, #fb9341 border, black text; dark: #fb9341 @ 15% fill, #fb9341 border, #fee8d7 text), mirroring the existing warning-box-* block.
  • apps/opik-frontend/tailwind.config.tswaste-bg / waste-border / waste-text color mappings (var(--waste-*), following the chart-* hex-var precedent so the dark fill's alpha survives).
  • Consumed by opik-plugin-ai-spend#30; merge this first — the plugin's waste-* classes only resolve once these tokens exist.

Change checklist

  • User facing
  • Documentation update

Issues

  • OPIK-7250

AI-WATERMARK

AI-WATERMARK: yes

  • Tools: Claude Code
  • Model(s): Claude Opus 4.8
  • Scope: Added the waste-* CSS variables (light + dark) and Tailwind color mappings.
  • Human verification: Reviewed the diff; confirmed the classes emit the expected var(--waste-*) CSS and flip light/dark; frontend eslint + tsc pass.

Testing

  • npx tsc --project tsconfig.json --noEmit — passes.
  • npx eslint src/plugins/ai-spend — passes (the consuming plugin).
  • Tailwind emission probe: npx tailwindcss -c tailwind.config.ts ... confirms bg-waste-bg → background-color: var(--waste-bg), border-waste-border, text-waste-text, bg-waste-border all emit.
  • Only CSS variables + Tailwind color mappings are added; no runtime logic changed.

Documentation

No documentation changes — internal design tokens mirroring the existing warning-box-* set.

Adds --waste-bg / --waste-border / --waste-text (light + dark) and their
Tailwind color mappings, mirroring the existing warning-box-* set. Light: pale
warm chip (#fee8d7 fill, #fb9341 border, black text); dark: subtle #fb9341/15
fill with a light warm text. Consumed by the AI-Spend "recoverable waste"
callout in opik-plugin-ai-spend so it flips through the token system instead of
hardcoded hex + manual dark: overrides.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

⏱️ pre-commit per-hook timing

Hook Description Result Duration
🌐 eslint — frontend Lint + autofix JS/TS 1.20s
Total (1 ran) 1.20s
⏭️ 40 skipped (no matching files changed)
Hook Description Result
🐍 trim trailing whitespace — python sdk Strip trailing whitespace ⏭️
🐍 fix end of files — python sdk Ensure files end in a newline ⏭️
🐍 ruff — python sdk Lint + autofix Python (ruff) ⏭️
🐍 ruff-format — python sdk Format Python code (ruff) ⏭️
🐍 mypy — python sdk Static type check ⏭️
🤖 trim trailing whitespace — optimizer Strip trailing whitespace ⏭️
🤖 fix end of files — optimizer Ensure files end in a newline ⏭️
🤖 check yaml — optimizer Validate YAML syntax ⏭️
🤖 check json — optimizer Validate JSON syntax ⏭️
🤖 check toml — optimizer Validate TOML syntax ⏭️
🤖 check for added large files — optimizer Block large files (>1MB) ⏭️
🔐 detect private key — optimizer Block committed private keys ⏭️
🤖 check for merge conflicts — optimizer Block merge-conflict markers ⏭️
🤖 check for case conflicts — optimizer Block case-only name clashes ⏭️
🤖 pyupgrade — optimizer Modernize Python syntax ⏭️
🤖 ruff — optimizer Lint + autofix Python (ruff) ⏭️
🤖 ruff-format — optimizer Format Python code (ruff) ⏭️
🤖 mypy — optimizer Static type check ⏭️
📓 nbstripout — optimizer notebooks Strip notebook output ⏭️
📝 markdownlint — optimizer Lint Markdown ⏭️
🔤 codespell — optimizer Fix common misspellings ⏭️
📊 radon cc — optimizer Cyclomatic-complexity gate ⏭️
📊 radon raw — optimizer Raw size metrics gate ⏭️
📊 xenon — optimizer Fail on complexity thresholds ⏭️
📊 lizard — optimizer Cyclomatic-complexity gate ⏭️
🧹 vulture — optimizer Find dead code ⏭️
🛡️ trim trailing whitespace — guardrails Strip trailing whitespace ⏭️
🛡️ fix end of files — guardrails Ensure files end in a newline ⏭️
🛡️ ruff — guardrails Lint + autofix Python (ruff) ⏭️
🛡️ ruff-format — guardrails Format Python code (ruff) ⏭️
🛡️ mypy — guardrails Static type check ⏭️
⚓ helm-docs Regenerate Helm chart README ⏭️
block non-public FE plugins Block non-public FE plugins ⏭️
☕ spotless — java backend Format Java code ⏭️
🧪 pre-commit wrapper smoke tests Self-test the wrapper scripts ⏭️
🌐 typecheck — frontend Whole-project tsc type check ⏭️
📘 eslint — typescript sdk Lint + autofix JS/TS ⏭️
📘 typecheck — typescript sdk Whole-project tsc type check ⏭️
⚙️ actionlint — github workflows Lint GitHub Actions workflows ⏭️
🐳 hadolint — dockerfiles Lint Dockerfiles ⏭️

@andriidudar andriidudar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@andriidudar andriidudar merged commit b6843b4 into main Jul 13, 2026
13 of 14 checks passed
@andriidudar andriidudar deleted the sashaa/ai-spend-waste-tokens branch July 13, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants