Skip to content

Add NewNote.deferUntilThread - #361

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

Add NewNote.deferUntilThread#361
KrisBraun merged 2 commits into
mainfrom
feat/defer-until-thread-sdk

Conversation

@KrisBraun

Copy link
Copy Markdown
Contributor

Adds NewNote.deferUntilThread.

A note addressed by { source } resolves immediately in the normal case, and
saveNote returns null when no thread carries that source — which for a
connector usually means the item the note belongs to has not synced yet,
often because a different product syncs it and lags. Today that leaves each
connector to build its own hold-and-retry store.

With this flag set, the platform holds the note and attaches it as soon as a
thread with that source appears.

When not to set it

Leave it unset when a miss means the note is genuinely undeliverable — null
is then the signal you want, and holding the note would accumulate payloads
for a thread that will never arrive. The JSDoc spells this out, along with two
properties worth knowing before you rely on it:

  • Held notes are dropped after a bounded retry window.
  • Ordering is not guaranteed relative to notes that attached immediately, so
    set created (as connectors already should) rather than relying on arrival
    order.
  • At most one UNKEYED held note survives per { source }: a second unkeyed
    note to the same unresolved source replaces the first. Give each a distinct
    key if you may defer more than one.

Scope

Type and documentation only — no runtime behaviour ships with this. It is
deliberately separated from the connector change that uses it so the platform
side can land and deploy first.

@KrisBraun
KrisBraun merged commit 0bbce19 into mainAug 3, 2026
1 check passed
@KrisBraun
KrisBraun deleted the feat/defer-until-thread-sdk branch August 3, 2026 02:48
@plot-app-builderplot-app-builderBot mentioned this pull request Aug 3, 2026
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