dashboard: turn_completed events carry no task correlation and drown real activity in the Live Activity feed #981

Closed
opened 2026-10-27 13:38:33 +00:00 by sam · 0 comments
Owner

Problem, two compounding parts

1. turn_completed events carry no useful, correlatable content.
internal/gateway/turn.go:306-311 publishes:

r.Bus.Publish(events.Event{
    Kind:   events.KindTurnCompleted,
    Detail: sessionID,
    Data:   map[string]any{"session": sessionID, "channel": r.Channel},
})

No TaskID is set, and Detail is a raw internal session identifier (e.g. 1312197967) with no formatting. On the dashboard's "Live activity" table this renders as Task: —, Detail: 1312197967 — meaningless to anyone reading it, and impossible to correlate to a task. This event fires on every chat turn, so it dominates the feed: in a sample of the 30 most-recent Live Activity rows, only 3 were real task-lifecycle events (task_queued); the other 27 were content-free turn_completed rows.

2. The /logs page has no filtering, search, or level control at all — just Pause/Refresh. Confirmed live: during the redelivery storm in #517, handle failed alone produced 996 near-identical lines, and there is no way to filter by task, by level, or search text to find anything else in the stream. During exactly the situation an operator needs the log page most (an active incident), it is unusable.

Fix

  • Give turn_completed (and any other cross-cutting event shown in this feed) a human-meaningful Detail — e.g. the channel name plus a short session label — and drop it from the feed entirely if it isn't task-correlated, since a feed titled "Live activity" that is 90% non-actionable chat-turn noise defeats its own purpose.
  • Add basic filtering to /logs: at minimum a level filter and a task/session search, so a single noisy source can be excluded without losing everything else.

Imported from beads archie-core-1786749700635-7-83b8c32f · GitHub #521 · type bug · priority P2 · created 2026-08-14 · closed 2026-08-15

## Problem, two compounding parts **1. `turn_completed` events carry no useful, correlatable content.** `internal/gateway/turn.go:306-311` publishes: ```go r.Bus.Publish(events.Event{ Kind: events.KindTurnCompleted, Detail: sessionID, Data: map[string]any{"session": sessionID, "channel": r.Channel}, }) ``` No `TaskID` is set, and `Detail` is a raw internal session identifier (e.g. `1312197967`) with no formatting. On the dashboard's "Live activity" table this renders as `Task: —`, `Detail: 1312197967` — meaningless to anyone reading it, and impossible to correlate to a task. This event fires on every chat turn, so it dominates the feed: in a sample of the 30 most-recent Live Activity rows, only 3 were real task-lifecycle events (`task_queued`); the other 27 were content-free `turn_completed` rows. **2. The `/logs` page has no filtering, search, or level control at all** — just Pause/Refresh. Confirmed live: during the redelivery storm in #517, `handle failed` alone produced 996 near-identical lines, and there is no way to filter by task, by level, or search text to find anything else in the stream. During exactly the situation an operator needs the log page most (an active incident), it is unusable. ## Fix - Give `turn_completed` (and any other cross-cutting event shown in this feed) a human-meaningful `Detail` — e.g. the channel name plus a short session label — and drop it from the feed entirely if it isn't task-correlated, since a feed titled "Live activity" that is 90% non-actionable chat-turn noise defeats its own purpose. - Add basic filtering to `/logs`: at minimum a level filter and a task/session search, so a single noisy source can be excluded without losing everything else. --- _Imported from beads `archie-core-1786749700635-7-83b8c32f` · GitHub #521 · type bug · priority P2 · created 2026-08-14 · closed 2026-08-15_
sam added the mediumbug labels 2026-10-27 13:38:33 +00:00
sam self-assigned this 2026-10-27 13:38:33 +00:00
sam closed this issue 2026-10-27 13:38:33 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#981