Add persistent daily stats with weekly/monthly breakdowns#6
Merged
Conversation
The mac app now accumulates connection stats over time so users can see interesting trends weekly, monthly, and all-time. Stats are written to the shared history.db on every poll cycle (~5s). New: - StatsStore: SQLite daily_stats table + per-IP history writer - StatsView: bar chart (30-day), summary cards, weekly/monthly periods - Stats tab in globe window with expandable details panel - "This week" summary line in menu bar popover The mac app also writes to the Rust CLI's connections/seen_ports/ seen_processes tables, so history grows even when only the mac app runs. Storage: ~22 KB/year for daily_stats — negligible. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
daily_statstable that accumulates connection stats every 5s poll cycle — daily totals, unique IPs, peak connections, new IPs, top country, top processconnections/seen_ports/seen_processestables, so history grows even when only the mac app is runningStorage impact
~22 KB/year for the daily_stats table — negligible.
Test plan
~/Library/Application Support/maperick/history.dbcontains adaily_statstable with today's row🤖 Generated with Claude Code