Skip to content

Fix provider calendar source names on event cards - #2192

Open
martin-forge wants to merge 1 commit into
callumalpass:mainfrom
martin-forge:martin-forge/fix-provider-calendar-source-names
Open

Fix provider calendar source names on event cards#2192
martin-forge wants to merge 1 commit into
callumalpass:mainfrom
martin-forge:martin-forge/fix-provider-calendar-source-names

Conversation

@martin-forge

@martin-forge martin-forge commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Problem

Agenda and list cards already use their metadata line for the source calendar: ICS events show the subscription name, while the calendar icon separately identifies the row as a calendar event.

Google and Microsoft events missed that lookup and fell back to the generic "Calendar" label, even when TaskNotes already knows the calendar's name. With several provider calendars visible at once, every one of those rows reads "Calendar".

Fix

Resolve provider-owned events through CalendarProviderRegistry, so the existing source field can show names such as Personal or Work. Google's primary alias is mapped to the primary calendar's metadata, since events on the default calendar report that alias rather than the calendar's own id.

Unchanged: the calendar-event icon label, ICS subscription names, and the translated fallback for events that neither a subscription nor a provider owns.

Both card paths already look the subscription up for the event colour, so that result is passed through rather than repeated — no extra lookup is added to card render or update.

Validation

npm test -- tests/unit/issues/issue-provider-calendar-source-name.test.ts
npm run typecheck
npm run lint
npm run build

Rebased on current main.

Agenda and list cards already use their metadata line for the source calendar:
ICS events show the subscription name, while the calendar icon separately
identifies the row as a calendar event.

Google and Microsoft events missed that lookup and fell back to the generic
"Calendar" label even when TaskNotes knows the calendar name. Resolve
provider-owned events through CalendarProviderRegistry so the existing source
field can show names such as Personal or Work. Google's primary alias maps to
the primary calendar's metadata.

The calendar-event icon label, ICS subscription names, and the translated
fallback are unchanged.
@martin-forge
martin-forge force-pushed the martin-forge/fix-provider-calendar-source-names branch from c08a27a to df9888a Compare August 21, 2026 21:57
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.

1 participant