fix(mobile): add long-press unarchive menu to archived thread rows - #5640
fix(mobile): add long-press unarchive menu to archived thread rows#5640sideeffffect wants to merge 1 commit into
Conversation
On Android the only way to unarchive a thread was to swipe a row open and tap the narrow "Unarchive" action button — a fiddly interaction, and the archived-threads screen (unlike every other thread list) had no long-press menu fallback. A full swipe on the row triggers Delete, so a mistimed swipe permanently removes the thread instead of unarchiving it. Mirror the home/sidebar rows: wrap the archived row in a ControlPillMenu long-press menu exposing Unarchive and Delete. On Android this anchors a native dropdown to the row; on iOS it renders a context menu. Swipe actions are unchanged. Also pass `resetKey` so recycled LegendList rows reset their swipe state, matching the other thread lists. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
closing in favor of #5658, the later implementation of the same archived-row unarchive action. |
Problem
On Android, archived threads can't be reliably unarchived. The archived-threads screen's rows are the only thread list in the app without a long-press action menu — every other row (home, sidebar) got a
ControlPillMenuin the Android support work (#3579), but the archived rows were missed.That leaves the swipe action as the sole unarchive affordance: swipe a row open, then tap the narrow "Unarchive" button. On Android this is fiddly, and worse — a full swipe on the row triggers Delete, so a slightly-too-far swipe permanently deletes the thread instead of unarchiving it.
The underlying command/decider/projector/reducer path for unarchive is correct and symmetric with archive; this is purely a missing Android-friendly UI affordance.
Fix
Wrap the archived thread row in a
ControlPillMenulong-press menu exposing Unarchive and Delete, mirroring the home/sidebar rows:onLongPress), giving a dependable, non-swipe way to unarchive.Swipe actions are left untouched. Also passes
resetKeyto the row'sThreadSwipeableso recycledLegendListrows reset their swipe state, matching the home/sidebar lists.Testing
tsc --noEmit(mobile) — cleanvp check(format + lint) — cleanvp testforfeatures/archive+features/home— 38 passed🤖 Generated with Claude Code
Note
Low Risk
UI-only affordance on the archive screen; reuses existing
ControlPillMenuand existing unarchive/delete callbacks with no backend or auth changes.Overview
Archived threads were the only list rows without long-press actions, so on Android unarchive depended on a narrow swipe button and a full swipe could delete instead.
Archived thread rows are wrapped in
ControlPillMenuwithshouldOpenOnLongPress, exposing Unarchive and Delete the same way as home/sidebar thread rows (native dropdown on Android, context menu on iOS). Swipe-to-unarchive/delete is unchanged.ThreadSwipeablealso gets aresetKeyofenvironmentId:threadIdso recycledLegendListrows don’t keep a stale open swipe state, consistent with other thread lists.Reviewed by Cursor Bugbot for commit 571cc90. Bugbot is set up for automated code reviews on this repo. Configure here.