Skip to content

Add live output streaming for running jobs#47

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/add-standard-output-watching
Draft

Add live output streaming for running jobs#47
Copilot wants to merge 4 commits intomainfrom
copilot/add-standard-output-watching

Conversation

Copy link
Contributor

Copilot AI commented Nov 22, 2025

Enables real-time monitoring of job execution output. Users can now watch stdout/stderr as jobs run instead of waiting for completion.

Backend

  • Process output capture: Modified RunnerWorker to stream output to __live_output__/{jobId}.txt using Process.OutputDataReceived/ErrorDataReceived events with thread-safe file writing
  • API endpoint: Added GET /Jobs/GetLiveOutput returning {output: string, isRunning: bool}
  • Cleanup: Live output files deleted in JobManager.CompleteJobAsync after final compressed output saved to __messages__

Frontend

  • Watch Live button: Added to jobs with RUN status
  • Modal: Auto-refreshing (2s interval) display with monospace formatting, auto-scroll, and status indicator
  • Smart polling: Stops automatically when isRunning: false to reduce API load

Example

// RunnerWorker now streams output in real-time
process.OutputDataReceived += (sender, e) => {
    if (e.Data != null) {
        standardOutput.Add(e.Data);
        lock (_writerLock) {
            liveWriter?.WriteLine(e.Data);
        }
    }
};

Temporary files stored in __live_output__/ parallel to existing __messages__/ for final output.

Original prompt

This section details on the original issue you should resolve

<issue_title>Hook up standard output so you can watch a job running</issue_title>
<issue_description>Write to disk or database as things are written to the console/output. From the jobs screen, have the option to watch the process running live - hit the server every few seconds to pull the contents.

Once the job completes, this temporary content can be removed and the ordinary log is saved.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits November 22, 2025 17:52
Co-authored-by: jtenos <607782+jtenos@users.noreply.github.com>
…e management

Co-authored-by: jtenos <607782+jtenos@users.noreply.github.com>
Co-authored-by: jtenos <607782+jtenos@users.noreply.github.com>
Copilot AI changed the title [WIP] Hook up standard output to watch job running Add live output streaming for running jobs Nov 22, 2025
Copilot AI requested a review from jtenos November 22, 2025 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hook up standard output so you can watch a job running

2 participants