Repository navigation
fix(ios): allow clearing task date times - #172
TaylorFinklea wants to merge 2 commits into
Conversation
Preserve the selected day when removing a task time and retain custom datetime behavior. Add property round-trip and isolated timezone regression coverage.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9fd905dcc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Button { | ||
| if hasTime || editingTime { | ||
| editingTime = false | ||
| selection.wrappedValue = Calendar.current.startOfDay(for: selection.wrappedValue) |
There was a problem hiding this comment.
Propagate time clears even when the picker preview is unchanged
For a Scheduled/Deadline timestamp in the first minute of the day with nonzero seconds or milliseconds, such as 00:00:30, clearing the time does not update the save draft. View_query.temporal_picker truncates the native preview to the minute (shared/src/logseq/view_query.ml:233–237) while retaining the original draft, then ignores change events matching that preview (lines 266–270). Consequently, the editor initially shows Add time, and Add time → Clear time → Done still saves 00:00:30 rather than a date-only value. Ensure an explicit clear replaces the draft even when the rounded picker selection is unchanged, and cover this UI-to-draft path in a regression test.
Useful? React with 👍 / 👎.
Scheduled and Deadline dates currently keep their time when edited on iOS. Add Clear time to retain the selected date while removing the clock, and Add time to reveal the clock again without saving until Done. Date-only task labels omit the time; custom datetime properties retain their existing behavior.
Reuse the existing native property event, draft/save path and core property mutation. No schema, dependency or sync path is added. Date-only task values use the existing local day-start representation, including its inability to distinguish an intentional midnight from a date-only value.
Validation on base
82b6da9:dune build @shared/native/runtest: 1,306 tests passed in each of two contexts, including both task-property RPC round-trips and isolated timezone regressions for gaps, overlaps and backward date transitions.The exact reviewed commit merges cleanly with current main
1518c97; the six intervening commits do not overlap these files. The full build/test gates above were not rerun on that combined tree. This PR is independent of the task-reminder contribution.