fix: default Captain overview to last 7 days (#15206)

The Captain agents overview now defaults to the last 7 days instead of
this month, so the page opens on a more recent and actionable window.

## What changed

- Overview page, range selector, and welcome card default to `7`.
- Backend `Captain::AssistantStatsWindow::DEFAULT_RANGE` changed from
`30` to `7`, so requests without a `range` param (or with invalid
values) also resolve to the last 7 days.

## How to test

- Open Captain → Overview: the range selector should show "Last 7 days"
by default and metrics should reflect that window. Other ranges continue
to work as before.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
Shivam Mishra
2026-07-28 13:33:08 +05:30
committed by GitHub
parent acae0a2acf
commit 64301495b4
5 changed files with 7 additions and 7 deletions

View File

@@ -11,7 +11,7 @@
class Captain::AssistantStatsWindow
include TimezoneHelper
DEFAULT_RANGE = '30'.freeze
DEFAULT_RANGE = '7'.freeze
ALLOWED_RANGES = %w[7 30 90 this_month last_month].freeze
attr_reader :range