Fix mobile left-edge swipe popping home to sign-in#125
Conversation
On narrow layouts the home screen (/spaces) is a child of the login route (/). Android's left-edge back gesture shares the same edge as the swipe-to-open-sidebar gesture, so it would pop the home route down to the sign-in screen instead of opening the channel drawer. Wrap the mobile Scaffold in a PopScope (canPop: false) that intercepts the system back gesture and steps through / opens the drawers instead: close the member end-drawer, else close the channel drawer, else open the channel drawer. The left swipe now opens the left sidebar as expected.
Covers the three back-gesture cases introduced by the PopScope fix — no drawer open (opens channel drawer), drawer open (closes it), end drawer open (closes it) — plus a regression guard confirming back never pops the route back to the sign-in screen. https://claude.ai/code/session_01SemWs7SV5pTx7ZbtNjKvmJ
Code Review — findings & fixesReviewed Findings ranked by severity🔴 High — Missing test coverage (fixed in this review)The new
Tests added:
The 🟡 Medium —
|
On narrow layouts the home screen (/spaces) is a child of the login
route (/). Android's left-edge back gesture shares the same edge as the
swipe-to-open-sidebar gesture, so it would pop the home route down to
the sign-in screen instead of opening the channel drawer.
Wrap the mobile Scaffold in a PopScope (canPop: false) that intercepts
the system back gesture and steps through / opens the drawers instead:
close the member end-drawer, else close the channel drawer, else open
the channel drawer. The left swipe now opens the left sidebar as
expected.