Skip to content

fix(composer): disable touch composer on desktop - #2082

Merged
Hona merged 1 commit into
devfrom
upstream-f/up-382-disable-touch-composer-desktop
Dec 1, 2026
Merged

Hona merged 1 commit into
devfrom
upstream-f/up-382-disable-touch-composer-desktop

Conversation

@Hona

@Hona Hona commented Dec 1, 2026

Copy link
Copy Markdown
Member

Ports official anomalyco/opencode#67612 (fix(app): disable touch composer on desktop, commit 40ce89c032).

Summary

  • Gate apps/desktop/src/shell/view/composer/touch.rs::mounted behind cfg!(target_arch = "wasm32") so native desktop builds never mount the bottom touch composer dock, never hide inline composer actions/Submit, and never switch Return to newline-only mode on touch-capable Windows 2-in-1s, pen displays, or remote desktop sessions.
  • Keep the wasm32 web build (apps/web) behavior unchanged for phones and tablets.
  • Gate the touch memo input in apps/desktop/src/shell/view/composer.rs::composer_dock behind cfg!(target_arch = "wasm32") to match.

Upstream Hunk Mapping

  • packages/app/src/composer/editor/editor.tsx (import { usePlatform }, const platform = usePlatform(), const touch = platform.platform === "desktop" ? () => false : createMediaQuery("(hover: none) and (pointer: coarse)")) -> apps/desktop/src/shell/view/composer/touch.rs::mounted (!cfg!(target_arch = "wasm32") early return) and apps/desktop/src/shell/view/composer.rs::composer_dock (let touch = cfg!(target_arch = "wasm32") && session_view::style::touch_controls()).
    • Every composer touch behavior in Rune (mounting composer::touch::bar, hiding the inline submit button via ComposerHost::composer_docked_actions, switching toolbar items, shell-mode min-height/toolbar hiding, and Return-inserts-newline keyboard handling) flows through touch::mounted(s).

Verification

  • Local scripts/guardrails.ps1: 11/11 passed.

Copilot AI balanced review requested due to automatic review settings December 1, 2026 22:46

Copilot AI 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.

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.

@Hona
Hona merged commit 05e482f into dev Dec 1, 2026
8 checks passed
@Hona
Hona deleted the upstream-f/up-382-disable-touch-composer-desktop branch December 1, 2026 23:12
Hona added a commit that referenced this pull request Dec 1, 2026
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.

2 participants