You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(dashboard): savings-trend tooltip omits year for daily/weekly intervals; ambiguous across year boundaries #53
After LeanerCloud/cloud-commitments-cli#1257 the Home savings-over-time tooltip shows a date instead of the raw 13-digit millisecond value (QA 3.2). However, the helper it reuses (formatTrendAxisTick in frontend/src/dashboard.ts:996) returns "Jun 15" for daily/weekly intervals with no year component. The hourly branch also omits the year.
For the 90d range (daily) and the new ~365-day All range (weekly), the tooltip can show two points labeled "Jun 15" -- one from this year and one from last year -- with no way to distinguish them. The same is true for any range straddling a year boundary (e.g. clicking 90d in February).
Root cause
The frontend reuses formatTrendAxisTick for both x-axis tick labels and the tooltip title (PR LeanerCloud/cloud-commitments-cli#1257). The axis-tick branch needs to be compact (limited horizontal space per label), but the tooltip has plenty of room and would benefit from including the year.
Add a separate formatter formatTrendTooltipTitle(tsMs, interval) that includes the year. The axis-tick formatter stays as-is (compact). Wire the tooltip title callback to the new helper:
Activity