Fix: Mobile swipe-back from workspace chat list to workspace list #2
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
On mobile, the task detail page supports swiping right from the left edge to return to the task list. However, the workspace detail page (
SpacesPage/SpaceDetail) does not have this swipe-back gesture on the chat list pane.Users expect consistent mobile navigation across the app — swiping right from the left edge should always return them to the previous level (workspace list → task detail → back to workspace list).
Root Cause
SpaceDetail.tsx'sSpaceChatcomponent has a chat list pane on the left and a conversation detail pane on the right (viaSwipeableTabsfor mobile).SwipeableTabs'onSwipeBackFromFirst→onSelectSpaceTask(0)(returns to chat list).onSelectSpace(undefined)on right-swipe.App.tsxhas a top-leveluseEdgeSwipehook for opening the navigation drawer, but it doesn't cover the chat list insideSpaceDetail.Proposed Fix
In
ui/src/components/spaces/SpaceDetail.tsx:onSelectSpacetoSpaceChatso the chat list pane knows when to return to the workspace list.useEdgeSwipe(existing hook) to the chat list<div>withonOpen: () => onSelectSpace?.(undefined).onSelectSpaceis provided,spaceTaskId == null(chat list view, not conversation), and!showCreate(no create dialog open).Diff
Notes
useEdgeSwipehook is already tested and used inApp.tsxfor the nav drawer. Reusing it for consistency.useEdgeSwipedefaults).