Conversation
- Bulk select/delete with toolbar - Swipe gestures for complete/delete - Long-press to select, long-press+drag to reorder - Larger 44px checkbox tap targets - Reduced item vertical spacing - Clear completed scoped to section only - Fix selection toolbar not dismissing after delete Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Greptile SummaryThis PR adds swipe gestures (complete/delete), long-press-to-select, bulk delete toolbar, drag-to-reorder, and section-scoped "clear completed" to the task page, along with full l10n support across all 33 locales.
Confidence Score: 4/5Safe to merge after fixing the two P1 issues; all remaining findings are style-level. Two P1 defects exist: the drag drop-indicator logic always resolves to 'insert below' due to the wrong RenderBox context, and the selection toolbar can get stuck after a partial API failure in bulk delete. Both are regressions on the primary user paths advertised in this PR. The l10n and redundant-arg findings are P2 and do not block merge. app/lib/pages/action_items/action_items_page.dart (DragTarget.onMove RenderBox), app/lib/providers/action_items_provider.dart (deleteSelectedItems success gate)
|
| Filename | Overview |
|---|---|
| app/lib/pages/action_items/action_items_page.dart | Major UI rewrite adding swipe gestures, long-press-to-select, drag-to-reorder, and bulk delete toolbar; contains a P1 bug in the drag hover position logic (wrong RenderBox context) and a minor l10n violation. |
| app/lib/providers/action_items_provider.dart | Adds multi-selection state and bulk delete; contains a P1 bug where the selection toolbar persists when any individual API deletion fails because _isSelectionMode is only cleared on full success. |
| app/lib/l10n/app_en.arb | Adds new l10n keys (selectedCount, tasksSelectAll, tasksDeleteSelected, etc.) for the selection UI; selectedCount generates a two-parameter function but is always called with the same value twice. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User interaction on task item] --> B{Gesture type?}
B -->|Swipe right| C[confirmDismiss: toggle complete]
B -->|Swipe left| D[onDismissed: deleteActionItem]
B -->|Long press 400ms| E[LongPressDraggable starts]
E --> F{Finger moved?}
F -->|Yes| G[Drag to reorder]
F -->|No| H[onDragEnd: startSelectionWithItem]
H --> I[Selection toolbar shown]
I --> J{User action}
J -->|Tap delete| L[deleteSelectedItems]
L --> M{All API calls succeed?}
M -->|Yes| N[Clear selection + end mode]
M -->|No - BUG| O[Toolbar persists with stale IDs]
J -->|Tap cancel| P[endSelection: clear state]
Comments Outside Diff (3)
-
app/lib/providers/action_items_provider.dart, line 700-714 (link)Selection toolbar persists when any API deletion fails
deleteActionItemremoves each item from the local list and callsnotifyListeners()immediately, regardless of the API result. Because_selectedItemsand_isSelectionModeare only cleared inside theif (success)branch, a single API failure leaves the toolbar visible with stale IDs that reference items no longer in_actionItems. The user is stuck in selection mode with no way to dismiss the toolbar other than a restart.The PR description lists "Fix selection toolbar persisting after delete" as a goal, but this path is still broken.
// After awaiting Future.wait, always end selection mode // regardless of whether every server call succeeded _selectedItems.clear(); _isSelectionMode = false; notifyListeners(); return success;
-
app/lib/pages/action_items/action_items_page.dart, line 944-955 (link)Wrong RenderBox for above/below drop indicator
contexthere is_ActionItemsPageState's build context, socontext.findRenderObject()returns theRenderBoxof the entire page, not the individual task item. AfterglobalToLocal,localPosition.dyis measured from the page top — solocalPosition.dy < 20is onlytruefor drags within the topmost 20 px of the screen. For any item below the page header the condition is alwaysfalse, meaning the "insert above" drop indicator never appears and items are always placed below the target.The fix is to attach a
GlobalKeyto each item widget and useitemKey.currentContext!.findRenderObject()together withbox.size.height / 2as the threshold, so the above/below split is relative to the individual item. -
app/lib/pages/action_items/action_items_page.dart, line 1341-1358 (link)Hardcoded English string in goal delete dialog
The
contenttext'Delete "${goal.title}"?'is a hardcoded English string. Per the project's localization rule (all user-facing strings must usecontext.l10n), this should be replaced with a proper ARB key. The rest of the dialog (deleteGoal,cancel,delete) already uses l10n correctly.Context Used: Flutter localization - all user-facing strings mus... (source)
Reviews (1): Last reviewed commit: "fix dismiss selection toolbar instantly ..." | Re-trigger Greptile
| context.l10n.selectedCount( | ||
| provider.selectedCount + _selectedGoalIds.length, | ||
| provider.selectedCount + _selectedGoalIds.length, | ||
| ), |
There was a problem hiding this comment.
Redundant second argument to
selectedCount
The generated selectedCount(int count, Object s) signature takes an Object s parameter that is unused in every locale's implementation. Passing the same computed value twice is redundant and could confuse future maintainers. The second argument can be removed once the ARB/generated signature is reviewed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@aaravgarg check ui |
Demo
ScreenRecording_04-10-2026.00-15-14_1.MP4
Bulk select/delete with toolbar demo:
ScreenRecording_04-10-2026.00-25-16_1.MP4
Test plan
🤖 Generated with Claude Code