@@ -7,8 +7,19 @@ Single-binary, cross-platform TUI for:
77- Local Codex usage stats (last 7/30 days, chart, top models) by scanning ` CODEX_HOME/sessions ` .
88- Live account limits/credits by spawning ` codex app-server ` and calling ` account/rateLimits/read ` .
99
10+ See ` CHANGELOG.md ` for release history.
11+
1012<img width =" 1647 " height =" 861 " alt =" Dkh7CxLgx7 " src =" https://github.com/user-attachments/assets/edec765d-0924-493b-8c10-cb32bca867a9 " />
1113
14+ ## Release 0.3.0
15+
16+ - Added incremental session parsing with persisted offsets and parser state in ` comon.db ` .
17+ - Reduced restart regressions: unchanged files outside current scan plan now stay visible via cache.
18+ - Added ` --scan-time-budget-ms ` for bounded per-refresh parse time (` 0 ` disables budget).
19+ - Added ` --max-jsonl-line-kib ` to cap parsed line size without hard-dropping large files.
20+ - Added cache DB schema migration (` v1 -> v2 ` ) for offset/parser-state fields.
21+ - For historical backfill after copying older sessions, run once: ` comon --full-scan --scan-time-budget-ms 0 `
22+
1223## Requirements
1324
1425- Rust toolchain (stable) installed.
@@ -48,9 +59,11 @@ Common flags:
4859- ` --usage-days <n> ` : days to scan for usage (clamped 1..=90; default from config)
4960- ` --refresh-usage-secs <n> ` : usage refresh interval in seconds (default from config)
5061- ` --refresh-limits-secs <n> ` : limits refresh interval in seconds (default from config)
51- - ` --max-session-file-mib <n> ` : max size (MiB) of a single session file to scan (default from config)
62+ - ` --max-session-file-mib <n> ` : per-file planning weight (MiB) for scan budget (default from config)
5263- ` --max-session-total-mib <n> ` : max total size (MiB) to scan across session files (default from config)
5364- ` --max-session-files <n> ` : max number of session files to scan per refresh (default from config)
65+ - ` --max-jsonl-line-kib <n> ` : max parsed JSONL line size in KiB (default from config)
66+ - ` --scan-time-budget-ms <n> ` : max parse time budget per refresh in ms (` 0 ` disables budget)
5467- ` --full-scan ` : scan all files under ` CODEX_HOME/sessions ` , including old months (ignores mtime cutoff)
5568- ` --no-full-scan ` : disable full scan for this run (overrides config)
5669- ` --scan-cache-max-entries <n> ` : max entries kept in cache database (` comon.db ` ) (default from config)
@@ -73,6 +86,8 @@ Config precedence:
7386 "max_session_file_mib" : 256 ,
7487 "max_session_total_mib" : 256 ,
7588 "max_session_files" : 10000 ,
89+ "max_jsonl_line_kib" : 512 ,
90+ "scan_time_budget_ms" : 1500 ,
7691 "full_scan" : false ,
7792 "scan_cache_max_entries" : 50000
7893}
@@ -84,6 +99,16 @@ Example:
8499comon --codex-home " C:\\ Users\\ You\\ .codex" --cwd " C:\\ Repos\\ some-git-repo"
85100```
86101
102+ Large-log recovery/tuning example:
103+
104+ ``` bash
105+ # One-time backfill for copied/old sessions:
106+ comon --full-scan --scan-time-budget-ms 0
107+
108+ # Normal usage with bounded incremental refresh:
109+ comon --scan-time-budget-ms 1500 --max-jsonl-line-kib 512
110+ ```
111+
87112## Key bindings
88113
89114- ` Tab ` Toggle data (Tokens/Time/Runs)
@@ -247,12 +272,28 @@ Optional custom install root:
247272bash install.sh ~ /.local
248273```
249274
275+ ## Development checks
276+
277+ ASCII-only guardrails for docs/code/scripts:
278+
279+ ``` bash
280+ # Run full repository check (tracked files)
281+ bash scripts/check-ascii.sh
282+
283+ # Install local pre-commit hook (checks staged files on commit)
284+ bash scripts/install-pre-commit-hook.sh
285+ ```
286+
287+ CI also runs this check on each push and pull request via ` .github/workflows/ascii-check.yml ` .
288+
250289## Notes
251290
252291- Usage stats are derived from Codex session JSONL logs. If you have no session data yet, values will be empty.
253292- Limits/credits require ` codex app-server ` to start successfully (auth, environment, and a usable working directory).
254293- comon stores local app state in ` ~/.comon/state.json ` by default (or ` $COMON_HOME ` , or ` --comon-home ` ).
255294- comon stores scan cache in ` ~/.comon/comon.db ` to avoid rereading unchanged session files.
295+ - Large session logs are parsed incrementally with persisted parser offsets in ` comon.db ` ; unchanged files are reused from cache.
296+ - If historical days look incomplete after adding old session files, run once with ` --full-scan --scan-time-budget-ms 0 ` to complete backfill.
256297- comon uses embedded SQLite (` rusqlite ` with bundled SQLite); no system ` sqlite3 ` CLI is required at runtime.
257298- comon stores user-editable runtime settings in ` ~/.comon/config.json ` by default.
258299- Privacy: comon stores metadata (workspace paths, timestamps, token/run/time aggregates) and does not persist prompt/completion text.
0 commit comments