Settings › Swipe actions: choose what swiping left or right does per list - #139
Merged
Merged
Conversation
Chores, tasks and memos each get a left and a right swipe mapped to Done (log/tick/mark done), Snooze, Archive, Delete or Nothing, within what that list supports. Defaults match the previous fixed behaviour. - data/model/SwipeAction.kt: SwipeAction, SwipeDirection, SwipePair, SwipeSubject (per-list allow-list + default) and SwipeSettings, pure and tested in SwipeActionTest. - SettingsRepository stores one key per list and direction; unknown or unsupported names fall back to that list's default at read time. - New SwipeSubScreen with a CozyChoiceChips pill picker; nav row under Personalisation. - Shared SwipeActionBackground draws the reveal panel for all three cards; toSwipeDirection() maps the Compose enum to left/right (LESSONS #51). - Chores can now be archived by swipe (Undo); tasks can be archived (TaskRepository.archiveTask, reminders silenced/restored with it) or deleted (confirm) by swipe; memos can be snoozed an hour (ReminderDto.snoozedBy, ReminderRepository.replace) or archived, each with Undo. Done on an already done task or memo restores it. - Callbacks read the live setting through rememberUpdatedState so a card that stays in composition follows a changed setting (LESSONS #59). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XvuHjkqiBGSFa6MxdE79aw
mapgie
marked this pull request as ready for review
September 12, 2026 01:22
mapgie
pushed a commit
that referenced
this pull request
Sep 12, 2026
Integrates main's configurable Settings > Swipe actions (PR #139) with this branch's task work. Resolutions: - Task swipe uses main's per-list, per-direction SwipeAction system. The Delete action routes to this branch's deleteTaskWithUndo, so a deleted task (and its reminders) can be restored from the Undo snackbar; the edit sheet's delete goes through the same path. Delete is still confirmed by the card's dialog first. - Dropped this branch's hardcoded swipe-left-delete gesture and screen-level delete dialog in favour of main's card. - The task card's tap-to-open change stands: TaskCard no longer takes onToggleDone (completion is a swipe or the overview's Mark done). - Kept both settings axes on TaskUiState (colourAxes and swipe) and both feature sets on the view model (colour axes, reminders, delete-with-undo, plus main's archiveTask). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sg2m9t6JspJ1MgpXgwCLTX
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.
What
A new Settings page, Swipe actions (under Personalisation), lets the user pick what swiping a card left and right does, separately for chores, tasks and reminders. Each direction can be set to:
Chores have no Delete (a chore is a
tagsrow; it retires by archiving). Tasks have no Snooze. Defaults reproduce the behaviour before this change: chores log right / snooze left, tasks complete right / nothing left, reminders done left / delete right.How
data/model/SwipeAction.kt:SwipeAction,SwipeDirection,SwipePair,SwipeSubject(per-list allow-list and default) andSwipeSettings. Pure Kotlin, pinned bySwipeActionTest.SettingsRepositorystores one DataStore key per list and direction. An unknown or unsupported stored name falls back to that list's default for the direction at read time.SwipeSubScreenuses a newCozyChoiceChipspill picker (wrapping row, radio semantics, 44dp targets) since four or five options do not fit the segmented control.ui/components/core/SwipeActionBackground.ktdraws the reveal panel for all three cards and maps the Compose dismiss enum to left/right in one place (LESSONS Bump mapgie/android-Actions/.github/workflows/codeql.yml from 87b0b6408e7168235e4977377add51c312ebab71 to 252cf0054ab486b6aa3e87563bc12146d97ff891 #51). Delete alone uses the error container.SwipePairand anonSwipecallback.enableDismissFrom*follows the setting, so a direction set to Nothing does not drag. Callbacks read the setting throughrememberUpdatedStatebecause the dismiss state capturesconfirmValueChangeonce (LESSONS fix: switch to XML font resources so Nunito/Lora render on first frame #59, added).New actions reachable by swipe:
TaskRepository.archiveTask; linked reminders are silenced and restored the same way as done/undone, now shared helpers) with Undo, and task delete behind the same confirmation as the edit sheet.ReminderDto.snoozedBymoves the next ring one hour later than now or the pending ring, brings a rung once-only memo back to Active, leaves a tag-alarm alone (its Snooze direction is disabled on the card). Undo writes the earlier record back viaReminderRepository.replace. Reminder archive with Undo.Tests
SwipeActionTest: defaults per list, allow-lists, Nothing disables one direction, sanitising and resolving stored names, labels, per-list updates.ReminderModelTest: foursnoozedBycases (waiting, already rung, repeating, tag-alarm).TaskPayloadTest: archive payload.Also: help sheet tip, changelog fragment (
minor),a11y_check.pyclean.🤖 Generated with Claude Code
https://claude.ai/code/session_01XvuHjkqiBGSFa6MxdE79aw
Generated by Claude Code