Skip to content

fix: CodeRabbit auto-fixes for PR #758 - #763

Merged
cristim merged 1 commit into
feat/multicloud-web-frontendfrom
coderabbitai/autofix/c5d0ff6
May 27, 2026
Merged

cristim merged 1 commit into
feat/multicloud-web-frontendfrom
coderabbitai/autofix/c5d0ff6

Conversation

@coderabbitai

@coderabbitai coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

This stacked PR contains CodeRabbit auto-fixes for #758.

Files modified:

  • frontend/src/modules/savings-history.ts

Fixed 1 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

Important

Review skipped

This PR was authored by the user configured for CodeRabbit reviews. CodeRabbit does not review PRs authored by this user. It's recommended to use a dedicated user account to post CodeRabbit review feedback.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e397fde8-06a6-4fe1-b285-57d21c95031c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands and usage tips.

@cristim
cristim merged commit b5d3d00 into feat/multicloud-web-frontend May 27, 2026
5 checks passed
cristim added a commit that referenced this pull request May 27, 2026
… auto-fix) (#767)

* fix(home/stats): drop /mo suffix from Period Savings total

Revert the change applied by PR #763 ("CodeRabbit auto-fixes"): it appended
the unit suffix to Period Savings even though the line immediately above
explicitly says Period Savings is a cumulative dollar total over the
selected date range, NOT a per-unit rate.

The auto-fix violated its own comment and broke 4 tests in
frontend/src/__tests__/savings-history.test.ts, which assert plain
"$X.XX" output (no suffix). Restoring the original behaviour so the
tests and the comment agree again.

* feat(home/stats): show selected unit on Period Savings label

Period Savings is a cumulative dollar total over the selected date range,
not a per-unit rate. Appending /mo, /hr, or /yr to the value misrepresents
it as a rate. Instead, the label becomes "Period Savings (monthly)" etc.,
reinforcing which view mode is active without implying a rate.

Added id="period-savings-label" to the <h4> in index.html, updated
renderSavingsStats to set its textContent to `Period Savings (${unit})`
using the already-available adjective variable (lowercased), and added
label assertions to the unit-toggle test for all three units.

* feat(home/stats): show unit below value on Period Savings, not in label

The label ("Period Savings") answers "what is this number" and should
stay plain across all unit modes. A new sub-line element
(#period-savings-unit, class stat-unit-context) below the dollar value
carries the view-mode context ("shown in monthly/hourly/yearly
equivalents"), making the semantic layering explicit: label = what,
value = number, sub-line = how it is displayed. Updated the DOM fixture
and three unit-toggle assertions in savings-history.test.ts to query
#period-savings-unit. Added .stat-unit-context CSS rule to charts.css.
@cristim
cristim deleted the coderabbitai/autofix/c5d0ff6 branch June 3, 2026 21:53
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.

1 participant