Skip to content

Add a redesigned calendar and native Google integration - #300

Merged
huacnlee merged 26 commits into
huacnlee:mainfrom
klaudworks:feat/calendar-workspace
Sep 30, 2026
Merged

huacnlee merged 26 commits into
huacnlee:mainfrom
klaudworks:feat/calendar-workspace

Conversation

@klaudworks

@klaudworks klaudworks commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

A more complete calendar in Omamail

This PR redesigns the calendar: clearer views, easier navigation, better event editing, and useful reminders. Google Calendar is the first provider with the deeper native integration in this work, including calendar discovery, attendance updates and event management.

The redesigned views and navigation apply to the calendar as a whole. New drag/resize writes and desktop reminders are Google-only; other providers retain their existing, more limited create/edit/delete behavior. Google-specific features are called out below.

1. A clearer month view

Multi-day events now form one continuous bar, with continuation marks when they cross a week boundary. Overlapping trips and all-day events get separate rows. The month uses five or six weeks as needed, with lighter grid lines, a clearer today marker and more room for events.

Narrow Month rows put the event title before the time, so a short cell still tells you what is happening. Busy-day previews show the event count and cap their height, with a visible scrollbar for longer lists.

Before/after: narrow Month titles and a long busy-day preview

Narrow Month — title first instead of a time taking most of the row.

Narrow Month before and after

Busy-day preview — bounded height, event count and scrolling.

Long overflow preview before and after

The same synthetic month is shown in both images. Look at Lakeside holiday, Design sprint and Design conference: repeated daily blocks become readable spans.

Before After
Month before: repeated daily blocks and fixed six-week grid Month after: continuous multi-day bars, separate overlap rows and lighter grid

See everything on a busy day

Hover a day with “+ more…” to see its complete event list. The day stays highlighted, entries can be opened directly, and longer lists scroll. You can inspect a busy day while keeping the rest of the month in view.

Here, Friday has eight events across three calendars. The after image shows all eight, alongside the multi-day bars and redesigned month layout.

Before: hovering leaves the extra events hidden After: a full-day preview opens
Busy-day hover before Busy-day hover after: eight events with names and time ranges

2. Better Day and Week views

  • A permanent all-day lane. Click or drag in it to create an all-day event, even when the lane is empty.
  • Continuous bars at the top. Multi-day all-day events and timed events lasting at least a full local day sit above the hourly grid. Timed events keep their original start/end times; this is a display change.
  • A clear distinction for timed spans. Top-lane timed events say “Timed”; the current-time line stays behind event cards so it cannot strike through a meeting title.
  • Readable overlaps. Simultaneous meetings use separate columns and can be selected independently.
  • All 24 hours are reachable. Day and Week open around the morning and scroll from midnight to midnight.
  • Clearer interaction. Drag to create a time range. On Google calendars, move an event or resize either edge; a preview shows the change and failed saves restore the previous position. Other providers change event times through their existing editor.

This comparison combines a long timed conference, a two-day workshop, a birthday, overlapping meetings and the current-time indicator.

Before After
Week before: the long conference fills the hourly grid and all-day events repeat per day Week after: continuous top-lane bars and separated overlapping meetings
Before/after: an empty all-day lane is still useful

The same week with the top-lane events removed. The new lane remains available for click/drag creation.

Before After
Empty all-day lane before Empty all-day lane after

Navigation that takes less space

Before/after: timed-span labels and a readable current meeting

Week label and current-time refinements

Day, Week, Month and Agenda share one dropdown, with their keyboard shortcuts shown beside them. Previous/next arrows surround the date, clicking the date opens a picker, and Today sits alongside it. The separate Create event button is replaced by direct calendar interaction and the existing keyboard shortcut.

Agenda lists upcoming and ongoing events. Finished events drop out automatically.

Screenshots: Day, Agenda and the date picker

These are new views/states; the Week comparison above shows the previous calendar experience.

Day

Day view

Agenda

Agenda view

Date picker

Date picker

3. A more capable event editor

The editor brings the calendar, dates, times and event options together:

  • Choose the destination calendar, grouped by account.
  • Set separate start/end dates and switch between timed and all-day events.
  • Keep a clearly labelled Description directly below the title.
  • Suggest guests by name or address from the same known email contacts as the mail composer. Choose with a click or Up/Down and Enter; already-added addresses are excluded.
  • Edit the location, description, guests, time zone, availability, privacy and reminders where supported.
  • Add Google Meet and edit supported repeating-event rules. Advanced recurrence rules are preserved.
  • Press Enter to save and close. Invalid ranges show an error and prevent saving; a failed save keeps the form open.
  • Keep Save, Cancel and save errors in a fixed footer, even when the form scrolls. Keyboard-focused fields and guest suggestions scroll into view.
  • See persistent field labels, an explicit local-time indicator and reminder units. Time zone, availability and visibility live under More options.
Before After
Event editor before Event editor after

A compact form with visible feedback

Description sits directly below Title with a persistent label. Typing a guest's name or email shows the same contact suggestions as composing mail. Enter chooses a suggestion while the list is open; Escape dismisses it without closing the event. Choosing a guest inserts only the email address and never submits the event.

Before/after: persistent labels, simpler default form and fixed action footer.

Editor before and after

Before/after: a failed save in the same 660 × 900 window. The error was below the scrolling viewport; it is now visible beside the save actions without manual scrolling.

Failed save before and after

More editor comparisons: guest suggestions, reminder units and dark theme

Guest suggestions before and after

Custom reminder units before and after

Dark editor before and after

4. Google integration that updates the actual calendar

This goes beyond displaying Google events:

Action What Omamail now does
Connect calendars Finds the account's calendars, including shared and hidden entries. Lets you choose which to show and respects read-only access.
Answer an invitation in mail Yes / Maybe / No updates your own attendance in Google Calendar, then reads the event back to confirm the result. The native RSVP path does not send a second reply email.
Reopen an invitation or event Refreshes attendance and guest details, so the displayed answers can follow changes made elsewhere.
Edit or move an event Saves changes to the selected Google calendar. Supports moving eligible organizer-owned events between calendars in the same account.
Change an event with guests Offers a choice to notify guests or save without sending an update. Deletion has the same notification choice.
Work with a repeating event Loads the parent when editing the whole series and preserves existing recurrence exceptions.
Undo a supported change Checks the event revision before writing, to avoid overwriting a newer change.
Open meeting details Shows guest response states and the meeting link, with a copy action.

If an invitation cannot be matched to Google Calendar, or the connected backend is API 5, Omamail offers Open Calendar and clearly labelled email-only responses. An email-only reply does not mark Calendar attendance as confirmed. Gmail-generated travel events also explain their editing restrictions instead of offering unsupported time changes.

Before/after: Gmail invitations on the pinned API-5 backend

The API-5 backend cannot execute native attendance updates. The invitation now offers explicit email-only responses instead of native choices that fail. These synthetic production-component captures use identical 900 × 600 dimensions, Solarized Light and scale 1; baseline 76c4e3a.

Before After
Before: unavailable native attendance choices on API 5 After: clearly labelled email-only replies

The fallback shows one clear set of response choices. Event details put Join meeting and Edit near the title, followed by the description and guests. One Delete... control reveals the notification/series choices before the existing confirmation dialog.

Before/after: meeting details, delete choices and email-only invitation fallback

Narrow meeting details before and after

Delete choices before and after

Invitation fallback before and after

Screenshot: guest responses and meeting details

Guest response states and meeting link

This synthetic capture illustrates the UI. It is not evidence of a live Google RSVP round trip; testing and remaining checks are listed below.

Other providers keep their limited behavior

Microsoft/Outlook, iCloud and generic CalDAV keep the shared redesigned views and their existing basic event operations, with read-only and recurring-CalDAV restrictions preserved. Deep native attendance, transfers and advanced Google options remain Google-specific. New drag/resize writes and desktop reminders are explicitly restricted to Google, including polling and candidate generation: previously saved non-Google reminder settings cannot enable them. Microsoft creation omits the unsupported Repeat control and ignores stale repeat state after switching calendars.

This is a compatibility boundary, not an expansion of the other provider adapters. Inherited limitations remain, including Outlook's preview-based description editing and incomplete attendee-status normalization; the new gestures no longer expose that editing path.

Before/after: limited Microsoft editor and calendar settings

Synthetic production-component captures at identical 1000 × 1100 dimensions, Solarized Light, font base 14 and scale 1; baseline c50c3f1. The Microsoft editor no longer offers repetition that saving would reject. Settings remove non-Google reminder controls, including the global reminder section when no Google calendar is connected.

Microsoft editor — before Microsoft editor — after
Microsoft editor before Microsoft editor after
Microsoft settings — before Microsoft settings — after
Microsoft settings before Microsoft settings after

5. Clearer setup and reminders

Settings now start with accounts and use one calendar list for visibility and reminder preferences. Each account has a dropdown for its default calendar for new events. Default-calendar and reminder settings can be saved for any available account, even when another mailbox is selected; event writes retain their mailbox scope. Google setup reuses the Gmail account and shared OAuth client, with specific actions to retry discovery, sign in again or enable the Calendar API.

Google desktop reminders have a global on/off switch, per-calendar timing and a snooze duration. They run while Omamail is running, even with its window closed. Hiding a Google calendar does not turn off its reminders. Google event reminders respect events that explicitly have no reminders.

Notifications request Open, Snooze and Dismiss, but some desktop notification cards expose only the default action. Delivered reminders therefore also appear in the calendar and matching event details, with visible Snooze and Dismiss buttons. Opening a notification no longer dismisses its reminder. Failed reminder actions leave the controls available with an error; successful actions remove the notice. Old notification callbacks cannot acknowledge a newer delivery in the same running instance.

A private persistent ledger prevents duplicate claims across shell and standalone instances. Each due event retains its own details and independent actions: dismissing one cannot dismiss or cancel another event's snooze, including records from an older grouped ledger. Reaching the desktop notification-process limit does not remove events from the in-app inbox. The in-app action list is session-local; restoring that list across restarts and cross-instance action synchronization remain runtime verification gaps.

Before/after: two reminders due in the same poll

The grouped response exposed only the first event and a count. Each event now has its own title, Open, Snooze and Dismiss controls. These synthetic production-component captures replay the old and new response shapes for the same events at identical 900 × 600 dimensions, Solarized Light and scale 1; baseline 76c4e3a.

Before After
Before: second event hidden behind a count After: both events independently actionable

Before/after: reminder actions in narrow event details.

Reminder event actions before and after

Reminder actions in the calendar and a failed-action state

Calendar reminders before and after

After: failure keeps the reminder and its actions available.

Reminder action error

Before After
Calendar settings before Calendar settings after
More setup screenshots: connected accounts, selection, recovery and narrow layouts

These pairs show the final settings refinement compared with the earlier version of this calendar implementation.

State Before refinement After refinement
One list for each account's calendars Connected before Connected after
First-time setup Initial before Initial after
Choose calendars Selection before Selection after
Recover from a connection error Recovery before Recovery after
Narrow settings Narrow before Narrow after

Reminder timing: Off, Use Google event reminders, or Custom timing.

Expanded reminder options

Testing and review status

Latest diagnostics repair (63b6716): added the backend’s calendar_organizer_mismatch identifier to the exact diagnostics allowlist, fixing the portable-test failure on d393151. The full portable shell suite and full make validate pass locally on this head. Fresh CI is pending; earlier green runs do not establish the status of this commit.

Validation: Full make validate passes for 3704706: Rust, JavaScript, shell/source checks, QML suites, standalone UI tests, QML lint and plugin validation. Both the development API-6 contract and pinned 0.10.7/API-5 released contract pass. Regression tests first failed against the original implementation, then passed for API-5 email-only replies, settings for another account, all-day drag moves across spring/autumn DST, and independent simultaneous reminders. The reminder tests also cover legacy grouped records and retaining inbox entries when the desktop process limit is reached. Provider-limit, editor interaction, reminder retry/stale-callback and event-identity coverage remain included. All 85 synthetic audit after captures, four provider-limit images and four review-repair images were inspected. This follow-up has not been installed locally. Cross-platform CI for 3704706 is pending.

Previous cross-platform CI passed all 14 checks, including both macOS jobs, Linux/Windows standalone apps and backends, native credential contracts, portable tests and published/unreleased backend gates. Results for the newly pushed head must be checked separately.

The concurrency regression reproduced a first lock-file creation failure on macOS with OS error ENOENT, matching the documented Darwin openat(O_CREAT) create-or-open race (upstream report). The fix uses exclusive creation followed, only on EEXIST, by a non-creating open of the existing lock file. Both calls remain descriptor-relative and no-follow; ownership, link-count, private-mode and ACL validation still precede locking. Concurrent initialization, reminder claims and unsafe-existing-lock regressions now pass in macOS CI as well as locally.

Focused tests cover multi-day layout, overlap selection, full-day scrolling and 23:00 event creation, drag/resize rollback, Enter-to-save, invalid dates, timed/all-day request conversion, discovery recovery, attendance handling and reminder behavior. One user-requested calendar transfer was also checked against Google with a follow-up read.

Ready for review; remaining verification: broader live Google checks remain, especially attendance matching outside the primary calendar, recurrence exceptions, all-day conversion and partial-transfer/Undo behavior. Reminder restart, suspend, cross-instance actions and Do Not Disturb behavior also need more runtime coverage. Desktop notification delivery is currently Linux-specific. Synthetic invitation and reminder interaction screenshots are included above; these do not establish live provider or desktop lifecycle behavior.

Implementation and security notes for reviewers
  • Calendar sources, caches and selections retain account/calendar identity. Google discovery keeps access, time-zone, reminder and conferencing metadata; older backend versions are gated from unsupported features.
  • Native attendance writes validate the responding attendee, use event revision checks and confirm the result by reading it back. The current lookup starts with the primary calendar copy.
  • Reminder fetching is independent of the visible date range. A private, locked, atomically written ledger records claims, snoozes and dismissals.
  • Concurrent first-time lock creation avoids Darwin's create-or-open race. Regression coverage includes concurrent initialization and refusal of symlinks, hard links, non-private files and macOS ACL grants without modifying rejected entries.
  • API-6 methods and contract cases are included. The published backend pin and version/API handshake are preserved.
  • Scoped tests cover origin/TLS/redirect restrictions, identity refusal, unsafe reminder-storage paths and notification escaping/actions. The macOS fixture resolves the trusted temporary parent and sets private fixture permissions; production storage checks remain unchanged.

Security verdict: NOT VERIFIED for release. The scoped checks pass, but the complete new Google integration and reminder lifecycle still need the runtime evidence described above before approval.

About the screenshots

All images are synthetic Qt component captures using production calendar components and standalone UI adapters, with synthetic accounts/events and Solarized Light colours. They are not private live-mail screenshots. PNGs are uploaded to GitHub attachments and are not committed.

Each before/after pair uses the same events, dates, window dimensions, theme, font size and scale. Main Month/Week scenes are 1440 × 1000, font base 14, scale 1. Editor/settings and additional view captures are 1200 × 1000. Settings-refinement pairs are 1000 × 1200, or 660 × 1200 for the narrow view.

The main baseline is the pre-workspace calendar at d583ab6; settings-refinement pairs use 976c97a. Before/after hover captures place the pointer over the same busy date. Week captures show each version's initial presentation of the same date range; the redesign's morning scroll position and long-event placement are intentional differences.

The labelled side-by-side audit comparisons use 612a92a as their baseline. Each half retains the same dimensions, fixture state, theme and scale: 1200 × 1100 for the editor, 660 × 900 for save failure and narrow details, 660 × 1000 for narrow Month, 1440 × 1000 for Week, and 900 × 700 for the invitation fallback. Dark editor and reminder/overflow comparisons use 1200 × 1000. The evidence includes 85 after-state captures and matched baselines; images were reviewed at contact-sheet and full resolution. No real event or RSVP mutation was made for this audit.

Release Notes

  • Redesign the calendar with clearer Month and Week layouts, Day and Agenda views, simpler navigation and full-day scrolling.
  • Show continuous multi-day events, a permanent all-day lane and complete busy-day hover previews.
  • Improve event creation and editing with multi-date ranges, richer options and Enter-to-save validation; enable drag/resize changes for Google events.
  • Suggest calendar guests from known email contacts and place a clearly labelled description below the event title.
  • Keep event save controls and errors visible, label reminder units, and simplify meeting details and invitation fallback choices.
  • Add deeper Google Calendar integration for calendar selection, event management, attendance updates and guest response details.
  • Simplify calendar settings and add Google desktop reminders with snooze and dismiss actions.
  • Preserve other calendar providers' existing limited event operations without offering Google-only gestures or reminders.
  • Make delivered reminders actionable inside the calendar even when the desktop notification omits action buttons.
  • Keep Gmail email-only invitation replies available on the pinned backend, save calendar preferences across accounts, and preserve all-day dates when dragging across daylight-saving changes.
  • Keep simultaneous reminders independently visible and actionable, including when the desktop notification-process limit is reached.

@klaudworks klaudworks changed the title Add Google Calendar workspace, attendance and desktop reminders Add a redesigned calendar and native Google integration Sep 28, 2026
@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

CI failed at 918c9d3 (run). What each failed gate needs:

Portable tests failed

The Rust, JavaScript and portable shell suites, the release checks or the contract inventory did not pass. Run the same set locally and read the first failing name in the log:

make test-rust test-js test-shell-portable
python3 tests/test_backend_release.py
python3 app/tests/test_release_workflow.py
python3 scripts/package-backend.py check-api
git diff --check

Fix, push, and the gates run again; this comment updates itself.

@klaudworks
klaudworks marked this pull request as ready for review September 28, 2026 20:40
@klaudworks klaudworks closed this Sep 29, 2026
@klaudworks klaudworks reopened this Sep 29, 2026
klaudworks and others added 8 commits September 29, 2026 09:25
… UID

A UID is not a secret: anyone who saw one invitation can mail another
naming the same UID. calendar.attendance now takes the invitation's
organizer and refuses the calendar copy, before any read-back or PATCH,
when its organizer differs. An invitation naming no organizer makes no
request, and a mismatch offers only the explicit email reply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Discovery lists calendars other people shared, and their owners choose
the names. The settings rows now draw the name and the source detail as
plain text, and test_qml_text_format.py treats a model's `name` and
`sourceDetail` as untrusted so a later row cannot drop it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pinned API 5 backend sends neither sendUpdates, conferenceDataVersion
nor If-Match, so an event created there saved without its Meet link and
added guests without telling them, and a drag overwrote edits made
elsewhere. The composer offers these controls only with the API 6
backend, the controller refuses them rather than dropping them, and
drag moves go through CalendarController.rescheduleRefusal, which
requires it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CalendarController.undoChange outlived an account switch, so `u` in
account B quietly reverted the last edit made in account A. The undo
now records the calendar scope it was made in; a write finishing after
the view moved offers none, and an undo from another scope is dropped
without a request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ry minute

The minute refresh reassigned CalendarController.events even when
nothing had changed, so every month and week delegate and the busy-day
preview were rebuilt on the shell's GUI thread, and the agenda's model
was recomputed on every clock tick. The controller now replaces the list
only when Calendar.sameEvents says it differs, and the agenda keeps its
model until the events it shows change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The month overflow preview was a QQC.Popup, and an open Popup takes
every key before the window's shortcuts, focused or not. Resting the
pointer on a busy day silenced j, k, t and the view keys until it left.
The preview is now an item drawn above the window, and Escape closes it
through goBack() via CalendarView.dismissPreview.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… access

OAuth.SCOPES asks for calendar.calendarlist.readonly and AuthManager
refuses a grant without it, but finish_google checked only the mail and
calendar event scopes, so the two sign-in paths disagreed about what a
usable grant was.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
huacnlee
huacnlee previously approved these changes Sep 29, 2026
huacnlee and others added 5 commits September 29, 2026 18:36
A bundled runtime accepted exactly the pinned API 5, while `make app-run`
bundles the backend this checkout builds, which answers with the
unreleased API 6 step, so the handshake reported "Incompatible backend".
Bundled mode now accepts the same one step past the pin the plugin does;
features keep gating on the API the connected binary reports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Calendar settings drew binary settings as "✓ Show in calendar" buttons,
reminder timing as a "Desktop reminders: ..." button that disclosed a
dropdown, and listed every calendar under a repeat of its account
address. CalendarSettings now uses the rows the rest of the settings
page uses: CALENDARS lists each mailbox with its calendars beneath it,
each with a colour and a visibility switch; NEW EVENTS holds one default
calendar row per account; REMINDERS holds the desktop reminder switch,
the snooze minutes and one timing row per Google calendar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e dropdown

A Google primary calendar is named after its address, so the account
row, the calendar row, the default picker and the reminder row all
repeated it; CalendarSettings.displayName calls it Primary beside its
account. The account action now reads Refresh calendars whenever the
account lists calendars, the colour dots sit on the account title's
edge, and the default calendar row appears only where there is a
choice. The standalone app gains an Omamail ComboBox style: one
chevron, body-small text, the shared state fills, the selected fill
while its list is open, and option rows marked with a check rather
than the accent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Event details drew Delete... as a toggle that disclosed up to three red
buttons, each opening the confirmation again, and the detail view read
the parent series itself. The details now hold one Delete... that opens
ConfirmDeleteDialog, which names the event and offers a button per
consequence from Calendar.deleteRequest: without email, notifying
guests, one occurrence or the series, with the last as the default.
CalendarController.deleteRequest, confirmDelete and deleteSeries own the
decision, so App.qml only relays it. The details also drop the colour
bar, set guest names below the title's weight and give Copy location a
copy icon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The editor labelled its calendar with an upper-case eyebrow, its dates
with a wider left column and every other field with a label above it,
so the form had three label styles and two left edges; the location's
placeholder repeated its label; and Create event, the action Enter
takes, looked like every other button. Every field is now labelled
above on one edge, the location field suggests what to type, and the
save action carries the accent on its edge and text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
huacnlee
huacnlee previously approved these changes Sep 29, 2026
@huacnlee
huacnlee merged commit af8a7ae into huacnlee:main Sep 30, 2026
14 checks passed
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.

2 participants