Repository navigation
fix(app): disable touch composer on desktop - #67612
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
There was a problem hiding this comment.
The fix works. I made Desktop report a touch screen by turning on Chromium's touch emulation, so (hover: none) and (pointer: coarse) matches. On the base branch the composer switched to the touch dock and used enterkeyhint="enter". With this PR, Desktop keeps the regular composer with its toolbar and inline send button, while the web app still uses the touch composer. I couldn't test on real Windows hardware or over remote desktop; the emulation produces the same query result described in the issue.
The type check and the composer tests in packages/app pass.
Public API: unchanged.
No blocking concerns.
Related: #43088


Disables the mobile touch composer dock in the Electron desktop app so Windows desktops, 2-in-1s, and remote desktop sessions keep the desktop toolbar and Enter-to-send.
Fixes #62647
Cause
On Windows, Chromium's
GetAvailablePointerAndHoverTypesImpl()(ui/base/pointer/pointer_device_win.cc) reports(hover: none) and (pointer: coarse)in two common desktop setups:flowchart LR W[Windows Electron] --> T{IsDeviceUsedAsATablet?} T -- yes --> C["(hover: none) & (pointer: coarse)<br/>skips SM_MOUSEPRESENT"] T -- no --> M{SM_MOUSEPRESENT == 0<br/>& virtual touch?} M -- yes --> C C --> D[Touch dock + Enter = newline]SM_CONVERTIBLESLATEMODE == 0, causing Chromium to return{POINTER_TYPE_COARSE, HOVER_TYPE_NONE}without checkingSM_MOUSEPRESENT.SM_MOUSEPRESENT == 0alongside a virtual touch digitizer (NID_EXTERNAL_TOUCH).Change
touchmedia query inpackages/app/src/composer/editor/editor.tsxbehindplatform.platform !== "desktop"so only the web app switches to the touch dock:Added by the opencode bot (AI-generated).
Related: #43088