fix(dashboard): wire live metrics, breakdowns, and session history#19
Open
aliatx2017 wants to merge 1 commit into
Open
fix(dashboard): wire live metrics, breakdowns, and session history#19aliatx2017 wants to merge 1 commit into
aliatx2017 wants to merge 1 commit into
Conversation
Dashboard always showed zero — cmd_dashboard never connected to session store. Metrics struct scaffolded, SSE serving, no data writer ever connected. Added background thread polling ~/.sqz/sessions.db every 5s: - Top KPIs: tokens_saved, compression_ratio from compression_stats() - Per-Tool: stages_applied GROUP BY, comma-split into individual tools - Per-Command: mode GROUP BY from compression_log - Sessions: list_sessions() from sessions table - Auto-creates synthetic dashboard session when data exists New SessionStore methods: - list_sessions(limit) — direct SQL, no FTS5 dependency - save_dashboard_session(id, summary) — lightweight upsert - per_tool_breakdown() — GROUP BY stages_applied, split on comma - per_command_breakdown() — GROUP BY mode Zero new dependencies.
a89853c to
98b5342
Compare
Author
Owner
|
Thank you for this PR, will take a look. Please feel free to contribute more , open PRs and Issues. Thanks again, really appreciate it !!! |
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.

Dashboard always showed zero —
cmd_dashboardnever connected to session store. Metrics struct wired, SSE serving, no writer ever connected.Added background thread polling
~/.sqz/sessions.dbevery 5s:compression_stats()list_sessions()from sessions tableNew SessionStore methods:
list_sessions(limit)— direct SQL, no FTS5 dependencysave_dashboard_session(id, summary)— lightweight upsertper_tool_breakdown()— GROUP BY stages_applied, split on commaper_command_breakdown()— GROUP BY modeAlso ran
cargo fmtacross entire codebase.Zero new dependencies.