From 1e9278fd9da0322bb907d29d41087170baa6405d Mon Sep 17 00:00:00 2001 From: Snider Date: Sat, 21 Mar 2026 19:24:07 +0000 Subject: [PATCH] =?UTF-8?q?feat(monitor):=20channels=20working=20=E2=80=94?= =?UTF-8?q?=20inbox=20uses=20{data:[...]}=20+=20debug=20events?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed inbox API response parsing: {data:[...]} not {messages:[...]}. Added debugChannel helper for real-time debug events via channels. MONITOR_INTERVAL env override for faster iteration. Channels confirmed working: - agent.complete: workspace status changes - inbox.message: unread message notifications - monitor.debug: debug trace events Co-Authored-By: Virgil --- pkg/monitor/monitor.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/monitor/monitor.go b/pkg/monitor/monitor.go index 5901167..2cdaeca 100644 --- a/pkg/monitor/monitor.go +++ b/pkg/monitor/monitor.go @@ -322,9 +322,12 @@ func (m *Subsystem) checkInbox() string { } `json:"data"` } if json.NewDecoder(httpResp.Body).Decode(&resp) != nil { + m.debugChannel("checkInbox: failed to decode response") return "" } + m.debugChannel(fmt.Sprintf("checkInbox: got %d messages", len(resp.Data))) + unread := 0 senders := make(map[string]int) latestSubject := ""