mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
SSE writes from the backend could arrive out of order under concurrent load. The frontend parts batcher also lacked directory awareness, making it unreliable when multiple directories are monitored. Changes: - Add QueuedSSEWriter that serializes SSE frames via promise chaining with backpressure handling and error isolation - Refactor SSE route to use QueuedSSEWriter instead of raw encoder - Make frontend parts batcher directory-aware: operations grouped by (sessionID, directory) composite key; flush() accepts optional target filter - Decouple batcher lifecycle from directory dependency in useSSE hook - Add comprehensive tests for all new behavior