feat(composer): Enter is a new line on a phone

Merged
VI
1d ago
+112-4

What

On a phone (a touch-only screen: coarse pointer and no fine pointer), Enter in the composer makes a new line and the send button sends. On a computer, a touch laptop or a tablet with a trackpad, Enter still sends and Shift+Enter is a new line.

Why

A phone keyboard has no Shift+Enter, so there was no way to write a message with more than one line. Follow-up asked in the room (#7079), approved (#7080).

Checks run

  • bun test scripts/composer.test.ts -t "Gimenes #7079" (new test): pass
  • bun run check:ui, test:ui, check:guidelines, format:check: pass
  • bun run screens -- --enter (new flag): pass. At 390 px Enter makes a new line and the send button sends; at 1440 px Enter sends.

Router bench

not touched

Deliberate decisions

  • docs/agents_deliberate_decisions.md: "2026-11-30 · viktor/mobile-enter-newline · Enter is a new line on a phone"

Screens

enter-newline-390.png
enter-sent-390.png
enter-sent-1440.png
room-390.png
room-1440.png


Summary by cubic

Makes Enter in the composer insert a new line on touch-only screens (phones), whose keyboards have no Shift+Enter, so multi-line messages were previously impossible. On computers, touch laptops, and tablets with a trackpad, Enter still sends the message and Shift+Enter stays the new line.

  • A "phone" is a screen with a coarse pointer and no fine pointer, so a narrow desktop window or an iPad with a keyboard keeps Enter to send.
  • Adds a --enter flag to the screen-capture script and a unit test covering both pointer profiles.