Skip to content

composer: Enter is a new line on a phone, 8-line box - #23

Open
fizzy-macos[bot] wants to merge 1 commit into
mainfrom
macos/work-530
Open

fizzy-macos[bot] wants to merge 1 commit into
mainfrom
macos/work-530

Conversation

@fizzy-macos

@fizzy-macos fizzy-macos Bot commented Oct 30, 2026

Copy link
Copy Markdown

In plain words

On a phone, pressing Enter in the chat's message box now starts a new line instead of sending, because a phone's Send button is what sends. On a computer Enter still sends and Shift+Enter adds a line. The box also grows taller before it starts scrolling, so longer messages stay readable while you write them.

What you will notice

On a phone or tablet build, Enter adds a line. On desktop nothing changes except the box growing to eight lines (was six) before it scrolls.

How this serves fizzy

Goal: phone typing (mobile): the same chat composes comfortably on a phone as on a desktop.

Goal

Port the composer rules from fizzy's #910 into the chat's message box (fizzyedit/work#530).

What changed and why

  • src/composer.zig (std-only): enter(shift, mobile) and max_lines = 8, with unit tests, wired into View.drawInput.
  • build.zig: the new tests run under zig build test.

How it was verified

  • zig fmt --check build.zig plugin.zig src: clean
  • zig build test: passes (includes the new composer tests; the Enter test fails without the change as the file is new)
  • zig build (into a temporary FIZZY_PROFILE): passes

Not done / follow-ups

  • Mobile detection: SDK 0.2.32 does not expose the app's form factor to plugins (no core.form_factor), so composer.isMobile() uses the build target (iOS/Android). A phone's web browser or a narrow desktop layout still counts as desktop; needs the SDK to expose it (the issue says no new SDK types).
  • Fences: not ported as a Segments splitter. Message text already goes through the markdown service, which renders fenced code, so a splitter would be dead code here.
  • chat.sample client: not added (the repo has no scripted client; chat/no-sample removed it); separate piece.
  • The phone-shaped tape/screenshot was not made: no windows on this machine; left to the QA loop.

Part of fizzyedit/work#530

Part of fizzyedit/work#530

Agent-Team: macos
Worker: claude

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

0 participants