Repository navigation
Feat(tui): Skip this time, and a daily note's date for repeating tasks - #58
Open
spirit-of-light wants to merge 1 commit into
Open
spirit-of-light wants to merge 1 commit into
spirit-of-light wants to merge 1 commit into
Conversation
The desktop app has the task menu item Skip this time. It writes the next occurrence of a `@repeat:` task and keeps this occurrence as a cancelled record. The task menu of zn now has the same item, with the key `n`. It shows only for an open inline task with `@repeat:`. A check-off of a repeating task from the Tasks list, the board, Home or the calendar now counts from the date of its daily note, as on the desktop. This applies only when daily notes are on and their tasks take the note date. A `due:` on the line and a `due` in the frontmatter come first. After the roll, a notice gives the next date. The CLI and MCP do not change. They count from today, as the MCP of the desktop does. The roll goes through the backend, so it works for local and remote vaults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0171pE1tFQspTuCEpf1xvQiH
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
This change adds the task menu item "Skip this time", and the Tasks views now count a repeating task from the date of its daily note. Both are the same as in the desktop app. This is the third small PR from the review of #50. It uses the shared engine
internal/vault/task_recurrence.goand does not change it, its test or the case file. It does not change the note format.What changes
n. It shows only for an open inline task with a valid@repeat:rule, as in the desktop'stask-context-menu.ts. It calls the engine withSkip: true: the next occurrence goes above the task, and the task becomes a cancelled[-]record. The desktop usesrfor Repeat… in the Tasks views, so this PR keepsrfree.j,kandqmove or close the menu.FallbackDueas the desktop'srecurringCompletionFordoes. This is the task's due when it is inferred, else the date of its daily note. The daily-note date applies only when daily notes are on andtasksDueOnNoteDateis true. Adue:on the line and aduein the frontmatter come first.What does not change
zn task toggleand the MCP tools count from today, as the MCP of the desktop does.[>]and[-]do not change.Tests
internal/tui/task_skip_test.goand one new test ininternal/cli/tasks_test.go. The tests ininternal/tuifailed before the change, except for the remote-vault test.go vet ./...,gofmt -l internal cmdandgit diff --checkshow no problems.go test -race ./...passes, except forTestManyControlSequencesRenderQuickly, which also fails under-raceon a cleanmain.Note
#57 adds a similar per-note helper to
internal/tui/data.go. This PR uses the same name,dailyDueOfPath. If #57 is merged first, I will rebase this branch.🤖 Generated with Claude Code
https://claude.ai/code/session_0171pE1tFQspTuCEpf1xvQiH