Repository navigation
fix(ui): the API spend line says "Since 4 Nov" instead of a range ending today - #6726
Open
jenna-winkler wants to merge 1 commit into
Open
jenna-winkler wants to merge 1 commit into
jenna-winkler wants to merge 1 commit into
Conversation
…ing today
A running range named today's UTC day as its end, which reads as
tomorrow in the evening west of UTC, and the line carried an underline
and a tooltip that repeated the start date. A running range now names
only its start ("Since 4 Nov", or "Today so far"), with no tooltip.
A finished range keeps its full dates.
Fixes #6714
Assisted-By: Claude
Signed-off-by: Jenna Winkler <135358348+jenna-winkler@users.noreply.github.com>
There was a problem hiding this comment.
🛡️ Code Guardian 🛡️ — ✅ Code Review @ a2ca736
PR #6726: fix(ui): the API spend line says "Since 4 Nov" instead of a range ending today
Author: jenna-winkler | Branch: claude/intelligent-cray-lbeg4x → main | Changes: +55 −3 (4 files)
Summary
This PR changes the line under a spend total for a running range. The line names only the start ("Since 4 Nov" or "Today so far"). It has no underline and no tooltip, and a finished range keeps its full dates and tooltip.
Findings
- ✅ Looks good: I ran
shownRangeandformatSoFaron eight range shapes. A running month cut at the start reads "Since 4 Nov". A week across New Year reads "Since 28 Dec 2026". The first day of a month or a week reads "Today so far". A cut finished month keeps its full dates and its tooltip. All added comments passcheck:comment-types.
Documentation Check (doc-drift)
- 🟢 Suggestion: The Home screen text says that a running range "ends at today and says "so far"". This PR makes that sentence false, so change it to the new lines (
docs/architecture/spend-limits.md:447).
Issue Fit
✅ No findings.
TypeScript Engineering Review
✅ No findings.
React UI Engineering Review
- 🟢 Suggestion: The tooltip rule is now the JSX condition
shown.soFar || !shown.cutAtStart, and no test covers it. Put the rule inshownRangeas one flag, and test it for running and finished ranges (packages/ui/src/modules/spend/components/spend-total-lines.tsx:37).
Verdict
APPROVE — The change does what #6714 asks, and no finding blocks it.
Review by Code Guardian 🛡️ · automated code guardian · ibm/aws/claude-opus-5-5 on pi
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.
What and why
The API spend card showed a running range such as "4–19 Nov 2026, so far". Spend uses UTC days, so in the evening west of UTC the end date is tomorrow's date. The line also had a dotted underline and a tooltip that repeated the start date. Now a running range shows only its start: "Since 4 Nov", or "Today so far" for the Today tab. The line has no underline and no tooltip.
Reviewer guide
Scope
spend/lib/range-label.ts: a newformatSoFarformatter.spend/lib/copy.ts:rangeLineusesformatSoFarfor a running range.spend/components/spend-total-lines.tsx: a running range renders as plain text, with no tooltip.spend-range-line.test.ts.Issue
Closes #6714
Testing
vitest: the new test and the spend tests pass.mainwithout this change (cron-conversion,just-ask,schedule-form-rule). They depend on the sandbox time zone.tsc --noEmit,eslintandprettier --checkpass on the changed files.