Skip to content

fix(monitor): incremental message streaming to prevent browser lockups - #84

Merged
kalinon merged 1 commit into
mainfrom
fix/monitor-incremental-message-stream
Apr 15, 2026
Merged

fix(monitor): incremental message streaming to prevent browser lockups#84
kalinon merged 1 commit into
mainfrom
fix/monitor-incremental-message-stream

Conversation

@moltar-bot

Copy link
Copy Markdown
Contributor

Summary

Implements incremental message streaming for the Monitor session panel so we stop replacing large message arrays on every refresh tick.

What changed

  • Initial load still fetches a full window (limit=100)
  • Silent refresh now fetches only a small tail (limit=20)
  • Silent refresh now appends only new messages (dedupe by message key) instead of replacing the full list
  • Applies to both:
    • regular session detail polling
    • cron latest-run message polling

Why

Large conversations were freezing the browser because the panel repeatedly re-fetched and re-rendered large message sets every refresh interval.

Validation

  • npm run -w ./web lint
  • npm run -w ./web test -- SessionDetailPanel.test.jsx
  • Added test: appends only new tail messages during silent refresh

@kalinon
kalinon merged commit 3190305 into main Apr 15, 2026
9 checks passed
@kalinon
kalinon deleted the fix/monitor-incremental-message-stream branch April 15, 2026 15:45
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.

2 participants