Repository navigation
feat(tasks): add Kanban board view mode - #284
Conversation
Introduces a new horizontal Kanban board view for tasks, allowing users to switch between list and board layouts. - Add `TaskBoardView` component using `boardview` package. - Implement `TaskViewMode` enum (list, board). - Update `TaskList` and `TaskListOptions` to support view mode switching. - Integrate view mode persistence in `TaskListOptionSettings`. - Add localization support for board view and tooltips. - Update `TasksPage`, `MarathonPage`, and `TaskDetailsPage` to support the new view. - Add helper logic for task grouping and column mapping in `TaskGroupingHelper`.
There was a problem hiding this comment.
Code Review
This pull request introduces a Kanban board view (TaskBoardView) for tasks, allowing users to toggle between list and board layouts across several pages, including TodayPage, TasksPage, TaskDetailsPage, and MarathonPage. It also adds support for drag-and-drop task updates across columns with reverse-mapping helpers. Feedback on these changes highlights a potential runtime crash in TaskBoardView due to unsafe null assertions (!), code duplication of the _resolveTagIdByName helper across multiple files, and a layout regression on the TodayPage caused by replacing CustomScrollView with a SingleChildScrollView containing hardcoded list heights.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
_onDropItem was validating the destination item index against the target column's length. A cross-column drop into an empty or shorter column produces a drop index >= that column's length — a valid insertion point that was being rejected, silently preventing the property change from being persisted. Split the single bounds check into _isSourceInBounds (source must be an existing card) and _isColumnInBounds (destination only needs a valid column index). Also clamped the within-column reorder index after the removeAt to account for the narrowed bounds.
The boardview package renders its live drag preview by mutating the BoardList/BoardItem instances in place. build() regenerated those instances on every rebuild, so any rebuild mid-drag (incoming task-update event, timer tick, parent rebuild) handed the package fresh lists and discarded its in-progress preview — snapping the dragged card back to its origin. Cache the built lists and reuse the same instances while a drag is active: onStartDragItem sets _isDragging, build() returns the cached lists instead of rebuilding, didUpdateWidget preserves the cache mid-drag, and onDropItem clears it so the next rebuild reflects fresh data. Verified against the package that onPointerUp always fires onDropItem, so the flag never sticks.
Restores CustomScrollView with SliverList for today_page list mode, removing the regression introduced by the kanban PR that replaced it with SingleChildScrollView and hardcoded SizedBox heights (300/400). Board mode still requires a bounded height for the horizontal-scroll BoardView widget; replaced the magic numbers with 60% of screen height via MediaQuery so it adapts across device sizes.
The translation analysis CI test flagged 21 untranslated strings — all were the new board.cross_column_move_not_supported key left as English copy in every non-English locale file.
🚀 Motivation and Context
This PR introduces a new horizontal Kanban board view for tasks, allowing users to switch between the existing list layout and a new visual board layout. The board view supports grouping tasks by any of the available sort fields (priority, status, planned date, deadline, tags, etc.) and renders each group as a vertical column with draggable task cards.
⚙️ Implementation Details
New Components:
TaskBoardView— horizontal scrolling board with per-group columns, using custom drag-and-drop (no external kanban package due to dependency conflicts with the existing widget tree).TaskViewModeenum (list,board) for toggling between layouts.Modified Components:
TaskListnow accepts aviewModeparameter; renders the board widget when board mode is selected.TaskListOptionsadds a view-mode toggle button (icons:view_kanban_outlined/view_list_outlined) with translated tooltips.TaskListOptionSettingspersists the user's preferred view mode across sessions.TasksPage,TaskDetailsPagethread the view mode through state and pass anonAddToGroupcallback that pre-fills the correct task properties (priority, dates, estimated time, tag) when adding to a specific column.Task Grouping Helpers:
TaskGroupingHelper(priorityFromGroupKey,isCompletedFromGroupKey,tagNameFromGroupKey,dateFromGroupKey,durationFromGroupKey) so the add-to-group dialog can derive initial task values from the column key._resolveTagIdByName).Cross-Column Drag-and-Drop:
Status(viaCompleteTaskCommand) andPriority(viaSaveTaskCommand).useCustomOrderis enabled.Localization:
boardViewTooltip,listViewTooltip,addToColumnTooltiptranslation keys.Test Fix:
testModeparameter toTaskCardto bypass thePlatformUtils.isMobilecheck in widget tests, restoring 14 previously-failing swipe-to-complete tests.📋 Checklist for Reviewer
🔗 Related