Add usage statistics tracking with NDJSON storage#298
Open
kevintraver wants to merge 2 commits intomikker:mainfrom
Open
Add usage statistics tracking with NDJSON storage#298kevintraver wants to merge 2 commits intomikker:mainfrom
kevintraver wants to merge 2 commits intomikker:mainfrom
Conversation
Add a new Stats tab in settings to help users identify their most-used actions and optimize their keyboard shortcut configurations. Features: - Track every action execution with timestamps and key paths - Store stats in NDJSON format (newline-delimited JSON) - Display grouped stats with visual progress bars showing relative usage - Support nested group hierarchies with expandable/collapsible UI - Show keyboard shortcuts, app icons, and usage counts inline - Display total execution count across all actions - Clear all stats with confirmation dialog Implementation: - StatsManager.swift: Singleton for recording executions and querying aggregated statistics with in-memory caching - StatsPane.swift: SwiftUI settings pane with hierarchical tree view, progress bars, and proper icon/key badge alignment at all nesting levels - Hook stats recording into Controller.runAction() with full key path - NDJSON format enables fast append-only writes and human-readable storage Stats stored at ~/Library/Application Support/Leader Key/stats.jsonl 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update StatsPane to properly wrap content in Settings.Section components with required title parameter, fixing build errors after Settings library update.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new Stats tab in settings to help users identify their most-used actions and optimize their keyboard shortcut configurations.
Features
Implementation
Stats are stored at `~/Library/Application Support/Leader Key/stats.jsonl`
Screenshot
The Stats pane displays a hierarchical view with:
Testing