Skip to content

fix usage dashboard reconcile and responsiveness#1

Merged
cosmiclasagnadev merged 2 commits intomainfrom
fix/usage-dashboard-reconcile-performance
Apr 8, 2026
Merged

fix usage dashboard reconcile and responsiveness#1
cosmiclasagnadev merged 2 commits intomainfrom
fix/usage-dashboard-reconcile-performance

Conversation

@cosmiclasagnadev
Copy link
Copy Markdown
Owner

@cosmiclasagnadev cosmiclasagnadev commented Apr 8, 2026

Make usage aggregation rebuild session data atomically and move dashboard persistence and view work off the hot path so navigation stays responsive while refreshing history.


Note

Medium Risk
Touches core aggregation/reconciliation paths and changes when events trigger recompute, which could impact correctness of counts or freshness if edge cases were missed, but scope is limited to the usage dashboard plugin.

Overview
Usage aggregation is refactored to be atomic and less error-prone. putMsg/putTool/putSess now write into an explicit Agg instance (no global seen signatures), tool aggregation ignores non-terminal updates, and reconciliation rebuilds a session’s buckets into a fresh aggregate and then swaps them in to avoid double-counting/stacking.

Dashboard responsiveness is improved via caching and lifecycle cleanup. Adds bounded memoization for computed flats/rows/active-session counts keyed by store.rev, clears these caches on seed/reconcile, persists view prefs asynchronously on exit, and simplifies plugin event handling to just schedule reconciles; also resets state on plugin dispose.

Adds test coverage for aggregation and reconcile/seed failure behavior, updates README install instructions, and bumps version to 1.0.2.

Reviewed by Cursor Bugbot for commit 2362c32. Bugbot is set up for automated code reviews on this repo. Configure here.

Make usage aggregation rebuild session data atomically and move dashboard persistence and view work off the hot path so navigation stays responsive while refreshing history.

Made-with: Cursor
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e9110ef. Configure here.

Comment thread src/reconcile.ts
Comment thread src/state.ts
@cosmiclasagnadev cosmiclasagnadev merged commit f42511d into main Apr 8, 2026
2 checks passed
@cosmiclasagnadev cosmiclasagnadev deleted the fix/usage-dashboard-reconcile-performance branch April 8, 2026 12:49
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