Skip to content

Let the platform hold RSVP notes whose event has not synced yet - #363

Merged
KrisBraun merged 2 commits into
mainfrom
feat/defer-until-thread-connector
Aug 3, 2026
Merged

Let the platform hold RSVP notes whose event has not synced yet#363
KrisBraun merged 2 commits into
mainfrom
feat/defer-until-thread-connector

Conversation

@KrisBraun

Copy link
Copy Markdown
Contributor

Follow-up to #361, which added NewNote.deferUntilThread. This makes the Gmail
connector use it and deletes the hold-and-retry machinery it was carrying.

What changes

An attendee's RSVP is folded onto the event's thread. When the event has not
synced yet, the connector used to store the message, poll for the event, and
retract the standalone email thread once the fold succeeded — roughly 330 lines
of bookkeeping (drainPendingRsvpsFn, a pending record, a store prefix and a
TTL). All of it is gone; the note now sets deferUntilThread and the platform
holds it.

Behaviour change worth reviewing

A fold miss previously left the RSVP visible as its own email thread until the
retry succeeded. Now the message is folded away regardless, so a conversation
that is nothing but responses produces no thread at all and the note is
invisible until the platform attaches it.

Two consequences, both documented in-code at the fold site:

  • If the platform's hold breaks, the response is lost silently rather than
    degrading to a visible-but-misfiled email thread.
  • If the event's calendar is never synced by Plot at all — the account has mail
    connected but not that calendar — nothing will ever carry the event's
    identifier, so the held note ages out and the response is dropped. This is
    an accepted trade, not an oversight.
    It replaced a fallback that kept the
    response visible and retried for longer.

Also fixed

recordRsvpOutcome is no longer gated on the note having saved. Reversal
tracking (a decline followed later by an acceptance) reads state written by
that call, and a deferred note returns no id — so gating on it would have meant
a deferred decline never recorded its state, and a later genuine acceptance
would have been silently treated as a bare acceptance and suppressed. The
outcome records the attendee's actual response, which is the right source of
truth whether or not the note itself is held.

Verification

376 tests pass; tsc --noEmit clean. Rebased onto current main, so it carries
the connector-emitted mail signals work from #359 — the fold and the
classification-parent selection interact correctly: a deferred RSVP is excluded
from being picked as the classification parent, which is what you want, since
its note is dropped from the email thread either way.

Attendee responses to a calendar invite fold onto the event's thread.
When the event hasn't synced yet, the note is now parked by the
platform (deferUntilThread) and attached automatically once the event
arrives, instead of the connector tracking and retrying it itself.
As a result, a Gmail conversation made up entirely of RSVP responses
never creates a standalone email thread, even while its event is still
missing — previously the response stayed visible there as a fallback.
The response is expected to land on the event eventually; a bug in the
platform's attach step would lose it silently rather than leave it
visibly stranded.
@KrisBraun
KrisBraun merged commit 486fcf2 into mainAug 3, 2026
1 check passed
@KrisBraun
KrisBraun deleted the feat/defer-until-thread-connector branch August 3, 2026 03:45
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