fix(tui): skip clampStdoutDimensions in Warp to prevent layout breakage (#35738) - #35764
Closed
liuhao1024 wants to merge 1 commit into
Closed
fix(tui): skip clampStdoutDimensions in Warp to prevent layout breakage (#35738)#35764liuhao1024 wants to merge 1 commit into
liuhao1024 wants to merge 1 commit into
Conversation
Warp wraps process.stdout in a non-standard emulation layer where Object.defineProperty changes Ink's internal layout path, collapsing the status bar onto the input line (issue NousResearch#35738). Skip the property-override patch when TERM_PROGRAM is WarpTerminal — Warp reports correct dimensions, so component-level fallbacks suffice. The PROBLEMATIC_TERMINALS set is extensible for future terminal quirks. Fixes NousResearch#35738
Collaborator
This was referenced May 31, 2026
Contributor
Author
|
@alt-glitch This PR uses detection with an extensible config pattern (via ), which should cover Warp and future terminals without hardcoding. The competing PR #35766 hasn't run CI yet. If maintainers prefer a different approach, I'm open to feedback. |
Contributor
|
Thanks for the focused Warp regression fix. This is now superseded by a broader current-main fix. Automated hermes-sweeper review.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Skip
clampStdoutDimensions()in Warp terminal to prevent TUI layout breakage. Warp wrapsprocess.stdoutin a non-standard emulation layer whereObject.definePropertyoverrides cause Ink's FlexBox layout to miscalculate vertical space, collapsing the status bar onto the input line.Related Issue
Fixes #35738
Type of Change
Changes Made
ui-tui/src/lib/terminalDimensions.ts: AddedPROBLEMATIC_TERMINALSset and early-return guard inclampStdoutDimensions()that checksprocess.env.TERM_PROGRAM. Warp'sprocess.stdoutis a non-standard wrapper whereObject.definePropertychanges Ink's internal layout path — skipping the patch avoids the breakage while preserving the WSL fix for other terminals.ui-tui/src/__tests__/terminalDimensions.test.ts: Added 2 regression tests — one verifying Warp is skipped, one verifying non-Warp terminals still get the clamping patch.How to Test
hermes --tui>prompt appears on a separate line below the status bar (not collapsed onto the same line)npm test -- --run src/__tests__/terminalDimensions.test.tsinui-tui/— all 18 tests should passclampStdoutDimensions()should still clamp bogus dimensions (e.g., 131072 → 2000)Checklist
Code
fix(scope):,feat(scope):, etc.)npm test -- --runand the terminalDimensions tests all pass (16/16)Documentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/ACode Intelligence
ui-tui/src/lib/terminalDimensions.ts—clampStdoutDimensions()(callers: 1 in entry.tsx)PROBLEMATIC_TERMINALSset is extensible for future terminal quirks;sanitizeTerminalSize()andsanitizeDimension()remain available for component-level sanitization