Skip to content

fix: remove max-w-4xl and drop Ctrl+Z to let terminal fill available width#1659

Open
yuzhichang wants to merge 2 commits intogeneralaction:mainfrom
yuzhichang:fix/terminal-max-width-expand
Open

fix: remove max-w-4xl and drop Ctrl+Z to let terminal fill available width#1659
yuzhichang wants to merge 2 commits intogeneralaction:mainfrom
yuzhichang:fix/terminal-max-width-expand

Conversation

@yuzhichang
Copy link
Copy Markdown

@yuzhichang yuzhichang commented Apr 4, 2026

Summary

Two fixes for terminal UX issues:

  1. Terminal width: Removes max-w-4xl from ChatInterface.tsx and MultiAgentTask.tsx terminal containers. The terminal was capped at 896px regardless of window width, wasting horizontal space on wide monitors.

  2. Ctrl+Z deadlock: Drops \x1a (SIGTSTP) at the PTY write level in writePty(). When Ctrl+Z is pressed in emdash's terminal running an agent, the shell chain (bash -ilc "claude; exec bash -il") would deadlock — the agent stops but exec bash -il never runs, leaving no foreground process to handle fg. Also removes exec from the shell chain so the resume shell runs as a proper foreground child. Ctrl+C (\x03) is preserved so users can still interrupt agent actions.

Fixes #1650

Test plan

  • Terminal fills available width on wide monitors
  • Ctrl+Z does not hang the terminal or cause deadlocks
  • Ctrl+C still interrupts agent actions within Claude

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Fixed PTY input handling to prevent unwanted signal generation when pressing Ctrl+Z in the terminal.
  • UI Improvements

    • Terminal containers now expand to full available width for optimal screen space utilization.
  • Improvements

    • Enhanced shell command execution flow for better process management.

yuzhichang and others added 2 commits April 4, 2026 17:09
Terminal containers in ChatInterface and MultiAgentTask were capped at
896px regardless of window width. Changed to w-full so the terminal
scales with the window, addressing the wasted horizontal space issue.

Fixes generalaction#1650

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When Ctrl+Z is pressed in emdash's terminal running an agent, SIGTSTP
is sent to the foreground process group, causing the shell chain
(bash -ilc "claude; exec bash -il") to deadlock — the agent stops but
the shell can't fg it because exec never runs and no foreground
process remains.

The fix drops \x1a at the PTY write level so SIGTSTP is never
generated, while preserving Ctrl+C (\x03) so users can still interrupt
agent actions. Also removes 'exec' from the shell chain so the resume
shell runs as a proper foreground child process.

Fixes generalaction#1650 (related job control issue)

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

vercel bot commented Apr 4, 2026

@yuzhichang is attempting to deploy a commit to the General Action Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 41ea047c-d2c4-4e58-b574-6627b8df3ea5

📥 Commits

Reviewing files that changed from the base of the PR and between 6a89f67 and 017d5d2.

📒 Files selected for processing (3)
  • src/main/services/ptyManager.ts
  • src/renderer/components/ChatInterface.tsx
  • src/renderer/components/MultiAgentTask.tsx

📝 Walkthrough

Walkthrough

Changes modify shell command chaining in the PTY manager to remove exec-based process control, add PTY input filtering to prevent Ctrl+Z signal generation, and update terminal container CSS classes from fixed max-width (max-w-4xl) to full-width (w-full) layout.

Changes

Cohort / File(s) Summary
PTY Process Management
src/main/services/ptyManager.ts
Modified shell command chaining to replace exec ${resumeShell} with ${resumeShell} for both provider and non-provider shell flows, altering process control behavior. Added PTY input filtering in writePty to drop Ctrl+Z (\x1a/SIGTSTP) signals instead of writing them to the underlying PTY.
Terminal Layout
src/renderer/components/ChatInterface.tsx, src/renderer/components/MultiAgentTask.tsx
Updated terminal container CSS classes from max-w-4xl to w-full, removing fixed width constraint and allowing the terminal to expand with window width.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰✨ No more caps on our terminal's dreams,
Full width it flows like digital streams!
Shell commands dance without exec's tight grip,
And Ctrl+Z signals take quite the trip—
To the void they go, our windows run free,
A wider world for all users to see! 🌟

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Out of Scope Changes check ❓ Inconclusive The Ctrl+Z deadlock fix in ptyManager.ts is mentioned in PR objectives but not in the linked issue #1650, making it an additional scope item. Clarify whether the Ctrl+Z fix is addressing a separate issue or is a related fix discovered during implementation.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes both main changes: removing max-w-4xl constraint to expand terminal width and dropping Ctrl+Z to prevent deadlocks.
Linked Issues check ✅ Passed Changes fully address issue #1650: max-w-4xl is removed from ChatInterface.tsx and MultiAgentTask.tsx, allowing terminal to fill available width.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

[bug]: Chat terminal has fixed max-width (max-w-4xl/896px), does not expand with window

1 participant