fix(ui): keep cache leakage time range picker inline at narrow widths - #34439
Merged
tin-berri merged 1 commit intoJul 24, 2026
Merged
Conversation
The card header used flex-wrap, so the date picker was the element that gave way when the row ran out of room; at higher browser zoom it dropped onto its own line under the description. Pin the picker with shrink-0 and let the title/description block shrink instead (min-w-0), so the copy wraps to a second line and the picker stays on the right. Below md the header stacks, since a 300px input plus its nowrap label leaves nothing usable beside it.
Contributor
Greptile SummaryUpdates the cache-leakage card header’s responsive layout.
Confidence Score: 5/5The PR appears safe to merge with no actionable defects identified. The isolated class changes preserve component behavior while making the header stack on small screens and allowing its text column to wrap beside the fixed-width picker at wider breakpoints.
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/app/(dashboard)/cost-optimization/_components/CacheLeakageCard.tsx | Adjusts responsive flex behavior and picker sizing without introducing a concrete functional regression. |
Reviews (1): Last reviewed commit: "fix(ui): keep cache leakage time range p..." | Re-trigger Greptile
Contributor
yuneng-berri
approved these changes
Jul 24, 2026
5 tasks
ap-anton-r-susilo
pushed a commit
to ap-anton-r-susilo/litellm
that referenced
this pull request
Jul 29, 2026
…eader_layout fix(ui): keep cache leakage time range picker inline at narrow widths (cherry picked from commit c93c3f7)
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:
Relevant issues
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
@greptileaito re-request a review after pushing changes)On the tests box: this is a CSS-class-only change and jsdom does not compute layout, so any test here would assert className strings and pass whether or not the header actually renders correctly; that is a change detector, not a regression test. The existing
CacheLeakageCard.test.tsxsuite still passes (4/4), and the real verification is the before/after screenshots belowDelays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
Screenshots / Proof of Fix
Screenshots to be attached: the Prompt Caching tab of the Cost Optimization page at a zoom level where the header no longer has room for both columns side by side
Before (at 43e7b96): the picker wraps under the description and sits on its own line above the tabs
After (at 2b77e8c): the description wraps to two lines and the picker stays flush right, in line with the title
Repro steps for both:
python litellm/proxy/proxy_cli.py --config litellm/proxy/dev_config.yaml --detailed_debug --reload --use_v2_migration_resolvernpm run devinui/litellm-dashboardType
🐛 Bug Fix
Changes
CacheLeakageCard's header row wasflex flex-wrap items-start justify-between gap-4with the picker as a bare flex item. Underflex-wrapthe picker is the element that gives way when the row runs short, so at higher zoom it wrapped onto its own line and pushed the tabs downThe header is now
flex flex-col gap-4 md:flex-row md:items-start md:justify-between; the picker is wrapped in ashrink-0div and the title/description column carriesmin-w-0, so the description is what gives way and wraps.AdvancedDatePickerneeds roughly 440px (aw-[300px]trigger plus awhitespace-nowraplabel), which is why the stacked layout is kept below md rather than squeezing it furtherFinal Attestation