Skip to content

feat(google): namespace calendar and tasks channel ids on saved links - #383

Merged
KrisBraun merged 3 commits into
mainfrom
calendar-channel-namespacing
Aug 7, 2026
Merged

feat(google): namespace calendar and tasks channel ids on saved links#383
KrisBraun merged 3 commits into
mainfrom
calendar-channel-namespacing

Conversation

@KrisBraun

Copy link
Copy Markdown
Contributor

Summary

The combined Google connector registers its channels under product-namespaced ids (calendar:<id>, tasks:<listId>) but stamped RAW provider ids on the links it saves, so a saved link's channelId never matched the connector's registered channels. This PR aligns them at the host seam:

  • New withNamespacedChannelIds wrapper: the calendar and tasks hosts hand their products an integrations tool whose saveLink/saveLinks namespace link.channelId on the way out. Products keep using raw provider ids internally — no churn in the sync code.
  • archiveLinks({channelId}) filters match BOTH forms during the transition, so links saved before this change still archive on channel disable.
  • Token reads (get) and channelSyncCompleted pass through untouched.
  • Mail is deliberately excluded: a mail thread can carry many labels at once, so mail links stay channel-agnostic by design.
  • Compose fix: onCreateLink for tasks receives the registered (namespaced) channel id from the picker; it now parses the raw list id for the Google Tasks API call and stamps the raw id into meta.listId so status write-back routes correctly. Raw ids pass through unchanged.

Test plan

  • Unit coverage for the wrapper (namespacing, no double-prefix, colon-bearing raw ids, null channel ids, dual-era archive filters, pass-through methods).
  • Host-seam tests constructing the connector: calendar saveLinks and tasks saveLink/archiveLinks reach the platform namespaced; token reads stay raw.
  • Compose tests: namespaced and raw draft channel ids both resolve the raw list id.
  • Full google connector suite green (406 tests), tsc --noEmit clean, plot lint clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FHoQc2TdA62Wp4BwUxvR6P

KrisBraunand others added 3 commits August 7, 2026 08:55
Adds a host-seam wrapper for the integrations tool so links saved by the
calendar and tasks products carry product-namespaced channel ids
(calendar:<id>, tasks:<id>), matching how this connector registers its
channels. Products keep raw provider ids internally. archiveLinks filters
match both eras during the transition. Mail is deliberately excluded so
mail links stay label-agnostic.
Claude-Session: https://claude.ai/code/session_01FHoQc2TdA62Wp4BwUxvR6P
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
… ids
The compose picker hands onCreateLink the registered channel id, which
this connector namespaces (tasks:<listId>); the Google Tasks API needs
the raw list id, and the link's meta.listId feeds the status write-back.
Parse once at the entry; raw ids pass through unchanged.
Claude-Session: https://claude.ai/code/session_01FHoQc2TdA62Wp4BwUxvR6P
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@KrisBraun
KrisBraun merged commit 80625a7 into mainAug 7, 2026
1 check passed
@KrisBraun
KrisBraun deleted the calendar-channel-namespacing branch August 7, 2026 13:13
Sign up for freeto 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

@KrisBraun