Add 7d/30d/all profile stats windows and improve skill tracking#202
Conversation
SDSLeon
commented
Jun 18, 2026
- Feature: Add selectable 7-day, 30-day, and all-time windows for profile stats so users can view recent activity or lifetime totals from settings.
- Extend shared profile contracts and main-process aggregation (core stats, token stats, heatmaps) to filter usage events by the selected window.
- Improve skill and subagent usage recording so runs are attributed to real names from completed payloads, with clearer display labels in insights and breakdowns.
- Update profile UI (window tabs, compact short-window heatmaps, window-aware token labels, share card) and preserve the selected window when switching device or provider scope.
- Add ProfileStatsWindow to contracts and filter core/token aggregations and heatmaps by range - Add window tabs in profile settings; thread window through header, stat strip, and share card - Render a compact heatmap for short windows and extract a shared legend component - Defer skill/subagent usage events until specific names resolve via item lifecycle updates - Use plain skill/subagent display names and update skills/subagents insight labels - Add usage recorder tests for deferred skill and subagent name recording
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 060d183893
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function recordItemHit(itemId: string, hit: ItemHit, meta: Meta, ts: number, final: boolean): void { | ||
| const next = betterHit(pendingItemHits.get(itemId), hit); | ||
| if (!isSpecificToolHit(next) && !final) { | ||
| rememberInMap(pendingItemHits, itemId, next); |
There was a problem hiding this comment.
Preserve start timestamps for deferred tool hits
When a Skill/Agent item starts with only a generic name, this branch defers the usage event until a later update/completion, but only the ItemHit is saved. The eventual push({ ts, ... }) uses the later batch's now, so a run that starts before local midnight or before a 7d/30d cutoff and completes after it is attributed to the wrong day/window, whereas starts were previously counted at invocation time. Store the original start timestamp alongside the pending hit and use it when flushing.
Useful? React with 👍 / 👎.
- Add profile stats range filter strings (7d, 30d, All) - Update activity insight labels for skills/subagents terminology - Add Total tokens labels for stat strip and share card - Sync de, en, es, fr, ja, ko, pl, pt-BR, ru, tr, uk, vi, zh-CN