Skip to content

fix(desktop): let the edit composer scroll long prompts - #44622

Closed
mollusk wants to merge 1 commit into
NousResearch:mainfrom
mollusk:fix/desktop-edit-composer-scroll
Closed

mollusk wants to merge 1 commit into
NousResearch:mainfrom
mollusk:fix/desktop-edit-composer-scroll

Conversation

@mollusk

@mollusk mollusk commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Symptom

When you click a previous prompt in Hermes Desktop, the bubble briefly expands to show the full text, then snaps back to a clipped view — and you can't scroll within the editor, so the tail of a long prompt becomes unreachable.

Root cause

Clicking a read-only user bubble opens the inline edit composer. Its contentEditable editor (apps/desktop/src/components/assistant-ui/thread.tsx) caps its height at max-h-48 but had no overflow rule, and its container is overflow-hidden. So a prompt taller than the cap is clipped with no scrollbar.

The "expands then shrinks" flash is the read-only bubble lifting its 2-line sticky-human-clamp on focus right before the edit composer mounts and clips.

The main chat composer's editor (apps/desktop/src/app/chat/composer/index.tsx) already pairs its height cap with overflow-y-auto; the edit composer simply missed it.

Fix

Add overflow-y-auto to the edit composer editor — one class, matching the main composer. Overflow now scrolls within the capped height instead of being hidden.

Test

Added a regression to user-message-edit.test.tsx asserting the edit composer editor keeps both the height cap (max-h-48) and a scroll affordance (overflow-y-auto). Confirmed RED before the fix, GREEN after.

Verification

vitest run --environment jsdom src/components/assistant-ui/user-message-edit.test.tsx   # 3 passed
eslint src/components/assistant-ui/thread.tsx src/components/assistant-ui/user-message-edit.test.tsx   # clean
tsc -b   # clean

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Jun 12, 2026
@alt-glitch alt-glitch added comp/desktop Electron desktop app (apps/desktop/*) and removed comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Jun 26, 2026
The inline edit composer caps height at max-h-48 but had no overflow
rule, so long prompts were clipped with no way to reach the tail.
Add overflow-y-auto to match the main composer editor.
@mollusk
mollusk force-pushed the fix/desktop-edit-composer-scroll branch from eacd783 to 82a1f1f Compare July 12, 2026 03:05
@teknium1

Copy link
Copy Markdown
Collaborator

Thanks for the focused desktop fix. Current main still renders the inline edit contentEditable with max-h-48 but no overflow behavior at apps/desktop/src/components/assistant-ui/thread/user-edit-composer.tsx:632; the main composer already uses overflow-y-auto for its capped editor at apps/desktop/src/app/chat/composer/index.tsx:717.

No substantive problems identified. The PR's one-class change and focused regression assertion match the confirmed failure path. The target files are unchanged from the PR base on current main, so this should be mechanically salvageable.

Automated hermes-sweeper review.

@teknium1

Copy link
Copy Markdown
Collaborator

Thanks for this fix! It was salvaged into #86766 (cherry-picked onto current main with your authorship preserved in the commit history) and is now merged. Closing since the work has landed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants