fix: CodeRabbit auto-fixes for PR #758 - #763
Merged
cristim merged 1 commit intoMay 27, 2026
Merged
Conversation
Fixed 1 file(s) based on 1 unresolved review comment. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
2 of 3 tasks
Contributor
Author
|
Important Review skippedThis 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
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.
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.
This stacked PR contains CodeRabbit auto-fixes for #758.
Files modified:
frontend/src/modules/savings-history.ts