Skip to content

fix(web): a new thread you ask for puts the cursor in the message box - #910

Merged
badcuban merged 1 commit into
mainfrom
fix/new-thread-composer-focus
Nov 14, 2026
Merged

badcuban merged 1 commit into
mainfrom
fix/new-thread-composer-focus

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

Problem

After Cmd+N (or the New thread button, or a new thread from the command palette) the cursor was not in the message box. Typing went nowhere until you clicked the box. A new empty thread opened without focus on purpose, so the app does not grab the keyboard when it opens, but that rule also caught new threads the user asked for.

Fix

Asking for a new thread now requests focus for that draft (newThreadComposerFocus.ts), and the ChatView showing the draft answers once, whether it was already on screen or mounts after the navigation.

  • The draft the app opens by itself at launch still leaves the keyboard alone (focusComposer: false).
  • Touch devices are skipped, where focus would open the keyboard.

Checks

  • vp fmt, vp lint, vp run typecheck
  • Web unit tests (3188 passed) and the full browser suite (1049 passed)
  • The Cmd+N browser test now checks focus after a new thread and after asking again on the same empty draft; it fails with the focus turned off. The command palette test checks focus survives the palette closing.

A new empty thread opened without focus in its composer, so after Cmd+N
(or the New thread button, or the command palette) typing went nowhere
until a click in the box.

Asking for a new thread now requests focus for that draft, and the
ChatView showing it answers once, whether it was already on screen or
mounts after the navigation. The draft the app opens by itself at launch
still leaves the keyboard alone, and so do touch devices, where focus
would open the keyboard.
@vercel

vercel Bot commented Nov 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Nov 14, 2026 5:31am UTC

Request Review

@badcuban
badcuban added this pull request to the merge queue Nov 14, 2026
Merged via the queue into main with commit 5c85270 Nov 14, 2026
24 checks passed
@badcuban
badcuban deleted the fix/new-thread-composer-focus branch November 14, 2026 06:14

This branch was previously deployed

1 inactive deployment
Preview — f1de9812 Deployed Nov 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant