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
[BUG] Make trends chart follow or lock period navigation #46
Describe the bug
In trends mode, period navigation changes the usage summary but the chart remains anchored to the same trailing window. The chart therefore appears static while the selected month, week, or day changes.
To Reproduce
Open /usage and enable trends with g.
Navigate to another period with the left/right arrow keys.
Compare the selected period in the header with the periods and values shown in the chart.
Repeat in month, week, and day granularity.
Expected behavior
Define and implement one consistent trends interaction model, controlled by an experiment flag so both options can be evaluated:
selected: the trend window is anchored to the selected period; navigating periods updates the chart.
static: the chart remains anchored to the current trailing window; period navigation is disabled or hidden while trends are active.
Use OPENCODE_MODEL_USAGE_TRENDS_MODE=selected|static as the comparison flag. Month/week/day granularity switching should remain available in both modes and update the chart granularity. Add deterministic tests for both behaviors and document the selected UX after evaluation.
Media
Additional context computeTrendSeries() currently uses Date.now() as its reference point and does not receive the selected period offset. The existing trends feature was introduced in #8.
Activity