Skip to content

feat(staged): make chat replies multiline and move Stop to the thinking row#874

Merged
matt2e merged 5 commits into
mainfrom
multi-line-replies-in-chat
Jul 11, 2026
Merged

feat(staged): make chat replies multiline and move Stop to the thinking row#874
matt2e merged 5 commits into
mainfrom
multi-line-replies-in-chat

Conversation

@matt2e

@matt2e matt2e commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Chat reply input is now multiline: plain Enter inserts a newline, and Cmd/Ctrl+Enter sends the message.
  • The composer's send button no longer swaps to a Stop button while the session is running — it stays as the send action, relabeled Queue to reflect that messages sent mid-run are persisted for backend drain.
  • Stop moved to the Thinking… row as a larger, labeled destructive button (spinner shown while cancelling), so stopping a session and composing a follow-up no longer share the same control.

Changes

  • ChatComposer.svelte: dropped the cancelling/onStop props and the live-state stop branch; the accent button now renders "Queue" when the session is live.
  • SessionChatPane.svelte: keydown handler now requires Cmd/Ctrl+Enter to send; added the Stop button to the thinking row wired to the existing cancel handler.

🤖 Generated with Claude Code

matt2e and others added 2 commits July 10, 2026 15:35
Composing a reply in the session chat now behaves like a multiline text
input: Enter inserts a newline and Cmd/Ctrl+Enter sends the message.

While the session is busy, the composer keeps its accent send button but
labels it Queue (sending while live already queues a follow-up) instead
of swapping in the stop button. Stopping now lives on a labeled Stop
button on the right-hand side of the Thinking indicator row.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Bump the Thinking-row Stop button from the xs to the sm size variant
and scale its icon/spinner up to match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e matt2e requested review from baxen and wesbillman as code owners July 11, 2026 04:21

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d4eb884379

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 1962 to +1965
<div class="thinking" in:messageSlide>
<Spinner size={14} />
<span>Thinking…</span>
<Button

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep Stop available while waiting for the first response

When a live non-pipeline session has no transcript groups, rendering takes the earlier Waiting for response… center-state branch, so this new Thinking-row Stop button is never mounted; because the composer no longer renders Stop while isLive, users cannot cancel a running session until at least one message group appears. This is especially problematic if startup hangs before the first transcript message is written.

Useful? React with 👍 / 👎.

function handleInputKeydown(e: KeyboardEvent) {
if (e.key === 'Enter' && !e.shiftKey && !e.altKey) {
// Multiline input: plain Enter inserts a newline; Cmd/Ctrl+Enter sends.
if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Let Ctrl+Enter bypass hashtag selection

This makes Ctrl+Enter the documented send shortcut, but when the hashtag dropdown is open HashtagInput still consumes Enter whenever !shiftKey && !metaKey, so on Windows/Linux Ctrl+Enter selects the highlighted hashtag instead of reaching this handler. Messages with an open # suggestion therefore cannot be sent with the advertised shortcut unless the user first dismisses the dropdown or uses the button.

Useful? React with 👍 / 👎.

matt2e and others added 3 commits July 11, 2026 14:34
The hashtag dropdown's Enter guard excluded Shift and Meta but not
Ctrl, so with the dropdown open, Ctrl+Enter selected the highlighted
hashtag instead of falling through to the composer's send handler.
Since Cmd/Ctrl+Enter is now the send chord, exclude ctrlKey too so
both modifiers behave the same on every platform.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
The composer's pipeline stop area only rendered during the pipeline
prelude (no transcript messages yet), so once steps started emitting
messages the composer came back and the only stop control was the
Thinking row, which lives in the scrollable transcript and doesn't
render at all while the transcript is still empty.

Key the bottom input area off the pipeline actually running (live
session with a pipeline) instead of the prelude: while a pipeline runs,
the composer (text field, model picker, attachment button) stays hidden
and a Stop button remains available in the fixed bottom chrome, now
with a text label matching the Thinking-row Stop.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Send shortcuts had diverged across the three composers: the session
chat pane sent on Cmd/Ctrl+Enter, NewSessionModal submitted on
Cmd+Enter only (no Ctrl fallback for Windows/Linux), and the hidden
SessionLauncher dev panel sent on plain Enter from a single-line input.

Make multiline prompts work everywhere with one consistent chord:

- NewSessionModal: accept Ctrl+Enter alongside Cmd+Enter to submit.
- SessionLauncher: replace the single-line Input with an auto-resizing
  textarea (capped like the chat composer) where plain Enter inserts a
  newline and Cmd/Ctrl+Enter creates the session, removing the last
  "return means send" case.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e matt2e merged commit f419ea1 into main Jul 11, 2026
4 checks passed
@matt2e matt2e deleted the multi-line-replies-in-chat branch July 11, 2026 06:06
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.

1 participant