Skip to content

Simplify action run logs viewer and add JSON download#1932

Merged
dandelany merged 2 commits into
developfrom
feat/action-logs-simplification
May 27, 2026
Merged

Simplify action run logs viewer and add JSON download#1932
dandelany merged 2 commits into
developfrom
feat/action-logs-simplification

Conversation

@AaronPlave
Copy link
Copy Markdown
Contributor

@AaronPlave AaronPlave commented May 18, 2026

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.

@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
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.
Copy link
Copy Markdown
Collaborator

@dandelany dandelany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for coming back to this. Confirmed it fixes the annoying log copy/paste behavior we saw before, avoids the complexity around expand/collapsing logs, and we got the JSON run info download button as a bonus.

I added one small change to include the action run's canceled flag in the JSON download file. Ready to merge when tests pass 🚀

@dandelany dandelany merged commit 4f3bbde into develop May 27, 2026
5 checks passed
@dandelany dandelany deleted the feat/action-logs-simplification branch May 27, 2026 00:00
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.

2 participants