fix(ui): make code blocks follow the theme in dark mode - #38771
Merged
ryan-crabbe-berri merged 2 commits intoAug 29, 2026
Merged
ryan-crabbe-berri merged 2 commits into
ryan-crabbe-berri merged 2 commits into
Conversation
… mode The customStyle background only reaches the <pre>, so the prism theme's own background stayed on the inner <code>. In dark mode that left a white card with a dark box hugging every line. Let the block inherit the themed surface from its wrapper instead.
…itellm_/api-reference-dark-mode-4ec67f
Contributor
Greptile SummaryThe PR updates the shared dashboard code block to inherit themed surfaces instead of painting fixed highlighter backgrounds.
Confidence Score: 5/5The PR appears safe to merge, with the themed code surface and copy control remaining readable in supported light and dark modes. The shared component now exposes the container’s theme-aware muted background while retaining syntax-theme foreground colors, and the copy button has distinct surface, border, icon, and hover tokens in both themes.
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/components/CodeBlock.tsx | Replaces fixed code backgrounds with theme-aware surfaces and updates the copy button without introducing an actionable defect. |
Reviews (1): Last reviewed commit: "Merge remote-tracking branch 'origin/lit..." | Re-trigger Greptile
ryan-crabbe-berri
approved these changes
Aug 29, 2026
galactic-batter Bot
pushed a commit
to codgician/litellm
that referenced
this pull request
Sep 1, 2026
…dark-mode-4ec67f fix(ui): make code blocks follow the theme in dark mode (cherry picked from commit e585aab)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
How it solves it:
User Flow
Before: an admin browsing the dashboard in dark mode finds the code samples hard to read
After: the same admin sees one dark code panel that matches the rest of the page
Relevant issues
Linear ticket
Pre-Submission checklist
uv run pytest tests/test_litellm/<your_test_file>.py -vScreenshots / Proof of Fix
Setup: local proxy plus the dashboard dev server pointed at it, signed in as an admin, page http://localhost:3103/api-reference with the theme toggle set to dark
Before (f0fadb7)
After (8f07a12)
Type
🐛 Bug Fix
Caveats (if any)
Low
Final Attestation