Skip to content

feat(db): aggregated feature usage stats table and helpers#2

Merged
gandarfh merged 2 commits into
mainfrom
feat/feature-usage-stats
Jun 16, 2026
Merged

feat(db): aggregated feature usage stats table and helpers#2
gandarfh merged 2 commits into
mainfrom
feat/feature-usage-stats

Conversation

@gandarfh

@gandarfh gandarfh commented Jun 16, 2026

Copy link
Copy Markdown
Member

Adds a local-only aggregated feature-usage table backing the desktop usage
dashboard. One row per (day, feature) with a running count — no payloads,
timestamps, or per-event rows; never leaves the machine.

  • Migration 016_feature_usage_stats.sql (date, feature, count) PK (date, feature)
  • db::feature_usage module: record_feature_usage (UPSERT increment),
    get_feature_usage_by_date_range, clear_feature_usage
  • Mirrors the existing usage_stats (chat tokens) pattern
  • 3 unit tests (increment, range exclusion, clear)

@gandarfh
gandarfh merged commit c331047 into main Jun 16, 2026
3 checks passed
@gandarfh
gandarfh deleted the feat/feature-usage-stats branch June 16, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant