-
Notifications
You must be signed in to change notification settings - Fork 5
Surface rate-limit percentages (5h/7d) in dashboard #17
Copy link
Copy link
Open
Labels
area: dashboardTUI dashboard and visualizationTUI dashboard and visualizationarea: databaseSQLite schema, queries, and migrationsSQLite schema, queries, and migrationsdifficulty: intermediateRequires some familiarity with the codebaseRequires some familiarity with the codebaseenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Metadata
Metadata
Assignees
Labels
area: dashboardTUI dashboard and visualizationTUI dashboard and visualizationarea: databaseSQLite schema, queries, and migrationsSQLite schema, queries, and migrationsdifficulty: intermediateRequires some familiarity with the codebaseRequires some familiarity with the codebaseenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Problem
The statusline hook captures
rate_limit_five_hour_pctandrate_limit_seven_day_pct, but this data is not stored in thetoken_snapshotstable — it's rendered once in the statusline and then lost. Users approaching their 5-hour or 7-day rate limits have no historical visibility or dashboard warning. For many users, this is more important than context-window percentage.What to do
src/context_analyzer_tool/db/schema.py:rate_limit_five_hour_pct REALandrate_limit_seven_day_pct REALcolumns totoken_snapshotsinsert_snapshot()insrc/context_analyzer_tool/db/events.pyroutes.pycontext_warnings.pyFiles to look at
src/context_analyzer_tool/db/schema.py— migration systemsrc/context_analyzer_tool/collector/models.py—StatuslineSnapshotRequestalready has the fieldssrc/context_analyzer_tool/dashboard/tui.py— display layer