Skip to content

Add workflow log listing & tail support (backend API + Tasks UI)#310

Merged
tbrandenburg merged 1 commit intomainfrom
codex/find-how-to-view-complete-workflow-logs
Mar 25, 2026
Merged

Add workflow log listing & tail support (backend API + Tasks UI)#310
tbrandenburg merged 1 commit intomainfrom
codex/find-how-to-view-complete-workflow-logs

Conversation

@tbrandenburg
Copy link
Copy Markdown
Owner

Motivation

  • Provide visibility into harness-generated workflow log files and allow viewing recent log output from the UI.
  • Standardize harness log filename format so logs can be discovered reliably by the backend.
  • Surface logs alongside workspace workflows on the Tasks page so operators can inspect recent activity and errors.

Description

  • Backend: added WORKFLOW_LOG_PREFIX and WORKFLOW_LOG_LOCATIONS and implemented list_workflow_logs() and read_workflow_log_tail() in cron_service.py to discover and tail workflow logs; added API endpoints GET /api/workflow-logs and GET /api/workflow-logs/{location}/{log_name} in app.py which call list_workflow_logs and read_workflow_log_tail respectively and map errors to appropriate HTTP responses.
  • Frontend: added WorkflowLogSummary and WorkflowLogTail types and API wrappers getWorkflowLogs and getWorkflowLogTail in useApi.ts; updated TasksPage.tsx to fetch logs together with workspace workflows, render an "Available workflow logs" table showing filename, path, modified date and size, and open a modal showing a tailed view via openLogTail; added formatBytes helper and modal state/logic.
  • UI/CSS: added .workflow-log-tail rules in page.css for better log display.
  • Template: updated WORKFLOW_TO_HARNESS_PROMPT_TEMPLATE.md to require made-[workflow-name]-[timestamp]-[PID].log filenames and adjusted preferred log locations.

Testing

  • Added unit tests TestWorkflowEndpoints::test_workflow_logs_success and TestWorkflowEndpoints::test_workflow_log_tail_success in packages/pybackend/tests/unit/test_api.py which mock list_workflow_logs and read_workflow_log_tail and verify the API responses; these tests passed.
  • Existing workspace workflow endpoint test test_workspace_workflows_success continued to run as part of the same test file and passed.

Codex Task

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
made Ready Ready Preview, Comment Mar 25, 2026 6:29pm

@tbrandenburg tbrandenburg merged commit 174dbea into main Mar 25, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant