Skip to content

Windows: add timestamps and ANSI/severity colors to Run output #275

Description

@1lck

Summary

The Windows Run pane renders child-process output as one plain foreground-colored <pre> block and does not add timestamps. Maven and other tools launched through piped stdio, especially in batch mode, often emit no ANSI styling, so [INFO], [WARNING], and [ERROR] lines all appear as white text.

macOS already provides the expected behavior through OutputTextView and OutputTimestamper: ANSI rendering, severity-based fallback colors, and leading timestamps.

Current Windows behavior

  • run-output events contain only sessionId and a raw text chunk.
  • run.store.ts concatenates chunks into a plain string.
  • run-pane.tsx displays the string directly in a fixed-color <pre>.
  • There is no timestamping or ANSI parser in the Windows Run feature.
  • Piped Maven output such as mvn.cmd -B -ntp spring-boot:run therefore renders as an undifferentiated wall of text.

Relevant code:

  • windows/tauri/src-tauri/src/run.rs
  • windows/tauri/src/features/run/hooks/use-run-process-events.ts
  • windows/tauri/src/features/run/stores/run.store.ts
  • windows/tauri/src/features/run/components/run-pane.tsx
  • macOS reference: macos/Sources/Lithe/Views/Workbench/OutputTextView.swift

Expected behavior

  1. Prefix each new logical output line with a local timestamp while preserving chunks that continue an existing line.
  2. Parse and render ANSI styles when the process provides them; do not show raw escape sequences.
  3. When no ANSI styling is present, color lines by stable severity tokens such as ERROR, WARNING/WARN, INFO, and DEBUG/TRACE.
  4. Dim timestamps so they remain readable without competing with the message.
  5. Preserve existing UTF-8/Windows code-page decoding, output-size trimming, stdout/stderr streaming, stdin support, and session isolation.
  6. Add focused tests for split chunks, partial lines, ANSI reset sequences, severity fallback, and timestamp continuation behavior.

Reproduction

  1. Open a Maven/Spring Boot run configuration on Windows.
  2. Run it and inspect output containing [INFO], [WARNING], and [ERROR] lines.
  3. Observe that every line uses the same foreground color and has no timestamp.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions