From 309bcbd6dd0db0056204b37fa4b36b364e977f7e Mon Sep 17 00:00:00 2001 From: Kris Braun Date: Mon, 3 Aug 2026 00:41:03 -0400 Subject: [PATCH] feat(twister)!: remove cta from the note type The ephemeral one-time-code prompt it fed has been retired and the value is no longer stored. Detection of one-time-code and confirmation mail during classification is unchanged. --- .changeset/remove-note-cta.md | 10 ++++++++++ twister/src/facets.ts | 6 +++--- twister/src/plot.ts | 8 +------- 3 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 .changeset/remove-note-cta.md diff --git a/.changeset/remove-note-cta.md b/.changeset/remove-note-cta.md new file mode 100644 index 00000000..e65fa659 --- /dev/null +++ b/.changeset/remove-note-cta.md @@ -0,0 +1,10 @@ +--- +"@plotday/twister": minor +--- + +Removed: `cta` from the note type. + +The ephemeral one-time-code prompt this field fed has been retired, and the +value is no longer stored. Connectors that set it should remove the assignment; +the field is ignored in the meantime. One-time-code and confirmation mail is +still identified during classification — that detection is unchanged. diff --git a/twister/src/facets.ts b/twister/src/facets.ts index faaeccb1..3b162e8e 100644 --- a/twister/src/facets.ts +++ b/twister/src/facets.ts @@ -42,9 +42,9 @@ export type ThreadFacets = { }; /** - * A time-sensitive call-to-action extracted from a message (e.g. an OTP code - * or a "confirm your account" link). Carried on a note so the client can show - * an ephemeral prompt. Heuristic + best-effort; null when nothing confident is + * A time-sensitive call-to-action detected during classification (e.g. an OTP + * code or a "confirm your account" link), used to identify one-time-code and + * confirmation mail. Heuristic + best-effort; null when nothing confident is * found. Link (`url`) is only ever populated for DMARC-authenticated mail. */ export type CtaKind = "otp" | "confirm"; diff --git a/twister/src/plot.ts b/twister/src/plot.ts index 1f9ceb9d..3d0962d1 100644 --- a/twister/src/plot.ts +++ b/twister/src/plot.ts @@ -1,4 +1,4 @@ -import type { Cta, ThreadFacets } from "./facets"; +import type { ThreadFacets } from "./facets"; import type { NewSchedule, NewScheduleOccurrence, Schedule } from "./schedule"; import type { LinkSignals } from "./signals"; import { type Tag } from "./tag"; @@ -793,12 +793,6 @@ export type Note = ThreadCommon & { recipients?: ResolvedRecipient[] | null; /** Focus twist IDs (twists/connectors) mentioned for dispatch routing. Does not include user contacts. */ mentions: ActorId[]; - /** - * A time-sensitive call-to-action extracted from this note's message - * (OTP code or confirm link). Null when none detected. Set by the runtime - * from the connector's extraction; clients read it to show an ephemeral prompt. - */ - cta: Cta | null; /** Group this note belongs to within its thread (e.g. a Trello checklist id). Null = ordinary note. */ sectionKey: string | null; /** Display label for the group (e.g. the checklist name). */