Four surfaces over the Mac's own calendar: a join card at the top of an empty launcher, a
Join Next Meeting global shortcut, the menu bar, and meetings that join themselves.
Around them sit five launcher commands, a My Schedule sub-screen, a per-meeting details page, a
camera preview, and individual events as searchable launcher entries.
- Nothing polls, and there is one timer.
.EKEventStoreChangedis the reload signal, held through the RAIINotificationToken, andNSWorkspace.didWakeNotificationcovers the sleep it cannot.MeetingClockis the only timer: one tick on the minute boundary, running while something is watching: the palette, the menu bar, or auto join. With all three off, an idle Mac owns no timer at all.CalendarCoordinator.applyClockis the one place that decides, and the clock'sTaskis stored and cancelled instop()and in anisolated deinit. - Auto join fires at most once per meeting per launch, and only for a meeting starting at or
after the moment the switch was armed. Both are why
AutoJoinPolicytakesarmedAtand the already-joined set rather than reading a clock of its own. - The camera settles before the panel opens, and stops after it closes.
CameraSession.start()resolves access and blocks onstartRunningfirst, then handsCameraPreviewControllera settledFeed, so the panel's first frame is live video rather than a stage it has to swap out, and the TCC prompt never takes key from a panel already up.stop()runs once AppKit's close animation has left the screen, so the camera light never outlives the preview but is never torn down under a visible one either. - The card's window is
[start - lead, min(start + lead, end)]. The grace period exists because everyone joins late; theminis why it never outlives a meeting shorter than the lead. - Recurrence comes from
predicateForEvents(withStart:end:calendars:), which expands occurrences itself. Masters are never fetched and recurrence is never hand-rolled. MeetingSpannarrows the fetch, never the surfaces.calendarSpanreaches EventKit throughCalendarStore.span, so a shorter span shortens the query and every surface (the menu bar's agenda included) follows from the one snapshot. No surface filters days out of a snapshot fetched wider, which is whyDays to Showsits under Menu Bar yet sets every surface's days. The same type owns the wording, so a sentence naming the days can never outlive the query it describes.UpcomingWindow.agendais the only place that says which events count: timed, not declined, not over, in start order. The card, the chord, the menu bar, the schedule and the launcher slice all go through it, so they cannot drift apart. Because an event ending changes nothing in EventKit, the filter alone is not enough for the launcher slice:CalendarCoordinatorrepublishes it on the minute boundary and on every summon.- The menu bar's
Todayhorizon follows the same empty-state rule. It carries any remaining event that starts today, plus an event within 30 minutes after midnight; only then does the title mode readNo upcoming events. calendarEnableddoubles as consent, so it is inSettingsBackupCoverage.deliberatelyExcludedand onlyCalendarCoordinator.setCalendarEnabledmay write it. Tinycast's own dialog comes first, the macOS prompt second, and only from the gesture that asked. It is written only after macOS grants, so a prompt that fails or is dismissed can never leave the feature reading as on with no access. Enabling is re-offered whenever access is anything but granted, by the Calendar pane and by the Permissions pane, so a TCC record lost after the setting was already on never strands it.- Per-calendar toggles live on
CalendarStore, notAppSettings. Calendar identifiers are machine-specific, so they are deliberately outside the backup mirror, the same reasoning aspalettePosition. MeetingEventcarries only what a row needs. Location, notes and attendees are read for one occurrence when its details page opens, never for the whole span, so a busy calendar's invites never sit in the snapshot every surface diffs.Model/stays Foundation-only;CalendarTeststests the shipped sources. EventKit lives inService/CalendarStore.swiftand nothing EventKit-shaped leaves it.
Model/ holds the whole decision, with every clock read injected:
MeetingLink: the join link plus itsProviderand the account whose calendar carried it. Eleven named services, plus.genericfor any otherhttp(s)link the event carries.MeetingEvent: one occurrence, flattened out ofEKEvent.UpcomingWindow:agenda,carded,joinable,countdownand a row'srowPill.MeetingDay: the day a meeting falls on, titledToday, Oct 2,Tomorrow, Oct 3, thenMonday, Oct 5. A meeting still running from before midnight is Today.MeetingDayGroup.groupingcuts the agenda into days, so My Schedule and the menu bar head the same days the same way.MeetingSpan: how far ahead the store reads, and the phrasing that names those days.MenuBarSummary: which event the menu bar carries, and for how long.AutoJoinPolicy: whether a meeting should open itself, and which one.EventDraft: what the Create Event editor collects, before anything touches the calendar.MeetingDetails: one occurrence's location, notes as plain text, and attendees.
MeetingLink.detect(fields:) is handed [event.url, event.location, event.notes] in that order and
scans each for http(s) runs. A named provider anywhere beats a bare link found earlier, so a
"reset your password" URL at the top of an invite never wins over the Meet link below it.
Link extraction is hand-rolled rather than NSDataDetector: a detector is not Sendable, and
rebuilding one per event costs more than the scan it replaces. A URL ends at whitespace or a quote,
and trailing punctuation is trimmed, so (https://whereby.com/acme). yields the URL alone.
A URL on a known host that fails that provider's path rule is rejected outright, not demoted to
.generic: zoom.us/download sits in half the invites people are sent, and meet.google.com/tel/…
is a dial-in helper rather than a meeting.
MeetingLauncher.join prefers the desktop app: MeetingLink.appURL rewrites a Zoom link to
zoommtg://zoom.us/join?confno=… (carrying pwd when present) and a teams.microsoft.com link to
msteams: plus its path and query. Nothing else is rewritten; the rest of the table has no
unambiguous scheme, and guessing one would open the wrong thing. If no app claims the scheme, the
plain https link opens instead, in meetingBrowserBundleID when one is chosen under
Open Meeting Links In, otherwise in the default browser. A chosen browser since uninstalled falls
back to the default rather than failing the join, and the picker reads it as Default Browser.
A Google Meet link opens as the account whose calendar carried it. Someone signed into several
Google accounts otherwise lands on the account chooser, so MeetingLink.webURL appends
?authuser=<address>: the address the current user carries in the invite, taken from their attendee
entry or, for a meeting booked with no guests, from the organizer. EventKit's mailto: participant
URLs are opaque (path sees nothing on them), so MeetingLink.accountAddress(of:isCurrentUser:)
reads the address out of the absolute string and percent-decodes it there, before accountURL
encodes it again. A link that already names an
authuser was written deliberately and is left alone, and no other provider takes an account in its
URL. MeetingLink.url stays the link as written: it is what the failure report quotes and what
Copy Meeting Link puts on the pasteboard, so a link shared onwards carries no address of ours.
No brand artwork ships with the app, so every named provider draws video.fill and the name
carries the identity; .generic draws link.
The card is LauncherScreen.Row.meeting, prepended the way the calculator card is. The two can never
both lead: the calculator only answers a typed query and the card only an empty one, which is what
keeps the flat selection index a single-row offset. LauncherList.LeadCard is that fact made
structural: one optional card, one selected flag, one activate closure, whichever feature owns it.
The countdown re-renders from MeetingClock.now, not from a keystroke, so in 4 min becomes
in 3 min on the boundary. A partial minute rounds up (in 1 min at 20 seconds out), and the
first minute past the start reads now rather than 0 min ago.
Like the calculator card, a card appearing while the palette is already open shifts the highlight down by one row. That is the existing behaviour of the row above it and is left alone.
UpcomingWindow.joinable is deliberately wider than carded, and answers in this order:
- Whatever the card is showing, so the chord always joins what is on screen.
- Anything currently running, however long ago it started.
- The next meeting with a link.
It reads the live clock rather than MeetingClock, because a chord fires with the palette closed and
nothing ticking.
All five leave the launcher when the feature is off, through CalendarCoordinator.applyEnabled.
"Show in launcher" takes out only the individual meeting entries, the way Custom Commands' switch
hides only its section: My Schedule stays findable, so meetings are one search away rather than
on the root. Each command's own checkbox hides it from search; its shortcut, the join card and the
menu bar are unaffected by either.
The Calendar settings can limit the individual meeting entries in launcher search to the next 1, 3, or 5 meetings, or leave them all visible. New installations default to the next 3 meetings so a busy calendar does not crowd out apps and commands.
For the menu bar, Keep visible — show time left leaves a started meeting up until it ends: it
changes from Now during the first five minutes to its remaining time. The other choices preserve
the option to hide a current event immediately or after a chosen delay.
| Command | Does | Bindable |
|---|---|---|
| Join Next Meeting | Opens the link for the carded, running, or next meeting. | yes |
| My Schedule | Opens the .schedule palette mode. |
yes |
| Create Event | Opens the launcher form for a title, a start and a duration, and writes the event. | yes |
| Copy Meeting Link | The same meeting's link, to the pasteboard. | no |
| Open in Calendar | Hands the meeting to Calendar.app, or opens another default calendar app. | no |
A command that opens a surface is bindable; the two that act on the next meeting are reached through the join card's own ⌘K menu instead, where the meeting they act on is on screen.
A miss reports through the HUD (Nothing to join right now), not a dialog: it is transient and there
is nothing to acknowledge.
CalendarCoordinator owns a lazy EventEditorSession; EventEditorScreen presents its fields inside
the launcher, using the native form input and input-menu components. The old dialog editor is gone.
Only the existing fields are offered: title, start offset (Now, 15, 30 or 60 minutes), and duration
(15, 30, 45 or 60 minutes). Defaults remain Now and 30 minutes. The event still goes to EventKit's
default calendar for new events, with the start offset measured when the user saves.
Tab and Shift-Tab cycle the three fields; Return, Space or Down opens a focused choice. A blank or whitespace-only title disables Create Event, including ⌘↵. Escape or Back discards the draft and restores the previous search and selection; an editor summoned from a hotkey closes instead. Permission and feature consent are checked at both open and save. Disabling Calendar closes its editor. Invoking Create Event again while its editor is open preserves the current draft and navigation; while the palette is hidden with that editor kept, it summons the palette back onto the same draft.
CalendarStore queries MeetingSpan.interval(from:calendar:) (midnight today through midnight one,
two or seven days on, in the Mac's own zone) and re-reads whenever span changes under it, but only once
it has read at all, so enabling the feature never fires two queries. The fetch stays on the main
actor: at most a week of events is a sub-millisecond query and EKEventStore is not Sendable, so
pushing it off-main would be a fight with no measurable gain. Both the launch-time load and the
per-summon refresh are deferred into a Task, because the first EventKit query pays for its XPC
warm-up and both of those paths are protected.
The EKEventStore itself is built on first use, so a Mac with the feature off never loads EventKit.
After a grant the store is dropped and rebuilt; one built before the grant does not see the new
calendars.
MeetingEvent.id is the event identifier plus the occurrence's start, because a recurring series
shares one identifier across every instance. calendarItemID is kept separately: it is the only
handle ical://ekevent/… accepts, and a recurring occurrence opens its series.
A cancelled event never reaches a surface. A declined one is dropped by agenda, and an all-day or
already-finished one with it.
MeetingActionsMenu is a meeting's ⌘K menu everywhere it is a row: the card, the launcher's Meetings
section, My Schedule and the details page. Its secondary and perform answer the menu's chords
(⌘↵ copies the link, ⌘O opens Calendar, ⌘I shows details), so every label has a key that works.
Show Details pushes .meetingDetails. CalendarCoordinator.showDetails(of:) has CalendarStore
load the details before the push, so the page's first frame is already filled. The store queries only
that occurrence's own window on its own calendar and matches the occurrence by MeetingEvent.id, so
a recurring series yields this instance rather than its master.
CalendarStore.details is re-read at the end of every reload, so the page follows an edit the
same way every other surface does, and goes to This meeting is no longer available when the event
is deleted or cancelled. Leaving the mode clears it, so a closed page never costs a query.
↵, ⌘↵, ⌘O and ⌘K act on the page's meeting exactly as on its row. Its own ⌘K menu leaves out
Show Details, which would only push the page it is on.
MeetingDetails.plainText(fromNotes:) turns a description some servers store as HTML into text,
and leaves anything without a known tag untouched, so a plain invite's <https://…> link survives.
The organizer leads the attendee list; everyone else keeps the invite's own order.
MenuBarSummary decides what the menu-bar item carries: the earliest event still inside its window,
which is [start - lead, start) for Automatically and [start - lead, min(start + hideAfter, end))
for the timed options. Because the earliest qualifying event wins, one hiding hands the space to the
next with no extra logic.
The calendar's item and Tinycast's own item are two independent MenuBarExtra scenes, each
inserted by one preference and reading nothing off the other: showInMenuBar on General for
Tinycast's, calendarMenuBarDisplay here for the calendar's. Either may be the only one in the menu
bar, both may be, or neither. Dragging the calendar item out writes .disabled, which is what the
picker already said; it never touches showInMenuBar.
The display choice is Disabled, Meeting Icon, or Meeting Title; the title reads
title • in X min and is capped at MenuBarSummary.titleCap characters: a hard cap is the only
thing that bounds a menu bar. CalendarMenuBarLabel reads the coordinator rather than the stores,
which scopes Observation to the label instead of re-running either scene. It falls back to a calendar
glyph when nothing is due, so the calendar item never disappears out from under the user. In Meeting
Title mode, once no event remains today it instead reads No upcoming events.
Hide when there are no upcoming events instead takes the item out whenever it would show the bare
glyph or that placeholder (whenever menuBarEvent is nil), so it follows Show Upcoming Events,
Only show events with meetings and Hide Current Event rather than adding a rule of its own: on
Today it leaves after the day's last event, on a minutes lead it also leaves between meetings. The
scene has to read that fact, so CalendarCoordinator.hasMenuBarEvent is stored and written only
when it flips: a derived read would re-run TinycastApp.body, and the main menu with it, on every
minute tick. SwiftUI writes
false back through isInserted when it removes the item itself, so the insertion setter ignores a
removal while the item is hidden for being empty: only a drag-out turns the display to .disabled.
CalendarMenuBarMenu lists calendar actions only: Join <title>, Open in Calendar and
Dismiss Event for the displayed event, then the agenda, then My Schedule (⌘O) and
Calendar Settings… (⌘,), so the two menus never repeat each other. Each block is a Section, so
SwiftUI draws the separators and a missing block never leaves a stray one. Join is absent for a linkless appointment rather than
opening Calendar under a name that lies. A bare click never joins: the menu bar is not a button,
and a mis-click there would open a call.
The agenda is CalendarCoordinator.menuBarAgenda: UpcomingWindow.agenda over the span, read off
MeetingClock, so a meeting that ends leaves on the minute, then cut into one section per day by
MeetingDayGroup. Each row reads start – end title beside a ring in its calendar's colour, filled
while the meeting is under way, and goes through join, so a linkless event opens Calendar and every gate still applies. It is the schedule, not
the title's candidate list: it ignores Only show events with meetings and dismissals, which
decide only what the item itself shows, and keeps the displayed event so the list never shifts
under a handover.
Dismiss Event takes the displayed occurrence out of the menu bar, and MenuBarSummary.event filters it
out exactly as it filters a lapsed one, so the next event inside its own lead takes the space with
no second rule, and with nothing behind it the item falls back to the glyph or leaves under Hide
when there are no upcoming events. The set lives on CalendarCoordinator and lasts the launch, the
way autoJoined does: a dismissal is a reaction to what is on screen now, not a preference worth
persisting, and the ids are pruned against the store so the set cannot grow. It is deliberately per
occurrence rather than per series: dismissing today's standup says nothing about tomorrow's.
AutoJoinPolicy answers the meeting the join card is already showing, narrowed by three rules:
start >= armedAt, now >= start, and not already joined. Reusing UpcomingWindow.carded rather
than inventing a second window is what keeps one knob, joinWindowMinutes, governing the card, the
chord and auto join alike.
Only join known meeting services (autoJoinNamedProvidersOnly, off by default) keeps auto join
to the eleven named providers. A .generic link is as often a booking page, a document or a calendar's
own help link as it is a call, and placeholder events carry plenty of them. The bare links are set
aside before carded picks, not after: filtering the pick would let a placeholder starting a
minute earlier hold the card's slot and starve the call beside it. The card, the chord and the menu
bar still offer a bare link; only the unattended join skips it.
The meeting is marked joined before the confirmation is raised, so declining does not re-ask a minute later.
Every join (the card, the chord, the menu bar, auto join) funnels through
CalendarCoordinator.join(_:uninvited:):
join(meeting)
├─ no link ────────────► openInCalendar
├─ camera preview on ──► CameraPreviewController.present → join, or drop
├─ uninvited + confirm ► core.confirm → join, or drop
└─ otherwise ──────────► MeetingLauncher.join
The preview is itself a confirmation, so it stands in for one when both are on rather than asking
twice. CameraPanel sits at .floating, below a dialog's .dialog, so a failure report
still lands on top of it. The session, the panel and the stage are the Camera feature's (see
camera.md); only the join-specific controller and footer live here.
The Calendar pane carries the master switch (routed through the coordinator so the consent gate cannot
be bypassed), the Join Next Meeting recorder, the
join-window picker, and the per-calendar checkbox list: one Form row holding a LazyVStack,
because a Form realizes every row it is handed; a few light rows don't need LauncherItemsTable.
The hidden-calendar set stores exclusions, so a calendar added after the setting was written defaults to on. Holidays and Birthdays are what people switch off.
autoJoinMeetings and cameraPreview join calendarEnabled in
SettingsBackupCoverage.deliberatelyExcluded: one arms the app to open links unattended and the
other turns on the camera, and an import must grant neither. meetingBrowser is excluded too: it names an
app installed on this Mac, which another Mac may not have. The menu-bar settings carry over
normally, and so does calendarSpan: it sets how far ahead is read rather than widening what
can be reached.
Because the span is a setting, the two sentences that name the days (the consent dialog and the
pane's own subtitle) interpolate MeetingSpan.possessivePhrase rather than spelling the days out,
and the empty schedule reads MeetingSpan.orPhrase off the store that did the query. The .schedule
placeholder names no days at all: it is a static PaletteMode string, and one that advertised a span
it could not read would be wrong half the time.
CalendarMenuBarDisplay and MenuBarEvents both put their default at rawValue == 0, so an unset
preference lands on .disabled and .today rather than fighting them. MenuBarEvents has no Never:
.disabled is the one switch that takes the item out of the menu bar, and a second one would only
disagree with it.
CalendarStore.access is a snapshot, refreshed on start, on every reload and after a request;
TCC announces nothing when a grant changes in Settings. refreshAccess() is why anything that acts on
access outside those three re-reads first: the enable path, so its guard cannot bounce off a stale
.granted and leave a dead button, and the Calendar pane on appear, so a grant made in Settings while
the feature was off is not reported as still missing.
The Permissions pane shows calendar access alongside Accessibility, and when TCC has no record it
offers the same consent path rather than only opening System Settings: the Calendars pane there
lists no app that has never asked, so a notDetermined state that could only be sent to Settings was
a dead end. Both entry points funnel through CalendarCoordinator.setCalendarEnabled, so Tinycast's
dialog still comes first. It answers whether access was granted, and the pane then asks the main app to
read access again, since a grant can leave the switch where it was. A denial is the one state that Settings alone can undo, and both panes send
it there.