Skip to content

Commit 3ac1a1b

Browse files
committed
chore(release): v1.20.0
1 parent cd1ffe1 commit 3ac1a1b

6 files changed

Lines changed: 41 additions & 24 deletions

File tree

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.20.0] - 2026-04-16
11+
12+
### Added
13+
14+
- **Default to latest session** — Session ID is now optional for all commands. When omitted, the most recent session from `~/.claude/statusline/` is auto-detected and used (#60, #68)
15+
- **`sessions` subcommand** — New `context-stats sessions` command lists recent sessions with project, model, token count, and last-activity time. Supports `--minutes N` to widen the search window (#60, #68)
16+
17+
### Fixed
18+
19+
- **Stricter `sessions` argument validation** — Reject missing, zero, or negative `--minutes` values and stray positional arguments instead of silently ignoring them
20+
21+
### Changed
22+
23+
- **Modernized prefix stripping** — Replaced `.replace("statusline.", "")` and `name[11:]` with `removeprefix("statusline.")` (Python 3.9+) across the CLI and state modules
24+
25+
[1.20.0]: https://github.com/luongnv89/context-stats/compare/v1.19.0...v1.20.0
26+
1027
## [1.19.0] - 2026-04-16
1128

1229
### Added

docs/context-stats.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Session Summary
8686
Model: claude-sonnet-4-6
8787
Session Duration: 2h 29m
8888
89-
Powered by context-stats v1.19.0 - https://github.com/luongnv89/cc-context-stats
89+
Powered by context-stats v1.20.0 - https://github.com/luongnv89/cc-context-stats
9090
```
9191

9292
## Features

docs/example-report-30days.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Token Usage Analytics Report
22

33
Generated: 2026-04-07 12:00:00
4-
Source: cc-context-stats v1.19.0
4+
Source: cc-context-stats v1.20.0
55

66
> **Note:** This is a sample report for the last 30 days (2026-03-08 → 2026-04-07).
77
> All project names and session IDs have been anonymized.

docs/index.html

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@
963963
<img src="assets/logo/logo-full.svg" alt="context-stats" />
964964
</div>
965965
<ul class="nav-links">
966-
<li><a href="#whats-new">v1.19.0</a></li>
966+
<li><a href="#whats-new">v1.20.0</a></li>
967967
<li><a href="#features">Features</a></li>
968968
<li><a href="#cache-warm">Cache Warm</a></li>
969969
<li><a href="#how-it-works">Install</a></li>
@@ -980,7 +980,7 @@
980980
<div class="container">
981981
<div class="hero-badge">
982982
<span class="dot"></span>
983-
v1.19.0 — Now with compaction detection & zone recommendations
983+
v1.20.0 — One-command session discovery & smarter defaults
984984
</div>
985985

986986
<h1>
@@ -1017,7 +1017,7 @@ <h1>
10171017
</div>
10181018
<div class="terminal-body">
10191019
<div><span class="t-prompt">$ </span><span class="t-cmd">pip install context-stats</span></div>
1020-
<div class="t-muted">Successfully installed context-stats-1.19.0</div>
1020+
<div class="t-muted">Successfully installed context-stats-1.20.0</div>
10211021
<br/>
10221022
<div><span class="t-prompt">$ </span><span class="t-cmd">context-stats graph</span></div>
10231023
<br/>
@@ -1147,34 +1147,34 @@ <h3>Lossy compaction, no warning</h3>
11471147
<section id="whats-new">
11481148
<div class="container">
11491149
<span class="section-label">What's New</span>
1150-
<h2>v1.19.0 — Compaction visibility<br/>& smarter zone guidance.</h2>
1151-
<p class="lead">Four new features that make context degradation visible and actionable, shipped April 2026.</p>
1150+
<h2>v1.20.0 — Session discovery<br/>& smarter defaults.</h2>
1151+
<p class="lead">Stop hunting for session IDs. Three improvements that make the CLI feel instant, shipped April 2026.</p>
11521152

11531153
<div class="problem-grid">
11541154
<div class="pain-card" style="border-color:rgba(0,255,65,0.2);">
1155-
<div class="pain-icon"></div>
1156-
<h3 style="color:var(--green);">Compaction event detection</h3>
1157-
<p>Detect <code>/compact</code> events automatically — a <code></code> marker appears in your graphs at the exact step where Claude compacted, so you can see session history at a glance.</p>
1155+
<div class="pain-icon">📋</div>
1156+
<h3 style="color:var(--green);">New <code>sessions</code> command</h3>
1157+
<p>Run <code>context-stats sessions</code> to list recent sessions with project, model, token count, and last-activity time. Use <code>--minutes N</code> to widen the window.</p>
11581158
</div>
11591159
<div class="pain-card" style="border-color:rgba(0,255,65,0.2);">
1160-
<div class="pain-icon"></div>
1161-
<h3 style="color:var(--yellow);">MI quality flag at compaction</h3>
1162-
<p>When compaction happens at low model intelligence (&lt;0.6 MI), the summary is flagged as <em>potentially lossy</em>. Now you always know if you can trust the compacted context.</p>
1160+
<div class="pain-icon"></div>
1161+
<h3 style="color:var(--cyan);">Session ID is now optional</h3>
1162+
<p>Every command — <code>graph</code>, <code>report</code>, <code>export</code>, <code>cache-warm</code> — auto-detects the most recent session when you omit the ID. Just run <code>context-stats</code> and go.</p>
11631163
</div>
11641164
<div class="pain-card" style="border-color:rgba(0,255,65,0.2);">
1165-
<div class="pain-icon">💡</div>
1166-
<h3 style="color:var(--cyan);">Actionable zone recommendations</h3>
1167-
<p>Every zone now ships with a brief recommended action — "Avoid new file reads; complete what's in progress" — so you always know what to do next without consulting docs.</p>
1165+
<div class="pain-icon">🛡</div>
1166+
<h3 style="color:var(--yellow);">Stricter <code>sessions</code> validation</h3>
1167+
<p>Missing, zero, or negative <code>--minutes</code> values now fail fast with a clear error instead of silently falling back to the default. Stray positionals are rejected too.</p>
11681168
</div>
11691169
<div class="pain-card" style="border-color:rgba(0,255,65,0.2);">
1170-
<div class="pain-icon">🎯</div>
1171-
<h3 style="color:var(--indigo);">Recalibrated 1M zone thresholds</h3>
1172-
<p>Zone boundaries for 1M-context models have been recalibrated to match real-world degradation onset (300–400k tokens), eliminating a 25–120k false-alarm window.</p>
1170+
<div class="pain-icon">🧹</div>
1171+
<h3 style="color:var(--indigo);">Modernized internals</h3>
1172+
<p>Swapped legacy <code>.replace("statusline.", "")</code> and slice-based prefix stripping for Python 3.9+ <code>removeprefix()</code> across the CLI and state modules.</p>
11731173
</div>
11741174
</div>
11751175

11761176
<div style="text-align:center;margin-top:32px;">
1177-
<a href="https://github.com/luongnv89/context-stats/releases/tag/v1.19.0" class="btn-secondary" style="display:inline-flex;">
1177+
<a href="https://github.com/luongnv89/context-stats/releases/tag/v1.20.0" class="btn-secondary" style="display:inline-flex;">
11781178
<svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"/></svg>
11791179
Full changelog on GitHub
11801180
</a>
@@ -1507,7 +1507,7 @@ <h2>What you actually see<br/>in the terminal.</h2>
15071507
<div class="t-green"> Exported → session-abc-1234-2026-04-07.md</div>
15081508
<br/>
15091509
<div class="t-h1"> # Session Export — abc-1234</div>
1510-
<div class="t-muted"> Generated: 2026-04-07 12:30:15 | context-stats v1.19.0</div>
1510+
<div class="t-muted"> Generated: 2026-04-07 12:30:15 | context-stats v1.20.0</div>
15111511
<br/>
15121512
<div class="t-h2"> ## Executive Summary</div>
15131513
<br/>
@@ -1557,7 +1557,7 @@ <h2>What you actually see<br/>in the terminal.</h2>
15571557
<div class="t-green"> Analyzing 312 sessions across 18 projects...</div>
15581558
<br/>
15591559
<div class="t-h1"> # Token Usage Analytics Report</div>
1560-
<div class="t-muted"> Generated: 2026-04-07 12:00:00 | context-stats v1.19.0</div>
1560+
<div class="t-muted"> Generated: 2026-04-07 12:00:00 | context-stats v1.20.0</div>
15611561
<br/>
15621562
<div class="t-h2"> ## Executive Summary (last 30 days)</div>
15631563
<br/>

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "context-stats"
7-
version = "1.19.0"
7+
version = "1.20.0"
88
description = "Monitor your Claude Code session context in real-time - track token usage and never run out of context"
99
readme = "README.md"
1010
license = { text = "MIT" }

src/claude_statusline/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Never run out of context unexpectedly - monitor your session context in real-time.
44
"""
55

6-
__version__ = "1.19.0"
6+
__version__ = "1.20.0"
77

88
from claude_statusline.core.config import Config
99
from claude_statusline.core.state import StateFile

0 commit comments

Comments
 (0)