Skip to content

fix(desktop): preserve compact composer default#1594

Merged
esengine merged 2 commits into
esengine:mainfrom
T1anjiu:fix/desktop-composer-default-height
May 23, 2026
Merged

fix(desktop): preserve compact composer default#1594
esengine merged 2 commits into
esengine:mainfrom
T1anjiu:fix/desktop-composer-default-height

Conversation

@T1anjiu

@T1anjiu T1anjiu commented May 23, 2026

Copy link
Copy Markdown

Summary

Fix the desktop chat composer taking too much vertical space by restoring its compact default height, while keeping autosize behavior for multi-line input. Also widen the desktop chat and composer area when both side rails are collapsed, so the center content uses available space more effectively.

Problem

A previous desktop composer autosize change interpreted “fewer than 5 lines: maintain default height” as “make the default height 5 lines.” This increased the empty/default composer from the original 2-line height to a 5-line height, reducing the visible chat area and making responses harder to read.

The issue is in the desktop composer sizing path:

  • desktop/src/ui/composer-sizing.ts set DEFAULT_COMPOSER_ROWS = 5
  • desktop/src/ui/composer.tsx uses rows={DEFAULT_COMPOSER_ROWS}
  • desktop/src/styles.css set .composer textarea min-height to 5 rows
  • tests/desktop-composer-autosize.test.ts encoded the inflated 5-row default as expected behavior

Users also reported that after collapsing the left and right desktop rails, the chat content still stayed capped around 740px, leaving too much unused horizontal space.

The layout width issue is in:

  • desktop/src/styles.css .thread-inner capped at 740px
  • desktop/src/styles.css .composer-inner capped at 760px
  • the same caps applied even when both rails were collapsed

Fix

  • desktop/src/ui/composer-sizing.ts — Restored the default composer height to 2 rows and introduced AUTOSIZE_COMPOSER_ROWS = 5 as the threshold where autosizing begins.
  • desktop/src/styles.css — Restored the textarea default min-height to 2 rows.
  • tests/desktop-composer-autosize.test.ts — Updated regression coverage so input below the 5-line autosize threshold keeps the original compact default height, and 5+ lines expand as intended.
  • desktop/src/styles.css — Added collapsed-rail CSS variables so normal three-column layout keeps the readable 740px/760px caps, while both-rails-collapsed layout widens chat content to 1120px and composer content to 1040px.

Verification

Check Result
npm test -- tests/desktop-composer-autosize.test.ts Passes
npm test -- tests/desktop-composer-autosize.test.ts desktop/src/App.test.ts Passes
npm run lint Passes with existing tests/welcome-banner-hints.test.tsx unused suppression warning
npm run verify Passes

Closed #1566

@esengine esengine merged commit 019a852 into esengine:main May 23, 2026
4 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