Skip to content

One-shot schedules are stored and displayed as a daily recurrence #97

Description

@maxlamagna

Version: v0.5.0 (c24f605)

What happens

Open the schedule popover from the split send button, pick a date and a time, leave Recurring unchecked, and schedule the message.

The schedule strip above the composer shows daily at 14:30, and the record written to data/schedules.json carries a daily_at value alongside the one-shot flag:

{ "one_shot": true, "daily_at": "14:30", "next_run": 1755780600.0 }

What I expected

A one-shot to be recorded and described as a one-shot.

Impact

The message does fire only once, so the runtime behaviour is correct. It is the stored record and the UI that are wrong.

Two consequences. Anything that reads daily_at to decide whether a schedule recurs gets the wrong answer from a record that contradicts its own one_shot flag. And the strip tells the user their one-off message is going to repeat every day, which is alarming enough that you go looking for a way to cancel something that was never going to happen.

Suggested direction

A one-shot has no recurrence to describe, so next_run is the whole story and daily_at can simply be left unset. The strip can then render the actual moment, for example once at 14:30 or once tomorrow at 14:30.

Fixed by #95, which does exactly that and adds tests for the record shape.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions