Stop the UI freeze: coalesce snapshot storms and bound chat rendering
Busy agents emitted a snapshot-changed broadcast per tool turn; every event made the renderer reload the full snapshot while the main process re-read whole audit tables synchronously, and ChatTimeline re-rendered every message with per-row linear scans - quadratic work per keystroke of agent activity until clicks stopped responding. Root fixes at each layer: all broadcasts funnel through one 200ms-coalesced notifier (unit-tested), the renderer reloads at most every 800ms with a trailing load, audit/access snapshot reads use SQL limits instead of full-table scans, and the timeline renders the latest 150 messages via O(n) lookup maps with a real show-earlier control. cred.txt is now gitignored so the Composio key cannot leak.
This commit is contained in:
1 parent
538bf20057
commit
f13ef48a3e
8 files changed
+158
-25
No files matched your search
@@ -6,3 +6,4 @@ playwright-report/
|
||||
coverage/
|
||||
*.tsbuildinfo
|
||||
design-source/
|
||||
cred.txt
|
||||
Reference in new issue
Block a user