GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(chat): focus the composer when opening a new or existing chat by waleedlatif1 · Pull Request #6683 · simstudioai/sim

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Clicking "New chat" or opening a chat from the sidebar left focus on the link, so the composer's mount-time focus was skipped and you had to click into the textarea before typing
  • The mount effect only focused when document.activeElement was body/documentElement; it now focuses unless the active element is a real text-entry field (input/textarea/select/contenteditable), so it takes focus from a link or button but never steals it from another field

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@waleedlatif1
fix(chat): focus the composer when opening a new or existing chat
f45c396
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 13, 2026 11:15pm

Request Review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cursor

cursor Bot commented Aug 13, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

PR Summary

Low Risk
Localized UX/focus behavior in the chat composer with no auth, data, or API changes.

Overview
Opening a chat from the sidebar or New chat often left focus on the clicked link, so the composer mount logic did not move focus and users had to click the textarea before typing.

The mount-time focus effect in user-input.tsx no longer only runs when activeElement is body/documentElement. It now focuses the composer whenever the page has focus unless the active element is a real text-entry target (input, textarea, select, or contenteditable), via a new isTextEntry helper. Sidebar links and buttons are overridden; other fields are not.

Reviewed by Cursor Bugbot for commit f45c396. Configure here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@greptile-apps

greptile-apps Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR updates the chat composer’s mount-time focus behavior so opening a new or existing chat transfers focus from sidebar links or buttons while preserving focus in active text-entry fields.

  • Adds a helper recognizing inputs, textareas, selects, and contenteditable elements.
  • Retains the document-focus guard and focuses the composer on the next animation frame when no text-entry field owns focus.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking issue identified.

The changed focus effect preserves focus for active native and contenteditable fields while correctly transferring focus from the sidebar control during the reachable composer remount flow.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/home/components/user-input/user-input.tsx Broadens composer autofocus from neutral document focus to non-text-entry controls without revealing a concrete regression in current mounting paths.

Reviews (1): Last reviewed commit: "fix(chat): focus the composer when openi..." | Re-trigger Greptile

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
waleedlatif1 merged commit 4ff339e into staging Aug 13, 2026
30 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
waleedlatif1 deleted the fix/focus-new-chat-input branch August 13, 2026 23:24
@waleedlatif1 waleedlatif1 mentioned this pull request Aug 13, 2026
v0.8.1: grok 4.6, v2 endpoints extension, workflow UI improvements, logrocket, perf improvements #6646
Merged

This branch was previously deployed

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@waleedlatif1
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.