Skip to content

fix: interactive check-due defaults, bare hours, date/timestamp mix - #91

Open
tobixen wants to merge 4 commits into
masterfrom
fix/check-due-defaults-bare-hour
Open

tobixen wants to merge 4 commits into
masterfrom
fix/check-due-defaults-bare-hour

Conversation

@tobixen

@tobixen tobixen commented Nov 16, 2026

Copy link
Copy Markdown
Member

Disclaimer: The code and the text below the line were generated by Claude Opus 5.5. The prompts are in each commit message, starting from:

There are some tasks on the calendar now like laundry and dishwash that was not picked up by plann interactive manage-tasks. Please investigat (sic)
Why is the 16-task-limit there? It would probably make more sense to show all tasks?
(traceback pasted: KeyError: 'DTEND' from interactive manage-tasks)


Fixes to plann interactive, found because chores like laundry and dishwashing were never shown by interactive manage-tasks:

  • The plann interactive subcommands now take their defaults from the functions manage-tasks calls, so a check behaves the same however it is started. check-due looks 24 hours ahead.
  • check-due no longer drops the tasks past the first 16 without a word, and these were usually the low-priority chores. It now says how many tasks are due when it can't show them all.
  • A bare hour like --set-dtstart=14 means 14:00 today, not the 14th of the month as an all-day date. This applies only to one or two digits from 0 to 23, in any date or time argument.
  • A task with DTSTART as a date and DUE as a timestamp made selections crash with KeyError: 'DTEND'. The date is now made local midnight, and the time on the other value is kept. A floating DTSTART together with a UTC DUE no longer crashes either.

🤖 Generated with Claude Code

The `plann interactive` subcommands had their own defaults, different
from those of the functions `interactive manage-tasks` calls, so the
same check behaved differently depending on how it was started.  The
click options now read the defaults from the function signatures.
check-due looks 24 hours ahead in both cases.

Prompt: There are some tasks on the calendar now like laundry and dishwash that was not picked up by `plann interactive manage-tasks`.  Please investigat (sic)
Followup-Prompt: Consolidate code and make 24 hours the default for
  check-due

Assisted-By: Claude Opus 5.5
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
`--set-dtstart=14` was parsed by dateparser as the 14th of the month,
giving an all-day task where 14:00 local time was meant.  A bare
number of one or two digits below 24 is now an hour today in the
implicit timezone, in any date or time argument.

Prompts: 
> They shouldn't have an all-day DUE, it should be a timestamp.

> `dtstart=14` was meant to be 14:00 laptop time

> (on the finding that "0001" became an hour and 24-31 stayed a day of
> the month) Let 1-2 digits only mean "hour" and not "day of the
> month".  Though, maybe we should avoid special logics (sic) in the plann
> cli and rather just rely on the decisions done in dateparser?  For me
> it was very confusing that an "all day"-task for the 14th of December
> was created when I wanted a task due at 14:00 today, but then again,
> plann should work for the public at large and not only for me.

Assisted-By: Claude Opus 5.5
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
check-due cut its list off at 16 tasks without a word, and as the list
is sorted on priority, the low-priority chores were never shown.  The
limit now applies after the client side filtering, and when tasks are
left out it says how many are due and points at dismiss-panic.

Prompt: Why is the 16-task-limit there?  It would probably make more sense to show all tasks?
Followup-Prompt: Ok, [warn when check-due leaves tasks out]

Assisted-By: Claude Opus 5.5
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
The sanity check on mismatched date types in selections always wrote
to DTEND, which a VTODO with DUE does not have, so it crashed with
KeyError.  It now converts only the date value, to local midnight in
the implicit timezone (floating if the other value is floating),
replacing the property so VALUE=DATE goes away.  The time of day on
the timestamp used to be truncated; it is kept.  The check that
DTSTART is not after DTEND/DUE no longer crashes when one is floating
and the other is not.

Prompt: (traceback pasted: KeyError: 'DTEND' in __select, from
  _split_huge_tasks in interactive manage-tasks, after the log line
  "has non-matching types on dtstart and dtend/due")

Assisted-By: Claude Opus 5.5
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant