Skip to content

Commit 80a87d2

Browse files
committed
test(claude): check the session window drops the day after --until
With a single session the unified session CLI test only caught sessions wrongly dropped on the `--until` day; it would still pass without any window filter. Add a second session last active just after local midnight so the asserted total also fails when the filter keeps too much. Also note in the session guide that the Last Activity table column shows the date in the report timezone while JSON keeps the RFC 3339 timestamp.
1 parent e522bf8 commit 80a87d2

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

‎docs/guide/session-reports.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Sessions are displayed using the last two segments of their full identifier:
9191
- **Input/Output Tokens**: Total tokens exchanged in the conversation
9292
- **Cache Tokens**: Cache creation and read tokens for context efficiency
9393
- **Cost**: Estimated USD cost for the usage shown; without a date filter, the entire conversation
94-
- **Last Activity**: Date of the most recent message included in the report
94+
- **Last Activity**: Date of the most recent message included in the report, shown in the report timezone (`--timezone`); JSON output keeps the full RFC 3339 timestamp
9595

9696
### Sorting
9797

‎rust/crates/ccusage/tests/claude_cli.rs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,16 @@ fn unified_sessions_keep_a_session_last_active_on_the_until_day() {
345345
1.0,
346346
),
347347
);
348+
let _ = fixture.write_file(
349+
"projects/project-a/session-d.jsonl",
350+
usage_line(
351+
"2026-09-12T00:30:00.000Z",
352+
"session-d",
353+
"msg-after",
354+
"req-after",
355+
2.0,
356+
),
357+
);
348358

349359
let output = run_ccusage(
350360
&fixture,

0 commit comments

Comments
 (0)