Skip to content

fix(google-calendar): resolve the primary calendar alias in every lookup - #2309

Merged
callumalpass merged 1 commit into
callumalpass:mainfrom
martin-forge:martin-forge/fix-google-primary-calendar-lookups
Sep 13, 2026
Merged

fix(google-calendar): resolve the primary calendar alias in every lookup#2309
callumalpass merged 1 commit into
callumalpass:mainfrom
martin-forge:martin-forge/fix-google-primary-calendar-lookups

Conversation

@martin-forge

@martin-forge martin-forge commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

When a Google calendar is enabled using the primary alias, fetched events carry that alias while the calendar list uses the account’s actual ID. Direct ID lookups then lose the calendar’s colour and name, and its visibility toggle fails to hide its events.

This change shares the alias lookup across calendar views, event cards and linked notes, and registers visibility toggles under both IDs. Event and subscription IDs stay unchanged so existing linked notes continue to resolve.

Validation:

  • Regression tests cover alias and real-ID lookup, calendar colours and visibility toggles; the colour regression fails on the original base.
  • Targeted calendar tests, ESLint and npm run build:test pass.
  • Previously reproduced against a real account: alias-fetched events use the calendar’s own colour after the fix.

Rebased onto current main; the release-note conflict is resolved and unrelated formatting changes have been removed.

@martin-forge
martin-forge force-pushed the martin-forge/fix-google-primary-calendar-lookups branch from fe23007 to 7ee6d40 Compare September 9, 2026 20:00
@martin-forge martin-forge changed the title Resolve Google's primary calendar alias in every lookup fix(google-calendar): resolve the primary calendar alias in every lookup Sep 9, 2026
A Google calendar enabled as `primary` is fetched under that alias, so its
events carry `primary` as their calendar id while the calendar list reports the
account's real id. Event cards already reconcile the two; three other lookups
compared ids directly and missed.

The calendar's own color was replaced by the default Google blue, its
per-calendar visibility toggle matched nothing and so never hid anything, and
mini calendar entries and event-linked notes fell back to the generic provider
name.

Resolve the alias through one shared helper, and register the account's own
calendar under both keys when building visibility toggles. Event and
subscription ids are unchanged, so notes already linked to alias-fetched events
still match.
@martin-forge
martin-forge force-pushed the martin-forge/fix-google-primary-calendar-lookups branch from 7ee6d40 to f4e3f17 Compare September 11, 2026 10:50
@callumalpass
callumalpass merged commit 17bc17c into callumalpass:main Sep 13, 2026
2 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