A modifier with Enter sends; the box grows with what is in it #68

Merged
mph merged 2 commits from cc-chat-enter-sends into main 2026-08-28 15:40:27 +00:00
Owner

Two changes to the composer, both from Michal's reaction to using it.

Enter writes a new line; a modifier with Enter sends. What is typed here is a
prompt, often several lines of one, and a bare Enter would cut a person off
mid-thought with no way to unsend. The box already took Ctrl/Cmd + Enter and it
went unfound, which was the actual defect — so the box now says which modifier
this machine has (it accepts either; naming the wrong one teaches a key that
is not there). The browser's own newline is suppressed only on the press that
sends.

The box grows with what is in it, up to 40vh, after which it scrolls — you
have to be able to read back several lines before sending them. Measured in a
browser: 48px empty, 80px at four lines, 197px at twelve, back to 48px once
sent.

Ten tests in ComposerTest. One honest limit: jsdom lays nothing out and
reports every scrollHeight as zero, so the tests there assert only that the
height is measured again on every change; the actual sizes above were verified
in a real browser.

Two changes to the composer, both from Michal's reaction to using it. **Enter writes a new line; a modifier with Enter sends.** What is typed here is a prompt, often several lines of one, and a bare Enter would cut a person off mid-thought with no way to unsend. The box already took Ctrl/Cmd + Enter and it went unfound, which was the actual defect — so the box now says which modifier *this* machine has (it accepts either; naming the wrong one teaches a key that is not there). The browser's own newline is suppressed only on the press that sends. **The box grows with what is in it**, up to 40vh, after which it scrolls — you have to be able to read back several lines before sending them. Measured in a browser: 48px empty, 80px at four lines, 197px at twelve, back to 48px once sent. Ten tests in `ComposerTest`. One honest limit: jsdom lays nothing out and reports every `scrollHeight` as zero, so the tests there assert only that the height is measured again on every change; the actual sizes above were verified in a real browser.
feat(ui): Enter sends what was typed, and the box says so
All checks were successful
CI / Check Formatting (pull_request) Successful in 1m11s
CI / Compile (pull_request) Successful in 1m23s
CI / Check Linting (pull_request) Successful in 1m13s
CI / Run Tests (pull_request) Successful in 1m55s
CI / Check Bundle Size (pull_request) Successful in 52s
CI / Run Integration Tests (pull_request) Successful in 1m55s
520c20c085
The box already took a modifier with Enter and nobody found it, which is
the whole defect: a key nobody can see is a key nobody presses. Enter now
sends and Shift with Enter writes a line — what a person typing into a box
like this expects — and the box says so beside the send control, quietly,
for the first time somebody uses it.

The browser's own newline is taken away only when the message actually
goes, so a message that was not sent keeps the line the person just wrote.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS9XLuXRvpbEuV9ZE3Whn1
feat(ui): keep Enter for a new line, and let the box grow with what is in it
All checks were successful
CI / Check Formatting (pull_request) Successful in 55s
CI / Compile (pull_request) Successful in 1m11s
CI / Check Linting (pull_request) Successful in 1m8s
CI / Run Tests (pull_request) Successful in 1m46s
CI / Check Bundle Size (pull_request) Successful in 52s
CI / Run Integration Tests (pull_request) Successful in 1m51s
97e87ed482
Sending on a bare Enter would cut a person off mid-thought, and what is
typed here is a prompt — often several lines of one, with no way to unsend.
So a modifier with Enter sends, Enter writes a line, and the box says which
modifier this machine has: it takes either, and words that name the wrong
one teach a key that is not there.

The box is now as tall as what is written in it, up to 40vh, after which it
scrolls — somebody writing several lines has to be able to read them back
before sending them. Measured in a browser: 48px empty, 80px at four lines,
197px at twelve, and back to 48px when it is sent. jsdom lays nothing out
and reports every scrollHeight as zero, so the tests there assert that the
height is measured again on every change, and the sizes were verified in a
real browser instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DS9XLuXRvpbEuV9ZE3Whn1
mph changed title from Enter sends what was typed to A modifier with Enter sends; the box grows with what is in it 2026-08-28 13:32:56 +00:00
mph merged commit bc7c978f41 into main 2026-08-28 15:40:27 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
iterative-works/claude-code-query!68
No description provided.