[GSoC 22] Project: Improving the Calendar Application

the launch_daemon handles daemons and servers, long running processes on the system.
I see three aproaches to this problem that might work.

  • extend launch_daemon to fire events at certain times, reliably (that is, also with carching up)

  • create a new daemon for such timed tasks

  • create a daemon specifically for calendar and time tracking

2 Likes

Generally speaking I would break Calendar into three components: main app, deamon and a deskbar replicant (although this has little to do with reminders but could fire up the app and show current day).
I find interesting the concept of MacOS event manager but for the sake of Calendar I would go for a separate lightweight deamon that checks upcoming event on a regular basis.
Ideally the granularity should be every minute but maybe we can cope with 5 minutes windows provided that Calendars allows reminders with multiples of 5 minutes steps only (e.g. 5 minutes before, 30 minutes before, one day before, etc.).
I don’t remember exactly how Calendar manages this but a live query could be used to show only the relevant events to remind on a given moment.
I would set a separate deamon in case the main app is closed for whatever reason. It should just query the events and show a notification and should start at boot even before Calendar is opened by the user.

2 Likes

Hey! Can you please point out to its repository

I would add something for this unscheduled event that will happen later in the day. Delay is too long for usual tea timers but you still need a reminder and you don’t want to have to enter a full description for it.
For example, you already started to work/to play/to watch vids but something happened to your neighbour and they called to ask you to pick their kids at school. Another example, you’re working but you have something cooking in the oven. I’d say that in this case, the max range is about 6 hours.

1 Like

No such repo exists. I’ll see if I can find some resource for you. However, you should be able to find the app on BeShare.

1 Like

Hello!

I need suggestions for the contents for the Reminder Notification.
Would Event Name, and Event Place be okay? Or should we add something related to the Category as well?

1 Like

Maybe a text area for description would be appropriate.

1 Like

It depends when you plan to display notifications. and for what kind of event.

This this how I’d see things for a scheduled event. Indeed, in this case, event, place and time remaining are all the things that you need.

My guess is that you would in fact display two notifications. The first, one quarter before, then the second five minutes before.
Event X is starting at Y in Z minutes

When it’s time, you start to display alerts because now, you want the user to validate a choice.
Event X is starting now at Y.

  • Cancel that event

  • OK I’m on it.

  • I’m not ready yet. Please, ask me again in 5 mins
    In this last case you display another alert 5 mins later.

    Event X already started 5 mins ago at Y.

    • Cancel that event
    • OK This time, I’m ready.
    • Damn! I won’t make it. Please reschedule.

Now in the case of a reminder for unscheduled event, I would ask the user to put all in a sentence. To take the same example as before, user would enter “Pick up Kelly’s kids at school” or “Turn off the oven”
Notifications would show the sentence and the time remaining.
User's sentence in ... mins
The alerts would do the same thing.
User's sentence now
You're already 5 mins late to User's sentence
They would offer same choices as for a scheduled event except that the second alert would obviously only have two choices.

In addition to @Starcrasher, please use full sentences with variable placeholders, instead of a format like variable + “ in ” + variable + “ minutes”.

Why would I want a calendar that requires interaction? I have better things to do than assure the Calendar that I’m attending an event, either I saw it or I did not, the option to ack lwledge provides nothing more.

A “you are late” notification makes no sense to me in the same vain

It would make sense on a phone OS because you’d have it with you but need notifications of meetings and so on, but on a desktop OS it only makes sense if you can interact with a phone OS using the cloud.

1 Like

Let’s say that you’re coding for Haiku. The fridge is empty so you put a reminder that you have to go for errands. The notification arrives. You have almost finished, just need to fix few typos and upload your patch. 5mins should be sufficient but you suddenly found a better solution and you dive in your code again. Without another reminder the shop are closed and you have nothing to eat.

1 Like

In fact, it depends of the kind of events. For example, doctors will have enough with a notification giving the name of their next patient. If you use the calendar to organize your days, a look at it in the morning will tell you that there’s an expo starting this afternoon, perhaps you will go today but that could be tomorrow. You don’t need a notification for that.
I agree that reminders of any kind should be an option.

2 Likes

I searched on BeShare (beshare.agmsmith.ca) and there is both the app and the documentation (PDF) available.

I just tried to run the Personal Assistant installer on Haiku and it crashes claiming it’s not an executable. So you might not be able to figure out how it handles events using a daemon, but I do seem to remember it installing some sort of daemon like thing to handle events.

1 Like

Hi. I have a (kind of) working copy of Personal Assistant here. At least, the installer run and can execute the application itself. I can sent it if you want.

Thanks everyone for their valuable suggestions!
The current progress of the project can be seen here!

We are using Live Queries for updating the list of events. But the Live Query is only able to recognize B_ENTRY_CREATED and B_ENTRY_REMOVED, and there is no way of getting (through queries) if an event’s attribute is changed.

@humdinger suggested to mode monitor each of the event separately so that any change can be captured. Also this should not take a huge toll on the system as no-one has thousands of events scheduled!

What do you suggest?

Past events are also captured, no?

Nope. As we are working on the reminders, so I think capturing the past events would not be necessary

It could be problematic if your cmos battery is empty and the system boots up with the time set to 1970.

But tbh we should just hardcode the current year as the lowest time if the battery is empty.

Hey Everyone!

We need some suggestions on this:
The Calendar application currently has some utility for sending the Notifications whenever the event is about to start. Although this is handled in a separate thread, yet the Notifications only pops up when the Calendar App is started.
That being said, would it still be useful after the Calendar Daemon is up and running?
Should we remove this NotificationLoop() from the Calendar Application?

1 Like