Dashboard Logs page never surfaces per-task attempt-log detail #1461

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

internal/webui/api_tasks_logs.go's handleTaskLogs (GET /api/tasks/{id}/logs) was fully working -- internal/logging/reader.go's decode() already captures every JSON field generically into Entry.Fields (stage, tokens, iterations, model, stop_reason, everything). But no frontend code called it: ui/src/logs/logs.js (the dashboard's only Logs page) exclusively called api.logs(), the daemon-wide feed, which only carries the daemon's own component-scoped Info/Warn/Error lines -- never the rich per-stage/per-agent-run detail that lives in a task's own per-attempt log file. An operator could never see why a specific task took as long as it did, what each workflow stage did, or its token spend breakdown from the dashboard, even though the daemon already recorded and could already serve all of it. Discovered while investigating production task 6 (2026-09-02, archie-core-95dj).

Acceptance criteria

A task's persisted attempt log (stage timings, iteration counts, token/prompt/completion/cached breakdowns, model) is visible from the dashboard task view. Reuses the daemon-wide log page's row-rendering logic rather than duplicating it. Handles disabled/empty/error states without crashing. task check (including task test:ui) passes.

Close reason

Added ui/src/base/log-row.js (row rendering extracted out of logs.js, shared -- second consumer per CLAUDE.md), ui/src/tasks/task-logs.js (taskLogPanel handling loading/error/disabled/empty/populated states), api.taskLogs() in ui/src/base/api.js, and a collapsible 'Attempt log' section wired into each task's existing timeline drill-down in ui/src/tasks/tasks.js -- lazily fetched on first expand. New tests: ui/test/log-row.test.js, ui/test/task-logs.test.js. task check clean, 100/100 JS tests.


Imported from beads archie-core-n2pv · GitHub #700 · type bug · priority P2 · created 2026-09-02 · closed 2026-09-02

internal/webui/api_tasks_logs.go's handleTaskLogs (GET /api/tasks/{id}/logs) was fully working -- internal/logging/reader.go's decode() already captures every JSON field generically into Entry.Fields (stage, tokens, iterations, model, stop_reason, everything). But no frontend code called it: ui/src/logs/logs.js (the dashboard's only Logs page) exclusively called api.logs(), the daemon-wide feed, which only carries the daemon's own component-scoped Info/Warn/Error lines -- never the rich per-stage/per-agent-run detail that lives in a task's own per-attempt log file. An operator could never see why a specific task took as long as it did, what each workflow stage did, or its token spend breakdown from the dashboard, even though the daemon already recorded and could already serve all of it. Discovered while investigating production task 6 (2026-09-02, archie-core-95dj). ### Acceptance criteria A task's persisted attempt log (stage timings, iteration counts, token/prompt/completion/cached breakdowns, model) is visible from the dashboard task view. Reuses the daemon-wide log page's row-rendering logic rather than duplicating it. Handles disabled/empty/error states without crashing. task check (including task test:ui) passes. ### Close reason Added ui/src/base/log-row.js (row rendering extracted out of logs.js, shared -- second consumer per CLAUDE.md), ui/src/tasks/task-logs.js (taskLogPanel handling loading/error/disabled/empty/populated states), api.taskLogs() in ui/src/base/api.js, and a collapsible 'Attempt log' section wired into each task's existing timeline drill-down in ui/src/tasks/tasks.js -- lazily fetched on first expand. New tests: ui/test/log-row.test.js, ui/test/task-logs.test.js. task check clean, 100/100 JS tests. --- _Imported from beads `archie-core-n2pv` · GitHub #700 · type bug · priority P2 · created 2026-09-02 · closed 2026-09-02_
sam added the mediumbug labels 2026-10-27 13:40:29 +00:00
sam self-assigned this 2026-10-27 13:40:29 +00:00
sam closed this issue 2026-10-27 13:40:29 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1461