#19209: feat(android): add disconnect button via StatusPill tap
app: android
size: XS
Cluster:
Device Pairing and Gateway Fixes
## Summary
- When connected to a gateway, tapping the green "Connected" status pill now shows a confirmation dialog with options to **Disconnect** or open **Settings**.
- Previously, tapping the pill always opened Settings regardless of connection state.
- This is needed if your gateway is offline (for the crazy people who don't run 24/7), the app will constantly try to connect, and the only way around it was to force stop the app. Clicking Disconnect in settings would just try to auto reconnect (possibly only if manual connection was used. I had tailscale issues with auto discovery, so I cannot test that workflow)
## AI Disclosure
- [x] AI-assisted (ClaudeCode Via OpenClaw) — human reviewed and tested
- [x] I understand what this code does
## Testing
- Lightly tested on OnePlus 12 (Android 15)
- Verified the disconnect dialog appears when tapping the "Connected" pill
- Confirmed tapping "Disconnect" actually disconnects from the gateway
- Confirmed tapping "Settings" opens the settings sheet
## Screenshots



🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
Added conditional disconnect dialog when tapping the status pill in connected state. When tapped while connected to a gateway, users now see a confirmation dialog with "Disconnect" and "Settings" options instead of immediately opening Settings. The dialog integrates with the existing `viewModel.disconnect()` method and maintains the original behavior (opening Settings) for all other connection states.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge with minimal risk
- The changes are minimal and well-scoped: adds a simple state variable, conditional logic based on existing `GatewayState` enum, and a standard Material3 `AlertDialog`. The disconnect flow calls an existing `viewModel.disconnect()` method, and the fallback behavior (opening Settings) is preserved for non-connected states. No complex logic, edge cases are handled cleanly, and the implementation follows Jetpack Compose best practices.
- No files require special attention
<sub>Last reviewed commit: 349fac8</sub>
Most Similar PRs
#11868: control-ui: pairing required guided flow (Clairephone V2 Candidate A)
by shojikumaru · 2026-02-08
66.2%
#19088: fix(gateway): allow startup with unset mode and fix pairing for local…
by mdanassaif · 2026-02-17
64.9%
#17765: fix: add link to settings when chat shows auth error
by MisterGuy420 · 2026-02-16
64.5%
#5441: fix(android): resolve WebSocket handshake race condition (#1922)
by cortexuvula · 2026-01-31
64.3%
#17378: fix(gateway): allow dangerouslyDisableDeviceAuth with trusted-proxy...
by ar-nadeem · 2026-02-15
63.8%
#20422: Fix/tailscale device pairing
by slagyr · 2026-02-18
63.7%
#8260: fix(macOS): gateway readiness detection + reversible Configure later
by xksteven · 2026-02-03
63.3%
#5867: Android: Add BouncyCastle Ed25519 fallback and gateway token UI
by brandonpollack23 · 2026-02-01
63.0%
#11527: feat(control-ui): UX improvements — Enter key, thinking icon, auto-...
by Annaxiebot · 2026-02-07
63.0%
#13321: android/gateway: harden manual connect identity and A2UI UX
by m888m · 2026-02-10
62.9%