Skip to content

Fix provider logs showing new content in the middle#1539

Merged
aliasaria merged 2 commits intomainfrom
fix/provider-logs-order
Mar 13, 2026
Merged

Fix provider logs showing new content in the middle#1539
aliasaria merged 2 commits intomainfrom
fix/provider-logs-order

Conversation

@aliasaria
Copy link
Copy Markdown
Member

Summary

  • Root cause: LocalProvider.get_job_logs concatenated stdout then stderr. Since stderr contains static setup messages (git hints, pip install) and stdout grows with runtime output, new log lines appeared in the middle instead of at the bottom.
  • Fix: Swap order to stderr first, then stdout, so growing runtime content appends at the end.
  • Bonus: Replace raw ANSI escape sequences (\x1b[2J\x1b[H) with xterm.js native terminal.reset() and fix scrollToBottom() in PollingOutputTerminal.

Test plan

  • Launch a local interactive job (e.g. Ollama + Gradio) and observe the Machine Logs tab
  • Verify setup messages (git, pip) appear at the top and runtime logs append at the bottom
  • Verify the Lab SDK Output tab scrolls to show newest content

… bottom

LocalProvider.get_job_logs concatenated stdout then stderr, so static
setup stderr (git hints, pip output) was always at the bottom while new
runtime stdout appeared above it. Swap the order to stderr-first so
growing stdout content appends at the end.

Also replace raw ANSI escape sequences with xterm.js native reset() and
fix scrollToBottom in PollingOutputTerminal.
@paragon-review
Copy link
Copy Markdown

Paragon Review Skipped

Hi @aliasaria! Your Polarity credit balance is insufficient to complete this review.

Please visit https://home.polarity.cc to add more credits and continue using Paragon reviews.

@sentry
Copy link
Copy Markdown

sentry bot commented Mar 12, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
api/transformerlab/compute_providers/local.py 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@aliasaria aliasaria merged commit f0a1966 into main Mar 13, 2026
8 of 9 checks passed
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.

2 participants