fix(webapp): constrain usage chart height to 320px#3469
Merged
Conversation
The UsageChart was using Chart.Root with minHeight='160px' but no max height constraint. The ChartContainer base class includes aspect-video (16:9 ratio), causing the chart to expand based on viewport width — often filling the entire screen. Before PR #2905, the chart used ChartContainer directly with 'max-h-96 min-h-40 w-full'. The migration to Chart.Root lost the max-height constraint. Fix: wrap Chart.Root in a fixed-height container (h-80 = 320px) and use fillContainer prop, which applies !aspect-auto to override the aspect-video ratio. Co-Authored-By: nick <55853254+nicktrn@users.noreply.github.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
Contributor
Author
ericallam
approved these changes
Apr 29, 2026
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.
✅ Checklist
Testing
Ran the webapp locally with
CLOUD_ENV=developmentand verified the usage page chart height at different viewport sizes. The chart now renders at a fixed 320px height instead of expanding to fill the viewport.Changelog
Fix the "Usage by day" chart on the usage settings page taking up 100% of the viewport height.
The regression was introduced in PR #2905 when the
UsageChartwas migrated from usingChartContainerdirectly (withmax-h-96 min-h-40 w-full) to the newChart.Rootcompound component. TheChartContainerbase class includesaspect-video(16:9 ratio), and themax-h-96constraint was lost during migration, causing the chart to scale its height based on viewport width.Fix: wrap
Chart.Rootin a fixed-height container (h-80= 320px) and use thefillContainerprop, which applies!aspect-autoto override theaspect-videoratio.Screenshots
Before (chart fills entire viewport):

After (chart constrained to 320px):

💯
Link to Devin session: https://app.devin.ai/sessions/6e5ed40516d3448db85950feb1115ab3