Repository navigation
feat: add option to delete all finished tasks in a project (#2684) - #2756
Open
phenrique-coder wants to merge 3 commits into
Open
phenrique-coder wants to merge 3 commits into
phenrique-coder wants to merge 3 commits into
Conversation
phenrique-coder
marked this pull request as draft
October 20, 2026 18:24
phenrique-coder
marked this pull request as ready for review
October 20, 2026 18:44
Owner
|
Works well, tested it with Todoist too and the deletion (with the spinner) is smooth. One bit of feedback on placement: the "Delete All Completed Tasks" action feels a little hidden in the project's context menu. Could it instead show up right under the "Completed" toggle, appearing only when there are completed tasks? That spot feels more natural and discoverable. Everything else looks good to me. |
alainm23
requested changes
Oct 30, 2026
| var delete_completed_tasks_item = new Widgets.ContextMenu.MenuItem (_ ("Delete All Completed Tasks"), "user-trash-symbolic"); | ||
| delete_completed_tasks_item.add_css_class ("menu-item-danger"); | ||
|
|
||
| menu_box.append (new Widgets.ContextMenu.MenuSeparator ()); |
Owner
There was a problem hiding this comment.
One more thought on placement: could the "Delete All Completed Tasks" action live in the View Option Menu instead, and only be visible when the "Completed" toggle is on? That keeps it close to where completed tasks are shown and out of the way otherwise. Thanks!
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #2684.
Adds an option in the project dropdown context menu to delete all completed/finished tasks belonging to that project, including an
Adw.AlertDialogconfirmation dialog before deletion.Changes
delete_completed_items_by_project (Objects.Project project)incore/Services/Store.valawhich callsitem.delete_item ()on each checked item in the project (properly propagating deletions to remote providers like Todoist and CalDAV/Deck as well as local database).build_context_menu_popover ()insrc/Views/Project/Project.vala:menu-item-dangeranduser-trash-symbolicicon.project.items_checked.size > 0whenever the popover is opened.Adw.AlertDialogconfirmation dialog before deletion with a destructive "Delete" response button._("Delete All Completed Tasks")andGLib.ngettext ("This will delete %d completed task and its subtasks from project %s", ...)).// TRANSLATORS:comments to assist translators with gettext context.src/Layouts/SectionBoard.vala, updateditem_deletedsignal handler to destroy and remove deleted items fromchecked_items_mapandcompleted_items_list, ensuring completed tasks disappear immediately from board view.src/Layouts/SectionRow.vala, updateditem_deletedsignal handler to also clean upchecked_items_map(matching byid_string) andcompleted_items_list.Objects.Project.source_typesafely falls back toSourceType.LOCALwhensource == null.test/core/test-delete-completed-tasks.valaand registered it intest/test-core-runner.valaandtest/meson.build, verifying that only completed tasks in the target project are deleted, active tasks are preserved, and tasks in other projects are untouched.Testing
meson test -C build): 5/5 test suites passed (core,cli,caldav-integration, schema validation, desktop file validation).ninja -C build.