Skip to content

feat task page UI improvements#6508

Merged
mdmohsin7 merged 7 commits intomainfrom
feat/task-ui-improvements
Apr 12, 2026
Merged

feat task page UI improvements#6508
mdmohsin7 merged 7 commits intomainfrom
feat/task-ui-improvements

Conversation

@krushnarout
Copy link
Copy Markdown
Member

@krushnarout krushnarout commented Apr 9, 2026

  • Swipe gestures (complete/delete)
  • Bulk select/delete with toolbar
  • Long-press to select, drag to reorder
  • Larger 44px checkbox tap targets
  • Reduced vertical item spacing
  • Clear completed scoped to section
  • Fix selection toolbar persisting after delete

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

  • Swipe right on a task → marks complete
  • Swipe left on a task → deletes it
  • Long-press without moving → enters selection mode
  • Long-press and drag → reorders task
  • Select multiple tasks → delete button turns red → tap delete → toolbar dismisses
  • Tap × in completed section → only clears that category

🤖 Generated with Claude Code

krushnarout and others added 3 commits April 10, 2026 00:17
- 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>
@krushnarout krushnarout linked an issue Apr 9, 2026 that may be closed by this pull request
krushnarout and others added 2 commits April 10, 2026 00:23
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@krushnarout krushnarout requested a review from mdmohsin7 April 9, 2026 18:58
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 9, 2026

Greptile Summary

This 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.

  • Drop indicator broken: context.findRenderObject() in DragTarget.onMove returns the page RenderBox, making the above/below threshold always false for items more than 20 px from the page top — the "insert above" indicator effectively never appears.
  • Toolbar persists after failed bulk delete: _isSelectionMode and _selectedItems are cleared only when every API call succeeds; if any deletion fails the toolbar stays visible with stale selection counts pointing to items already removed from the local list.

Confidence Score: 4/5

Safe 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)

Vulnerabilities

No security concerns identified. The bulk-delete flow uses the existing authenticated API client, no new auth or permission surfaces are introduced, and no sensitive data is logged.

Important Files Changed

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]
Loading

Comments Outside Diff (3)

  1. app/lib/providers/action_items_provider.dart, line 700-714 (link)

    P1 Selection toolbar persists when any API deletion fails

    deleteActionItem removes each item from the local list and calls notifyListeners() immediately, regardless of the API result. Because _selectedItems and _isSelectionMode are only cleared inside the if (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;
  2. app/lib/pages/action_items/action_items_page.dart, line 944-955 (link)

    P1 Wrong RenderBox for above/below drop indicator

    context here is _ActionItemsPageState's build context, so context.findRenderObject() returns the RenderBox of the entire page, not the individual task item. After globalToLocal, localPosition.dy is measured from the page top — so localPosition.dy < 20 is only true for drags within the topmost 20 px of the screen. For any item below the page header the condition is always false, meaning the "insert above" drop indicator never appears and items are always placed below the target.

    The fix is to attach a GlobalKey to each item widget and use itemKey.currentContext!.findRenderObject() together with box.size.height / 2 as the threshold, so the above/below split is relative to the individual item.

  3. app/lib/pages/action_items/action_items_page.dart, line 1341-1358 (link)

    P2 Hardcoded English string in goal delete dialog

    The content text 'Delete "${goal.title}"?' is a hardcoded English string. Per the project's localization rule (all user-facing strings must use context.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

Comment on lines +243 to +246
context.l10n.selectedCount(
provider.selectedCount + _selectedGoalIds.length,
provider.selectedCount + _selectedGoalIds.length,
),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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.

krushnarout and others added 2 commits April 10, 2026 00:32
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mdmohsin7
Copy link
Copy Markdown
Member

@aaravgarg check ui

@mdmohsin7 mdmohsin7 merged commit bf5d5ed into main Apr 12, 2026
2 checks passed
@mdmohsin7 mdmohsin7 deleted the feat/task-ui-improvements branch April 12, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task List UI: Add bulk operations and improve checkbox UX

2 participants