Skip to content

Conversation

@emma-sg
Copy link
Member

@emma-sg emma-sg commented Nov 26, 2025

Closes #3020

Merges into #2944

Changes

Meters

Reimplements meters for the dashboard & the Billing & Usage section of the org dashboard

  • Meters have a new look, more clearly separating the used part of the bar from the track, that better matches our original mockups
  • Removes the divided meter bar, instead replacing it with a slot for background sections of the meter, displayed behind the bar
    • This has the effect of condensing the "value" part of the meter into a single bar, rather than it being broken up in some cases
  • Adds a floating popover for use in meters (and other data visualization) that follows the mouse cursor
  • Reimplements popover content for better consistency & clarity
  • Adds hover highlights for value bar segments, to better show which part of the bar is shown as a popover
Updated dashboard meters
Screenshot 2025-12-02 at 5 35 03 PM
Screen.Recording.2025-12-02.at.8.36.00.PM.mov

Execution minute formatting

Simplifies the execution minute formatting logic, now no longer showing values twice with different detail levels.

Updated usage history table
Screenshot 2025-12-02 at 5 40 36 PM
Screenshot 2025-12-02 at 5 41 23 PM

Org Settings

As part of the changes to implement additional minute add-on purchases, this converts the Billing section of the Org Settings to Billing & Usage, and adds usage meters. Eventually this will be where billing history will also be displayed.

When no quota is set, Usage sections show usages as plain values.

Updated Billing & Usage section
Screenshot 2025-12-02 at 5 43 36 PM
Screenshot 2025-12-02 at 5 43 21 PM

@socket-security
Copy link

socket-security bot commented Nov 27, 2025

No dependency changes detected. Learn more about Socket for GitHub.

👍 No dependency changes detected in pull request

@ikreymer ikreymer added this to the 1.21 Release milestone Dec 2, 2025
@emma-sg emma-sg changed the title Add meters to "billing & usage" section of org settings Update meters & simplify execution minutes formatting Dec 2, 2025
Comment on lines +201 to +206
--darkened-background-color-1: oklch(
from var(--background-color) calc(l - 0.2) c h
);
--darkened-background-color-2: oklch(
from var(--background-color) calc(l - 0.1) calc(c + 0.1) h / 0.5
);
Copy link
Member Author

Choose a reason for hiding this comment

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

Relative colour syntax is widely supported now! These don't quite match the colour of the .valueBar::before outline (line 150) that uses mix-blend-mode: color-burn, but it's close enough for this use case.

@emma-sg emma-sg marked this pull request as ready for review December 3, 2025 01:41
@emma-sg emma-sg requested review from SuaYoo, ikreymer and tw4l December 3, 2025 01:41
@emma-sg emma-sg force-pushed the additional-minutes-addon-purchase branch from 9fa5509 to febe01f Compare December 3, 2025 01:42
fixes an issue where usage history would be incorrectly clamped to the
sum of available quota seconds when monthly quota is unlimited
move execution and storage meters to separate subdirectories with shared
colors, tooltip utilities, and rendering helpers. remove unused divided
meter bar implementation and consolidate color definitions. standardize
renderBar props to use structured color objects and introduce legend
utilities for consistent color rendering across meters. update import
paths to reflect new directory structure.
@emma-sg emma-sg force-pushed the additional-minutes-addon-purchase--meters-updates branch from 08e8a4b to 03b84fd Compare December 3, 2025 01:44
@emma-sg emma-sg force-pushed the additional-minutes-addon-purchase--meters-updates branch from 9e87411 to 5e3878f Compare December 3, 2025 02:03
@emma-sg emma-sg mentioned this pull request Dec 3, 2025
3 tasks
Copy link
Member

@SuaYoo SuaYoo left a comment

Choose a reason for hiding this comment

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

Very nice upgrade, love those popovers.

Minor comments, one overall impression is that when there is no usage, the saturated light green stands out to me in a way that is slightly confusing. It seems overly significant since the storage bar is desaturated:

Screenshot 2025-12-03 at 12 13 27 PM

Since the background of the current meters are gray, it's less intrusive:

Screenshot 2025-12-03 at 12 08 41 PM

Maybe we should hide the meter altogether if there is no usage and just show "X min remaining"? Since this is the view that all new users will see, I think it's worth considering this as the first impression.

@emma-sg
Copy link
Member Author

emma-sg commented Dec 3, 2025

Maybe we should hide the meter altogether if there is no usage and just show "X min remaining"? Since this is the view that all new users will see, I think it's worth considering this as the first impression.

That's a good point, what might actually be simpler here is just hiding the background components and just showing a simple "available" popup like the storage meter. I'll take a go at it!

@emma-sg
Copy link
Member Author

emma-sg commented Dec 3, 2025

Updated empty states:

With no additional/gifted minutes
Screenshot 2025-12-03 at 4 06 44 PM
Screenshot 2025-12-03 at 4 06 38 PM
With some additional minutes available
Screenshot 2025-12-03 at 4 06 54 PM
Screenshot 2025-12-03 at 4 07 01 PM

@emma-sg emma-sg requested a review from SuaYoo December 3, 2025 21:09
@emma-sg emma-sg merged commit 9ad4d7f into additional-minutes-addon-purchase Dec 3, 2025
29 checks passed
@emma-sg emma-sg deleted the additional-minutes-addon-purchase--meters-updates branch December 3, 2025 21:30
@emma-sg emma-sg linked an issue Dec 10, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task]: Add meters to billing section of org settings

4 participants