Skip to content

[Bug]: Android connection switch taps expand the row instead of enabling the environment #14958

Description

@JerkyTreats

Before submitting

  • I searched existing issues and did not find a duplicate of this tap behavior.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/mobile

Steps to reproduce

  1. Use the Android mobile app with a saved direct connection to a compatible T3 Code server.
  2. Switch the connection off, then open its connection settings.
  3. Confirm that the row says Off, rather than Client not supported.
  4. Tap the connection switch itself.
  5. Repeat with the details collapsed and expanded.

Expected behavior

Tapping the enabled switch turns the saved connection on. Tapping the label or chevron separately opens or expands its details.

Actual behavior

Tapping the switch expands or collapses the connection row instead. The switch stays off and the connection is not enabled.

This remained reproducible after restarting the app cleared an earlier protocol-compatibility block. The remaining Off state had no compatibility error.

Impact

Major degradation or frequent failure. The saved connection cannot be enabled through its switch.

Version or commit

Reproduced on an Android 2.0.0 production build of a local fork. Checked upstream main at 8ed276c246b624631e7d39241ebfd22d8314cb68.

The following three upstream files are byte-for-byte identical to the files in the reproduced build. A stock upstream APK has not been separately runtime-tested.

Environment

Physical Android device running Android 17. Saved direct connection. The Android switch is rendered through Expo UI Jetpack Compose.

Diagnosis and proposed fix

ConnectionEnvironmentRow places ThemedSwitch inside the row's React Native Pressable, whose onPress toggles row details. On Android, ThemedSwitch renders an Expo UI Compose switch through a native Host. The observed behavior is consistent with the ancestor pressable taking the tap instead of the native switch.

Use a non-interactive row container and keep the switch outside every row-navigation pressable:

<View className="flex-row items-center">
  <Pressable onPress={onToggleDetails}>
    {/* Label and connection status */}
  </Pressable>
  <ThemedSwitch value={enabled} onValueChange={onSetEnabled} />
  <Pressable onPress={onToggleDetails}>
    {/* Chevron */}
  </Pressable>
</View>

The same nested structure exists in ConnectedCloudEnvironmentRow: its outer pressable wraps a shell containing the native switch. Apply the same separation there, moving navigation and long-press removal onto the content and chevron. Cloud-row runtime reproduction has not been separately confirmed.

Keep the existing compatibility checks and disabled state for genuinely unsupported servers. Give each switch its own accessible connection label.

Validation of the proposed fix

The two row components were updated locally to make the switch a sibling of the row pressables. The rebuilt APK was installed on the same device, and the user confirmed that tapping the switch now triggers the toggle.

Formatting, lint, type checking, the full repository test gate, and the mobile static check passed. The Android release build and APK verification passed. This validates the locally patched build; it does not claim separate upstream APK acceptance.

Recommended native regression checks: direct-row switch taps in both expanded states, switching on and off, saved cloud-row switches, label and chevron navigation, cloud-row long-press removal, unsupported-server disabling, and iOS behavior.

Related reports considered

  • #13266 describes desktop welcome-wizard handling of persisted disabled connections and re-pairing.
  • #14252 describes the separate mobile activity toggle rolling back after a relay permission failure.

Neither describes connection-switch taps expanding a row without changing its enabled state.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions