Skip to content

Conversation

@mosaxiv
Copy link
Contributor

@mosaxiv mosaxiv commented Dec 10, 2025

Summary

When users type with an Input Method Editor (IME)—such as Japanese, Chinese, or Korean input—the Enter key is used to confirm the composed text, not to submit the message.
Previously, pressing Enter during this composition phase unintentionally triggered message submission.
This PR adds a check for e.nativeEvent.isComposing so that the message is only sent after the user has finished composing text.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

  • Confirm that pressing Enter during IME composition does not send the chat message.
  • Confirm that a normal Enter key press still sends the message as expected.

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)

Screenshots/Videos

icecrasher321 and others added 20 commits November 17, 2025 21:25
…pylon, intercom, mailchimp, loading optimizations (simstudioai#2132)

* fix(memory-util): fixed unbounded array of gmail/outlook pollers causing high memory util, added missing db indexes/removed unused ones, auto-disable schedules/webhooks after 10 consecutive failures (simstudioai#2115)

* fix(memory-util): fixed unbounded array of gmail/outlook pollers causing high memory util, added missing db indexes/removed unused ones, auto-disable schedules/webhooks after 10 consecutive failures

* ack PR comments

* ack

* improvement(teams-plan): seats increase simplification + not triggering checkout session (simstudioai#2117)

* improvement(teams-plan): seats increase simplification + not triggering checkout session

* cleanup via helper

* feat(tools): added sentry, incidentio, and posthog tools (simstudioai#2116)

* feat(tools): added sentry, incidentio, and posthog tools

* update docs

* fixed docs to use native fumadocs for llms.txt and copy markdown, fixed tool issues

* cleanup

* enhance error extractor, fixed posthog tools

* docs enhancements, cleanup

* added more incident io ops, remove zustand/shallow in favor of zustand/react/shallow

* fix type errors

* remove unnecessary comments

* added vllm to docs

* feat(i18n): update translations (simstudioai#2120)

* feat(i18n): update translations

* fix build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* improvement(workflow-execution): perf improvements to passing workflow state + decrypted env vars (simstudioai#2119)

* improvement(execution): load workflow state once instead of 2-3 times

* decrypt only in get helper

* remove comments

* remove comments

* feat(models): host google gemini models (simstudioai#2122)

* feat(models): host google gemini models

* remove unused primary key

* feat(i18n): update translations (simstudioai#2123)

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* feat(tools): added zendesk, pylon, intercom, & mailchimp (simstudioai#2126)

* feat(tools): added zendesk, pylon, intercom, & mailchimp

* finish zendesk and pylon

* updated docs

* feat(i18n): update translations (simstudioai#2129)

* feat(i18n): update translations

* fixed build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* fix(permissions): add client-side permissions validation to prevent unauthorized actions, upgraded custom tool modal (simstudioai#2130)

* fix(permissions): add client-side permissions validation to prevent unauthorized actions, upgraded custom tool modal

* fix failing test

* fix test

* cleanup

* fix(custom-tools): add composite index on custom tool names & workspace id (simstudioai#2131)

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
… sendgrid, linkedin, more tools (simstudioai#2148)

* feat(tools): added smtp, sendgrid, mailgun, linkedin, fixed permissions in context menu (simstudioai#2133)

* feat(tools): added twilio sendgrid integration

* feat(tools): added smtp, sendgrid, mailgun, fixed permissions in context menu

* added top level mocks for sporadically failing tests

* incr type safety

* fix(team-plans): track departed member usage so value not lost (simstudioai#2118)

* fix(team-plans): track departed member usage so value not lost

* reset usage to 0 when they leave team

* prep merge with stagig

* regen migrations

* fix org invite + ws selection'

---------

Co-authored-by: Waleed <walif6@gmail.com>

* feat(i18n): update translations (simstudioai#2134)

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* feat(creators): add verification for creators (simstudioai#2135)

* feat(tools): added apify block/tools  (simstudioai#2136)

* feat(tools): added apify

* cleanup

* feat(i18n): update translations (simstudioai#2137)

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* feat(env): added more optional env var examples (simstudioai#2138)

* feat(statuspage): added statuspage, updated list of tools in footer, renamed routes (simstudioai#2139)

* feat(statuspage): added statuspage, updated list of tools in footer, renamed routes

* ack PR comments

* feat(tools): add generic search tool (simstudioai#2140)

* feat(i18n): update translations (simstudioai#2141)

* fix(sdks): bump sdk versions (simstudioai#2142)

* fix(webhooks): count test webhooks towards usage limit (simstudioai#2143)

* fix(bill): add requestId to webhook processing (simstudioai#2144)

* improvement(subflow): remove all associated edges when moving a block into a subflow (simstudioai#2145)

* improvement(subflow): remove all associated edges when moving a block into a subflow

* ack PR comments

* fix(polling): mark webhook failed on webhook trigger errors (simstudioai#2146)

* fix(deps): declare core transient deps explicitly (simstudioai#2147)

* fix(deps): declare core transient deps explicitly

* ack PR comments

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
…lymarket, datadog, ahrefs, gitlab, shopify, ssh, wordpress integrations
@vercel
Copy link

vercel bot commented Dec 10, 2025

@mosaxiv is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 10, 2025

Greptile Overview

Greptile Summary

This PR fixes an IME (Input Method Editor) bug where pressing Enter during text composition for Japanese, Chinese, or Korean input would unintentionally submit the chat message instead of finalizing the composed text.

Key Changes

  • IME Composition Fix: Added !e.nativeEvent.isComposing check to the Enter key handler in user-input.tsx:394 to prevent message submission during IME composition
  • Developer Environment: Added IntelliJ IDEA files (.idea) to .gitignore

Analysis

The fix is minimal, targeted, and follows the standard pattern for handling IME composition events in web applications. The isComposing property is a standard DOM API that indicates when input is being composed through an IME, making this solution both correct and maintainable.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is a single-line addition using a standard DOM API (isComposing) to fix a well-defined bug. The fix follows established patterns for handling IME composition, has no side effects, and only affects Enter key behavior during text composition. The .gitignore change is a standard developer environment configuration.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
.gitignore 5/5 added IntelliJ IDE files (.idea) to gitignore
apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/user-input.tsx 5/5 added !e.nativeEvent.isComposing check to prevent form submission during IME composition

Sequence Diagram

sequenceDiagram
    participant User
    participant IME as Input Method Editor
    participant Textarea
    participant Handler as handleKeyDown
    participant Submit as handleSubmit

    Note over User,Submit: Scenario 1: IME Composition (Japanese/Chinese/Korean)
    User->>IME: Type characters (e.g., "nihon")
    IME->>Textarea: Start composition
    User->>Textarea: Press Enter (to confirm IME)
    Textarea->>Handler: KeyboardEvent (isComposing=true)
    Handler->>Handler: Check: e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing
    Note over Handler: isComposing=true, condition fails
    Handler-->>Textarea: Allow default behavior (finalize composition)
    IME->>Textarea: Finalize text (e.g., "日本")
    
    Note over User,Submit: Scenario 2: Normal Enter Key Press
    User->>Textarea: Type "hello"
    User->>Textarea: Press Enter (to submit)
    Textarea->>Handler: KeyboardEvent (isComposing=false)
    Handler->>Handler: Check: e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing
    Note over Handler: All conditions pass
    Handler->>Handler: e.preventDefault()
    Handler->>Submit: Call handleSubmit()
    Submit->>Submit: Send message
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1 waleedlatif1 changed the title prevent form submission during IME composition steps fix(ime): prevent form submission during IME composition steps Dec 10, 2025
@vercel
Copy link

vercel bot commented Dec 10, 2025

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

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Dec 10, 2025 3:45am

@icecrasher321 icecrasher321 changed the base branch from main to staging December 10, 2025 03:57
@icecrasher321 icecrasher321 merged commit 3cec449 into simstudioai:staging Dec 10, 2025
9 checks passed
waleedlatif1 added a commit that referenced this pull request Dec 10, 2025
… docs, mcp, autolayout improvements (#2286)

* fix(mcp): prevent redundant MCP server discovery calls at runtime, use cached tool schema instead (#2273)

* fix(mcp): prevent redundant MCP server discovery calls at runtime, use cached tool schema instead

* added backfill, added loading state for tools in settings > mcp

* fix tool inp

* feat(rate-limiter): token bucket algorithm  (#2270)

* fix(ratelimit): make deployed chat rate limited

* improvement(rate-limiter): use token bucket algo

* update docs

* fix

* fix type

* fix db rate limiter

* address greptile comments

* feat(i18n): update translations (#2275)

Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>

* fix(tools): updated kalshi and polymarket tools to accurately reflect outputs (#2274)

* feat(i18n): update translations (#2276)

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* fix(autolayout): align by handle (#2277)

* fix(autolayout): align by handle

* use shared constants everywhere

* cleanup

* fix(copilot): fix custom tools (#2278)

* Fix title custom tool

* Checkpoitn (broken)

* Fix custom tool flash

* Edit workflow returns null fix

* Works

* Fix lint

* fix(ime): prevent form submission during IME composition steps (#2279)

* fix(ui): prevent form submission during IME composition steps

* chore(gitignore): add IntelliJ IDE files to .gitignore

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: Waleed <walif6@gmail.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>

* feat(ui): logs, kb, emcn (#2207)

* feat(kb): emcn alignment; sidebar: popover primary; settings-modal: expand

* feat: EMCN breadcrumb; improvement(KB): UI

* fix: hydration error

* improvement(KB): UI

* feat: emcn modal sizing, KB tags; refactor: deleted old sidebar

* feat(logs): UI

* fix: add documents modal name

* feat: logs, emcn, cursorrules; refactor: logs

* feat: dashboard

* feat: notifications; improvement: logs details

* fixed random rectangle on canvas

* fixed the name of the file to align

* fix build

---------

Co-authored-by: waleed <walif6@gmail.com>

* fix(creds): glitch allowing multiple credentials in an integration (#2282)

* improvement: custom tools modal, logs-details (#2283)

* fix(docs): fix copy page button and header hook (#2284)

* improvement(chat): add the ability to download files from the deployed chat (#2280)

* added teams download and chat download file

* Removed comments

* removed comments

* component structure and download all

* removed comments

* cleanup code

* fix empty files case

* small fix

* fix(container): resize heuristic improvement (#2285)

* estimate block height for resize based on subblocks

* fix hydration error

* make more conservative

---------

Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
Co-authored-by: icecrasher321 <icecrasher321@users.noreply.github.com>
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
Co-authored-by: Siddharth Ganesan <33737564+Sg312@users.noreply.github.com>
Co-authored-by: mosa <mosaxiv@gmail.com>
Co-authored-by: Emir Karabeg <78010029+emir-karabeg@users.noreply.github.com>
Co-authored-by: Adam Gough <77861281+aadamgough@users.noreply.github.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.

3 participants