codex-usage-tracking 0.8.0__tar.gz → 0.8.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/.codex-plugin/plugin.json +1 -1
  2. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/CHANGELOG.md +5 -0
  3. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/PKG-INFO +1 -1
  4. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/development.md +7 -7
  5. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/one-dot-oh-readiness.md +8 -8
  6. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/pyproject.toml +1 -1
  7. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/skills/codex-usage-tracker/scripts/run_mcp.py +2 -2
  8. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/__init__.py +1 -1
  9. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/diagnostic_reports.py +4 -0
  10. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_diagnostics.js +126 -22
  11. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_tables.css +36 -1
  12. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/store.py +8 -0
  13. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracking.egg-info/PKG-INFO +1 -1
  14. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_dashboard_payload.py +8 -0
  15. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_dashboard_server.py +6 -0
  16. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/.mcp.json +0 -0
  17. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/AGENTS.md +0 -0
  18. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/CONTRIBUTING.md +0 -0
  19. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/LICENSE +0 -0
  20. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/MANIFEST.in +0 -0
  21. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/README.md +0 -0
  22. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/SECURITY.md +0 -0
  23. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/assets/icon.svg +0 -0
  24. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/architecture.md +0 -0
  25. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/assets/dashboard-call-investigator-evidence.png +0 -0
  26. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/assets/dashboard-call-investigator-preview.png +0 -0
  27. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/assets/dashboard-call-investigator.png +0 -0
  28. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/assets/dashboard-calls-preview.png +0 -0
  29. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/assets/dashboard-calls.png +0 -0
  30. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/assets/dashboard-details.png +0 -0
  31. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/assets/dashboard-insights.png +0 -0
  32. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/assets/dashboard-threads.png +0 -0
  33. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/assets/plugin-prompts.png +0 -0
  34. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/assets/plugin-thread-leaderboard.png +0 -0
  35. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/assets/ux/call-detail-panel.png +0 -0
  36. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/assets/ux/insight-overview.png +0 -0
  37. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/assets/ux/thread-investigation.png +0 -0
  38. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/call-drilldown-performance-checklist.md +0 -0
  39. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/cli-json-schemas.md +0 -0
  40. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/cli-reference.md +0 -0
  41. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/dashboard-guide.md +0 -0
  42. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/install.md +0 -0
  43. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/mcp.md +0 -0
  44. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/pricing-and-credits.md +0 -0
  45. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/privacy.md +0 -0
  46. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/docs/ui-ux-improvement-plan.md +0 -0
  47. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/scripts/benchmark_synthetic_history.py +0 -0
  48. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/scripts/check_release.py +0 -0
  49. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/scripts/install_local_plugin.py +0 -0
  50. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/scripts/smoke_installed_package.py +0 -0
  51. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/setup.cfg +0 -0
  52. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/skills/codex-usage-api/SKILL.md +0 -0
  53. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/skills/codex-usage-tracker/SKILL.md +0 -0
  54. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/__main__.py +0 -0
  55. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/allowance.py +0 -0
  56. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/api_payloads.py +0 -0
  57. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/call_origin.py +0 -0
  58. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/cli.py +0 -0
  59. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/cli_parser.py +0 -0
  60. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/context.py +0 -0
  61. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/costing.py +0 -0
  62. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/dashboard.py +0 -0
  63. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/diagnostic_facts.py +0 -0
  64. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/diagnostics.py +0 -0
  65. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/formatting.py +0 -0
  66. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/i18n.py +0 -0
  67. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/json_contracts.py +0 -0
  68. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/mcp_server.py +0 -0
  69. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/models.py +0 -0
  70. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/parser.py +0 -0
  71. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/paths.py +0 -0
  72. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/__init__.py +0 -0
  73. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/assets/icon.svg +0 -0
  74. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard.css +0 -0
  75. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard.js +0 -0
  76. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_actions.js +0 -0
  77. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_analysis.js +0 -0
  78. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_call.css +0 -0
  79. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_call_diagnostics.js +0 -0
  80. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_call_investigator.js +0 -0
  81. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_cells.js +0 -0
  82. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_data.js +0 -0
  83. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_detail.css +0 -0
  84. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_details.js +0 -0
  85. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_events.js +0 -0
  86. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_filters.js +0 -0
  87. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_format.js +0 -0
  88. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_i18n.js +0 -0
  89. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_insights.css +0 -0
  90. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_insights.js +0 -0
  91. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_layout.css +0 -0
  92. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_live.js +0 -0
  93. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_payload_cache.js +0 -0
  94. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_responsive.css +0 -0
  95. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_state.js +0 -0
  96. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_status.js +0 -0
  97. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_tables.js +0 -0
  98. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_template.html +0 -0
  99. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/dashboard_tooltips.js +0 -0
  100. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/locales/ar.json +0 -0
  101. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/locales/de.json +0 -0
  102. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/locales/en.json +0 -0
  103. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/locales/es.json +0 -0
  104. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/locales/fr.json +0 -0
  105. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/locales/it.json +0 -0
  106. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/locales/ja.json +0 -0
  107. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/locales/ko.json +0 -0
  108. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/locales/pt.json +0 -0
  109. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/locales/ru.json +0 -0
  110. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/locales/vi.json +0 -0
  111. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/dashboard/locales/zh-Hans.json +0 -0
  112. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-call-investigator-evidence.png +0 -0
  113. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-call-investigator-preview.png +0 -0
  114. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-call-investigator.png +0 -0
  115. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-calls-preview.png +0 -0
  116. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-calls.png +0 -0
  117. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-details.png +0 -0
  118. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-insights.png +0 -0
  119. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/docs/assets/dashboard-threads.png +0 -0
  120. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/docs/assets/plugin-prompts.png +0 -0
  121. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/docs/assets/plugin-thread-leaderboard.png +0 -0
  122. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/docs/dashboard-guide.html +0 -0
  123. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/rate_cards/codex-credit-rates.json +0 -0
  124. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/skills/codex-usage-api/SKILL.md +0 -0
  125. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_data/skills/codex-usage-tracker/SKILL.md +0 -0
  126. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/plugin_installer.py +0 -0
  127. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/pricing.py +0 -0
  128. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/pricing_config.py +0 -0
  129. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/pricing_estimates.py +0 -0
  130. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/pricing_openai.py +0 -0
  131. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/projects.py +0 -0
  132. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/recommendations.py +0 -0
  133. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/redaction.py +0 -0
  134. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/reports.py +0 -0
  135. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/schema.py +0 -0
  136. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/server.py +0 -0
  137. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/server_utils.py +0 -0
  138. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/store_query_sql.py +0 -0
  139. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/store_schema.py +0 -0
  140. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/store_sources.py +0 -0
  141. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/store_thread_summaries.py +0 -0
  142. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/support.py +0 -0
  143. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracker/threads.py +0 -0
  144. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracking.egg-info/SOURCES.txt +0 -0
  145. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracking.egg-info/dependency_links.txt +0 -0
  146. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracking.egg-info/entry_points.txt +0 -0
  147. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracking.egg-info/requires.txt +0 -0
  148. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/src/codex_usage_tracking.egg-info/top_level.txt +0 -0
  149. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/store_dashboard_helpers.py +0 -0
  150. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_allowance.py +0 -0
  151. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_call_origin.py +0 -0
  152. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_cli_lifecycle.py +0 -0
  153. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_cli_release.py +0 -0
  154. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_context_evidence.py +0 -0
  155. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_dashboard_data.py +0 -0
  156. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_dashboard_live.py +0 -0
  157. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_dashboard_state.py +0 -0
  158. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_i18n.py +0 -0
  159. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_json_contracts.py +0 -0
  160. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_mcp_integration.py +0 -0
  161. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_mcp_launcher.py +0 -0
  162. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_parser.py +0 -0
  163. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_plugin_installer.py +0 -0
  164. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_pricing.py +0 -0
  165. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_privacy.py +0 -0
  166. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_projects.py +0 -0
  167. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_recommendations.py +0 -0
  168. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_redaction.py +0 -0
  169. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_schema.py +0 -0
  170. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_store_dashboard_mcp.py +0 -0
  171. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_store_migrations.py +0 -0
  172. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_support.py +0 -0
  173. {codex_usage_tracking-0.8.0 → codex_usage_tracking-0.8.1}/tests/test_threads.py +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-usage-tracker",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Unofficial local tracker for aggregate Codex token usage from local session logs.",
5
5
  "author": {
6
6
  "name": "Douglas Monsky"
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.8.1 - 2026-06-20
6
+
7
+ - Make Diagnostics fact tables easier to scan by widening and pinning the Fact column while horizontally scrolling.
8
+ - Add API-backed sortable headers to top-level Diagnostics fact tables, including cached input, output, cache ratio, largest call, latest call time, occurrence, call-count, and fact-name sorts.
9
+
5
10
  ## 0.8.0 - 2026-06-20
6
11
 
7
12
  - Add an aggregate Diagnostics dashboard for inspecting diagnostic facts, associated calls, token totals, and on-demand evidence without persisting raw transcript text.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codex-usage-tracking
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: Unofficial local Codex plugin and dashboard for investigating aggregate token usage, costs, caching, and thread patterns.
5
5
  Author: Douglas Monsky
6
6
  License-Expression: MIT
@@ -38,7 +38,7 @@ fix/<issue-number>-short-description
38
38
  docs/<issue-number>-short-description
39
39
  chore/<issue-number>-short-description
40
40
  test/<issue-number>-short-description
41
- release/0.8.0
41
+ release/0.8.1
42
42
  hotfix/0.3.3
43
43
  ```
44
44
 
@@ -91,7 +91,7 @@ blocked
91
91
  Recommended milestones:
92
92
 
93
93
  ```text
94
- 0.8.0
94
+ 0.8.1
95
95
  1.0-readiness
96
96
  1.0.0
97
97
  ```
@@ -146,8 +146,8 @@ python scripts/smoke_installed_package.py --docker
146
146
  To verify the public PyPI package instead of the local checkout:
147
147
 
148
148
  ```bash
149
- python scripts/smoke_installed_package.py --from-pypi --version 0.8.0
150
- python scripts/smoke_installed_package.py --docker --from-pypi --version 0.8.0
149
+ python scripts/smoke_installed_package.py --from-pypi --version 0.8.1
150
+ python scripts/smoke_installed_package.py --docker --from-pypi --version 0.8.1
151
151
  ```
152
152
 
153
153
  `scripts/check_release.py` treats these public-package smoke commands as release-state claims. Keep their `--version` and `codex-usage-tracking==...` values aligned with `pyproject.toml`; the release gate fails when the docs claim a different public version. It also checks that install docs point at the real PyPI distribution, `codex-usage-tracking`, and keep the warning that `codex-usage-tracker` is a different PyPI package.
@@ -286,8 +286,8 @@ After the release branch merges, tag from updated `main`, not from an unreviewed
286
286
  ```bash
287
287
  git switch main
288
288
  git pull --ff-only
289
- git tag -a v0.8.0 -m "codex-usage-tracker 0.8.0"
290
- git push origin v0.8.0
289
+ git tag -a v0.8.1 -m "codex-usage-tracker 0.8.1"
290
+ git push origin v0.8.1
291
291
  ```
292
292
 
293
293
  Do not create or push release tags without maintainer approval.
@@ -296,7 +296,7 @@ Do not create or push release tags without maintainer approval.
296
296
 
297
297
  Publishing uses GitHub Actions Trusted Publishing through `.github/workflows/publish.yml`; do not upload from a local machine and do not add PyPI or TestPyPI API tokens.
298
298
 
299
- The first public package release, `0.3.0`, was published on June 8, 2026. Patch release `0.3.1` followed the same day to ship the live-dashboard skill launch fix. Patch release `0.3.2` made dashboard launch refresh the default and added runtime enablement for context loading. Minor release `0.4.0` added Python 3.14 support, release recovery docs, stricter privacy/support-bundle regression coverage, and large-history benchmark thresholds. Patch release `0.4.1` was published by workflow dispatch from `main`; it hardened the PyPI publish workflow and checked off completed 1.0 readiness gates. Minor release `0.5.0` added dashboard localization support and initial language catalogs. Minor release `0.6.0` is the performance and call-drilldown release with SQL-backed live API slices, materialized thread summaries, faster evidence loading, and dashboard runtime module refactors. Patch release `0.6.1` aligns the final README/package screenshots and companion plugin assets. Minor release `0.7.0` adds observed usage snapshots and the latest-observed dashboard card while keeping raw evidence on demand only. Minor release `0.8.0` adds aggregate diagnostics, source-offset context seeking, and live dashboard loading hardening.
299
+ The first public package release, `0.3.0`, was published on June 8, 2026. Patch release `0.3.1` followed the same day to ship the live-dashboard skill launch fix. Patch release `0.3.2` made dashboard launch refresh the default and added runtime enablement for context loading. Minor release `0.4.0` added Python 3.14 support, release recovery docs, stricter privacy/support-bundle regression coverage, and large-history benchmark thresholds. Patch release `0.4.1` was published by workflow dispatch from `main`; it hardened the PyPI publish workflow and checked off completed 1.0 readiness gates. Minor release `0.5.0` added dashboard localization support and initial language catalogs. Minor release `0.6.0` is the performance and call-drilldown release with SQL-backed live API slices, materialized thread summaries, faster evidence loading, and dashboard runtime module refactors. Patch release `0.6.1` aligns the final README/package screenshots and companion plugin assets. Minor release `0.7.0` adds observed usage snapshots and the latest-observed dashboard card while keeping raw evidence on demand only. Minor release `0.8.0` adds aggregate diagnostics, source-offset context seeking, and live dashboard loading hardening. Patch release `0.8.1` improves Diagnostics fact table readability with pinned fact names and sortable fact columns.
300
300
 
301
301
  - GitHub Release: `https://github.com/douglasmonsky/codex-usage-tracker/releases/tag/v0.3.0`
302
302
  - GitHub Release: `https://github.com/douglasmonsky/codex-usage-tracker/releases/tag/v0.3.1`
@@ -24,12 +24,12 @@ Not guaranteed:
24
24
 
25
25
  ## 1. Public Install And Package Metadata
26
26
 
27
- - [x] Verify the current public PyPI version is visible as `0.8.0`: `python -c "import json, urllib.request; print(json.load(urllib.request.urlopen('https://pypi.org/pypi/codex-usage-tracking/json'))['info']['version'])"`.
28
- - [x] Verify public venv install for `0.8.0`: `python -m venv /tmp/codex-usage-pypi-smoke && . /tmp/codex-usage-pypi-smoke/bin/activate && python -m pip install codex-usage-tracking==0.8.0 && codex-usage-tracker --version`.
29
- - [x] Verify public pipx install path for `0.8.0`: `PIPX_HOME=/tmp/codex-usage-pipx-home PIPX_BIN_DIR=/tmp/codex-usage-pipx-bin pipx install codex-usage-tracking==0.8.0 && /tmp/codex-usage-pipx-bin/codex-usage-tracker --version`.
27
+ - [x] Verify the current public PyPI version is visible as `0.8.1`: `python -c "import json, urllib.request; print(json.load(urllib.request.urlopen('https://pypi.org/pypi/codex-usage-tracking/json'))['info']['version'])"`.
28
+ - [x] Verify public venv install for `0.8.1`: `python -m venv /tmp/codex-usage-pypi-smoke && . /tmp/codex-usage-pypi-smoke/bin/activate && python -m pip install codex-usage-tracking==0.8.1 && codex-usage-tracker --version`.
29
+ - [x] Verify public pipx install path for `0.8.1`: `PIPX_HOME=/tmp/codex-usage-pipx-home PIPX_BIN_DIR=/tmp/codex-usage-pipx-bin pipx install codex-usage-tracking==0.8.1 && /tmp/codex-usage-pipx-bin/codex-usage-tracker --version`.
30
30
  - [x] Verify installed package resources from a built wheel: `python scripts/smoke_installed_package.py`.
31
31
  - [x] Verify installed package resources in Linux Docker: `python scripts/smoke_installed_package.py --docker`.
32
- - [x] Verify public PyPI package in Docker: `python scripts/smoke_installed_package.py --docker --from-pypi --version 0.8.0`.
32
+ - [x] Verify public PyPI package in Docker: `python scripts/smoke_installed_package.py --docker --from-pypi --version 0.8.1`.
33
33
  - [x] Verify PyPI metadata names remain unchanged: `python scripts/check_release.py`.
34
34
  - [x] Add Python 3.14 as an official support target after CI, package classifiers, docs, and installed-package smoke coverage were added. Docker smoke coverage uses `python:3.14-slim` by default. Track this in issue #12.
35
35
 
@@ -134,14 +134,14 @@ Not guaranteed:
134
134
 
135
135
  ## Evidence References
136
136
 
137
- These references are the concrete proof behind completed checklist items. Public package smoke commands are version-specific to `0.8.0`; all repo tests use synthetic or aggregate-only data.
137
+ These references are the concrete proof behind completed checklist items. Public package smoke commands are version-specific to `0.8.1`; all repo tests use synthetic or aggregate-only data.
138
138
 
139
139
  ### Public Install And Package Metadata
140
140
 
141
141
  - Public PyPI version, public venv install, and public pipx install are proven by the exact public-install commands in section 1.
142
142
  - Built-wheel and installed-resource coverage is proven by `scripts/smoke_installed_package.py` and `tests/test_cli_release.py::test_installed_package_smoke_checks_help_for_stable_commands`.
143
143
  - Linux package-resource coverage is proven by `scripts/smoke_installed_package.py --docker`.
144
- - Public PyPI Docker coverage is proven by `scripts/smoke_installed_package.py --docker --from-pypi --version 0.8.0`.
144
+ - Public PyPI Docker coverage is proven by `scripts/smoke_installed_package.py --docker --from-pypi --version 0.8.1`.
145
145
  - PyPI metadata, package/distribution names, package resources, source/wheel member names, Python 3.10-3.14 support metadata, CI workflow requirements, publish workflow safety text, and tracked secret patterns are proven by `scripts/check_release.py`, `scripts/check_release.py --dist`, and `tests/test_cli_release.py::test_release_check_script_passes`.
146
146
 
147
147
  ### Upgrade And Migration
@@ -219,8 +219,8 @@ These references are the concrete proof behind completed checklist items. Public
219
219
  - Publish workflow package name, Trusted Publishing, TestPyPI/PyPI job presence, event guards, no push/PR publishing, no token/password publishing, and manual PyPI main/tag preflight are proven by `scripts/check_release.py::_check_publish_workflow`.
220
220
  - The GitHub `pypi` environment gate is proven by `gh api repos/douglasmonsky/codex-usage-tracker/environments/pypi`, which reports a `required_reviewers` protection rule and `can_admins_bypass=false`.
221
221
  - Dist filename and wheel/sdist member checks are proven by `python -m build`, `python -m twine check dist/*`, and `python scripts/check_release.py --dist`.
222
- - TestPyPI publish process is proven by a workflow-dispatch run on `main`, followed by TestPyPI metadata and clean virtualenv install checks for `codex-usage-tracking==0.8.0`.
223
- - PyPI publish process is proven by a workflow-dispatch run on `main`, protected `pypi` environment approval, PyPI metadata visibility, clean virtualenv install, temporary pipx install, and Docker public-package smoke for `codex-usage-tracking==0.8.0`.
222
+ - TestPyPI publish process is proven by a workflow-dispatch run on `main`, followed by TestPyPI metadata and clean virtualenv install checks for `codex-usage-tracking==0.8.1`.
223
+ - PyPI publish process is proven by a workflow-dispatch run on `main`, protected `pypi` environment approval, PyPI metadata visibility, clean virtualenv install, temporary pipx install, and Docker public-package smoke for `codex-usage-tracking==0.8.1`.
224
224
  - Release recovery documentation is proven by `scripts/check_release.py` required-file and docs checks.
225
225
 
226
226
  ### Known Limitations
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "codex-usage-tracking"
7
- version = "0.8.0"
7
+ version = "0.8.1"
8
8
  description = "Unofficial local Codex plugin and dashboard for investigating aggregate token usage, costs, caching, and thread patterns."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -15,9 +15,9 @@ from pathlib import Path
15
15
 
16
16
  PACKAGE_SPEC = os.environ.get(
17
17
  "CODEX_USAGE_TRACKER_PACKAGE_SPEC",
18
- "codex-usage-tracking==0.8.0",
18
+ "codex-usage-tracking==0.8.1",
19
19
  )
20
- RUNTIME_VERSION = "0.8.0"
20
+ RUNTIME_VERSION = "0.8.1"
21
21
  PACKAGE_SPEC_MARKER = ".codex-usage-tracker-package-spec"
22
22
  MODULE_CHECK = (
23
23
  "import importlib.metadata; "
@@ -2,6 +2,6 @@
2
2
 
3
3
  from codex_usage_tracker.models import UsageEvent
4
4
 
5
- __version__ = "0.8.0"
5
+ __version__ = "0.8.1"
6
6
 
7
7
  __all__ = ["UsageEvent", "__version__"]
@@ -22,6 +22,10 @@ DIAGNOSTICS_NOTES = [
22
22
  DIAGNOSTIC_FACT_SORT_CHOICES = (
23
23
  "uncached",
24
24
  "tokens",
25
+ "cached",
26
+ "output",
27
+ "cache",
28
+ "largest",
25
29
  "calls",
26
30
  "occurrences",
27
31
  "time",
@@ -34,6 +34,7 @@
34
34
  const factCallPageSize = 25;
35
35
  const factCallPayloads = new Map();
36
36
  const factCallSorts = new Map();
37
+ const factSorts = new Map();
37
38
 
38
39
  function setActive(active) {
39
40
  diagnosticsPanelEl.hidden = !active;
@@ -52,6 +53,7 @@
52
53
  payloads = emptyPayloads();
53
54
  factCallPayloads.clear();
54
55
  factCallSorts.clear();
56
+ factSorts.clear();
55
57
  }
56
58
 
57
59
  function renderDiagnostics(dateRange) {
@@ -86,10 +88,13 @@
86
88
  const generation = requestGeneration + 1;
87
89
  requestGeneration = generation;
88
90
  try {
91
+ const factsSort = factSortState('facts');
92
+ const toolsSort = factSortState('tools');
93
+ const compactionsSort = factSortState('compactions');
89
94
  const [facts, tools, compactions] = await Promise.all([
90
- fetchPayload('/api/diagnostics/facts', { ...filters, limit: '50', sort: 'uncached', direction: 'desc' }),
91
- fetchPayload('/api/diagnostics/tools', { ...filters, limit: '25', sort: 'uncached', direction: 'desc' }),
92
- fetchPayload('/api/diagnostics/compactions', { ...filters, limit: '25', sort: 'uncached', direction: 'desc' }),
95
+ fetchPayload('/api/diagnostics/facts', { ...filters, limit: '50', sort: factsSort.sort, direction: factsSort.direction }),
96
+ fetchPayload('/api/diagnostics/tools', { ...filters, limit: '25', sort: toolsSort.sort, direction: toolsSort.direction }),
97
+ fetchPayload('/api/diagnostics/compactions', { ...filters, limit: '25', sort: compactionsSort.sort, direction: compactionsSort.direction }),
93
98
  ]);
94
99
  if (generation !== requestGeneration || signature !== activeSignature) return;
95
100
  payloads = { facts, tools, compactions };
@@ -164,6 +169,20 @@
164
169
  renderIfActive();
165
170
  }
166
171
 
172
+ function sortFactRows(sectionKey, sortKey) {
173
+ if (!diagnosticFactSortLabels()[sortKey]) return;
174
+ const current = factSortState(sectionKey);
175
+ const next = current.sort === sortKey
176
+ ? { sort: sortKey, direction: current.direction === 'asc' ? 'desc' : 'asc' }
177
+ : { sort: sortKey, direction: defaultFactSortDirection(sortKey) };
178
+ factSorts.set(sectionKey, next);
179
+ status = 'loading';
180
+ errorMessage = '';
181
+ const filters = getDiagnosticFilters();
182
+ void fetchDiagnostics(activeSignature, filters);
183
+ renderIfActive();
184
+ }
185
+
167
186
  function sortFactCalls(sortKey) {
168
187
  if (!selectedFactKey || !diagnosticCallSortLabels()[sortKey]) return;
169
188
  const current = factCallSortState(selectedFactKey);
@@ -206,30 +225,30 @@
206
225
  ${readoutMetric('Compaction rows', payloads.compactions)}
207
226
  <span class="diagnostics-note">Structured labels only. Raw context remains on-demand in the call investigator.</span>
208
227
  </div>
209
- ${renderFactSection('Top Diagnostic Facts', 'Ranked by associated uncached input tokens.', payloads.facts, loading)}
210
- ${renderFactSection('Tool and Function Activity', 'Tool/function facts associated with model calls.', payloads.tools, loading)}
211
- ${renderFactSection('Compaction Activity', 'Compaction facts and post-compaction associated costs.', payloads.compactions, loading)}
228
+ ${renderFactSection('facts', 'Top Diagnostic Facts', 'Structured facts associated with model calls.', payloads.facts, loading)}
229
+ ${renderFactSection('tools', 'Tool and Function Activity', 'Tool/function facts associated with model calls.', payloads.tools, loading)}
230
+ ${renderFactSection('compactions', 'Compaction Activity', 'Compaction facts and post-compaction associated costs.', payloads.compactions, loading)}
212
231
  </div>
213
232
  `;
214
233
  }
215
234
 
216
- function renderFactSection(title, caption, payload, loading) {
235
+ function renderFactSection(sectionKey, title, caption, payload, loading) {
217
236
  const rows = Array.isArray(payload?.rows) ? payload.rows : [];
218
237
  return `
219
238
  <div class="diagnostics-section">
220
239
  <div class="diagnostics-section-header">
221
240
  <div>
222
241
  <h3>${escapeHtml(title)}</h3>
223
- <p>${escapeHtml(caption)}</p>
242
+ <p>${escapeHtml(`${caption} Sorted by ${diagnosticFactSortDescription(sectionKey)}.`)}</p>
224
243
  </div>
225
244
  <span>${escapeHtml(payload ? `${number.format(payload.total_matched_rows || rows.length)} matched` : loading ? 'Loading' : 'No payload')}</span>
226
245
  </div>
227
- ${renderFactTable(rows, loading)}
246
+ ${renderFactTable(sectionKey, rows, loading)}
228
247
  </div>
229
248
  `;
230
249
  }
231
250
 
232
- function renderFactTable(rows, loading) {
251
+ function renderFactTable(sectionKey, rows, loading) {
233
252
  if (loading && !rows.length) return renderState('Loading diagnostics...');
234
253
  if (!rows.length) return renderState('No diagnostic facts matched the current filters.');
235
254
  const body = rows.map(row => {
@@ -240,7 +259,7 @@
240
259
  : tokenText(row.largest_call_tokens);
241
260
  return `
242
261
  <tr class="${selected ? 'selected-row' : ''}">
243
- <td>
262
+ <td class="diagnostics-fact-cell">
244
263
  <div class="diagnostic-fact">
245
264
  <strong>${escapeHtml(row.fact_type || 'unknown')}/${escapeHtml(row.fact_name || 'unknown')}</strong>
246
265
  <span>${escapeHtml(row.fact_category || 'uncategorized')}</span>
@@ -266,18 +285,31 @@
266
285
  }).join('');
267
286
  return `
268
287
  <div class="diagnostics-table-wrap">
269
- <table class="diagnostics-table">
288
+ <table class="diagnostics-table diagnostics-facts-table">
289
+ <colgroup>
290
+ <col class="diagnostics-fact-col">
291
+ <col class="diagnostics-count-col">
292
+ <col class="diagnostics-count-col">
293
+ <col class="diagnostics-token-col">
294
+ <col class="diagnostics-token-col">
295
+ <col class="diagnostics-token-col">
296
+ <col class="diagnostics-token-col">
297
+ <col class="diagnostics-ratio-col">
298
+ <col class="diagnostics-token-col">
299
+ <col class="diagnostics-latest-col">
300
+ <col class="diagnostics-action-col">
301
+ </colgroup>
270
302
  <thead><tr>
271
- ${columnHeader('Fact', 'Diagnostic fact type and name derived from structured local log metadata. Raw prompts, assistant text, and tool output are not persisted.')}
272
- ${columnHeader('Occ', 'Occurrences: count of matching diagnostic fact events. One model call can contribute more than one occurrence.', 'num')}
273
- ${columnHeader('Calls', 'Distinct model calls associated with this diagnostic fact.', 'num')}
274
- ${columnHeader('Assoc total', 'Associated total tokens for those calls. Totals are not additive across facts because one call can have multiple facts.', 'num')}
275
- ${columnHeader('Cached', 'Associated cached input tokens for those calls.', 'num')}
276
- ${columnHeader('Uncached', 'Associated uncached input tokens for those calls.', 'num')}
277
- ${columnHeader('Output', 'Associated output tokens for those calls.', 'num')}
278
- ${columnHeader('Cache %', 'Average cache ratio across associated calls.', 'num')}
279
- ${columnHeader('Largest', 'Largest associated call by total tokens.', 'num')}
280
- ${columnHeader('Latest', 'Latest associated call timestamp.')}
303
+ ${diagnosticFactHeader(sectionKey, 'fact', 'Fact', false, 'Diagnostic fact type and name derived from structured local log metadata. Raw prompts, assistant text, and tool output are not persisted.')}
304
+ ${diagnosticFactHeader(sectionKey, 'occurrences', 'Occ', true, 'Occurrences: count of matching diagnostic fact events. One model call can contribute more than one occurrence.')}
305
+ ${diagnosticFactHeader(sectionKey, 'calls', 'Calls', true, 'Distinct model calls associated with this diagnostic fact.')}
306
+ ${diagnosticFactHeader(sectionKey, 'tokens', 'Assoc total', true, 'Associated total tokens for those calls. Totals are not additive across facts because one call can have multiple facts.')}
307
+ ${diagnosticFactHeader(sectionKey, 'cached', 'Cached', true, 'Associated cached input tokens for those calls.')}
308
+ ${diagnosticFactHeader(sectionKey, 'uncached', 'Uncached', true, 'Associated uncached input tokens for those calls.')}
309
+ ${diagnosticFactHeader(sectionKey, 'output', 'Output', true, 'Associated output tokens for those calls.')}
310
+ ${diagnosticFactHeader(sectionKey, 'cache', 'Cache %', true, 'Average cache ratio across associated calls.')}
311
+ ${diagnosticFactHeader(sectionKey, 'largest', 'Largest', true, 'Largest associated call by total tokens.')}
312
+ ${diagnosticFactHeader(sectionKey, 'time', 'Latest', false, 'Latest associated call timestamp.')}
281
313
  ${columnHeader('Action', 'Expand or collapse the associated calls.')}
282
314
  </tr></thead>
283
315
  <tbody>${body}</tbody>
@@ -380,6 +412,22 @@
380
412
  return `<th${classAttr}${tooltipAttr ? ` ${tooltipAttr}` : ''}>${escapeHtml(label)}</th>`;
381
413
  }
382
414
 
415
+ function diagnosticFactHeader(sectionKey, sortKey, label, numeric = false, tooltip = '') {
416
+ const state = factSortState(sectionKey);
417
+ const active = state.sort === sortKey;
418
+ const indicator = active ? (state.direction === 'asc' ? '▲' : '▼') : '';
419
+ const ariaSort = active ? (state.direction === 'asc' ? 'ascending' : 'descending') : 'none';
420
+ const tooltipAttr = tooltipAttributes(tooltip);
421
+ return `
422
+ <th${numeric ? ' class="num"' : ''} data-diagnostics-fact-sort-active="${active ? 'true' : 'false'}" aria-sort="${ariaSort}"${tooltipAttr ? ` ${tooltipAttr}` : ''}>
423
+ <button class="sort-header child-sort-header" type="button" data-diagnostics-fact-section="${escapeHtml(sectionKey)}" data-diagnostics-fact-sort-key="${escapeHtml(sortKey)}">
424
+ <span>${escapeHtml(label)}</span>
425
+ <span class="sort-indicator">${escapeHtml(indicator)}</span>
426
+ </button>
427
+ </th>
428
+ `;
429
+ }
430
+
383
431
  function diagnosticCallHeader(sortKey, label, numeric = false, tooltip = '') {
384
432
  const state = factCallSortState(selectedFactKey);
385
433
  const active = state.sort === sortKey;
@@ -396,6 +444,28 @@
396
444
  `;
397
445
  }
398
446
 
447
+ function diagnosticFactSortDescription(sectionKey) {
448
+ const state = factSortState(sectionKey);
449
+ const labels = diagnosticFactSortLabels();
450
+ const label = labels[state.sort] || state.sort;
451
+ return `${label} ${state.direction === 'asc' ? 'ascending' : 'descending'}`;
452
+ }
453
+
454
+ function diagnosticFactSortLabels() {
455
+ return {
456
+ cache: 'cache ratio',
457
+ cached: 'cached input tokens',
458
+ calls: 'associated calls',
459
+ fact: 'fact name',
460
+ largest: 'largest call',
461
+ occurrences: 'occurrences',
462
+ output: 'output tokens',
463
+ time: 'latest call time',
464
+ tokens: 'total tokens',
465
+ uncached: 'uncached input tokens',
466
+ };
467
+ }
468
+
399
469
  function diagnosticCallSortDescription() {
400
470
  const state = factCallSortState(selectedFactKey);
401
471
  const labels = diagnosticCallSortLabels();
@@ -419,6 +489,14 @@
419
489
  };
420
490
  }
421
491
 
492
+ function factSortState(sectionKey) {
493
+ return factSorts.get(sectionKey) || { sort: 'uncached', direction: 'desc' };
494
+ }
495
+
496
+ function defaultFactSortDirection(sortKey) {
497
+ return sortKey === 'fact' ? 'asc' : 'desc';
498
+ }
499
+
422
500
  function factCallSortState(key) {
423
501
  return factCallSorts.get(key) || { sort: 'tokens', direction: 'desc' };
424
502
  }
@@ -483,10 +561,25 @@
483
561
  };
484
562
  }
485
563
 
564
+ function captureScrollPosition() {
565
+ pendingScrollAnchor = {
566
+ key: '',
567
+ type: 'scroll',
568
+ top: 0,
569
+ scrollY: window.scrollY,
570
+ };
571
+ }
572
+
486
573
  function restoreScrollAnchor() {
487
574
  if (!pendingScrollAnchor) return;
488
575
  const anchor = pendingScrollAnchor;
489
576
  pendingScrollAnchor = null;
577
+ if (anchor.type === 'scroll') {
578
+ window.requestAnimationFrame(() => {
579
+ window.scrollTo({ top: anchor.scrollY, behavior: 'auto' });
580
+ });
581
+ return;
582
+ }
490
583
  window.requestAnimationFrame(() => {
491
584
  const target = anchor.type === 'load-more'
492
585
  ? diagnosticsPanelEl.querySelector('[data-diagnostics-call-load-more]')
@@ -539,6 +632,17 @@
539
632
  void fetchFactCalls(factType, factName, { append: true });
540
633
  return;
541
634
  }
635
+ const factSortButton = target.closest('[data-diagnostics-fact-sort-key]');
636
+ if (factSortButton && diagnosticsPanelEl.contains(factSortButton)) {
637
+ event.preventDefault();
638
+ event.stopPropagation();
639
+ captureScrollPosition();
640
+ sortFactRows(
641
+ factSortButton.dataset.diagnosticsFactSection || 'facts',
642
+ factSortButton.dataset.diagnosticsFactSortKey || '',
643
+ );
644
+ return;
645
+ }
542
646
  const sortButton = target.closest('[data-diagnostics-call-sort-key]');
543
647
  if (sortButton && diagnosticsPanelEl.contains(sortButton)) {
544
648
  event.preventDefault();
@@ -323,12 +323,46 @@
323
323
  min-width: 1120px;
324
324
  table-layout: fixed;
325
325
  }
326
+ .diagnostics-facts-table {
327
+ min-width: 1320px;
328
+ }
329
+ .diagnostics-facts-table .diagnostics-fact-col { width: 26%; }
330
+ .diagnostics-facts-table .diagnostics-count-col { width: 5.5%; }
331
+ .diagnostics-facts-table .diagnostics-token-col { width: 7.5%; }
332
+ .diagnostics-facts-table .diagnostics-ratio-col { width: 5%; }
333
+ .diagnostics-facts-table .diagnostics-latest-col { width: 14.5%; }
334
+ .diagnostics-facts-table .diagnostics-action-col { width: 6%; }
326
335
  .diagnostics-call-table {
327
336
  min-width: 1060px;
328
337
  }
329
338
  .diagnostics-table th {
330
339
  position: static;
331
340
  }
341
+ .diagnostics-facts-table th {
342
+ position: sticky;
343
+ top: 0;
344
+ z-index: 12;
345
+ background: #fbfcfe;
346
+ }
347
+ .diagnostics-facts-table th:first-child,
348
+ .diagnostics-facts-table td.diagnostics-fact-cell {
349
+ position: sticky;
350
+ left: 0;
351
+ z-index: 3;
352
+ background: #ffffff;
353
+ box-shadow: 1px 0 0 var(--line);
354
+ }
355
+ .diagnostics-facts-table th:first-child {
356
+ z-index: 15;
357
+ background: #fbfcfe;
358
+ }
359
+ .diagnostics-facts-table tr.selected-row td.diagnostics-fact-cell {
360
+ background: #eff6ff;
361
+ }
362
+ .diagnostics-facts-table tbody tr:not(.diagnostics-drilldown-row):hover td,
363
+ .diagnostics-facts-table tbody tr:not(.diagnostics-drilldown-row):hover td.diagnostics-fact-cell {
364
+ background: #eff6ff;
365
+ }
332
366
  .diagnostics-table td,
333
367
  .diagnostics-table th {
334
368
  padding: 8px 10px;
@@ -342,9 +376,10 @@
342
376
  min-width: 0;
343
377
  }
344
378
  .diagnostic-fact strong {
345
- overflow-wrap: anywhere;
379
+ overflow-wrap: break-word;
346
380
  font-size: 12px;
347
381
  line-height: 1.25;
382
+ word-break: normal;
348
383
  }
349
384
  .diagnostic-fact span {
350
385
  color: var(--muted);
@@ -553,6 +553,10 @@ def query_diagnostic_facts(
553
553
  sort_map = {
554
554
  "uncached": "associated_uncached_input_tokens",
555
555
  "tokens": "associated_total_tokens",
556
+ "cached": "associated_cached_input_tokens",
557
+ "output": "associated_output_tokens",
558
+ "cache": "avg_cache_ratio",
559
+ "largest": "largest_call_tokens",
556
560
  "calls": "associated_calls",
557
561
  "occurrences": "occurrences",
558
562
  "time": "latest_event_timestamp",
@@ -681,6 +685,10 @@ def query_diagnostic_summary(
681
685
  sort_map = {
682
686
  "uncached": "associated_uncached_input_tokens",
683
687
  "tokens": "associated_total_tokens",
688
+ "cached": "associated_cached_input_tokens",
689
+ "output": "associated_output_tokens",
690
+ "cache": "avg_cache_ratio",
691
+ "largest": "largest_call_tokens",
684
692
  "calls": "associated_calls",
685
693
  "occurrences": "occurrences",
686
694
  "time": "latest_event_timestamp",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codex-usage-tracking
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: Unofficial local Codex plugin and dashboard for investigating aggregate token usage, costs, caching, and thread patterns.
5
5
  Author: Douglas Monsky
6
6
  License-Expression: MIT
@@ -292,6 +292,14 @@ def test_dashboard_and_csv_are_aggregate_only(tmp_path: Path) -> None:
292
292
  assert "Occurrences: count of matching diagnostic fact events" in dashboard_diagnostics_js
293
293
  assert "Associated total tokens for those calls" in dashboard_diagnostics_js
294
294
  assert "Average cache ratio across associated calls" in dashboard_diagnostics_js
295
+ assert "data-diagnostics-fact-sort-key" in dashboard_diagnostics_js
296
+ assert "data-diagnostics-fact-sort-active" in dashboard_diagnostics_js
297
+ assert "sortFactRows" in dashboard_diagnostics_js
298
+ assert "diagnosticFactHeader" in dashboard_diagnostics_js
299
+ assert "diagnostics-facts-table" in dashboard_surface
300
+ assert "diagnostics-fact-cell" in dashboard_surface
301
+ assert "diagnostics-facts-table th:first-child" in dashboard_css
302
+ assert "td.diagnostics-fact-cell" in dashboard_css
295
303
  assert "captureScrollAnchor" in dashboard_diagnostics_js
296
304
  assert "restoreScrollAnchor" in dashboard_diagnostics_js
297
305
  assert "data-diagnostics-call-load-more" in dashboard_diagnostics_js
@@ -462,6 +462,9 @@ def test_dashboard_server_live_sql_api_slices_are_aggregate_only(tmp_path: Path)
462
462
  recommendations_payload = _read_json(f"{base_url}/api/recommendations?limit=5")
463
463
  diagnostics_summary_payload = _read_json(f"{base_url}/api/diagnostics/summary?limit=5")
464
464
  diagnostics_facts_payload = _read_json(f"{base_url}/api/diagnostics/facts?limit=5")
465
+ diagnostics_sorted_facts_payload = _read_json(
466
+ f"{base_url}/api/diagnostics/facts?limit=5&sort=cached&direction=desc"
467
+ )
465
468
  diagnostics_compactions_payload = _read_json(
466
469
  f"{base_url}/api/diagnostics/compactions?limit=5"
467
470
  )
@@ -526,6 +529,9 @@ def test_dashboard_server_live_sql_api_slices_are_aggregate_only(tmp_path: Path)
526
529
  assert {row["fact_name"] for row in diagnostics_facts_payload["rows"]} >= {
527
530
  "post_compaction"
528
531
  }
532
+ assert diagnostics_sorted_facts_payload["filters"]["sort"] == "cached"
533
+ assert diagnostics_sorted_facts_payload["filters"]["direction"] == "desc"
534
+ _assert_contract(diagnostics_sorted_facts_payload)
529
535
  assert diagnostics_compactions_payload["filters"]["fact_type"] == "compaction"
530
536
  _assert_contract(diagnostics_compactions_payload)
531
537
  assert {row["fact_type"] for row in diagnostics_compactions_payload["rows"]} == {