Skip to content

Simplify action run logs viewer and add JSON download#1932

Open
AaronPlave wants to merge 1 commit into
developfrom
feat/action-logs-simplification
Open

Simplify action run logs viewer and add JSON download#1932
AaronPlave wants to merge 1 commit into
developfrom
feat/action-logs-simplification

Conversation

@AaronPlave
Copy link
Copy Markdown
Contributor

Summary

  • Replace per-line ConsoleLog rendering in the action-run output with a new ActionRunLogs component — a tight monospace block (no chevrons, no expandable rows) so vertical text selection copies cleanly in source order, like GitHub Actions logs.
  • Add a Download button in the run header that exports the full run (metadata + parameters + settings + error + results + parsed logs) as JSON via the existing downloadJSON utility.
  • Move the log parser out of the Svelte file into utilities/actions.ts as parseActionLogLines with its own ParsedActionLog type, and migrate the Error block to render through ActionRunLogs too so both blocks share formatting (the red wrapper keeps the Error section visually distinct).

Test plan

  • Open a run with multi-line logs (including ERROR with continuation lines). Drag-select across several rows and paste into a plain editor — output should be one line per entry with timestamps + levels, indented continuation preserved, no chevron/marker characters.
  • Levels render with their colors: INFO blue, WARN yellow, ERROR red, DEBUG muted (matching ConsoleLog's palette).
  • Click Download in the header → {action-name}-{runId}.json downloads. Open it: object with id, status, requestedAt, requestedBy, duration, parameters, settings, error, results, and logs: [{ timestamp, level, message, trace?, data? }, ...].
  • Trigger a failing run → Error block renders inside the red wrapper using the same formatting as the Logs block.
  • Trigger a successful run with results.data → Results block renders unchanged.
  • Run with logs: null shows the italic "No logs" placeholder; Download button still functions.

Action server logs were rendering through ConsoleLog (the error-console
component built around <details>/expandable rows), making text selection
and copy/paste fragile. Replace with a dedicated ActionRunLogs component
that renders entries as a tight monospace block — no chevrons, no expand
markers, so vertical selection copies cleanly in source order.

The log parser moves out of the Svelte file into utilities/actions.ts
as parseActionLogLines, with its own ParsedActionLog type (severed from
LogMessage/ErrorTypes, which carry error-console-specific fields).

The Error block also migrates to ActionRunLogs (single-entry array) so
the two blocks render uniformly; the red wrapper keeps the visual accent.

Adds a Download button next to Re-run that exports the full run as JSON
(metadata + parameters + settings + error + results + parsed logs) via
the existing downloadJSON utility.
@AaronPlave AaronPlave requested a review from a team as a code owner May 18, 2026 21:56
@AaronPlave AaronPlave self-assigned this May 18, 2026
@AaronPlave AaronPlave requested review from dandelany and removed request for joswig and mattdailis May 18, 2026 21:57
@AaronPlave AaronPlave added the feature New feature or request label May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant