Skip to content

Comments

fix(terminal): auto-switch to Run tab and remove horizontal scroll in lifecycle logs#1046

Open
beks-m wants to merge 1 commit intogeneralaction:mainfrom
beks-m:emdash/eight-trams-pump-825
Open

fix(terminal): auto-switch to Run tab and remove horizontal scroll in lifecycle logs#1046
beks-m wants to merge 1 commit intogeneralaction:mainfrom
beks-m:emdash/eight-trams-pump-825

Conversation

@beks-m
Copy link
Contributor

@beks-m beks-m commented Feb 23, 2026

Summary

  • Auto-switch dropdown to the Run lifecycle tab when a run script starts, so users see logs immediately without manual switching
  • Remove horizontal scrolling from lifecycle log output by wrapping long lines (whitespace-pre-wrap break-words), matching the terminal view's behavior

Details

Auto-switch to Run tab: Added a useEffect that watches runStatus. When it transitions to 'running' (via lifecycle event), the dropdown automatically switches to lifecycle::run. This is reactive rather than imperative — it responds to the actual state change instead of setting state inside the click handler (which was interfering with the API call).

Horizontal scroll fix: Changed the <pre> element from overflow-auto to overflow-y-auto overflow-x-hidden whitespace-pre-wrap break-words. The terminal view (xterm.js) wraps text internally, but the lifecycle logs used a raw <pre> that preserved all whitespace without wrapping, causing unwanted horizontal scroll.

Test plan

  • Configure a lifecycle run script in .emdash.json
  • Click the Play button from any terminal tab — verify dropdown auto-switches to "Run" and logs appear
  • Verify long lines in lifecycle logs wrap instead of causing horizontal scroll
  • Verify terminal tabs still work normally (no horizontal scroll regression)
  • Verify setup/teardown lifecycle phases still work when selected manually

🤖 Generated with Claude Code

… lifecycle logs

When clicking Play to start a lifecycle run script, the dropdown now
automatically switches to the Run tab so logs are visible immediately.
Also fixes horizontal scrolling in lifecycle log output by wrapping
long lines, matching the terminal view's behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 23, 2026

@beks-m is attempting to deploy a commit to the General Action Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps
Copy link

greptile-apps bot commented Feb 23, 2026

Greptile Summary

Added reactive auto-switching to the Run lifecycle tab when a run script starts, and fixed horizontal scrolling in lifecycle logs by wrapping long lines.

Key Changes:

  • Added useEffect that watches runStatus and automatically switches the dropdown to lifecycle::run when the run phase starts (when runStatus becomes 'running')
  • Changed lifecycle log <pre> element from overflow-auto to overflow-y-auto overflow-x-hidden whitespace-pre-wrap break-words to wrap long lines instead of showing horizontal scrollbar
  • The auto-switch implementation is reactive (responds to state changes from lifecycle events) rather than imperative (setting state in click handlers)

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Both changes are well-isolated, focused improvements to UX. The auto-switch logic has proper guard conditions to prevent infinite loops, and the CSS changes are straightforward styling fixes with no side effects.
  • No files require special attention

Important Files Changed

Filename Overview
src/renderer/components/TaskTerminalPanel.tsx Added auto-switch to Run tab when lifecycle starts and fixed horizontal scroll in lifecycle logs with text wrapping

Last reviewed commit: 3585b5e

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.

1 participant