Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat(reminders): unify Reminders with independent completion and schedule controls (#7329)

gbirman0e66009cfe44
diff --git a/.sqlx/query-7ea81f3980153520f121d3b5c167d0cffe60e9446953f1ac5d62277d3f3002f9.json b/.sqlx/query-7ea81f3980153520f121d3b5c167d0cffe60e9446953f1ac5d62277d3f3002f9.json
new file mode 100644
index 0000000000..d7ff17027a
--- /dev/null
+++ b/.sqlx/query-7ea81f3980153520f121d3b5c167d0cffe60e9446953f1ac5d62277d3f3002f9.json
@@ -0,0 +1,113 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "\n WITH candidates AS (\n SELECT r.*, NOT (\n (r.completed_at IS NULL AND r.next_run_at <= $3)\n OR (r.enabled AND (r.completed_at IS NULL OR r.cron IS NOT NULL))\n ) AS history\n FROM reminder r\n WHERE r.user_id = $1\n AND ($2::bool IS NULL OR (r.completed_at IS NOT NULL) = $2)\n )\n SELECT r.id, r.description, r.entity_type, r.entity_id,\n r.remind_at, r.cron, r.timezone, r.next_run_at, r.enabled,\n r.completed_at, r.created_at, r.updated_at,\n d.\"fileType\" AS \"file_type?\", dst.sub_type::text AS \"sub_type?\",\n f.payload AS \"followup?\"\n FROM candidates r\n LEFT JOIN \"Document\" d ON r.entity_type = 'document'\n AND d.id = r.entity_id::text AND d.\"deletedAt\" IS NULL\n LEFT JOIN document_sub_type dst ON dst.document_id = d.id\n LEFT JOIN reminder_email_followup f ON f.reminder_id = r.id AND f.user_id = $1\n WHERE $4::bool IS NULL\n OR (r.history, r.next_run_at, r.created_at, r.id) > ($4, $5, $6, $7)\n ORDER BY r.history, r.next_run_at, r.created_at, r.id\n LIMIT $8\n ",
+ "describe": {
+ "columns": [
+ {
+ "ordinal": 0,
+ "name": "id",
+ "type_info": "Uuid"
+ },
+ {
+ "ordinal": 1,
+ "name": "description",
+ "type_info": "Text"
+ },
+ {
+ "ordinal": 2,
+ "name": "entity_type",
+ "type_info": "Text"
+ },
+ {
+ "ordinal": 3,
+ "name": "entity_id",
+ "type_info": "Uuid"
+ },
+ {
+ "ordinal": 4,
+ "name": "remind_at",
+ "type_info": "Timestamptz"
+ },
+ {
+ "ordinal": 5,
+ "name": "cron",
+ "type_info": "Text"
+ },
+ {
+ "ordinal": 6,
+ "name": "timezone",
+ "type_info": "Text"
+ },
+ {
+ "ordinal": 7,
+ "name": "next_run_at",
+ "type_info": "Timestamptz"
+ },
+ {
+ "ordinal": 8,
+ "name": "enabled",
+ "type_info": "Bool"
+ },
+ {
+ "ordinal": 9,
+ "name": "completed_at",
+ "type_info": "Timestamptz"
+ },
+ {
+ "ordinal": 10,
+ "name": "created_at",
+ "type_info": "Timestamptz"
+ },
+ {
+ "ordinal": 11,
+ "name": "updated_at",
+ "type_info": "Timestamptz"
+ },
+ {
+ "ordinal": 12,
+ "name": "file_type?",
+ "type_info": "Text"
+ },
+ {
+ "ordinal": 13,
+ "name": "sub_type?",
+ "type_info": "Text"
+ },
+ {
+ "ordinal": 14,
+ "name": "followup?",
+ "type_info": "Jsonb"
+ }
+ ],
+ "parameters": {
+ "Left": [
+ "Text",
+ "Bool",
+ "Timestamptz",
+ "Bool",
+ "Timestamptz",
+ "Timestamptz",
+ "Uuid",
+ "Int8"
+ ]
+ },
+ "nullable": [
+ false,
+ false,
+ true,
+ true,
+ true,
+ true,
+ true,
+ false,
+ false,
+ true,
+ false,
+ false,
+ true,
+ null,
+ false
+ ]
+ },
+ "hash": "7ea81f3980153520f121d3b5c167d0cffe60e9446953f1ac5d62277d3f3002f9"
+}
diff --git a/apps/web/src/components/ui/components/Tooltip.tsx b/apps/web/src/components/ui/components/Tooltip.tsx
index c93434982b..d7094ed197 100644
--- a/apps/web/src/components/ui/components/Tooltip.tsx
+++ b/apps/web/src/components/ui/components/Tooltip.tsx
@@ -22,6 +22,8 @@ type TooltipProps = ParentProps<{
/** Allows non-interactive tooltip targets, such as disabled actions, to receive keyboard focus. */
tabIndex?: number;
disabled?: boolean;
+ /** Override visibility, for example while a nested control has keyboard focus. */
+ open?: boolean;
}>;
export type TooltipClassOptions = {
@@ -45,6 +47,7 @@ export function tooltipClasses(options: TooltipClassOptions = {}): string {
export function Tooltip(props: TooltipProps) {
const [triggerRef, setTriggerRef] = createSignal<HTMLElement>();
const [open, setOpen] = createSignal(false);
+ const isOpen = () => props.open ?? open();
if (import.meta.env.MODE === 'test') {
return <>{props.children}</>;
@@ -109,7 +112,7 @@ export function Tooltip(props: TooltipProps) {
return (
<KobalteTooltip
- open={open()}
+ open={isOpen()}
onOpenChange={(isOpen) => {
setOpen(isOpen);
}}
@@ -133,7 +136,7 @@ export function Tooltip(props: TooltipProps) {
>
{props.children}
</KobalteTooltip.Trigger>
- <Show when={open()}>
+ <Show when={isOpen()}>
<KobalteTooltip.Portal>
<KobalteTooltip.Content class="z-tool-tip max-w-[calc(100vw-32px)]">
<Surface class={tooltipClasses()} depth={3}>
diff --git a/apps/web/src/features/entity/components/Badges.tsx b/apps/web/src/features/entity/components/Badges.tsx
index d70711c8da..c5042ef267 100644
--- a/apps/web/src/features/entity/components/Badges.tsx
+++ b/apps/web/src/features/entity/components/Badges.tsx
@@ -171,24 +171,6 @@ export function CallChannelNameBadge(props: { channelName: string }) {
);
}
-/**
- * How often a recurring reminder fires, e.g. "Every weekday at 9:00 AM".
- *
- * A reminder row shows its next firing in the timestamp column, which for a
- * recurring one says when it next comes due but not that it will come due
- * again. This is the part that says so.
- */
-export function ReminderRecurrenceBadge(props: { recurrence: string }) {
- return (
- <Badge
- class="max-w-40 min-w-0 shrink-0 normal-case font-sans text-ink-extra-muted border-edge-muted px-2"
- title={props.recurrence}
- >
- <span class="truncate">{props.recurrence}</span>
- </Badge>
- );
-}
-
export function CallDurationBadge(props: { duration: string }) {
return (
<Badge class="normal-case text-ink-extra-muted border-edge-muted px-2">
diff --git a/apps/web/src/features/entity/composed/ListEntity.tsx b/apps/web/src/features/entity/composed/ListEntity.tsx
index 9142fbf2c3..fa2560bb10 100644
--- a/apps/web/src/features/entity/composed/ListEntity.tsx
+++ b/apps/web/src/features/entity/composed/ListEntity.tsx
@@ -1,5 +1,6 @@
import './ListEntity.css';
import { useMaybeSoupView } from '@app/features/next-soup/soup-view/soup-view-context';
+import { ReminderRowSchedule } from '@app/features/reminders/views/reminder-row-schedule';
import { useFeatureFlag } from '@app/lib/analytics/posthog';
import {
SwipableRow,
@@ -37,7 +38,11 @@ import {
isHitSnippetComplete,
isHitSnippetEntity,
} from '../extractors-search/snippet-entity';
-import { isChannelEntity, isEmailEntity } from '../types/entity';
+import {
+ isChannelEntity,
+ isEmailEntity,
+ isReminderEntity,
+} from '../types/entity';
import { isWithNotification } from '../types/notification';
import { isSearchEntity } from '../types/search';
import { createEntityDraggable } from '../utils/draggable';
@@ -96,6 +101,16 @@ export function ListEntity(props: ListEntityProps) {
const soupView = useMaybeSoupView();
const rowActions = children(() => props.actions);
const leadingAction = children(() => props.leadingAction);
+ const scheduleStatus = children(() => (
+ <Show when={isReminderEntity(props.entity) && props.entity}>
+ {(entity) => (
+ <ReminderRowSchedule
+ entity={entity()}
+ onToggleDone={props.onToggleReminderDone}
+ />
+ )}
+ </Show>
+ ));
const unread = () => unreadFilterFn(props.entity);
const isShared = useIsShared(props.entity);
@@ -153,6 +168,7 @@ export function ListEntity(props: ListEntityProps) {
entity: props.entity,
actions: !isTouchDevice() ? rowActions() : undefined,
leadingAction: !isTouchDevice() ? leadingAction() : undefined,
+ scheduleStatus: scheduleStatus(),
authorDisplayName: props.authorDisplayName,
checked: props.checked,
hideCheckbox: props.hideCheckbox,
@@ -252,6 +268,7 @@ export function ListEntity(props: ListEntityProps) {
<Match when={isTouchDevice() && mobileStacks().length > 0}>
<Entity.Notification.MobileStackRows
stacks={mobileStacks()}
+ scheduleStatus={scheduleStatus()}
entity={props.entity}
entityRowConfig={props.entityRowConfig}
/>
diff --git a/apps/web/src/features/entity/composed/list-entity/narrow-condensed-layout.tsx b/apps/web/src/features/entity/composed/list-entity/narrow-condensed-layout.tsx
index de6a06c2d1..072925a4fc 100644
--- a/apps/web/src/features/entity/composed/list-entity/narrow-condensed-layout.tsx
+++ b/apps/web/src/features/entity/composed/list-entity/narrow-condensed-layout.tsx
@@ -15,9 +15,9 @@ export function NarrowCondensedLayout(props: LayoutProps) {
'w-full gap-x-(--soup-row-column-gap) items-center pr-2 pl-(--soup-row-padding-l) grid text-sm'
)}
style={{
- 'grid-template-columns': 'var(--soup-row-indicator-width) 1fr',
+ 'grid-template-columns': 'var(--soup-row-indicator-width) 1fr auto',
'grid-template-rows': '36px',
- 'grid-template-areas': '"indicator title"',
+ 'grid-template-areas': '"indicator title timestamp"',
}}
>
<Entity.Slot placement="indicator" class="relative">
@@ -56,6 +56,7 @@ export function NarrowCondensedLayout(props: LayoutProps) {
)}
</Show>
</Entity.Slot>
+ <Entity.Slot placement="timestamp">{props.scheduleStatus}</Entity.Slot>
</Entity.Layout>
);
}
diff --git a/apps/web/src/features/entity/composed/list-entity/narrow-inbox-layout.tsx b/apps/web/src/features/entity/composed/list-entity/narrow-inbox-layout.tsx
index 4ba7030bc7..dc22e35e51 100644
--- a/apps/web/src/features/entity/composed/list-entity/narrow-inbox-layout.tsx
+++ b/apps/web/src/features/entity/composed/list-entity/narrow-inbox-layout.tsx
@@ -43,7 +43,8 @@ export function NarrowInboxLayout(props: LayoutProps) {
style={{
// A scheduled send's badge is wider than a date, so it sizes its column.
'grid-template-columns':
- isEmailEntity(props.entity) && props.entity.scheduledSendTime
+ props.scheduleStatus ||
+ (isEmailEntity(props.entity) && props.entity.scheduledSendTime)
? 'auto 1fr auto'
: 'auto 1fr 8ch',
'grid-template-rows': 'auto auto auto',
@@ -119,8 +120,9 @@ export function NarrowInboxLayout(props: LayoutProps) {
<Entity.Slot
placement="timestamp"
- class="text-xs text-right text-ink-extra-muted font-light pt-3 pr-4"
+ class="flex items-center justify-end gap-1 text-xs text-right text-ink-extra-muted font-light pt-3 pr-4"
>
+ {props.scheduleStatus}
<Show
when={
!props.hasNotifications &&
diff --git a/apps/web/src/features/entity/composed/list-entity/narrow-layout.tsx b/apps/web/src/features/entity/composed/list-entity/narrow-layout.tsx
index c5b49b5795..48be7044fc 100644
--- a/apps/web/src/features/entity/composed/list-entity/narrow-layout.tsx
+++ b/apps/web/src/features/entity/composed/list-entity/narrow-layout.tsx
@@ -97,28 +97,32 @@ export function NarrowLayout(props: LayoutProps) {
<Show
when={
- !props.hasNotifications &&
- !(isChannelEntity(props.entity) && isSearchEntity(props.entity))
+ props.scheduleStatus ||
+ (!props.hasNotifications &&
+ !(isChannelEntity(props.entity) && isSearchEntity(props.entity)))
}
>
<Entity.Slot
placement="timestamp"
- class="text-xs text-right text-ink-extra-muted font-light"
+ class="flex items-center justify-end gap-1 text-xs text-right text-ink-extra-muted font-light"
>
- <RowEnd actions={props.actions} leadingAction={props.leadingAction}>
- <Show
- when={!isTaskEntity(props.entity)}
- fallback={
- <Entity.Properties
- entity={props.entity}
- maxUserStackUsers={0}
- showCaret={false}
- />
- }
- >
- <Entity.Timestamp entity={props.entity} />
- </Show>
- </RowEnd>
+ {props.scheduleStatus}
+ <Show when={!props.hasNotifications}>
+ <RowEnd actions={props.actions} leadingAction={props.leadingAction}>
+ <Show
+ when={!isTaskEntity(props.entity)}
+ fallback={
+ <Entity.Properties
+ entity={props.entity}
+ maxUserStackUsers={0}
+ showCaret={false}
+ />
+ }
+ >
+ <Entity.Timestamp entity={props.entity} />
+ </Show>
+ </RowEnd>
+ </Show>
</Entity.Slot>
</Show>
</Entity.Layout>
diff --git a/apps/web/src/features/entity/composed/list-entity/narrow-single-line-layout.tsx b/apps/web/src/features/entity/composed/list-entity/narrow-single-line-layout.tsx
index 63bfd4a7b0..15eb615eeb 100644
--- a/apps/web/src/features/entity/composed/list-entity/narrow-single-line-layout.tsx
+++ b/apps/web/src/features/entity/composed/list-entity/narrow-single-line-layout.tsx
@@ -103,28 +103,32 @@ export function NarrowSingleLineLayout(props: LayoutProps) {
<Show
when={
- !props.hasNotifications &&
- !(isChannelEntity(props.entity) && isSearchEntity(props.entity))
+ props.scheduleStatus ||
+ (!props.hasNotifications &&
+ !(isChannelEntity(props.entity) && isSearchEntity(props.entity)))
}
>
<Entity.Slot
placement="timestamp"
- class="text-xs text-right text-ink-extra-muted font-light"
+ class="flex items-center justify-end gap-1 text-xs text-right text-ink-extra-muted font-light"
>
- <Switch fallback={<Entity.Timestamp entity={props.entity} />}>
- <Match when={isTaskEntity(props.entity)}>
- <Entity.Properties
- entity={props.entity}
- maxUserStackUsers={0}
- showCaret={false}
- />
- </Match>
- <Match
- when={props.entity.type === 'calendar_event' && props.entity}
- >
- {(entity) => <CalendarEventWhen entity={entity()} />}
- </Match>
- </Switch>
+ {props.scheduleStatus}
+ <Show when={!props.hasNotifications}>
+ <Switch fallback={<Entity.Timestamp entity={props.entity} />}>
+ <Match when={isTaskEntity(props.entity)}>
+ <Entity.Properties
+ entity={props.entity}
+ maxUserStackUsers={0}
+ showCaret={false}
+ />
+ </Match>
+ <Match
+ when={props.entity.type === 'calendar_event' && props.entity}
+ >
+ {(entity) => <CalendarEventWhen entity={entity()} />}
+ </Match>
+ </Switch>
+ </Show>
</Entity.Slot>
</Show>
</Entity.Layout>
diff --git a/apps/web/src/features/entity/composed/list-entity/reminder.tsx b/apps/web/src/features/entity/composed/list-entity/reminder.tsx
index 5a7c343bd9..46a9dbd960 100644
--- a/apps/web/src/features/entity/composed/list-entity/reminder.tsx
+++ b/apps/web/src/features/entity/composed/list-entity/reminder.tsx
@@ -1,23 +1,6 @@
-import {
- describeReminderSchedule,
- scheduleFromRow,
-} from '@app/features/reminders/reminder-schedule';
-import { Show } from 'solid-js';
-import { ReminderRecurrenceBadge } from '../../components/Badges';
import { ReminderTitle } from '../../extractors/reminder-title';
import type { ReminderEntity } from '../../types/entity';
export function ReminderWideContent(props: { entity: ReminderEntity }) {
- const recurrence = () =>
- props.entity.scheduleType === 'recurring'
- ? describeReminderSchedule(scheduleFromRow(props.entity))
- : undefined;
- return (
- <>
- <ReminderTitle entity={props.entity} showNote />
- <Show when={recurrence()}>
- {(text) => <ReminderRecurrenceBadge recurrence={text()} />}
- </Show>
- </>
- );
+ return <ReminderTitle entity={props.entity} showNote />;
}
diff --git a/apps/web/src/features/entity/composed/list-entity/shared.tsx b/apps/web/src/features/entity/composed/list-entity/shared.tsx
index f9a3166043..1c6a601960 100644
--- a/apps/web/src/features/entity/composed/list-entity/shared.tsx
+++ b/apps/web/src/features/entity/composed/list-entity/shared.tsx
@@ -32,6 +32,8 @@ export interface BaseListEntityProps<E extends EntityData = EntityData> {
actions?: JSX.Element;
/** Persistent status/action immediately before the timestamp. */
leadingAction?: JSX.Element;
+ /** Collection-owned completion of a reminder occurrence. */
+ onToggleReminderDone?: () => Promise<void>;
hideContentHits?: boolean;
/** Resolved app display name for a linked GitHub PR author, when available. */
authorDisplayName?: string;
@@ -62,6 +64,8 @@ const WIDE_BREAKPOINT = 512; // @lg container query = 32rem
export interface LayoutProps {
entity: WithNotification<EntityData>;
+ /** Persistent schedule metadata, including on touch and notification rows. */
+ scheduleStatus?: JSX.Element;
actions?: JSX.Element;
leadingAction?: JSX.Element;
checked?: boolean;
diff --git a/apps/web/src/features/entity/composed/list-entity/wide-layout.tsx b/apps/web/src/features/entity/composed/list-entity/wide-layout.tsx
index cbc5febc6b..ae128fdc2e 100644
--- a/apps/web/src/features/entity/composed/list-entity/wide-layout.tsx
+++ b/apps/web/src/features/entity/composed/list-entity/wide-layout.tsx
@@ -81,6 +81,7 @@ export function WideLayout(props: LayoutProps) {
// content isn't indented by an empty gutter.
// A scheduled send's badge is wider than a date, so it sizes its column.
props.actions ||
+ props.scheduleStatus ||
(isEmailEntity(props.entity) && props.entity.scheduledSendTime)
? props.hideCheckbox
? 'grid-cols-[1fr_auto_auto]'
@@ -309,8 +310,9 @@ export function WideLayout(props: LayoutProps) {
</Entity.Slot>
<Entity.Slot
placement="timestamp"
- class="text-xs text-right text-ink-extra-muted font-medium"
+ class="flex items-center justify-end gap-1 text-xs text-right text-ink-extra-muted font-medium"
>
+ {props.scheduleStatus}
<RowEnd actions={props.actions} leadingAction={props.leadingAction}>
<Show
when={
diff --git a/apps/web/src/features/entity/extractors-notification/mobile-notification-stacks.tsx b/apps/web/src/features/entity/extractors-notification/mobile-notification-stacks.tsx
index 8093dd3481..97050eb675 100644
--- a/apps/web/src/features/entity/extractors-notification/mobile-notification-stacks.tsx
+++ b/apps/web/src/features/entity/extractors-notification/mobile-notification-stacks.tsx
@@ -41,6 +41,7 @@ export type EntityRowConfig = {
function MobileStackRowLayout(props: {
stack: NotificationStack;
entity: WithNotification<EntityData>;
+ scheduleStatus?: JSX.Element;
unread: boolean;
onClick?: (e: MouseEvent) => void;
}) {
@@ -53,7 +54,9 @@ function MobileStackRowLayout(props: {
class="w-full text-sm grid"
onClick={props.onClick}
style={{
- 'grid-template-columns': 'auto 1fr 8ch',
+ 'grid-template-columns': props.scheduleStatus
+ ? 'auto 1fr auto'
+ : 'auto 1fr 8ch',
'grid-template-rows': 'auto auto auto',
'grid-template-areas':
'"icon title timestamp" "icon body body" "icon body body"',
@@ -92,8 +95,9 @@ function MobileStackRowLayout(props: {
<Entity.Slot
placement="timestamp"
- class="text-xs text-right text-ink-extra-muted font-light pt-3 pr-4 tabular-nums"
+ class="flex items-center justify-end gap-1 text-xs text-right text-ink-extra-muted font-light pt-3 pr-4 tabular-nums"
>
+ {props.scheduleStatus}
<NotificationTimestamp stack={props.stack} />
</Entity.Slot>
@@ -127,6 +131,7 @@ function MobileStackRowLayout(props: {
function MobileStackRow(props: {
stack: NotificationStack;
entity: WithNotification<EntityData>;
+ scheduleStatus?: JSX.Element;
entityRowConfig?: EntityRowConfig;
}) {
const ctx = useContext(SwipableRowContext);
@@ -166,6 +171,7 @@ function MobileStackRow(props: {
return (
<MobileStackRowLayout
stack={props.stack}
+ scheduleStatus={props.scheduleStatus}
entity={props.entity}
unread={unread()}
onClick={handleClick}
@@ -188,6 +194,7 @@ function MobileStackRow(props: {
>
<MobileStackRowLayout
stack={props.stack}
+ scheduleStatus={props.scheduleStatus}
entity={props.entity}
unread={unread()}
onClick={handleClick}
@@ -207,6 +214,7 @@ function keyStack(stack: NotificationStack): KeyedStack {
interface MobileNotificationStackRowsProps {
stacks: NotificationStack[];
entity: WithNotification<EntityData>;
+ scheduleStatus?: JSX.Element;
entityRowConfig?: EntityRowConfig;
visibleCount?: number;
}
@@ -240,6 +248,9 @@ export function MobileNotificationStackRows(
{(stack) => (
<MobileStackRow
stack={stack}
+ scheduleStatus={
+ stack.id === stacks[0]?.id ? props.scheduleStatus : undefined
+ }
entity={props.entity}
entityRowConfig={props.entityRowConfig}
/>
diff --git a/apps/web/src/features/entity/types/entity.ts b/apps/web/src/features/entity/types/entity.ts
index 59c27c902c..ddca24d601 100644
--- a/apps/web/src/features/entity/types/entity.ts
+++ b/apps/web/src/features/entity/types/entity.ts
@@ -428,8 +428,10 @@ export type ReminderEntity = EntityBase & {
nextRunAt: DateValue;
/** When false, the dispatcher skips this reminder. */
enabled: boolean;
- /** Set once a one-shot reminder has fired. */
+ /** When the owner acknowledged the occurrence; recurring schedules can remain enabled. */
completedAt?: DateValue | null;
+ /** Owning email workflow; these mirrors must be rescheduled through Remind me. */
+ emailFollowup?: import('@service-storage/generated/schemas/emailFollowup').EmailFollowup;
};
/** Normalized time shape of a calendar event soup row. */
diff --git a/apps/web/src/features/next-soup/actions/make-mark-done-action.test.ts b/apps/web/src/features/next-soup/actions/make-mark-done-action.test.ts
index 56206c68f0..ecccda1779 100644
--- a/apps/web/src/features/next-soup/actions/make-mark-done-action.test.ts
+++ b/apps/web/src/features/next-soup/actions/make-mark-done-action.test.ts
@@ -170,6 +170,126 @@ describe('makeMarkDoneAction', () => {
dispose();
});
+ it('keeps ordinary reminders undoable when selected with a workflow mirror', async () => {
+ const mirror = {
+ type: 'reminder',
+ id: 'mirror',
+ emailFollowup: { threadId: 'thread' },
+ } as EntityData;
+ const ordinary = { type: 'reminder', id: 'ordinary' } as EntityData;
+ const { action, dispose } = createAction();
+ const onUndoHandle = vi.fn();
+ await action.execute([mirror, ordinary], undefined, { onUndoHandle });
+ expect(mocks.mutateAsync).toHaveBeenCalledTimes(2);
+ const mirrorVariables = mocks.mutateAsync.mock.calls[0][0];
+ const ordinaryVariables = mocks.mutateAsync.mock.calls[1][0];
+ expect(mirrorVariables).toMatchObject({ entities: [mirror] });
+ expect(ordinaryVariables).toMatchObject({
+ entities: [ordinary],
+ onUndoHandle,
+ });
+ const options = mocks.undoableOptionsFactory() as {
+ onPushed: (
+ handle: { dispose: () => void },
+ variables: unknown
+ ) => unknown;
+ };
+ const mirrorHandle = { dispose: vi.fn() };
+ const ordinaryHandle = { dispose: vi.fn() };
+ options.onPushed(mirrorHandle, mirrorVariables);
+ options.onPushed(ordinaryHandle, ordinaryVariables);
+ expect(mirrorHandle.dispose).toHaveBeenCalledOnce();
+ expect(ordinaryHandle.dispose).not.toHaveBeenCalled();
+ expect(onUndoHandle).toHaveBeenCalledWith(ordinaryHandle);
+ dispose();
+ });
+
+ it.each(['resolve', 'reject'] as const)(
+ 'waits for the mirror to %s before publishing ordinary Undo',
+ async (settlement) => {
+ const mirror = {
+ type: 'reminder',
+ id: 'mirror',
+ emailFollowup: { threadId: 'thread' },
+ } as EntityData;
+ const ordinary = { type: 'reminder', id: 'ordinary' } as EntityData;
+ let resolveMirror!: () => void;
+ let rejectMirror!: (reason: Error) => void;
+ const pendingMirror = new Promise<void>((resolve, reject) => {
+ resolveMirror = resolve;
+ rejectMirror = reject;
+ });
+ const failure = new Error('mirror failed');
+ const { action, dispose } = createAction();
+ const onUndoHandle = vi.fn();
+ const ordinaryHandle = { dispose: vi.fn() };
+ const options = mocks.undoableOptionsFactory() as {
+ onPushed: (
+ handle: { dispose: () => void },
+ variables: unknown
+ ) => unknown;
+ };
+ mocks.mutateAsync.mockImplementationOnce(() => pendingMirror);
+ mocks.mutateAsync.mockImplementationOnce(async (variables) => {
+ options.onPushed(ordinaryHandle, variables);
+ });
+ try {
+ const result = action
+ .execute([mirror, ordinary], undefined, { onUndoHandle })
+ .catch((error) => error);
+ await Promise.resolve();
+ expect(mocks.mutateAsync).toHaveBeenCalledTimes(1);
+ expect(onUndoHandle).not.toHaveBeenCalled();
+ if (settlement === 'reject') rejectMirror(failure);
+ else resolveMirror();
+ expect(await result).toBe(
+ settlement === 'reject' ? failure : undefined
+ );
+ expect(mocks.mutateAsync).toHaveBeenCalledTimes(2);
+ expect(onUndoHandle).toHaveBeenCalledWith(ordinaryHandle);
+ expect(ordinaryHandle.dispose).not.toHaveBeenCalled();
+ } finally {
+ dispose();
+ }
+ }
+ );
+
+ it.each(['mirror', 'ordinary'])(
+ 'attempts both mixed groups when the %s group fails',
+ async (failedId) => {
+ const mirror = {
+ type: 'reminder',
+ id: 'mirror',
+ emailFollowup: { threadId: 'thread' },
+ } as EntityData;
+ const ordinary = { type: 'reminder', id: 'ordinary' } as EntityData;
+ const failure = new Error(`${failedId} failed`);
+ mocks.mutateAsync.mockImplementationOnce(async () => {
+ if (failedId === 'mirror') throw failure;
+ });
+ mocks.mutateAsync.mockImplementationOnce(async () => {
+ if (failedId === 'ordinary') throw failure;
+ });
+ const { action, dispose } = createAction();
+ const onUndoHandle = vi.fn();
+ try {
+ await expect(
+ action.execute([mirror, ordinary], undefined, { onUndoHandle })
+ ).rejects.toBe(failure);
+ expect(mocks.mutateAsync).toHaveBeenCalledTimes(2);
+ expect(mocks.mutateAsync.mock.calls[1][0]).toMatchObject({
+ entities: [ordinary],
+ onUndoHandle,
+ });
+ expect(mocks.mutateAsync.mock.calls[0][0]).toMatchObject({
+ entities: [mirror],
+ });
+ } finally {
+ dispose();
+ }
+ }
+ );
+
it('uses the agent-session entity target while GraphQL Soup is enabled', async () => {
mocks.graphqlSoupEnabled.mockReturnValue(true);
mocks.resolveMarkEntitiesDoneVariables.mockReturnValue({
diff --git a/apps/web/src/features/next-soup/actions/make-mark-done-action.ts b/apps/web/src/features/next-soup/actions/make-mark-done-action.ts
index 697662c908..e91d0d43a7 100644
--- a/apps/web/src/features/next-soup/actions/make-mark-done-action.ts
+++ b/apps/web/src/features/next-soup/actions/make-mark-done-action.ts
@@ -32,7 +32,7 @@ const VALID_MARK_DONE_LIST_VIEWS: `${ListView}-${string}`[] = [
'home-signal',
'home-noise',
// Marking a pending reminder done cancels it before it fires — same as the
- // standalone Reminders view's Scheduled tab below.
+ // standalone Reminders collection below.
'home-reminders',
'mail-important',
'mail-all',
@@ -42,23 +42,18 @@ const VALID_MARK_DONE_LIST_VIEWS: `${ListView}-${string}`[] = [
// stay in place and flip to the done state exactly like mail "All".
'mail-calendar',
'mail-shared',
- // Completing a reminder is the whole point of the Reminders view: without
- // it the only way to clear one is to delete it. Done is listed too so a
- // reminder marked by mistake can be reopened from where it landed.
- 'reminders-active',
- 'reminders-scheduled',
- 'reminders-done',
+ 'reminders-all',
];
export const canExecuteMarkDoneOnView = (view: ListView, tabId: string) => {
return VALID_MARK_DONE_LIST_VIEWS.includes(`${view}-${tabId}`);
};
-/** Already-done emails are skipped by mark-done (they appear alongside
- * not-done rows in views that show done content, e.g. mail "All"). done
- * state is email-specific; other entity types are never filtered. */
+/** Already-done emails and reminders coexist with actionable rows in unified
+ * collections, so mark-done skips them rather than acknowledging twice. */
const isMarkDoneTarget = (e: EntityData) =>
- !(e.type === 'email' && e.done === true);
+ !(e.type === 'email' && e.done === true) &&
+ !(e.type === 'reminder' && e.completedAt != null);
type MakeMarkDoneOptions = {
userId?: () => string | undefined;
@@ -185,6 +180,20 @@ export const makeMarkDoneAction = (options: MakeMarkDoneOptions) => {
},
undoLabel: 'Mark Done',
onPushed: (handle, variables) => {
+ // Email follow-up mirrors deliberately reject completed:false. Reopening
+ // requires a new time through their owning composer, not generic Undo.
+ if (
+ variables.entities.some(
+ (entity) => entity.type === 'reminder' && entity.emailFollowup
+ )
+ ) {
+ handle.dispose();
+ if (!variables.silent)
+ toast.success(
+ 'Marked as done. Use Remind me to schedule the email again.'
+ );
+ return;
+ }
variables.onUndoHandle?.(handle);
const firstEntityId = variables.entities[0]?.id;
const count = variables.entities.length;
@@ -261,12 +270,41 @@ export const makeMarkDoneAction = (options: MakeMarkDoneOptions) => {
entities: EntityData[],
restoreFocus?: () => void,
opts?: MarkDoneExecuteOpts
- ) => {
+ ): Promise<void> => {
// Skip already-done emails so a mixed selection (e.g. done + not-done rows
// in mail "All") doesn't re-archive the done ones or overcount the toast.
const targets = entities.filter(isMarkDoneTarget);
if (targets.length === 0) return;
+ // Only workflow mirrors lack generic undo. Keep reversible selections in
+ // their own transaction so a mixed selection retains its normal Undo.
+ const mirrors = targets.filter(
+ (entity) => entity.type === 'reminder' && entity.emailFollowup
+ );
+ if (mirrors.length > 0 && mirrors.length < targets.length) {
+ let failure: { reason: unknown } | undefined;
+ // Settle mirrors first so their non-undoable entry cannot overwrite the
+ // ordinary group's Undo toast or clear its Redo stack after completion.
+ // A failed group must not prevent the remaining writes from being tried.
+ for (const attempt of [
+ () => execute(mirrors, undefined, { silent: opts?.silent }),
+ () =>
+ execute(
+ targets.filter((entity) => !mirrors.includes(entity)),
+ restoreFocus,
+ opts
+ ),
+ ]) {
+ try {
+ await attempt();
+ } catch (reason) {
+ failure ??= { reason };
+ }
+ }
+ if (failure) throw failure.reason;
+ return;
+ }
+
const source = notificationSource();
const scopeChannelNotifications = scopeChannelNotificationsToEntity();
const resolved = resolveMarkEntitiesDoneVariables({
diff --git a/apps/web/src/features/next-soup/actions/make-mark-not-done-action.test.ts b/apps/web/src/features/next-soup/actions/make-mark-not-done-action.test.ts
index bf8d2c9b1d..a0fb056d9d 100644
--- a/apps/web/src/features/next-soup/actions/make-mark-not-done-action.test.ts
+++ b/apps/web/src/features/next-soup/actions/make-mark-not-done-action.test.ts
@@ -114,6 +114,19 @@ describe('makeMarkNotDoneAction', () => {
});
});
+ it('never sends generic reopening for an email-follow-up mirror', async () => {
+ const mirror = {
+ type: 'reminder',
+ id: 'mirror',
+ completedAt: '2026-10-01T12:00:00Z',
+ emailFollowup: { threadId: 'email' },
+ } as EntityData;
+ const action = createAction();
+ expect(action.canExecute(mirror)).toBe(false);
+ await action.execute([mirror]);
+ expect(mocks.executeMarkEntitiesUndone).not.toHaveBeenCalled();
+ });
+
it('unarchives a thread and restores only its notifications', async () => {
await expect(createAction().execute([doneEmail('inbound')])).resolves.toBe(
'committed'
diff --git a/apps/web/src/features/next-soup/actions/make-mark-not-done-action.ts b/apps/web/src/features/next-soup/actions/make-mark-not-done-action.ts
index f3a247f780..99defc9827 100644
--- a/apps/web/src/features/next-soup/actions/make-mark-not-done-action.ts
+++ b/apps/web/src/features/next-soup/actions/make-mark-not-done-action.ts
@@ -173,9 +173,11 @@ async function restoreEmailNotifications(
* queued writes; only a completely failed email selection rejects the action.
*/
export const makeMarkNotDoneAction = (options: MakeMarkNotDoneOptions) => {
- // Always reversible — unlike a done thread there is no "permanently done" case.
+ // Email workflow mirrors reject generic reopening: Remind me owns rescheduling.
const isCompletedReminder = (entity: EntityData): boolean =>
- entity.type === 'reminder' && entity.completedAt != null;
+ entity.type === 'reminder' &&
+ entity.completedAt != null &&
+ !entity.emailFollowup;
const canExecute = (entity: EntityData): boolean =>
(entity.type === 'email' && entity.done === true) ||
diff --git a/apps/web/src/features/next-soup/sidebar/soup-filter-presets.test.ts b/apps/web/src/features/next-soup/sidebar/soup-filter-presets.test.ts
index e7e04ededa..68677ec3be 100644
--- a/apps/web/src/features/next-soup/sidebar/soup-filter-presets.test.ts
+++ b/apps/web/src/features/next-soup/sidebar/soup-filter-presets.test.ts
@@ -214,69 +214,31 @@ describe('reminders view presets', () => {
return compileToAst(queryStateFrom(preset.filters));
};
- it('defaults to the active tab', () => {
- expect(VIEW_TAB_PRESETS.reminders.default).toBe('active');
- });
-
- // Active and Scheduled split on `fired` server-side rather than in a client
- // predicate: they would otherwise share one `comp:false` query whose row
- // limit is spent on whichever end the sort direction favours.
- it('asks for fired, uncompleted reminders on the active tab', () => {
- expect(astFor('active').remf).toEqual({
- '&': [
- { l: { comp: false } },
- { '&': [{ l: { fired: true } }, { l: 'inc' }] },
- ],
+ it('has one unfiltered collection without a segmented tab', () => {
+ expect(VIEW_TAB_PRESETS.reminders.default).toBe('all');
+ expect(astFor('all').remf).toEqual({ l: 'inc' });
+ expect(getViewPreset('reminders', 'all')?.clientFilters).toEqual({
+ and: ['reminders'],
});
+ expect('reminders' in VIEW_TAB_LISTS).toBe(false);
});
- it('asks for not-yet-fired reminders on the scheduled tab', () => {
- expect(astFor('scheduled').remf).toEqual({
- '&': [
- { l: { comp: false } },
- { '&': [{ l: { fired: false } }, { l: 'inc' }] },
- ],
- });
- });
-
- it('asks for completed reminders on the done tab', () => {
- expect(astFor('done').remf).toEqual({
- '&': [{ l: { comp: true } }, { l: 'inc' }],
- });
- });
-
- // `comp: false` is what `soupQueryExcludesDone` matches to drop a row
- // optimistically when it is marked done; losing it regresses that silently.
- it.each(['active', 'scheduled'])(
- 'keeps the not-completed filter on the %s tab',
+ it.each(['active', 'scheduled', 'done'])(
+ 'normalizes the old %s preset',
(tab) => {
- expect(
- JSON.stringify(getViewPreset('reminders', tab)?.filters)
- ).toContain('reminderCompleted');
+ expect(getViewPreset('reminders', tab)).toEqual(
+ getViewPreset('reminders', 'all')
+ );
}
);
- // Active is an inbox, so newest-fired first like every other feed. Scheduled
- // points at future dates, where newest-first would mean furthest-away first.
- it('reads only the scheduled tab soonest-first', () => {
- expect(getViewPreset('reminders', 'active')?.sortDirection).toBeUndefined();
- expect(getViewPreset('reminders', 'scheduled')?.sortDirection).toBe('asc');
- expect(getViewPreset('reminders', 'done')?.sortDirection).toBeUndefined();
+ it('keeps the collection reminders-only', () => {
+ const ast = astFor('all');
+ expect(ast.df).toBeDefined();
+ expect(ast.ef).toBeDefined();
+ expect(ast.chanf).toBeDefined();
+ expect(ast.cf).toBeDefined();
});
-
- // defineQueryFilters NIL-excludes every target a query does not name, which
- // is the only thing keeping other entity types out of this view.
- it.each(['active', 'scheduled', 'done'])(
- 'excludes every other entity type on the %s tab',
- (tab) => {
- const ast = astFor(tab);
-
- expect(ast.df, 'documents').toBeDefined();
- expect(ast.ef, 'emails').toBeDefined();
- expect(ast.chanf, 'channels').toBeDefined();
- expect(ast.cf, 'chats').toBeDefined();
- }
- );
});
// The tab bar's labels and the filter presets are two separate tables keyed by
diff --git a/apps/web/src/features/next-soup/sidebar/soup-filter-presets.ts b/apps/web/src/features/next-soup/sidebar/soup-filter-presets.ts
index b3e0367531..c722998a7c 100644
--- a/apps/web/src/features/next-soup/sidebar/soup-filter-presets.ts
+++ b/apps/web/src/features/next-soup/sidebar/soup-filter-presets.ts
@@ -551,49 +551,15 @@ export const VIEW_TAB_PRESETS: Record<ListView, ViewTabConfig> = {
}),
},
},
- // Reminders are the one entity type that is opt-in server-side, so naming
- // `includeReminders` both surfaces them and — via defineQueryFilters, which
- // NIL-excludes every target this query does not reference — makes the view
- // reminders-only. Soup already orders them by when they fire.
+ // One collection: completion and scheduling are independent row state.
reminders: {
- default: 'active',
+ default: 'all',
tabs: {
- // Fired and waiting on you — an inbox, so newest arrival on top like
- // every other feed. `reminderFired` is a server filter rather than a
- // client one for a reason: both this tab and Scheduled would otherwise
- // share one `comp:false` query, and the page limit would be spent on
- // whichever end the sort direction favours, so a user with a hundred
- // future reminders could open Active on an empty list.
- active: () => ({
- filters: defineQueryFilters({
- include: {
- includeReminders: true,
- reminderCompleted: false,
- reminderFired: true,
- },
- }),
- clientFilters: { and: ['reminders-fired'] },
- }),
- // Not due yet. Soonest first: "newest first" on a future date means
- // furthest away first, which puts December above tomorrow.
- scheduled: () => ({
- filters: defineQueryFilters({
- include: {
- includeReminders: true,
- reminderCompleted: false,
- reminderFired: false,
- },
- }),
- clientFilters: { and: ['reminders-scheduled'] },
+ all: () => ({
+ filters: defineQueryFilters({ include: { includeReminders: true } }),
+ clientFilters: { and: ['reminders'] },
sortDirection: 'asc',
}),
- // Dealt with. Most-recently-due first, like every other archive view.
- done: () => ({
- filters: defineQueryFilters({
- include: { includeReminders: true, reminderCompleted: true },
- }),
- clientFilters: { and: ['reminders-done'] },
- }),
},
},
search: {
@@ -661,7 +627,7 @@ export function getViewPreset(
const config = VIEW_TAB_PRESETS[view];
if (!config) return undefined;
- const tabId = tab ?? config.default;
+ const tabId = view === 'reminders' ? 'all' : (tab ?? config.default);
const resolver = config.tabs[tabId];
if (!resolver) return undefined;
diff --git a/apps/web/src/features/next-soup/soup-view/filters-bar/mobile-filter-drawer.tsx b/apps/web/src/features/next-soup/soup-view/filters-bar/mobile-filter-drawer.tsx
index 5de70a19ab..9e25a6e738 100644
--- a/apps/web/src/features/next-soup/soup-view/filters-bar/mobile-filter-drawer.tsx
+++ b/apps/web/src/features/next-soup/soup-view/filters-bar/mobile-filter-drawer.tsx
@@ -36,6 +36,7 @@ import { useContacts } from '@queries/contacts/contacts';
import { createMemo, createSignal, For, Show } from 'solid-js';
import { ConsolidatedFilterChip } from './consolidated-filter-chip';
import { useInboxPicker } from './inbox-picker';
+import { toggleReminderCompletionFilter } from './reminder-completion-filter';
import {
buildContactLabel,
type FilterOption,
@@ -157,6 +158,11 @@ export const MobileFilterDrawer = (props: {
showInboxSection();
const toggleFilter = (optionId: FilterOption['id']) => {
+ if (
+ currentView() === 'reminders' &&
+ toggleReminderCompletionFilter(optionId, soup.predicates, queryFilters)
+ )
+ return;
const wasActive = soup.predicates.isActive(optionId);
const previousDocumentTypeIds =
currentView() === 'documents' && isDocumentTypeFilterId(optionId)
diff --git a/apps/web/src/features/next-soup/soup-view/filters-bar/reminder-completion-filter.test.ts b/apps/web/src/features/next-soup/soup-view/filters-bar/reminder-completion-filter.test.ts
new file mode 100644
index 0000000000..04ea32621c
--- /dev/null
+++ b/apps/web/src/features/next-soup/soup-view/filters-bar/reminder-completion-filter.test.ts
@@ -0,0 +1,59 @@
+import { createRoot } from 'solid-js';
+import { expect, it } from 'vitest';
+import {
+ createPredicatesStore,
+ type PredicateConfig,
+} from '../../filters/filter-store/predicates-store';
+import { createQueryStore } from '../../filters/filter-store/query-store';
+import { toggleReminderCompletionFilter } from './reminder-completion-filter';
+
+it.each([
+ [
+ 'reminders-done',
+ 'reminders-not-done',
+ 'reminders-not-done',
+ 'reminders-done',
+ 'reminders-done',
+ ],
+ [
+ 'reminders-not-done',
+ 'reminders-done',
+ 'reminders-done',
+ 'reminders-not-done',
+ 'reminders-not-done',
+ ],
+])(
+ 'keeps client matches and request completion synchronized through %j',
+ (...sequence) =>
+ createRoot((dispose) => {
+ const query = createQueryStore({
+ initial: { include: { includeReminders: true } },
+ });
+ const predicates = createPredicatesStore<
+ boolean,
+ unknown,
+ PredicateConfig<boolean>
+ >({
+ configs: [
+ { id: 'reminders', predicate: () => true },
+ { id: 'reminders-done', predicate: (done: boolean) => done },
+ { id: 'reminders-not-done', predicate: (done: boolean) => !done },
+ ],
+ initial: { and: ['reminders'] },
+ });
+ for (const [index, id] of sequence.entries()) {
+ toggleReminderCompletionFilter(id, predicates, query);
+ const expected =
+ index === 2 || index === 4 ? undefined : id === 'reminders-done';
+ expect(query.state.include.reminderCompleted).toBe(expected);
+ expect(query.state.include.includeReminders).toBe(true);
+ expect(predicates.test(true, undefined)).toBe(expected !== false);
+ expect(predicates.test(false, undefined)).toBe(expected !== true);
+ expect(predicates.andIds()).toEqual(
+ expected === undefined ? ['reminders'] : ['reminders', id]
+ );
+ expect(predicates.orIds()).toEqual([]);
+ }
+ dispose();
+ })
+);
diff --git a/apps/web/src/features/next-soup/soup-view/filters-bar/reminder-completion-filter.ts b/apps/web/src/features/next-soup/soup-view/filters-bar/reminder-completion-filter.ts
new file mode 100644
index 0000000000..7ec49839fd
--- /dev/null
+++ b/apps/web/src/features/next-soup/soup-view/filters-bar/reminder-completion-filter.ts
@@ -0,0 +1,45 @@
+import { batch } from 'solid-js';
+import type { SetPredicatesInput } from '../../filters/filter-store/predicates-store';
+import type { QueryStore } from '../../filters/filter-store/query-store';
+
+type CompletionPredicates = {
+ andIds: () => readonly string[];
+ orIds: () => readonly string[];
+ set: (input: SetPredicatesInput<string>) => void;
+};
+const isCompletion = (id: string) =>
+ id === 'reminders-done' || id === 'reminders-not-done';
+
+/** A scalar server filter must have one matching client selection. */
+export function toggleReminderCompletionFilter(
+ optionId: string,
+ predicates: CompletionPredicates,
+ query: Pick<QueryStore, 'state' | 'set'>
+): boolean {
+ if (!isCompletion(optionId)) return false;
+ const requested = optionId === 'reminders-done';
+ const completed =
+ query.state.include.reminderCompleted === requested ? undefined : requested;
+ setReminderCompletionFilter(completed, predicates, query);
+ return true;
+}
+
+/** Preserve the collection and unrelated refinements when changing or clearing completion. */
+export function setReminderCompletionFilter(
+ completed: boolean | undefined,
+ predicates: CompletionPredicates,
+ query: Pick<QueryStore, 'set'>
+): void {
+ batch(() => {
+ predicates.set({
+ and: [
+ ...predicates.andIds().filter((id) => !isCompletion(id)),
+ ...(completed === undefined
+ ? []
+ : [completed ? 'reminders-done' : 'reminders-not-done']),
+ ],
+ or: predicates.orIds().filter((id) => !isCompletion(id)),
+ });
+ query.set({ include: { reminderCompleted: completed } });
+ });
+}
diff --git a/apps/web/src/features/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx b/apps/web/src/features/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx
index 8c93cc4b10..2ecfe03773 100644
--- a/apps/web/src/features/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx
+++ b/apps/web/src/features/next-soup/soup-view/filters-bar/unified-filter-dropdown.tsx
@@ -53,6 +53,7 @@ import {
FilterSubmenu,
SearchableFilterSubmenu,
} from './filter-menu';
+import { toggleReminderCompletionFilter } from './reminder-completion-filter';
import type { SearchableOption } from './searchable-multi-select';
import { useTagFilter } from './tag-filter';
@@ -368,9 +369,17 @@ export const VIEW_FILTER_CATEGORIES: Record<ListView, FilterCategory[]> = {
channels: [],
calls: [],
folders: [],
- // The two tabs already split reminders on the only axis they have; there is
- // nothing further to refine by.
- reminders: [],
+ reminders: [
+ {
+ id: 'completion',
+ label: 'Completion',
+ multiple: false,
+ options: [
+ { id: 'reminders-not-done', label: 'Not done' },
+ { id: 'reminders-done', label: 'Done' },
+ ],
+ },
+ ],
search: [],
};
@@ -468,6 +477,11 @@ export const UnifiedFilterDropdown = (
};
const toggleFilter = (optionId: string) => {
+ if (
+ currentView() === 'reminders' &&
+ toggleReminderCompletionFilter(optionId, soup.predicates, queryFilters)
+ )
+ return;
const wasActive = soup.predicates.isActive(optionId);
const previousDocumentTypeIds =
currentView() === 'documents' && isDocumentTypeFilterId(optionId)
diff --git a/apps/web/src/features/next-soup/soup-view/filters-bar/use-filter-refinements.test.tsx b/apps/web/src/features/next-soup/soup-view/filters-bar/use-filter-refinements.test.tsx
new file mode 100644
index 0000000000..19481f8bb6
--- /dev/null
+++ b/apps/web/src/features/next-soup/soup-view/filters-bar/use-filter-refinements.test.tsx
@@ -0,0 +1,125 @@
+import { createRoot } from 'solid-js';
+import { expect, it, vi } from 'vitest';
+import {
+ createPredicatesStore,
+ type PredicateConfig,
+} from '../../filters/filter-store/predicates-store';
+import { createQueryStore } from '../../filters/filter-store/query-store';
+import { toggleReminderCompletionFilter } from './reminder-completion-filter';
+import { useFilterRefinements } from './use-filter-refinements';
+
+const state = vi.hoisted(() => ({
+ current: {} as {
+ soup: {
+ predicates: ReturnType<
+ typeof createPredicatesStore<boolean, unknown, PredicateConfig<boolean>>
+ >;
+ };
+ queryFilters: ReturnType<typeof createQueryStore>;
+ items: () => never[];
+ assigneeFilter: () => never[];
+ setAssigneeFilter: ReturnType<typeof vi.fn>;
+ activeTab: () => string;
+ },
+}));
+vi.mock('../soup-view-context', () => ({ useSoupView: () => state.current }));
+vi.mock('@components/app/split-layout/layoutUtils', () => ({
+ useSplitPanelOrThrow: () => ({
+ handle: { content: () => ({ type: 'component', id: 'reminders' }) },
+ }),
+}));
+vi.mock('@core/context/user', () => ({
+ useUserContext: () => ({ userId: () => 'user' }),
+ useUserId: () => () => 'user',
+}));
+vi.mock('@queries/contacts/contacts', () => ({ useContacts: () => () => [] }));
+vi.mock('@core/component/UserIcon', () => ({ UserIcon: () => null }));
+vi.mock('@app/features/next-soup/filters', () => ({ NO_ASSIGNEE: 'none' }));
+vi.mock('./tag-filter', () => ({
+ useTagFilter: () => ({ hasTags: () => false }),
+}));
+vi.mock('../../sidebar/soup-filter-presets', () => ({
+ getViewPreset: () => ({
+ filters: { include: { includeReminders: true } },
+ clientFilters: { and: ['reminders'] },
+ }),
+ VIEW_TAB_PRESETS: { reminders: { default: 'all' } },
+}));
+vi.mock('./unified-filter-dropdown', () => ({
+ buildContactLabel: () => '',
+ VIEW_FILTER_CATEGORIES: {
+ reminders: [
+ {
+ id: 'completion',
+ label: 'Completion',
+ multiple: false,
+ options: [
+ { id: 'reminders-done', label: 'Done' },
+ { id: 'reminders-not-done', label: 'Not done' },
+ ],
+ },
+ ],
+ },
+}));
+
+it.each([true, false])(
+ 'keeps completion chips and collection requests synchronized starting at %s',
+ (initial) => {
+ createRoot((dispose) => {
+ const query = createQueryStore({
+ initial: { include: { includeReminders: true } },
+ });
+ const predicates = createPredicatesStore<
+ boolean,
+ unknown,
+ PredicateConfig<boolean>
+ >({
+ configs: [
+ { id: 'reminders', predicate: () => true },
+ { id: 'reminders-done', predicate: (done: boolean) => done },
+ { id: 'reminders-not-done', predicate: (done: boolean) => !done },
+ ],
+ initial: { and: ['reminders'] },
+ });
+ state.current = {
+ soup: { predicates },
+ queryFilters: query,
+ items: () => [],
+ assigneeFilter: () => [],
+ setAssigneeFilter: vi.fn(),
+ activeTab: () => 'all',
+ };
+ const refinements = useFilterRefinements();
+ const id = (done: boolean) =>
+ done ? 'reminders-done' : 'reminders-not-done';
+ const check = (completed: boolean | undefined) => {
+ expect(query.state.include).toEqual({
+ includeReminders: true,
+ reminderCompleted: completed,
+ });
+ expect(predicates.test(true, undefined)).toBe(completed !== false);
+ expect(predicates.test(false, undefined)).toBe(completed !== true);
+ expect(
+ refinements
+ .consolidatedFiltersList()
+ .flatMap((chip) => chip.values().map((value) => value.id))
+ ).toEqual(completed === undefined ? [] : [id(completed)]);
+ };
+ toggleReminderCompletionFilter(id(initial), predicates, query);
+ check(initial);
+ const chip = refinements.consolidatedFiltersList()[0];
+ expect(chip.multiple).toBe(false);
+ chip.onToggleValue!(id(!initial));
+ check(!initial);
+ chip.onToggleValue!(id(!initial));
+ check(undefined);
+ toggleReminderCompletionFilter(id(initial), predicates, query);
+ refinements.consolidatedFiltersList()[0].onRemoveAll();
+ check(undefined);
+ toggleReminderCompletionFilter(id(initial), predicates, query);
+ refinements.resetToTabDefaults();
+ check(undefined);
+ dispose();
+ });
+ }
+);
diff --git a/apps/web/src/features/next-soup/soup-view/filters-bar/use-filter-refinements.tsx b/apps/web/src/features/next-soup/soup-view/filters-bar/use-filter-refinements.tsx
index d02ee4caad..751cef342d 100644
--- a/apps/web/src/features/next-soup/soup-view/filters-bar/use-filter-refinements.tsx
+++ b/apps/web/src/features/next-soup/soup-view/filters-bar/use-filter-refinements.tsx
@@ -33,6 +33,10 @@ import type {
ConsolidatedFilter,
FilterValue,
} from './consolidated-filter-chip';
+import {
+ setReminderCompletionFilter,
+ toggleReminderCompletionFilter,
+} from './reminder-completion-filter';
import type { SearchableOption } from './searchable-multi-select';
import { useTagFilter } from './tag-filter';
import {
@@ -476,6 +480,11 @@ export function useFilterRefinements() {
multiple: group.multiple,
isValueActive: (id) => soup.predicates.isActive(id),
onToggleValue: (id) => {
+ if (
+ currentView() === 'reminders' &&
+ toggleReminderCompletionFilter(id, soup.predicates, queryFilters)
+ )
+ return;
const filterId = id as FilterID;
const wasActive = soup.predicates.isActive(filterId);
const isInboxTypeFilter =
@@ -521,6 +530,14 @@ export function useFilterRefinements() {
});
},
onRemoveAll: () => {
+ if (currentView() === 'reminders' && categoryId === 'completion') {
+ setReminderCompletionFilter(
+ undefined,
+ soup.predicates,
+ queryFilters
+ );
+ return;
+ }
const categoryOptionIds = new Set(
group.allOptions
.filter((option) => !TAB_ONLY_FILTERS.has(option.id))
diff --git a/apps/web/src/features/next-soup/soup-view/initial-view-filters.test.ts b/apps/web/src/features/next-soup/soup-view/initial-view-filters.test.ts
new file mode 100644
index 0000000000..a1cd628b99
--- /dev/null
+++ b/apps/web/src/features/next-soup/soup-view/initial-view-filters.test.ts
@@ -0,0 +1,82 @@
+import { createRoot } from 'solid-js';
+import { expect, it, vi } from 'vitest';
+import { createPredicatesStore } from '../filters/filter-store/predicates-store';
+import { createQueryStore } from '../filters/filter-store/query-store';
+import { resolveInitialViewFilters } from './initial-view-filters';
+
+vi.mock('../sidebar/soup-filter-presets', () => ({
+ getViewPreset: () => ({ filters: { include: { includeReminders: true } } }),
+}));
+
+it.each(['active', 'scheduled', 'done', undefined])(
+ 'migrates a %s reminder entry without leaking into the next split destination',
+ (rememberedTab) =>
+ createRoot((dispose) => {
+ const query = createQueryStore();
+ const predicates = createPredicatesStore({
+ configs: [
+ { id: 'reminders', predicate: () => true },
+ { id: 'calls', predicate: () => true },
+ ],
+ });
+ const initialize = (
+ options: Parameters<typeof resolveInitialViewFilters>[0]
+ ) => {
+ const filters = resolveInitialViewFilters(options);
+ query.replace(filters.query ?? null);
+ predicates.set(filters.predicates ?? {});
+ };
+ const legacyEntry = {
+ query: { include: { includeReminders: true, reminderCompleted: true } },
+ predicates: { and: ['reminders-done'] },
+ };
+ initialize({
+ view: 'reminders',
+ rememberedTab,
+ entry: legacyEntry,
+ persisted: {},
+ initial: {},
+ });
+ expect(query.state.include.reminderCompleted).toBeUndefined();
+ expect(predicates.andIds()).toEqual(['reminders']);
+ initialize({
+ view: 'calls',
+ rememberedTab: undefined,
+ entry: {},
+ persisted: {},
+ initial: {
+ query: { include: { documentId: ['call'] } },
+ predicates: { and: ['calls'] },
+ },
+ });
+ expect(query.state.include).toEqual({ documentId: ['call'] });
+ expect(predicates.andIds()).toEqual(['calls']);
+ // The same provider must also migrate an old reminder history entry on return.
+ initialize({
+ view: 'reminders',
+ rememberedTab,
+ entry: legacyEntry,
+ persisted: {},
+ initial: {},
+ });
+ expect(query.state.include).toEqual({ includeReminders: true });
+ expect(predicates.andIds()).toEqual(['reminders']);
+ dispose();
+ })
+);
+
+it('preserves explicit completion refinements on a current all entry', () => {
+ const entry = {
+ query: { include: { reminderCompleted: true } },
+ predicates: { and: ['reminders', 'reminders-done'] },
+ };
+ expect(
+ resolveInitialViewFilters({
+ view: 'reminders',
+ rememberedTab: 'all',
+ entry,
+ persisted: {},
+ initial: {},
+ })
+ ).toEqual(entry);
+});
diff --git a/apps/web/src/features/next-soup/soup-view/initial-view-filters.ts b/apps/web/src/features/next-soup/soup-view/initial-view-filters.ts
new file mode 100644
index 0000000000..82ffbd82f6
--- /dev/null
+++ b/apps/web/src/features/next-soup/soup-view/initial-view-filters.ts
@@ -0,0 +1,41 @@
+import type { ListView } from '@app/constants/list-views';
+import type { SetPredicatesInput } from '../filters/filter-store/predicates-store';
+import type { Query } from '../filters/filter-store/query-store';
+import { getViewPreset } from '../sidebar/soup-filter-presets';
+
+type ViewFilters = {
+ query?: Query;
+ predicates?: SetPredicatesInput<string>;
+};
+
+/** Resolve each destination independently: the split provider survives navigation. */
+export function resolveInitialViewFilters(options: {
+ view: ListView | undefined;
+ rememberedTab: unknown;
+ entry: ViewFilters;
+ persisted: ViewFilters;
+ initial: ViewFilters;
+ preferInitialFilters?: boolean;
+}): ViewFilters {
+ const migrateReminderTab =
+ options.view === 'reminders' && options.rememberedTab !== 'all';
+ const entry = migrateReminderTab ? {} : options.entry;
+ const fallback = migrateReminderTab
+ ? {
+ query: getViewPreset('reminders')?.filters,
+ predicates: { and: ['reminders'] },
+ }
+ : options.initial;
+ return {
+ query:
+ entry.query ??
+ (options.preferInitialFilters ? options.initial.query : undefined) ??
+ options.persisted.query ??
+ fallback.query,
+ predicates:
+ entry.predicates ??
+ (options.preferInitialFilters ? options.initial.predicates : undefined) ??
+ options.persisted.predicates ??
+ fallback.predicates,
+ };
+}
diff --git a/apps/web/src/features/next-soup/soup-view/soup-view-context.tsx b/apps/web/src/features/next-soup/soup-view/soup-view-context.tsx
index 2155e2decb..b5386bdb85 100644
--- a/apps/web/src/features/next-soup/soup-view/soup-view-context.tsx
+++ b/apps/web/src/features/next-soup/soup-view/soup-view-context.tsx
@@ -67,7 +67,9 @@ import {
unreadFilterFn,
} from '@entity';
import { useQueryClient } from '@queries/client';
+import { queryReadyGate } from '@queries/gate';
import { invalidateUserNotifications } from '@queries/notification/user-notifications';
+import { useReminderCollectionQuery } from '@queries/reminders/collection';
import { createGroupedSoupQueries } from '@queries/soup/grouped/create-grouped-soup-queries';
import type {
GroupMeta as ApiGroupMeta,
@@ -103,6 +105,7 @@ import {
applyDocumentTabScope,
withDocumentTabItemScope,
} from './document-tab-scope';
+import { resolveInitialViewFilters } from './initial-view-filters';
type DataSource<T> = {
data: Accessor<T[]>;
@@ -381,20 +384,26 @@ export const createSoupViewState = (props: SoupViewContextProviderProps) => {
? persistedPredicatesFor(initialView, initialTab)
: undefined;
- const store = createQueryStore({
- initial:
- initialEntryQuery ??
- (props.preferInitialFilters ? props.initialQuery : undefined) ??
- initialPersistedQuery ??
- props.initialQuery,
+ const initialFilters = resolveInitialViewFilters({
+ view: initialView,
+ rememberedTab:
+ initialEntryState?.['soup.tab'] ??
+ (filterPersistenceEnabled() && initialView
+ ? persistedActiveTabs()[initialView]
+ : undefined),
+ entry: { query: initialEntryQuery, predicates: initialEntryPredicates },
+ persisted: {
+ query: initialPersistedQuery,
+ predicates: initialPersistedPredicates,
+ },
+ initial: {
+ query: props.initialQuery,
+ predicates: props.initialClientFilters,
+ },
+ preferInitialFilters: props.preferInitialFilters,
});
-
- const initialPredicates =
- initialEntryPredicates ??
- (props.preferInitialFilters ? props.initialClientFilters : undefined) ??
- initialPersistedPredicates ??
- props.initialClientFilters;
- if (initialPredicates) soup.predicates.set(initialPredicates);
+ const store = createQueryStore({ initial: initialFilters.query });
+ if (initialFilters.predicates) soup.predicates.set(initialFilters.predicates);
const filterCaptorTeardown = panel.handle.registerEntryStateCaptor(
'search.filters',
@@ -703,11 +712,13 @@ export const createSoupViewState = (props: SoupViewContextProviderProps) => {
// inbox's All and Reminders tabs stay on update recency even when a row
// carries a notification stamp from a Signal page or a live delivery.
const clientSort = createMemo((): SortConfig<SoupEntity>[] =>
- presetSortMethod() === 'notified_at'
- ? [SORT_CONFIGS.notified_at]
- : config().sortMethod?.() === 'touched_by_me'
- ? []
- : soup.sort.active()
+ activeListView() === 'reminders'
+ ? []
+ : presetSortMethod() === 'notified_at'
+ ? [SORT_CONFIGS.notified_at]
+ : config().sortMethod?.() === 'touched_by_me'
+ ? []
+ : soup.sort.active()
);
const isClientPropertyGroup = createMemo(
@@ -870,22 +881,23 @@ export const createSoupViewState = (props: SoupViewContextProviderProps) => {
? persistedPredicatesFor(view, tabId)
: undefined;
- queryFilters.replace(
- entryQuery ??
- (options.preferInitialFilters ? options.initialQuery : undefined) ??
- persistedQuery ??
- options.initialQuery ??
- null
- );
- soup.predicates.set(
- entryPredicates ??
- (options.preferInitialFilters
- ? options.initialClientFilters
- : undefined) ??
- savedPredicates ??
- options.initialClientFilters ??
- {}
- );
+ const filters = resolveInitialViewFilters({
+ view,
+ rememberedTab:
+ entryState?.['soup.tab'] ??
+ (filterPersistenceEnabled() && view
+ ? persistedActiveTabs()[view]
+ : undefined),
+ entry: { query: entryQuery, predicates: entryPredicates },
+ persisted: { query: persistedQuery, predicates: savedPredicates },
+ initial: {
+ query: options.initialQuery,
+ predicates: options.initialClientFilters,
+ },
+ preferInitialFilters: options.preferInitialFilters,
+ });
+ queryFilters.replace(filters.query ?? null);
+ soup.predicates.set(filters.predicates ?? {});
setSearchText(options.initialSearchText ?? '');
setEnabled(true);
});
@@ -949,6 +961,28 @@ export const createSoupViewState = (props: SoupViewContextProviderProps) => {
);
};
+ const usesReminderCollection = () =>
+ activeListView() === 'reminders' && !search.isSearching();
+ const reminderCollection = useReminderCollectionQuery(() => ({
+ userId: userId(),
+ enabled: enabled() && usesReminderCollection(),
+ completed: queryFilters.state.include.reminderCompleted,
+ }));
+ const reminderCollectionData = () =>
+ queryReadyGate(reminderCollection) ? reminderCollection.data : undefined;
+ const reminderSource = {
+ data: reminderCollectionData,
+ error: () => reminderCollection.error,
+ hasData: () => reminderCollectionData() !== undefined,
+ isLoading: () => reminderCollection.isLoading,
+ isFetching: () => reminderCollection.isFetching,
+ isPlaceholderData: () => false,
+ isFetchingNextPage: () => reminderCollection.isFetchingNextPage,
+ isEnabled: () => enabled() && usesReminderCollection(),
+ hasNextPage: () => reminderCollection.hasNextPage,
+ fetchNextPage: () => reminderCollection.fetchNextPage(),
+ };
+
// The Soup query facade owns GraphQL eligibility and REST fallback. Its urql
// implementation keeps loaded pages subscribed to the normalized cache.
const itemsQuery = useSoupAstItemsQuery(
@@ -967,7 +1001,8 @@ export const createSoupViewState = (props: SoupViewContextProviderProps) => {
// after a tab switch.
const emailImportance = queryFilters.state.include.emailImportance;
return {
- enabled: enabled() && !search.isSearching(),
+ enabled:
+ enabled() && !search.isSearching() && !usesReminderCollection(),
showSupportedForeignEntities: showSupportedForeignEntitiesFF().enabled,
onBeforeGraphqlRefresh: () => groupQueries.resetToInitialPage(),
meta: {
@@ -992,7 +1027,7 @@ export const createSoupViewState = (props: SoupViewContextProviderProps) => {
const itemsQueryError = () =>
itemsQuery.error ?? nativeOfflineLoadError(itemsQueryHasData);
- const itemsSource = {
+ const soupItemsSource = {
data: itemsQueryData,
error: itemsQueryError,
hasData: itemsQueryHasData,
@@ -1005,12 +1040,15 @@ export const createSoupViewState = (props: SoupViewContextProviderProps) => {
fetchNextPage: () => itemsQuery.fetchNextPage(),
};
+ const itemsSource = () =>
+ usesReminderCollection() ? reminderSource : soupItemsSource;
+
const items = createMemo<SoupEntity[]>(
(prev) => {
const searching = search.isSearching();
if (!searching) {
- const data = itemsSource.data();
+ const data = itemsSource().data();
const extras = config().additionalEntities?.() ?? [];
const extraEntities = extras.map((e) =>
isWithNotification(e) ? e : attachNotifications(e)
@@ -1022,7 +1060,9 @@ export const createSoupViewState = (props: SoupViewContextProviderProps) => {
// navigation. Once the active query fails, those rows belong to
// the previous query and must go so the load-error state can
// render — only client-local rows remain valid.
- return itemsSource.error() ? extraEntities : prev;
+ return usesReminderCollection() || itemsSource().error()
+ ? extraEntities
+ : prev;
}
if (data.groups) return prev;
@@ -1147,12 +1187,12 @@ export const createSoupViewState = (props: SoupViewContextProviderProps) => {
const groupQueries = createGroupedSoupQueries({
initialPage: createMemo(() => {
- if (itemsSource.isPlaceholderData()) return;
+ if (itemsSource().isPlaceholderData()) return;
- const groups = itemsSource.data()?.groups;
- const items = itemsSource.data()?.itemsById;
+ const groups = itemsSource().data()?.groups;
+ const items = itemsSource().data()?.itemsById;
if (!groups || !items) return;
- return { groups, items, cachedMail: itemsSource.data()?.cachedMail };
+ return { groups, items, cachedMail: itemsSource().data()?.cachedMail };
}),
groupByField: serverGroupByField,
soupParams,
@@ -1237,7 +1277,7 @@ export const createSoupViewState = (props: SoupViewContextProviderProps) => {
const builtRows = createMemo((): SoupRow[] => {
const field = groupByField();
- const groups = itemsSource.data()?.groups;
+ const groups = itemsSource().data()?.groups;
// Client-side property grouping (Customers view): bucket the flat
// (paginated) list by property value; option order comes from the
@@ -1463,28 +1503,28 @@ export const createSoupViewState = (props: SoupViewContextProviderProps) => {
cachedMail: () =>
!search.isSearching() && itemsQueryData()?.cachedMail === true,
error: () =>
- search.isSearching() ? searchSourceError() : itemsSource.error(),
+ search.isSearching() ? searchSourceError() : itemsSource().error(),
hasData: () =>
search.isSearching()
? searchSourceHasData()
- : itemsSource.hasData() ||
+ : itemsSource().hasData() ||
// Rows retained across a query rebind count as data so the view
// doesn't flash, but once the query errors only client-local
// rows remain and must not suppress the load-error state.
- (!itemsSource.error() &&
- !itemsSource.isPlaceholderData() &&
+ (!itemsSource().error() &&
+ !itemsSource().isPlaceholderData() &&
entities().length > 0),
- isLoading: () => itemsSource.isLoading(),
- isFetching: () => itemsSource.isFetching() || searchQuery.isFetching,
+ isLoading: () => itemsSource().isLoading(),
+ isFetching: () => itemsSource().isFetching() || searchQuery.isFetching,
isPlaceholderData: () =>
- itemsSource.isPlaceholderData() && !search.isSearching(),
+ itemsSource().isPlaceholderData() && !search.isSearching(),
isFetchingNextPage: () =>
- itemsSource.isFetchingNextPage() || searchQuery.isFetchingNextPage,
+ itemsSource().isFetchingNextPage() || searchQuery.isFetchingNextPage,
hasNextPage: () => {
if (!enabled()) return false;
return (
- (itemsSource.isEnabled() && itemsSource.hasNextPage()) ||
+ (itemsSource().isEnabled() && itemsSource().hasNextPage()) ||
(searchQuery.isEnabled && searchQuery.hasNextPage)
);
},
@@ -1492,7 +1532,7 @@ export const createSoupViewState = (props: SoupViewContextProviderProps) => {
if (!enabled()) return;
await Promise.all([
- itemsSource.isEnabled() ? itemsSource.fetchNextPage() : undefined,
+ itemsSource().isEnabled() ? itemsSource().fetchNextPage() : undefined,
searchQuery.isEnabled ? searchQuery.fetchNextPage() : undefined,
]);
},
@@ -1525,6 +1565,10 @@ export const createSoupViewState = (props: SoupViewContextProviderProps) => {
// This covers both transports: urql pages sit outside the TanStack
// invalidation above, and the REST refetch dedupes against it.
+ if (usesReminderCollection()) {
+ await reminderCollection.refetch({ throwOnError: true });
+ return;
+ }
await itemsQuery.refresh();
},
},
diff --git a/apps/web/src/features/next-soup/soup-view/soup-view-tabs.tsx b/apps/web/src/features/next-soup/soup-view/soup-view-tabs.tsx
index 104080c7f5..b9df8e0cbe 100644
--- a/apps/web/src/features/next-soup/soup-view/soup-view-tabs.tsx
+++ b/apps/web/src/features/next-soup/soup-view/soup-view-tabs.tsx
@@ -276,6 +276,9 @@ export const MobileSoupViewTabs = () => {
return (
<Switch>
+ <Match when={listView() === 'reminders'}>
+ <MobileFilterDrawer />
+ </Match>
<Match when={listView() === 'search'}>
{/* The search view has no tab pills — its header hosts only the
facet-filter drawer button (the desktop SearchFiltersRow's
diff --git a/apps/web/src/features/next-soup/soup-view/soup-view.tsx b/apps/web/src/features/next-soup/soup-view/soup-view.tsx
index 775d122ff4..f2b32f3748 100644
--- a/apps/web/src/features/next-soup/soup-view/soup-view.tsx
+++ b/apps/web/src/features/next-soup/soup-view/soup-view.tsx
@@ -119,6 +119,7 @@ import {
import { Dynamic } from 'solid-js/web';
import { Virtualizer, type VirtualizerHandle } from 'virtua/solid';
import type { CacheSnapshot } from 'virtua/unstable_core';
+import { makeMarkNotDoneAction } from '../actions/make-mark-not-done-action';
import { SOUP_TOUR } from '../tour';
import { SearchAskAiButton } from './search-ask-ai-button';
import { SoupEntitySelectionToolbar } from './soup-entity-selection-toolbar';
@@ -304,7 +305,10 @@ export const SoupView = (props: SoupViewProps) => {
: undefined;
let initialActiveTab = persistedActiveTab ?? persistedViewActiveTab;
- if (initialActiveTab === undefined && isListViewID(contentId)) {
+ if (
+ (initialActiveTab === undefined || contentId === 'reminders') &&
+ isListViewID(contentId)
+ ) {
initialActiveTab = VIEW_TAB_PRESETS[contentId].default;
}
@@ -806,6 +810,9 @@ const SoupViewListContent = (props: SoupViewListProps) => {
userId,
notificationSource: () => notificationSource,
});
+ const markNotDoneAction = makeMarkNotDoneAction({
+ notificationSource: () => notificationSource,
+ });
const debouncedFetchMore = debounce(() => {
if (
@@ -1378,6 +1385,24 @@ const SoupViewListContent = (props: SoupViewListProps) => {
source.deferRowInteractions?.() === true
}
entity={row.original}
+ onToggleReminderDone={
+ row.original.type === 'reminder'
+ ? async () => {
+ if (
+ row.original.type !== 'reminder'
+ )
+ return;
+ if (row.original.completedAt)
+ await markNotDoneAction.execute(
+ [row.original]
+ );
+ else
+ await markDoneAction.execute([
+ row.original,
+ ]);
+ }
+ : undefined
+ }
timestamp={timestamp()}
highlighted={row.isFocused()}
onMouseMove={() => {
diff --git a/apps/web/src/features/next-soup/soup-view/tab-lists.ts b/apps/web/src/features/next-soup/soup-view/tab-lists.ts
index 1492d1c7b6..5e4debecbf 100644
--- a/apps/web/src/features/next-soup/soup-view/tab-lists.ts
+++ b/apps/web/src/features/next-soup/soup-view/tab-lists.ts
@@ -12,7 +12,6 @@ export type TabbedListView = Extract<
| 'channels'
| 'calls'
| 'folders'
- | 'reminders'
>;
/** Tab definitions for each list view. */
@@ -67,9 +66,4 @@ export const VIEW_TAB_LISTS: Record<TabbedListView, TabItem[]> = {
{ value: 'owned', label: 'Owned' },
{ value: 'all', label: 'All' },
],
- reminders: [
- { value: 'active', label: 'Active' },
- { value: 'scheduled', label: 'Scheduled' },
- { value: 'done', label: 'Done' },
- ],
};
diff --git a/apps/web/src/features/next-soup/soup-view/use-soup-view-hotkeys.test.ts b/apps/web/src/features/next-soup/soup-view/use-soup-view-hotkeys.test.ts
new file mode 100644
index 0000000000..ef55ded7e6
--- /dev/null
+++ b/apps/web/src/features/next-soup/soup-view/use-soup-view-hotkeys.test.ts
@@ -0,0 +1,117 @@
+import { createRoot } from 'solid-js';
+import { afterEach, describe, expect, it, vi } from 'vitest';
+
+const mocks = vi.hoisted(() => ({
+ enter: undefined as ((event?: KeyboardEvent) => boolean) | undefined,
+ open: vi.fn(),
+}));
+
+vi.mock('@app/constants/hotkeys', () => ({
+ GO_TO_COMMAND_SCOPE: 'go-to',
+ GO_TO_LEADER_KEY: 'g',
+}));
+vi.mock('@app/features/command/state', () => ({
+ CommandState: { isOpen: () => false },
+}));
+vi.mock('@app/features/next-soup/sidebar/soup-filter-presets', () => ({
+ VIEW_TAB_PRESETS: {},
+}));
+vi.mock('@app/features/next-soup/utils', () => ({
+ markChannelNotificationsSeenOnOpen: vi.fn(),
+ markReminderSeenOnOpen: vi.fn(),
+ openEntityInSplitFromUnifiedList: mocks.open,
+}));
+vi.mock('@app/lib/analytics/analytics-context', () => ({
+ useAnalytics: () => ({ track: vi.fn() }),
+}));
+vi.mock('@app/signal/splitLayout', () => ({
+ globalSplitManager: () => undefined,
+}));
+vi.mock('@components/app/GlobalAppState', () => ({
+ useGlobalNotificationSource: () => ({}),
+}));
+vi.mock('@core/hotkey/hotkeys', () => ({
+ createHotkeyGroup: () => ({ dispose: vi.fn() }),
+ registerHotkey: (options: {
+ hotkey: string | string[];
+ keyDownHandler?: (event?: KeyboardEvent) => boolean;
+ }) => {
+ if (Array.isArray(options.hotkey) && options.hotkey[0] === 'enter') {
+ mocks.enter = options.keyDownHandler;
+ }
+ return { withGroup: vi.fn() };
+ },
+}));
+vi.mock('@core/hotkey/utils', () => ({ isScopeInActiveBranch: () => true }));
+vi.mock('@entity', () => ({
+ filterNotDoneNotifications: vi.fn(),
+ filterValidNotifications: vi.fn(),
+ isSearchEntity: () => false,
+ isWithNotification: () => false,
+}));
+vi.mock('@notifications', () => ({ openSingleStackNotification: vi.fn() }));
+vi.mock('./soup-view-tabs', () => ({
+ VIEW_TAB_LISTS: {},
+ useVisibleViewTabs: () => () => [],
+}));
+
+import { useSoupViewHotkeys } from './use-soup-view-hotkeys';
+
+let dispose: (() => void) | undefined;
+afterEach(() => {
+ dispose?.();
+ mocks.open.mockClear();
+});
+
+function mountHotkeys() {
+ createRoot((cleanup) => {
+ dispose = cleanup;
+ useSoupViewHotkeys({
+ scopeId: 'reminder-native-action-test',
+ soup: {
+ focus: {
+ row: () => ({
+ getIsGrouped: () => false,
+ getIsLoadMore: () => false,
+ }),
+ item: () => ({ type: 'reminder', id: 'reminder' }),
+ },
+ },
+ splitHandle: {},
+ currentView: () => 'reminders',
+ } as unknown as Parameters<typeof useSoupViewHotkeys>[0]);
+ });
+}
+
+describe('native reminder Enter activation', () => {
+ it('yields without preventing the native button default or opening its row', () => {
+ mountHotkeys();
+ const button = document.createElement('button');
+ button.setAttribute('data-reminder-action', '');
+ const icon = button.appendChild(document.createElement('span'));
+ const event = new KeyboardEvent('keydown', {
+ key: 'Enter',
+ cancelable: true,
+ });
+ let handled: boolean | undefined;
+ icon.addEventListener('keydown', (event) => {
+ handled = mocks.enter?.(event as KeyboardEvent);
+ });
+ icon.dispatchEvent(event);
+ expect(handled).toBe(false);
+ expect(event.defaultPrevented).toBe(false);
+ expect(mocks.open).not.toHaveBeenCalled();
+ });
+
+ it.each([true, false])(
+ 'retains row navigation (keyboard event: %s)',
+ (keyboard) => {
+ mountHotkeys();
+ const event = keyboard
+ ? new KeyboardEvent('keydown', { key: 'Enter' })
+ : undefined;
+ expect(mocks.enter?.(event)).toBe(true);
+ expect(mocks.open).toHaveBeenCalledOnce();
+ }
+ );
+});
diff --git a/apps/web/src/features/next-soup/soup-view/use-soup-view-hotkeys.ts b/apps/web/src/features/next-soup/soup-view/use-soup-view-hotkeys.ts
index 8392d8bb16..ed02d73bca 100644
--- a/apps/web/src/features/next-soup/soup-view/use-soup-view-hotkeys.ts
+++ b/apps/web/src/features/next-soup/soup-view/use-soup-view-hotkeys.ts
@@ -158,6 +158,13 @@ export const useSoupViewHotkeys = (options: UseSoupViewHotkeysOptions) => {
description: 'Open',
hide: true,
keyDownHandler: (event) => {
+ // Native row controls own Enter. The document hotkey runs during capture,
+ // before the reminder button's propagation guards can handle the event.
+ if (
+ event?.target instanceof Element &&
+ event.target.closest('button[data-reminder-action]')
+ )
+ return false;
const focusedRow = soup.focus.row();
if (!focusedRow) return false;
diff --git a/apps/web/src/features/reminders/ReminderComposerModal.tsx b/apps/web/src/features/reminders/ReminderComposerModal.tsx
index 7762c5b5e8..6b9c1ed634 100644
--- a/apps/web/src/features/reminders/ReminderComposerModal.tsx
+++ b/apps/web/src/features/reminders/ReminderComposerModal.tsx
@@ -78,7 +78,7 @@ export function ReminderComposerModal() {
setSubmitting(false);
closeReminderComposer();
toast.success(
- `Reminder set · ${describeReminderConfirmation(reminder.schedule)}`,
+ `Reminder set · ${describeReminderConfirmation(reminder.schedule, reminder.nextRunAt)}`,
{
actions: [
{
diff --git a/apps/web/src/features/reminders/ReminderEditorSplit.tsx b/apps/web/src/features/reminders/ReminderEditorSplit.tsx
index ee806cd23a..63863853a6 100644
--- a/apps/web/src/features/reminders/ReminderEditorSplit.tsx
+++ b/apps/web/src/features/reminders/ReminderEditorSplit.tsx
@@ -80,6 +80,7 @@ function referenceMention(
*/
export type ReminderDetailsProps = {
reminderId: string | undefined;
+ isEmailFollowup?: boolean;
onClose: VoidFunction;
};
@@ -107,7 +108,11 @@ export function ReminderDetails(props: ReminderDetailsProps) {
return (
<Show when={props.reminderId} keyed fallback={<ReminderUnavailable />}>
{(reminderId) => (
- <ReminderDetailsForId reminderId={reminderId} onClose={props.onClose} />
+ <ReminderDetailsForId
+ reminderId={reminderId}
+ onClose={props.onClose}
+ isEmailFollowup={props.isEmailFollowup}
+ />
)}
</Show>
);
@@ -115,6 +120,7 @@ export function ReminderDetails(props: ReminderDetailsProps) {
/** One keyed editor lifecycle, recreated whenever the selected reminder changes. */
function ReminderDetailsForId(props: {
+ isEmailFollowup?: boolean;
reminderId: string;
onClose: VoidFunction;
}) {
@@ -195,7 +201,7 @@ function ReminderDetailsForId(props: {
});
if (!active || props.reminderId !== submittedReminderId) return;
toast.success(
- `Reminder updated · ${describeReminderConfirmation(updated.schedule)}`
+ `Reminder updated · ${describeReminderConfirmation(updated.schedule, updated.nextRunAt)}`
);
props.onClose();
} catch {
@@ -221,7 +227,11 @@ function ReminderDetailsForId(props: {
<Switch>
<Match when={query.isSuccess ? query.data : undefined}>
{(reminder) => (
- <EmailDetailsGate reminder={reminder()} onClose={props.onClose}>
+ <EmailDetailsGate
+ reminder={reminder()}
+ onClose={props.onClose}
+ isEmailFollowup={props.isEmailFollowup}
+ >
<ReminderForm
initialDescription={reminder().description}
initialSchedule={reminder().schedule}
@@ -313,6 +323,7 @@ export function ReminderEditorSplit(props: { reminderId: string | undefined }) {
}
function EmailDetailsGate(props: {
+ isEmailFollowup?: boolean;
reminder: Reminder;
onClose: () => void;
children: JSX.Element;
@@ -329,6 +340,7 @@ function EmailDetailsGate(props: {
{(threadId) => (
<EmailReminderDetails
reminder={props.reminder}
+ isEmailFollowup={props.isEmailFollowup}
threadId={threadId()}
onClose={props.onClose}
>
diff --git a/apps/web/src/features/reminders/ReminderForm.test.tsx b/apps/web/src/features/reminders/ReminderForm.test.tsx
index 42dd410471..e8b6c76767 100644
--- a/apps/web/src/features/reminders/ReminderForm.test.tsx
+++ b/apps/web/src/features/reminders/ReminderForm.test.tsx
@@ -59,7 +59,7 @@ function chooseRepeat(
}
describe('one-shot scheduling', () => {
- it('parses natural date language and previews the exact timezone', () => {
+ it('parses natural date language and previews the exact local time without a redundant timezone', () => {
const { onSubmit } = renderForm({ initialDescription: 'Follow up' });
fireEvent.input(
@@ -74,7 +74,7 @@ describe('one-shot scheduling', () => {
);
const preview = screen.getByText(/Scheduled:/).closest('p');
expect(preview?.textContent).toContain('12:30 PM');
- expect(preview?.textContent).toMatch(/\([A-Z]+\)/);
+ expect(preview?.textContent).not.toContain('UTC');
fireEvent.click(screen.getByRole('button', { name: 'Set reminder' }));
expect(onSubmit).toHaveBeenCalledWith({
@@ -171,7 +171,9 @@ describe('one-shot scheduling', () => {
vi.setSystemTime(new Date('2026-09-21T12:07:23.000Z'));
const { onSubmit } = renderForm({ initialDescription: 'Exact follow up' });
- fireEvent.click(screen.getByRole('button', { name: /In 30m.*12:37 PM/ }));
+ fireEvent.click(
+ screen.getByRole('button', { name: /In 30m.*12:37:23 PM/ })
+ );
fireEvent.click(screen.getByRole('button', { name: 'Choose date & time' }));
const time = screen.getByLabelText('Time') as HTMLInputElement;
@@ -191,7 +193,9 @@ describe('one-shot scheduling', () => {
vi.setSystemTime(new Date('2026-09-21T12:07:23.000Z'));
const { onSubmit } = renderForm({ initialDescription: 'Exact follow up' });
- fireEvent.click(screen.getByRole('button', { name: /In 30m.*12:37 PM/ }));
+ fireEvent.click(
+ screen.getByRole('button', { name: /In 30m.*12:37:23 PM/ })
+ );
fireEvent.click(screen.getByRole('button', { name: 'Choose date & time' }));
fireEvent.click(screen.getByLabelText('Custom reminder date'));
fireEvent.click(screen.getByRole('gridcell', { name: '22' }));
@@ -465,8 +469,13 @@ describe('recurrence', () => {
screen.getByRole('button', { name: 'Repeat, Custom schedule' })
).not.toBeNull();
expect(
- screen.getByText(/will stay unchanged unless you choose a replacement/)
+ screen.getByText(/stays unchanged unless you choose a replacement/)
).not.toBeNull();
+ const preview = screen.getByText('Next:').closest('p');
+ expect(preview?.textContent).toContain('Sep 22, 2026 at 9:00 AM EDT');
+ expect(preview?.textContent).toContain('Repeats on a custom schedule');
+ expect(preview?.textContent).not.toContain(custom.cron);
+ expect(preview?.textContent).not.toContain('America/New_York');
fireEvent.input(screen.getByLabelText('Reminder description'), {
target: { value: 'Renamed custom cadence' },
});
@@ -677,3 +686,74 @@ it('reverts an edited form in place when its host requests that behavior', () =>
fireEvent.click(screen.getByRole('button', { name: 'Cancel' }));
expect(onCancel).toHaveBeenLastCalledWith(false);
});
+
+it('shows the stored custom monthly occurrence without exposing cron and drops it after replacement', () => {
+ renderForm({
+ initialDescription: 'Monthly review',
+ initialSchedule: {
+ type: 'recurring',
+ cron: '0 0 9 1,15 * *',
+ timezone: 'America/New_York',
+ },
+ initialRemindAt: '2026-10-15T13:00:00Z',
+ submitLabel: 'Save',
+ });
+ const preview = screen.getByText('Next:').closest('p');
+ expect(preview?.textContent).toContain('Oct 15, 2026 at 9:00 AM EDT');
+ expect(preview?.textContent).toContain('Repeats monthly on the 1st and 15th');
+ expect(preview?.textContent).not.toContain('0 0 9');
+ chooseRepeat('daily');
+ expect(screen.queryByText('Next:')).toBeNull();
+ expect(screen.queryByText(/Oct 15, 2026/)).toBeNull();
+ expect(screen.getByText(/Repeats daily at/)).not.toBeNull();
+});
+
+it('does not invent a next occurrence when a custom schedule has no nextRunAt', () => {
+ renderForm({
+ initialDescription: 'Custom review',
+ initialSchedule: {
+ type: 'recurring',
+ cron: '0 */15 9 * * *',
+ timezone: 'America/New_York',
+ },
+ submitLabel: 'Save',
+ });
+ expect(screen.queryByText('Next:')).toBeNull();
+ const preview = screen.getByText('Repeats on a custom schedule').closest('p');
+ expect(preview?.textContent).not.toContain('America/New_York');
+ expect(preview?.textContent).not.toContain('EDT');
+});
+
+it('labels a past custom occurrence as due', () => {
+ renderForm({
+ initialDescription: 'Past review',
+ initialSchedule: {
+ type: 'recurring',
+ cron: '0 0 9 1,15 * *',
+ timezone: 'UTC',
+ },
+ initialRemindAt: '2026-09-15T09:00:00Z',
+ submitLabel: 'Save',
+ });
+ expect(screen.getByText('Due:').closest('p')?.textContent).toContain(
+ 'Sep 15, 2026 at 9:00 AM'
+ );
+ expect(screen.queryByText('Next:')).toBeNull();
+});
+
+it('does not apply the opening day seasonal offset to a recurring preview after DST', () => {
+ vi.setSystemTime(new Date('2026-10-31T12:00:00Z'));
+ renderForm({
+ initialDescription: 'Sunday review',
+ initialSchedule: {
+ type: 'recurring',
+ cron: '0 0 9 * * 1',
+ timezone: 'America/New_York',
+ },
+ initialRemindAt: '2026-11-01T14:00:00Z',
+ submitLabel: 'Save',
+ });
+ const preview = screen.getByText(/Repeats weekly on Sun at/);
+ expect(preview.textContent).toContain('9:00 AM Eastern Time');
+ expect(preview.textContent).not.toContain('EDT');
+});
diff --git a/apps/web/src/features/reminders/ReminderForm.tsx b/apps/web/src/features/reminders/ReminderForm.tsx
index 3a42d1c92c..0227f09972 100644
--- a/apps/web/src/features/reminders/ReminderForm.tsx
+++ b/apps/web/src/features/reminders/ReminderForm.tsx
@@ -2,7 +2,6 @@ import { toast } from '@core/component/Toast/Toast';
import {
type CronParts,
DEFAULT_WEEKDAYS,
- describeCron,
getDefaultTimezone,
isCronRepresentable,
isValidCronParts,
@@ -36,7 +35,10 @@ import {
EventDateField,
EventTimeInput,
} from '../calendar/components/composer/EventDateTimeInputs';
+import { describeReminderRecurrence } from './core/recurrence-label';
+import { formatReminderOccurrence } from './core/schedule-instant';
import {
+ describeReminderSchedule,
formatReminderInstant,
isRecurring,
onceSchedule,
@@ -169,10 +171,6 @@ function sameDays(a: string[], b: string[]): boolean {
return a.length === b.length && a.every((day) => b.includes(day));
}
-function capitalize(value: string): string {
- return value.charAt(0).toUpperCase() + value.slice(1);
-}
-
/** Compact but exact enough to compare the quick choices before selecting one. */
function formatQuickPreset(date: Date, timezone: string): string {
return new Intl.DateTimeFormat(undefined, {
@@ -183,19 +181,6 @@ function formatQuickPreset(date: Date, timezone: string): string {
}).format(date);
}
-/** Human-readable zone without awkward output such as `UTC (UTC)`. */
-function formatTimezoneSummary(zone: string): string {
- const readable = zone.replace(/_/g, ' ');
- const abbreviation = shortZone(zone);
- if (
- abbreviation === readable ||
- (abbreviation === 'UTC' && (zone === 'UTC' || zone === 'Etc/UTC'))
- ) {
- return abbreviation;
- }
- return `${readable} (${abbreviation})`;
-}
-
/** The control values to open with, derived from the reminder (or the defaults). */
function deriveSeed(
description: string | undefined,
@@ -247,15 +232,6 @@ function gmtOffset(
return { minutes, text: `${match[1]}${match[2]}:${match[3]}` };
}
-/** A short zone tag ("EDT", "GMT+5:30") for the schedule summary and once view. */
-function shortZone(zone: string, instant = new Date()): string {
- return (
- new Intl.DateTimeFormat('en-US', { timeZone: zone, timeZoneName: 'short' })
- .formatToParts(instant)
- .find((part) => part.type === 'timeZoneName')?.value ?? zone
- );
-}
-
/**
* Every IANA zone the runtime lists, labelled with its current GMT offset and
* ordered by that offset so the list reads west-to-east. Built once — the set
@@ -624,13 +600,41 @@ export function ReminderForm(props: ReminderFormProps) {
if (!typedWhenIsValid()) return;
const date = onceDateTime();
return date
- ? formatReminderInstant(date, localZone, openedAt)
+ ? {
+ label: date.getTime() <= openedAt.getTime() ? 'Due' : 'Scheduled',
+ text:
+ formatReminderOccurrence(date, localZone) ??
+ 'Schedule unavailable',
+ }
: undefined;
}
- if (storedCronIsCustom && !customScheduleReplaced()) {
- return `Custom repeating schedule · ${formatTimezoneSummary(timezone())}`;
+ if (
+ storedCronIsCustom &&
+ !customScheduleReplaced() &&
+ props.initialSchedule?.type === 'recurring'
+ ) {
+ const recurrence = describeReminderRecurrence(
+ props.initialSchedule.cron
+ ).cadence;
+ if (!props.initialRemindAt) return { label: undefined, text: recurrence };
+ const date = new Date(props.initialRemindAt);
+ const instant = formatReminderOccurrence(
+ date,
+ props.initialSchedule.timezone
+ );
+ return instant
+ ? {
+ label: date.getTime() <= openedAt.getTime() ? 'Due' : 'Next',
+ text: `${instant} · ${recurrence}`,
+ }
+ : { label: undefined, text: 'Schedule unavailable' };
}
- return `${capitalize(describeCron(repeatParts()))} · ${formatTimezoneSummary(timezone())}`;
+ return {
+ label: undefined,
+ text: describeReminderSchedule(
+ recurringSchedule(repeatParts(), timezone())
+ ),
+ };
});
const submit = () => {
@@ -849,7 +853,7 @@ export function ReminderForm(props: ReminderFormProps) {
fullWidth
class="h-auto min-h-12 min-w-0 flex-col items-start gap-0.5 rounded-[10px] px-3 py-2 text-left whitespace-normal"
data-reminder-quick-preset={preset.id}
- aria-label={`${preset.label}, ${formatReminderInstant(preset.date, localZone, openedAt)}`}
+ aria-label={`${preset.label}, ${formatReminderInstant(preset.date, localZone)}`}
aria-pressed={
onceDateTime()?.getTime() === preset.date.getTime()
}
@@ -961,8 +965,12 @@ export function ReminderForm(props: ReminderFormProps) {
>
<CalendarBlankIcon class="mt-0.5 size-3.5 shrink-0 text-ink-extra-muted" />
<span class="min-w-0">
- <span class="font-medium text-ink">Scheduled:</span>{' '}
- {preview()}
+ <Show when={preview().label}>
+ {(label) => (
+ <span class="font-medium text-ink">{label()}: </span>
+ )}
+ </Show>
+ {preview().text}
</span>
</p>
)}
@@ -1024,9 +1032,9 @@ export function ReminderForm(props: ReminderFormProps) {
</Dropdown>
<Show when={storedCronIsCustom && !customScheduleReplaced()}>
- <p class="rounded-lg bg-alert/10 px-3 py-2 text-xs text-alert-ink">
- This reminder uses a custom repeat schedule. It will stay
- unchanged unless you choose a replacement.
+ <p class="text-xs text-ink-muted">
+ This repeat schedule stays unchanged unless you choose a
+ replacement.
</p>
</Show>
diff --git a/apps/web/src/features/reminders/components/email-reminder-form.tsx b/apps/web/src/features/reminders/components/email-reminder-form.tsx
index b3d13b220c..09b198e7c8 100644
--- a/apps/web/src/features/reminders/components/email-reminder-form.tsx
+++ b/apps/web/src/features/reminders/components/email-reminder-form.tsx
@@ -205,7 +205,7 @@ export function EmailReminderForm(props: {
</Show>
<p class="text-xs text-ink-muted" role="status">
{valid()
- ? formatReminderInstant(selected()!, zone, now)
+ ? formatReminderInstant(selected()!, zone)
: 'Choose a future time. Times skipped by a clock change are unavailable.'}
</p>
<SegmentedControl<EmailReminderCondition>
diff --git a/apps/web/src/features/reminders/components/reminder-schedule-indicator.test.tsx b/apps/web/src/features/reminders/components/reminder-schedule-indicator.test.tsx
new file mode 100644
index 0000000000..2fa67a55f3
--- /dev/null
+++ b/apps/web/src/features/reminders/components/reminder-schedule-indicator.test.tsx
@@ -0,0 +1,55 @@
+import { cleanup, fireEvent, render, screen } from '@solidjs/testing-library';
+import type { JSX, ParentProps } from 'solid-js';
+import { afterEach, expect, it, vi } from 'vitest';
+import { ReminderScheduleIndicator } from './reminder-schedule-indicator';
+
+const device = vi.hoisted(() => ({ touch: false }));
+vi.mock('@core/mobile/isTouchDevice', () => ({
+ isTouchDevice: () => device.touch,
+}));
+vi.mock('@ui', () => ({
+ Tooltip: (props: ParentProps<{ open?: boolean }>) => (
+ <div data-testid="tooltip" data-open={String(props.open)}>
+ {props.children}
+ </div>
+ ),
+ Button: (props: JSX.ButtonHTMLAttributes<HTMLButtonElement>) => (
+ <button {...props} />
+ ),
+}));
+afterEach(() => {
+ cleanup();
+ vi.restoreAllMocks();
+});
+
+it.each([false, true])(
+ 'shows keyboard focus schedules on touch=%s',
+ (touch) => {
+ device.touch = touch;
+ render(() => (
+ <ReminderScheduleIndicator label="Next: Oct 15" onEdit={() => {}} />
+ ));
+ const button = screen.getByRole('button');
+ vi.spyOn(button, 'matches').mockReturnValue(true);
+ fireEvent.focusIn(button);
+ expect(screen.getByTestId('tooltip').getAttribute('data-open')).toBe(
+ 'true'
+ );
+ }
+);
+it('keeps a touch-restored focus tooltip from covering the next row action', () => {
+ device.touch = true;
+ const edit = vi.fn();
+ render(() => (
+ <ReminderScheduleIndicator label="Next: Oct 15" onEdit={edit} />
+ ));
+ const button = screen.getByRole('button');
+ vi.spyOn(button, 'matches').mockReturnValue(false);
+ fireEvent.focusIn(button);
+ expect(screen.getByTestId('tooltip').getAttribute('data-open')).toBe('false');
+ fireEvent.click(button);
+ expect(edit).toHaveBeenCalledOnce();
+ fireEvent.focusOut(button);
+ fireEvent.focusIn(button);
+ expect(screen.getByTestId('tooltip').getAttribute('data-open')).toBe('false');
+});
diff --git a/apps/web/src/features/reminders/components/reminder-schedule-indicator.tsx b/apps/web/src/features/reminders/components/reminder-schedule-indicator.tsx
new file mode 100644
index 0000000000..f04ce03066
--- /dev/null
+++ b/apps/web/src/features/reminders/components/reminder-schedule-indicator.tsx
@@ -0,0 +1,48 @@
+import { isTouchDevice } from '@core/mobile/isTouchDevice';
+import ClockIcon from '@phosphor/clock.svg';
+import { Button, Tooltip } from '@ui';
+import { createSignal } from 'solid-js';
+
+/** Persistent metadata, independent of a row's hover actions and timestamp. */
+export function ReminderScheduleIndicator(props: {
+ label: string;
+ onEdit: () => void;
+}) {
+ const [focused, setFocused] = createSignal(false);
+ return (
+ <span
+ class="inline-flex shrink-0"
+ onPointerDown={(event) => {
+ event.stopPropagation();
+ if (event.pointerType === 'touch') setFocused(false);
+ }}
+ onMouseDown={(event) => event.stopPropagation()}
+ onKeyDown={(event) => {
+ if (event.key === 'Enter' || event.key === ' ') event.stopPropagation();
+ }}
+ onClick={(event) => event.stopPropagation()}
+ onFocusIn={(event) =>
+ setFocused(
+ !isTouchDevice() ||
+ (event.target instanceof HTMLElement &&
+ event.target.matches(':focus-visible'))
+ )
+ }
+ onFocusOut={() => setFocused(false)}
+ >
+ <Tooltip
+ label={props.label}
+ open={focused() ? true : isTouchDevice() ? false : undefined}
+ >
+ <Button
+ size="icon-sm"
+ data-reminder-action
+ aria-label={props.label}
+ onClick={props.onEdit}
+ >
+ <ClockIcon class="size-4" />
+ </Button>
+ </Tooltip>
+ </span>
+ );
+}
diff --git a/apps/web/src/features/reminders/core/recurrence-label.test.ts b/apps/web/src/features/reminders/core/recurrence-label.test.ts
new file mode 100644
index 0000000000..c706ca04a4
--- /dev/null
+++ b/apps/web/src/features/reminders/core/recurrence-label.test.ts
@@ -0,0 +1,34 @@
+import { expect, it } from 'vitest';
+import { describeReminderRecurrence } from './recurrence-label';
+
+it.each([
+ ['0 0 9 * * *', 'Repeats daily'],
+ ['0 0 9 * * MON-FRI', 'Repeats on weekdays'],
+ ['0 0 9 * * 1,7', 'Repeats on weekends'],
+ ['0 0 9 * * 2', 'Repeats weekly on Mon'],
+ ['0 0 9 15 * *', 'Repeats monthly on the 15th'],
+ ['0 0 9 15,1,15 * *', 'Repeats monthly on the 1st and 15th'],
+])(
+ 'describes %s without exposing cron or duplicating its time',
+ (cron, cadence) => {
+ expect(describeReminderRecurrence(cron)).toEqual({
+ cadence,
+ time: '9:00 AM',
+ });
+ }
+);
+
+it.each([
+ '0 */15 9 * * *',
+ '30 0 9 * * *',
+ '0 0 9 * * * 2027',
+ '0 0 9 1,15 10 *',
+ '0 0 9 1,15 * 2',
+ '0 99 9 1,15 * *',
+ '0 0 9 1,32 * *',
+ 'invalid',
+])('does not invent a recurrence for %s', (cron) => {
+ expect(describeReminderRecurrence(cron)).toEqual({
+ cadence: 'Repeats on a custom schedule',
+ });
+});
diff --git a/apps/web/src/features/reminders/core/recurrence-label.ts b/apps/web/src/features/reminders/core/recurrence-label.ts
new file mode 100644
index 0000000000..c80db9b3b7
--- /dev/null
+++ b/apps/web/src/features/reminders/core/recurrence-label.ts
@@ -0,0 +1,77 @@
+import {
+ formatTimeLabel,
+ isCronRepresentable,
+ parseCron,
+ WEEKDAY_OPTIONS,
+} from '@core/util/cron';
+
+/** Display-only reading. Never feed this back into a saved schedule. */
+export type ReminderRecurrenceLabel = { cadence: string; time?: string };
+
+const ordinal = (day: number) =>
+ `${day}${day % 100 >= 11 && day % 100 <= 13 ? 'th' : (({ 1: 'st', 2: 'nd', 3: 'rd' } as Record<number, string>)[day % 10] ?? 'th')}`;
+const list = (values: string[]) =>
+ new Intl.ListFormat(undefined, {
+ style: 'long',
+ type: 'conjunction',
+ }).format(values);
+
+/** Keep unsupported expressions honest, without exposing storage syntax. */
+export function describeReminderRecurrence(
+ cron: string
+): ReminderRecurrenceLabel {
+ const fields = cron.trim().split(/\s+/);
+ const names = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];
+ if (fields[5])
+ fields[5] = fields[5].replace(/SUN|MON|TUE|WED|THU|FRI|SAT/gi, (name) =>
+ String(names.indexOf(name.toUpperCase()) + 1)
+ );
+ const displayCron = fields.join(' ');
+ if (isCronRepresentable(displayCron)) {
+ const parts = parseCron(displayCron);
+ const time = formatTimeLabel(parts.time);
+ if (parts.frequency === 'month') {
+ return {
+ cadence: `Repeats monthly on the ${ordinal(Number(parts.dayOfMonth))}`,
+ time,
+ };
+ }
+ const days = parts.daysOfWeek;
+ const cadence =
+ days.length === 7
+ ? 'Repeats daily'
+ : days.length === 5 &&
+ days.every((day) => ['2', '3', '4', '5', '6'].includes(day))
+ ? 'Repeats on weekdays'
+ : days.length === 2 && days.includes('1') && days.includes('7')
+ ? 'Repeats on weekends'
+ : `Repeats weekly on ${list(WEEKDAY_OPTIONS.filter((option) => days.includes(option.value)).map((option) => option.label))}`;
+ return { cadence, time };
+ }
+ // A monthly list is readable even though the editor can only replace it with
+ // a single day. Read it strictly; never silently drop constraints or steps.
+ const [seconds, minute, hour, days, month, weekday, year] = fields;
+ if (
+ (fields.length === 6 || fields.length === 7) &&
+ seconds === '0' &&
+ /^\d+$/.test(minute) &&
+ Number(minute) <= 59 &&
+ /^\d+$/.test(hour) &&
+ Number(hour) <= 23 &&
+ month === '*' &&
+ weekday === '*' &&
+ (year === undefined || year === '*') &&
+ /^(?:[1-9]|[12]\d|3[01])(?:,(?:[1-9]|[12]\d|3[01]))+$/.test(days)
+ ) {
+ const dates = [...new Set(days.split(',').map(Number))].sort(
+ (a, b) => a - b
+ );
+ return {
+ cadence: `Repeats monthly on the ${list(dates.map(ordinal))}`,
+ time: formatTimeLabel(
+ `${String(Number(hour)).padStart(2, '0')}:${String(Number(minute)).padStart(2, '0')}`
+ ),
+ };
+ }
+ return { cadence: 'Repeats on a custom schedule' };
+}
diff --git a/apps/web/src/features/reminders/core/row-schedule.test.ts b/apps/web/src/features/reminders/core/row-schedule.test.ts
new file mode 100644
index 0000000000..9d2a2f1697
--- /dev/null
+++ b/apps/web/src/features/reminders/core/row-schedule.test.ts
@@ -0,0 +1,110 @@
+import type { ReminderEntity } from '@entity';
+import { describe, expect, it } from 'vitest';
+import { reminderScheduleLabel, reminderScheduleState } from './row-schedule';
+
+const now = Date.parse('2026-10-01T12:00:00Z');
+const reminder: ReminderEntity = {
+ type: 'reminder',
+ id: 'test',
+ name: 'Review',
+ description: 'Review',
+ ownerId: '',
+ enabled: true,
+ scheduleType: 'once',
+ nextRunAt: '2026-10-02T13:00:00Z',
+};
+
+describe('independent reminder occurrence and schedule state', () => {
+ it.each([
+ [{}, 'scheduled'],
+ [{ nextRunAt: '2026-10-01T12:00:00Z' }, 'due'],
+ [{ enabled: false }, 'paused'],
+ [{ enabled: false, nextRunAt: '2026-10-01T11:00:00Z' }, 'due'],
+ [
+ {
+ scheduleType: 'recurring',
+ enabled: false,
+ nextRunAt: '2026-10-01T11:00:00Z',
+ },
+ 'paused',
+ ],
+ [{ completedAt: '2026-10-01T11:00:00Z' }, 'completed'],
+ [
+ { scheduleType: 'recurring', completedAt: '2026-10-01T11:00:00Z' },
+ 'scheduled',
+ ],
+ [
+ {
+ scheduleType: 'recurring',
+ enabled: false,
+ completedAt: '2026-10-01T11:00:00Z',
+ },
+ 'completed',
+ ],
+ ] as const)('represents %j as %s', (patch, state) => {
+ expect(reminderScheduleState({ ...reminder, ...patch }, now)).toBe(state);
+ });
+
+ it('labels a disabled past recurring occurrence as paused', () => {
+ expect(
+ reminderScheduleLabel(
+ {
+ ...reminder,
+ scheduleType: 'recurring',
+ enabled: false,
+ nextRunAt: '2026-10-01T11:00:00Z',
+ cron: '0 0 9 * * *',
+ },
+ now,
+ 'UTC'
+ )
+ ).toBe('Paused: Oct 1, 2026 at 11:00 AM · Repeats daily');
+ });
+
+ it('shows a compact date, one foreign zone and a readable recurrence', () => {
+ const label = reminderScheduleLabel(
+ {
+ ...reminder,
+ scheduleType: 'recurring',
+ cron: '0 0 9 * * MON-FRI',
+ timezone: 'America/New_York',
+ },
+ now,
+ 'UTC'
+ );
+ expect(label).not.toContain('Friday');
+ expect(label).toContain('Oct 2');
+ expect(label).toContain('2026');
+ expect(label).toContain('9:00');
+ expect(label).toContain('EDT');
+ expect(label).not.toContain('America/New_York');
+ expect(label).toContain('Repeats on weekdays');
+ expect(label.match(/9:00/g)).toHaveLength(1);
+ expect(label).toContain(' · ');
+ });
+
+ it('does not mislabel an unsupported monthly rule as weekdays', () => {
+ const label = reminderScheduleLabel(
+ {
+ ...reminder,
+ scheduleType: 'recurring',
+ cron: '0 0 9 1,15 * *',
+ timezone: 'America/New_York',
+ },
+ now
+ );
+ expect(label).toContain('Repeats monthly on the 1st and 15th');
+ expect(label).not.toContain('0 0 9 1,15 * *');
+ expect(label).not.toContain('Weekdays');
+ });
+});
+
+it('omits the zone for a local schedule and retains a different year', () => {
+ const label = reminderScheduleLabel(
+ { ...reminder, nextRunAt: '2027-10-02T13:00:00Z', timezone: 'UTC' },
+ now,
+ 'UTC'
+ );
+ expect(label).toContain('2027');
+ expect(label).not.toContain('UTC');
+});
diff --git a/apps/web/src/features/reminders/core/row-schedule.ts b/apps/web/src/features/reminders/core/row-schedule.ts
new file mode 100644
index 0000000000..f3946d505c
--- /dev/null
+++ b/apps/web/src/features/reminders/core/row-schedule.ts
@@ -0,0 +1,68 @@
+import type { ReminderEntity } from '@entity';
+import { describeReminderRecurrence } from './recurrence-label';
+import { formatReminderOccurrence } from './schedule-instant';
+
+/** Completion acknowledges an occurrence; it does not stop a recurring schedule. */
+export function reminderScheduleState(
+ reminder: Pick<
+ ReminderEntity,
+ 'enabled' | 'completedAt' | 'scheduleType' | 'nextRunAt'
+ >,
+ now: number
+): 'scheduled' | 'due' | 'paused' | 'completed' {
+ if (reminder.completedAt && reminder.scheduleType === 'once')
+ return 'completed';
+ // Fired one-shots are disabled but remain due until acknowledged. A disabled
+ // recurring series is paused instead, even when its stored occurrence is past.
+ if (
+ !reminder.completedAt &&
+ (reminder.enabled || reminder.scheduleType === 'once') &&
+ new Date(reminder.nextRunAt).getTime() <= now
+ )
+ return 'due';
+ if (!reminder.enabled) return reminder.completedAt ? 'completed' : 'paused';
+ return new Date(reminder.nextRunAt).getTime() > now ? 'scheduled' : 'due';
+}
+
+/** A concise next occurrence, with a zone only when it differs from the viewer's. */
+export function reminderScheduleLabel(
+ reminder: ReminderEntity,
+ now: number,
+ viewerTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone
+): string {
+ const state = reminderScheduleState(reminder, now);
+ const timezone =
+ reminder.scheduleType === 'recurring'
+ ? (reminder.timezone ?? viewerTimezone)
+ : viewerTimezone;
+ const instant = formatReminderOccurrence(
+ reminder.nextRunAt,
+ timezone,
+ viewerTimezone
+ );
+ if (!instant) return 'Schedule unavailable';
+ const recurrence =
+ reminder.scheduleType === 'recurring' && reminder.cron
+ ? describeReminderRecurrence(reminder.cron).cadence
+ : undefined;
+ const status = {
+ scheduled: reminder.emailFollowup
+ ? 'Returning'
+ : reminder.scheduleType === 'recurring'
+ ? 'Next'
+ : 'Remind me',
+ due: 'Due',
+ paused: 'Paused',
+ completed: 'Completed',
+ }[state];
+ const condition =
+ reminder.emailFollowup?.condition === 'if_no_reply'
+ ? 'if no reply'
+ : undefined;
+ return [
+ `${status}: ${instant}${condition ? ` ${condition}` : ''}`,
+ recurrence,
+ ]
+ .filter(Boolean)
+ .join(' · ');
+}
diff --git a/apps/web/src/features/reminders/core/schedule-instant.test.ts b/apps/web/src/features/reminders/core/schedule-instant.test.ts
new file mode 100644
index 0000000000..e94987a13a
--- /dev/null
+++ b/apps/web/src/features/reminders/core/schedule-instant.test.ts
@@ -0,0 +1,47 @@
+import { expect, it } from 'vitest';
+import { formatReminderOccurrence } from './schedule-instant';
+
+it('uses a compact exact instant without repeating a local zone', () => {
+ expect(
+ formatReminderOccurrence(
+ '2026-10-15T13:00:00Z',
+ 'America/New_York',
+ 'America/New_York'
+ )
+ ).toBe('Oct 15, 2026 at 9:00 AM');
+});
+it('gets a foreign zone from the occurrence across DST', () => {
+ expect(
+ formatReminderOccurrence('2026-10-15T13:00:00Z', 'America/New_York', 'UTC')
+ ).toContain('9:00 AM EDT');
+ expect(
+ formatReminderOccurrence('2026-11-15T14:00:00Z', 'America/New_York', 'UTC')
+ ).toContain('9:00 AM EST');
+});
+it('disambiguates both instances of a repeated local hour', () => {
+ expect(
+ formatReminderOccurrence(
+ '2026-11-01T05:30:00Z',
+ 'America/New_York',
+ 'America/New_York'
+ )
+ ).toContain('1:30 AM EDT');
+ expect(
+ formatReminderOccurrence(
+ '2026-11-01T06:30:00Z',
+ 'America/New_York',
+ 'America/New_York'
+ )
+ ).toContain('1:30 AM EST');
+});
+it('preserves nonzero seconds', () => {
+ expect(
+ formatReminderOccurrence('2026-10-15T09:00:30Z', 'UTC', 'UTC')
+ ).toContain('9:00:30 AM');
+});
+it.each([
+ ['invalid', 'UTC'],
+ ['2026-10-15T09:00:00Z', 'Invalid/Zone'],
+])('handles an unavailable instant/zone %s %s', (instant, zone) => {
+ expect(formatReminderOccurrence(instant, zone)).toBeUndefined();
+});
diff --git a/apps/web/src/features/reminders/core/schedule-instant.ts b/apps/web/src/features/reminders/core/schedule-instant.ts
new file mode 100644
index 0000000000..73a5e0428e
--- /dev/null
+++ b/apps/web/src/features/reminders/core/schedule-instant.ts
@@ -0,0 +1,51 @@
+import { getDefaultTimezone } from '@core/util/cron';
+
+/** Compact exact time; presentation only, never used to rebuild a schedule. */
+export function formatReminderOccurrence(
+ value: Date | string,
+ timezone = getDefaultTimezone(),
+ viewerTimezone = getDefaultTimezone()
+): string | undefined {
+ const date = new Date(value);
+ if (!Number.isFinite(date.getTime())) return;
+ try {
+ const calendar = new Intl.DateTimeFormat(undefined, {
+ timeZone: timezone,
+ year: 'numeric',
+ month: 'short',
+ day: 'numeric',
+ });
+ const viewer = new Intl.DateTimeFormat(undefined, {
+ timeZone: viewerTimezone,
+ });
+ const wallTime = new Intl.DateTimeFormat('en-CA', {
+ timeZone: timezone,
+ year: 'numeric',
+ month: '2-digit',
+ day: '2-digit',
+ hour: '2-digit',
+ minute: '2-digit',
+ second: '2-digit',
+ hourCycle: 'h23',
+ });
+ // A fall-back hour can name two instants even in the viewer's own zone.
+ const local = wallTime.format(date);
+ const repeated = [-180, -120, -90, -60, -30, 30, 60, 90, 120, 180].some(
+ (minutes) =>
+ wallTime.format(new Date(date.getTime() + minutes * 60_000)) === local
+ );
+ const showZone =
+ repeated ||
+ calendar.resolvedOptions().timeZone !== viewer.resolvedOptions().timeZone;
+ const time = new Intl.DateTimeFormat(undefined, {
+ timeZone: timezone,
+ hour: 'numeric',
+ minute: '2-digit',
+ second: date.getUTCSeconds() ? '2-digit' : undefined,
+ timeZoneName: showZone ? 'short' : undefined,
+ }).format(date);
+ return `${calendar.format(date)} at ${time}`;
+ } catch {
+ return;
+ }
+}
diff --git a/apps/web/src/features/reminders/primitives/reminder-clock.ts b/apps/web/src/features/reminders/primitives/reminder-clock.ts
new file mode 100644
index 0000000000..458031da1c
--- /dev/null
+++ b/apps/web/src/features/reminders/primitives/reminder-clock.ts
@@ -0,0 +1,10 @@
+import { createSharedRoot } from '@solid-primitives/rootless';
+import { createSignal, onCleanup } from 'solid-js';
+
+/** One local clock for mounted schedule indicators, with no network polling. */
+export const useReminderClock = createSharedRoot(() => {
+ const [now, setNow] = createSignal(Date.now());
+ const timer = setInterval(() => setNow(Date.now()), 30_000);
+ onCleanup(() => clearInterval(timer));
+ return now;
+});
diff --git a/apps/web/src/features/reminders/reminder-schedule.test.ts b/apps/web/src/features/reminders/reminder-schedule.test.ts
index 8ddfd2bd95..66fae119c7 100644
--- a/apps/web/src/features/reminders/reminder-schedule.test.ts
+++ b/apps/web/src/features/reminders/reminder-schedule.test.ts
@@ -100,17 +100,16 @@ describe('parseLocalReminderDateTime', () => {
});
describe('formatReminderInstant', () => {
- it('includes the relative day, exact date, time, and timezone', () => {
+ it('includes an exact date and time without repeating the local timezone', () => {
const described = formatReminderInstant(
new Date('2026-09-22T09:00:00.000Z'),
- 'UTC',
- new Date('2026-09-21T12:00:00.000Z')
+ 'UTC'
);
- expect(described).toContain('Tomorrow');
+ expect(described).not.toContain('Tomorrow');
expect(described).toContain('Sep 22');
expect(described).toMatch(/9:00\sAM/);
- expect(described).toContain('(UTC)');
+ expect(described).not.toContain('(UTC)');
});
it('describes persisted schedules for success feedback', () => {
@@ -120,7 +119,7 @@ describe('formatReminderInstant', () => {
cron: '0 0 9 * * 2-6',
timezone: 'America/New_York',
})
- ).toContain('Weekdays at 9:00 AM');
+ ).toContain('Repeats on weekdays at 9:00 AM');
});
it('does not invent a cadence for an unsupported custom cron', () => {
@@ -130,7 +129,7 @@ describe('formatReminderInstant', () => {
cron: '0 */15 9 * * *',
timezone: 'America/New_York',
})
- ).toBe('Custom repeating schedule (America/New_York)');
+ ).toBe('Repeats on a custom schedule');
});
});
@@ -612,7 +611,7 @@ describe('describeReminderSchedule', () => {
timezone: 'UTC',
});
- expect(described).toMatch(/^Weekdays at /);
+ expect(described).toMatch(/^Repeats on weekdays at /);
});
it('says nothing for a one-shot, whose date is already shown', () => {
@@ -644,7 +643,7 @@ describe('describeReminderWhen', () => {
nextRunAt: new Date(2026, 7, 10, 9, 0),
});
- expect(when).toMatch(/^Weekdays at /);
+ expect(when).toMatch(/^Repeats on weekdays at /);
expect(when).not.toContain('Aug');
});
});
@@ -800,3 +799,29 @@ describe('keeping a recurring schedule unchanged', () => {
).toBeUndefined();
});
});
+
+it('uses a stable zone for recurrence-only text and the actual occurrence for dated row text across DST', () => {
+ const originalTimezone = process.env.TZ;
+ process.env.TZ = 'UTC';
+ try {
+ const schedule = {
+ type: 'recurring' as const,
+ cron: '0 0 9 * * 1',
+ timezone: 'America/New_York',
+ };
+ expect(describeReminderSchedule(schedule)).toBe(
+ 'Repeats weekly on Sun at 9:00 AM Eastern Time'
+ );
+ const when = describeReminderWhen({
+ scheduleType: 'recurring',
+ cron: schedule.cron,
+ timezone: schedule.timezone,
+ nextRunAt: '2026-11-01T14:00:00Z',
+ });
+ expect(when).toBe('Repeats weekly on Sun at 9:00 AM EST');
+ expect(when).not.toContain('EDT');
+ } finally {
+ if (originalTimezone === undefined) delete process.env.TZ;
+ else process.env.TZ = originalTimezone;
+ }
+});
diff --git a/apps/web/src/features/reminders/reminder-schedule.ts b/apps/web/src/features/reminders/reminder-schedule.ts
index b483ea938d..bffa04273b 100644
--- a/apps/web/src/features/reminders/reminder-schedule.ts
+++ b/apps/web/src/features/reminders/reminder-schedule.ts
@@ -2,9 +2,7 @@ import { formatDateAndTime } from '@app/features/entity/utils/timestamp';
import {
buildCron,
type CronParts,
- describeCron,
getDefaultTimezone,
- isCronRepresentable,
normalizeCron,
parseCron,
type ScheduleFrequency,
@@ -12,6 +10,8 @@ import {
import type { EntityData } from '@entity';
import type { ReminderSchedule } from '@service-storage/generated/schemas/reminderSchedule';
import type { UpdateReminderRequest } from '@service-storage/generated/schemas/updateReminderRequest';
+import { describeReminderRecurrence } from './core/recurrence-label';
+import { formatReminderOccurrence } from './core/schedule-instant';
/**
* The time of day a bare date resolves to.
@@ -126,71 +126,26 @@ export function reminderQuickPresets(now: Date): ReminderQuickPreset[] {
/** An exact, human-readable instant for previews and save confirmation. */
export function formatReminderInstant(
date: Date,
- timezone: string = getDefaultTimezone(),
- now: Date = new Date()
+ timezone: string = getDefaultTimezone()
): string {
- const dateParts = (value: Date) =>
- new Intl.DateTimeFormat('en-CA', {
- timeZone: timezone,
- year: 'numeric',
- month: '2-digit',
- day: '2-digit',
- }).format(value);
- const tomorrow = new Date(now);
- tomorrow.setDate(tomorrow.getDate() + 1);
-
- const calendarLabel =
- dateParts(date) === dateParts(now)
- ? 'Today'
- : dateParts(date) === dateParts(tomorrow)
- ? 'Tomorrow'
- : new Intl.DateTimeFormat(undefined, {
- timeZone: timezone,
- weekday: 'long',
- }).format(date);
- const year =
- new Intl.DateTimeFormat('en-US', {
- timeZone: timezone,
- year: 'numeric',
- }).format(date) ===
- new Intl.DateTimeFormat('en-US', {
- timeZone: timezone,
- year: 'numeric',
- }).format(now)
- ? undefined
- : 'numeric';
- const exactDate = new Intl.DateTimeFormat(undefined, {
- timeZone: timezone,
- month: 'short',
- day: 'numeric',
- year,
- }).format(date);
- const exactTime = new Intl.DateTimeFormat(undefined, {
- timeZone: timezone,
- hour: 'numeric',
- minute: '2-digit',
- }).format(date);
- const zone = new Intl.DateTimeFormat(undefined, {
- timeZone: timezone,
- timeZoneName: 'short',
- })
- .formatToParts(date)
- .find((part) => part.type === 'timeZoneName')?.value;
-
- return `${calendarLabel}, ${exactDate} at ${exactTime} (${zone ?? timezone})`;
+ return formatReminderOccurrence(date, timezone) ?? 'Schedule unavailable';
}
/** The schedule wording shown after persistence succeeds. */
export function describeReminderConfirmation(
- schedule: ReminderSchedule
+ schedule: ReminderSchedule,
+ nextRunAt?: string
): string {
if (isRecurring(schedule)) {
- if (!isCronRepresentable(schedule.cron)) {
- return `Custom repeating schedule (${schedule.timezone})`;
+ if (nextRunAt) {
+ const instant = formatReminderOccurrence(nextRunAt, schedule.timezone);
+ return instant
+ ? `${instant} · ${describeReminderRecurrence(schedule.cron).cadence}`
+ : 'Schedule unavailable';
}
return describeReminderSchedule(schedule) ?? 'Repeating reminder';
}
- return formatReminderInstant(new Date(schedule.remindAt));
+ return formatReminderOccurrence(schedule.remindAt) ?? 'Schedule unavailable';
}
/** A one-shot schedule firing at `date`. */
@@ -282,8 +237,7 @@ export function scheduleFromRow(row: {
*
* A recurring reminder reads as its cadence ("Every weekday at 9:00 AM"), which
* is what says it fires again at all; a one-shot reads as the single instant it
- * fires, date and time together. Both answer "when?" without repeating what the
- * recurrence badge beside them already says.
+ * fires, date and time together. Any seasonal zone is taken from that occurrence.
*/
export function describeReminderWhen(row: {
scheduleType: 'once' | 'recurring';
@@ -292,7 +246,7 @@ export function describeReminderWhen(row: {
nextRunAt: string | Date;
}): string {
return (
- describeReminderSchedule(scheduleFromRow(row)) ??
+ describeReminderSchedule(scheduleFromRow(row), new Date(row.nextRunAt)) ??
formatDateAndTime(row.nextRunAt)
);
}
@@ -325,14 +279,26 @@ export function repeatPartsFromSchedule(schedule: ReminderSchedule): CronParts {
* in words would just be the same thing twice.
*/
export function describeReminderSchedule(
- schedule: ReminderSchedule
+ schedule: ReminderSchedule,
+ occurrence?: Date
): string | undefined {
if (!isRecurring(schedule)) return undefined;
- // The zone is part of the schedule, not decoration: "every day at 9:00 AM"
- // means a different instant in Denver than in Berlin, and a reminder built in
- // one and read in the other has to say which it fires by.
- const described = describeCron(parseCron(schedule.cron), schedule.timezone);
- return described.charAt(0).toUpperCase() + described.slice(1);
+ const { cadence, time } = describeReminderRecurrence(schedule.cron);
+ if (!time) return cadence;
+ try {
+ const zone =
+ schedule.timezone === getDefaultTimezone()
+ ? undefined
+ : new Intl.DateTimeFormat(undefined, {
+ timeZone: schedule.timezone,
+ timeZoneName: occurrence ? 'short' : 'longGeneric',
+ })
+ .formatToParts(occurrence ?? new Date())
+ .find((part) => part.type === 'timeZoneName')?.value;
+ return `${cadence} at ${time}${zone ? ` ${zone}` : ''}`;
+ } catch {
+ return 'Schedule unavailable';
+ }
}
/** Whether two schedules are the same, so an unchanged one is not re-sent. */
diff --git a/apps/web/src/features/reminders/views/email-reminder-details.test.tsx b/apps/web/src/features/reminders/views/email-reminder-details.test.tsx
index f69f531bc6..7965afdb9a 100644
--- a/apps/web/src/features/reminders/views/email-reminder-details.test.tsx
+++ b/apps/web/src/features/reminders/views/email-reminder-details.test.tsx
@@ -36,6 +36,26 @@ vi.mock('../components/email-reminder-form', () => ({
beforeEach(() => vi.resetAllMocks());
afterEach(cleanup);
+it('distinguishes a failed workflow read from a missing reminder and allows retry', () => {
+ const refetch = vi.fn();
+ mocks.query.mockReturnValue({ isSuccess: false, isError: true, refetch });
+ render(() => (
+ <EmailReminderDetails
+ reminder={{ id: 'mirror', description: 'Subject' } as Reminder}
+ isEmailFollowup
+ threadId="thread"
+ onClose={vi.fn()}
+ >
+ <p>Generic editor</p>
+ </EmailReminderDetails>
+ ));
+ expect(screen.getByRole('alert').textContent).toContain('Couldn’t load');
+ expect(screen.queryByText(/no longer available/)).toBeNull();
+ expect(screen.queryByText('Generic editor')).toBeNull();
+ fireEvent.click(screen.getByRole('button', { name: 'Try again' }));
+ expect(refetch).toHaveBeenCalledOnce();
+});
+
it.each([false, true])(
'retries against a refetched revision (competing writer: %s)',
async (competing) => {
diff --git a/apps/web/src/features/reminders/views/email-reminder-details.tsx b/apps/web/src/features/reminders/views/email-reminder-details.tsx
index 5c99bd9b6d..a9fc8580bc 100644
--- a/apps/web/src/features/reminders/views/email-reminder-details.tsx
+++ b/apps/web/src/features/reminders/views/email-reminder-details.tsx
@@ -6,19 +6,22 @@ import {
} from '@queries/reminders/email-followup';
import type { EmailFollowupCommand } from '@service-storage/generated/schemas/emailFollowupCommand';
import type { Reminder } from '@service-storage/generated/schemas/reminder';
+import { Button } from '@ui';
import { createSignal, type JSX, Show } from 'solid-js';
import { EmailReminderForm } from '../components/email-reminder-form';
/** Generic email-attached reminders retain their ordinary editor. */
export function EmailReminderDetails(props: {
reminder: Reminder;
+ isEmailFollowup?: boolean;
threadId: string;
onClose: () => void;
children: JSX.Element;
}) {
const query = useEmailFollowupQuery(() => props.threadId);
const followup = () =>
- query.isSuccess && query.data?.reminderId === props.reminder.id
+ query.isSuccess &&
+ (props.isEmailFollowup || query.data?.reminderId === props.reminder.id)
? query.data
: undefined;
const [pending, setPending] = createSignal(false);
@@ -60,41 +63,74 @@ export function EmailReminderDetails(props: {
fallback={<p role="status">Loading reminder…</p>}
>
<Show
- when={followup()?.state === 'pending' ? followup() : undefined}
- fallback={props.children}
+ when={!query.isError}
+ fallback={
+ <div class="space-y-3">
+ <p role="alert">Couldn’t load the email reminder. Try again.</p>
+ <Button
+ disabled={query.isFetching}
+ onClick={() => void query.refetch()}
+ >
+ Try again
+ </Button>
+ </div>
+ }
>
- {(current) => (
- <>
- <div class="mb-4">
- <ItemPreview id={props.threadId} type="email" />
- </div>
- <EmailReminderForm
- subject={props.reminder.description}
- initialTime={current().remindAt}
- initialCondition={current().condition}
- pending={pending()}
- error={error()}
- onCancel={props.onClose}
- onSave={(at, condition) =>
- void save({
- type: 'set',
- operationId: crypto.randomUUID(),
- expectedRevision: current().revision,
- remindAt: at.toISOString(),
- condition,
- })
- }
- onRemove={() =>
- void save({
- type: 'remove',
- operationId: crypto.randomUUID(),
- expectedRevision: current().revision,
- undo: false,
- })
- }
- />
- </>
- )}
+ <Show
+ when={followup()}
+ fallback={
+ props.isEmailFollowup ? (
+ <p>
+ This email reminder is no longer available. Open the email to
+ set a new reminder.
+ </p>
+ ) : (
+ props.children
+ )
+ }
+ >
+ {(current) => (
+ <>
+ <div class="mb-4">
+ <ItemPreview id={props.threadId} type="email" />
+ </div>
+ <EmailReminderForm
+ subject={props.reminder.description}
+ initialTime={
+ current().state === 'pending' ||
+ current().state === 'archiving'
+ ? current().remindAt
+ : undefined
+ }
+ initialCondition={current().condition}
+ pending={pending()}
+ error={error()}
+ onCancel={props.onClose}
+ onSave={(at, condition) =>
+ void save({
+ type: 'set',
+ operationId: crypto.randomUUID(),
+ expectedRevision: current().revision,
+ remindAt: at.toISOString(),
+ condition,
+ })
+ }
+ onRemove={
+ current().state === 'pending' ||
+ current().state === 'archiving'
+ ? () =>
+ void save({
+ type: 'remove',
+ operationId: crypto.randomUUID(),
+ expectedRevision: current().revision,
+ undo: false,
+ })
+ : undefined
+ }
+ />
+ </>
+ )}
+ </Show>
</Show>
</Show>
);
diff --git a/apps/web/src/features/reminders/views/reminder-row-schedule.test.tsx b/apps/web/src/features/reminders/views/reminder-row-schedule.test.tsx
new file mode 100644
index 0000000000..fff7ae7767
--- /dev/null
+++ b/apps/web/src/features/reminders/views/reminder-row-schedule.test.tsx
@@ -0,0 +1,139 @@
+import type { ReminderEntity } from '@entity';
+import {
+ cleanup,
+ fireEvent,
+ render,
+ screen,
+ waitFor,
+} from '@solidjs/testing-library';
+import type { JSX, ParentProps } from 'solid-js';
+import { Portal } from 'solid-js/web';
+import { afterEach, expect, it, vi } from 'vitest';
+import { ReminderRowSchedule } from './reminder-row-schedule';
+
+vi.mock('@ui', async (importOriginal) => {
+ const { cn } = await importOriginal<typeof import('@ui')>();
+ const Container = (props: ParentProps) => <>{props.children}</>;
+ return {
+ cn,
+ Button: (
+ props: JSX.ButtonHTMLAttributes<HTMLButtonElement> & { label?: string }
+ ) => <button {...props} aria-label={props['aria-label'] ?? props.label} />,
+ Tooltip: Container,
+ Dialog: (props: ParentProps<{ open: boolean }>) => (
+ <Portal>{props.open && props.children}</Portal>
+ ),
+ ActionDialogShell: Object.assign(Container, {
+ Header: Container,
+ Title: Container,
+ }),
+ };
+});
+vi.mock('../ReminderEditorSplit', () => ({
+ ReminderDetails: (props: { onClose: () => void }) => (
+ <button onClick={props.onClose}>Cancel</button>
+ ),
+}));
+vi.mock('../primitives/reminder-clock', () => ({
+ useReminderClock: () => () => Date.parse('2026-10-01T12:00:00Z'),
+}));
+afterEach(cleanup);
+
+it('isolates portaled editor clicks from the source row', () => {
+ const openSource = vi.fn();
+ const entity: ReminderEntity = {
+ type: 'reminder',
+ id: 'reminder',
+ name: 'Review',
+ description: 'Review',
+ ownerId: '',
+ enabled: true,
+ scheduleType: 'once',
+ nextRunAt: '2026-10-02T12:00:00Z',
+ };
+ render(() => (
+ <div onClick={openSource}>
+ <ReminderRowSchedule entity={entity} />
+ </div>
+ ));
+ fireEvent.click(screen.getByRole('button', { name: /Remind me:/ }));
+ expect(openSource).not.toHaveBeenCalled();
+ fireEvent.click(screen.getByRole('button', { name: 'Cancel' }));
+ expect(screen.queryByRole('button', { name: 'Cancel' })).toBeNull();
+ expect(openSource).not.toHaveBeenCalled();
+});
+
+const recurring: ReminderEntity = {
+ type: 'reminder',
+ id: 'recurring',
+ name: 'Review',
+ description: 'Review',
+ ownerId: '',
+ enabled: true,
+ scheduleType: 'recurring',
+ cron: '0 0 9 1,15 * *',
+ timezone: 'UTC',
+ nextRunAt: '2026-10-15T09:00:00Z',
+ completedAt: '2026-10-01T10:00:00Z',
+};
+it('keeps a completed recurring clock and exposes undo without a pressed-state pill', async () => {
+ const toggle = vi.fn().mockResolvedValue(undefined);
+ render(() => (
+ <ReminderRowSchedule entity={recurring} onToggleDone={toggle} />
+ ));
+ const undo = screen.getByRole('button', { name: 'Mark reminder not done' });
+ expect(undo.hasAttribute('aria-pressed')).toBe(false);
+ expect(
+ screen.getByRole('button', { name: /Next:.*Repeats monthly/ })
+ ).toBeTruthy();
+ fireEvent.click(undo);
+ await waitFor(() => expect(toggle).toHaveBeenCalledOnce());
+});
+it('disables repeat completion while pending and recovers after failure', async () => {
+ let reject: (reason: Error) => void = () => {};
+ const toggle = vi.fn(
+ () =>
+ new Promise<void>((_, fail) => {
+ reject = fail;
+ })
+ );
+ render(() => (
+ <ReminderRowSchedule
+ entity={{ ...recurring, completedAt: undefined }}
+ onToggleDone={toggle}
+ />
+ ));
+ const done = screen.getByRole('button', {
+ name: 'Mark reminder done',
+ }) as HTMLButtonElement;
+ fireEvent.click(done);
+ expect(done.disabled).toBe(true);
+ fireEvent.click(done);
+ expect(toggle).toHaveBeenCalledOnce();
+ reject(new Error('offline'));
+ await waitFor(() => expect(done.disabled).toBe(false));
+});
+it('opens the owning composer for a completed email mirror instead of reopening generically', () => {
+ const toggle = vi.fn();
+ const emailFollowup: NonNullable<ReminderEntity['emailFollowup']> = {
+ threadId: 'thread',
+ linkId: 'link',
+ reminderId: 'recurring',
+ revision: 'revision',
+ condition: 'if_no_reply',
+ state: 'returned',
+ remindAt: '2026-10-15T09:00:00Z',
+ };
+ render(() => (
+ <ReminderRowSchedule
+ entity={{ ...recurring, scheduleType: 'once', emailFollowup }}
+ onToggleDone={toggle}
+ />
+ ));
+ fireEvent.click(
+ screen.getByRole('button', { name: 'Done — remind me again' })
+ );
+ expect(toggle).not.toHaveBeenCalled();
+ expect(screen.getByRole('button', { name: 'Cancel' })).toBeTruthy();
+ expect(screen.queryByRole('button', { name: /Next:/ })).toBeNull();
+});
diff --git a/apps/web/src/features/reminders/views/reminder-row-schedule.tsx b/apps/web/src/features/reminders/views/reminder-row-schedule.tsx
new file mode 100644
index 0000000000..24aa525256
--- /dev/null
+++ b/apps/web/src/features/reminders/views/reminder-row-schedule.tsx
@@ -0,0 +1,132 @@
+import type { ReminderEntity } from '@entity';
+import ArrowCounterClockwiseIcon from '@phosphor/arrow-counter-clockwise.svg';
+import CheckIcon from '@phosphor/check.svg';
+import { ActionDialogShell, Button, cn, Dialog } from '@ui';
+import { createSignal, Show, Suspense } from 'solid-js';
+import { ReminderScheduleIndicator } from '../components/reminder-schedule-indicator';
+import {
+ reminderScheduleLabel,
+ reminderScheduleState,
+} from '../core/row-schedule';
+import { useReminderClock } from '../primitives/reminder-clock';
+import { ReminderDetails } from '../ReminderEditorSplit';
+
+/** The editor is loaded only on demand; rendering a clock performs no query. */
+export function ReminderRowSchedule(props: {
+ entity: ReminderEntity;
+ onToggleDone?: () => Promise<void>;
+}) {
+ const [open, setOpen] = createSignal(false);
+ const [pending, setPending] = createSignal(false);
+ let opener: HTMLElement | undefined;
+ const openEditor = () => {
+ opener =
+ document.activeElement instanceof HTMLElement
+ ? document.activeElement
+ : undefined;
+ setOpen(true);
+ };
+ const now = useReminderClock();
+ const state = () => reminderScheduleState(props.entity, now());
+ const done = () => props.entity.completedAt != null;
+ const reschedule = () => done() && !!props.entity.emailFollowup;
+ const toggle = async () => {
+ if (pending()) return;
+ if (reschedule()) {
+ openEditor();
+ return;
+ }
+ setPending(true);
+ try {
+ await props.onToggleDone?.();
+ } catch {
+ /* The collection action owns failure feedback. */
+ } finally {
+ setPending(false);
+ }
+ };
+ return (
+ <span
+ class="contents"
+ onClick={(event) => event.stopPropagation()}
+ onPointerDown={(event) => event.stopPropagation()}
+ onPointerUp={(event) => event.stopPropagation()}
+ onMouseDown={(event) => event.stopPropagation()}
+ onKeyDown={(event) => {
+ if (event.key === 'Enter' || event.key === ' ') event.stopPropagation();
+ }}
+ >
+ <Show when={props.onToggleDone || done()}>
+ <span
+ class="inline-flex shrink-0"
+ onPointerDown={(e) => e.stopPropagation()}
+ onMouseDown={(e) => e.stopPropagation()}
+ onClick={(e) => e.stopPropagation()}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' || e.key === ' ') e.stopPropagation();
+ }}
+ >
+ <Button
+ size="icon-sm"
+ data-reminder-action
+ disabled={pending() || (!props.onToggleDone && !reschedule())}
+ label={
+ reschedule()
+ ? 'Done — remind me again'
+ : done()
+ ? 'Mark reminder not done'
+ : 'Mark reminder done'
+ }
+ class={cn(
+ 'text-ink-extra-muted',
+ !done() &&
+ 'not-touch:opacity-0 not-touch:pointer-events-none group-hover/entity:opacity-100 group-hover/entity:pointer-events-auto group-focus-within/entity:opacity-100 group-focus-within/entity:pointer-events-auto'
+ )}
+ aria-busy={pending()}
+ onClick={() => void toggle()}
+ >
+ <Show when={done()} fallback={<CheckIcon class="size-4" />}>
+ <CheckIcon class="size-4 touch:hidden group-hover/entity:hidden group-focus-within/entity:hidden" />
+ <span class="hidden touch:inline-flex group-hover/entity:inline-flex group-focus-within/entity:inline-flex">
+ <ArrowCounterClockwiseIcon class="size-4" />
+ </span>
+ </Show>
+ </Button>
+ </span>
+ </Show>
+ <Show when={state() !== 'completed'}>
+ <ReminderScheduleIndicator
+ label={reminderScheduleLabel(props.entity, now())}
+ onEdit={openEditor}
+ />
+ </Show>
+ <Dialog
+ open={open()}
+ onOpenChange={setOpen}
+ onCloseAutoFocus={(event) => {
+ if (opener?.isConnected) {
+ event.preventDefault();
+ opener.focus();
+ }
+ }}
+ position="center"
+ class="w-[calc(100vw-2rem)] max-w-110"
+ >
+ <ActionDialogShell>
+ <ActionDialogShell.Header class="px-6 pt-5">
+ <ActionDialogShell.Title>Reminder</ActionDialogShell.Title>
+ </ActionDialogShell.Header>
+ <Show when={open()}>
+ <Suspense fallback={<p role="status">Loading reminder…</p>}>
+ <ReminderDetails
+ reminderId={props.entity.id}
+ isEmailFollowup={!!props.entity.emailFollowup}
+ onClose={() => setOpen(false)}
+ />
+ </Suspense>
+ </Show>
+ </ActionDialogShell>
+ </Dialog>
+ </span>
+ );
+}
diff --git a/apps/web/src/lib/queries/reminders/collection.test.ts b/apps/web/src/lib/queries/reminders/collection.test.ts
new file mode 100644
index 0000000000..e9abb8d5cf
--- /dev/null
+++ b/apps/web/src/lib/queries/reminders/collection.test.ts
@@ -0,0 +1,51 @@
+import type { Reminder } from '@service-storage/generated/schemas/reminder';
+import type { ReminderCollectionPage } from '@service-storage/generated/schemas/reminderCollectionPage';
+import type { InfiniteData } from '@tanstack/solid-query';
+import { afterEach, expect, it } from 'vitest';
+import { queryClient } from '../client';
+import { updateReminderCollection } from './collection';
+import { reminderKeys } from './keys';
+
+afterEach(() =>
+ queryClient.removeQueries({ queryKey: reminderKeys.collection._def })
+);
+it.each([false, true])(
+ 'keeps the unfiltered row and removes completion mismatches (done: %s)',
+ (completed) => {
+ const reminder = {
+ id: 'reminder',
+ completedAt: completed ? '2026-10-01T12:00:00Z' : undefined,
+ } as Reminder;
+ const all = reminderKeys.collection('owner').queryKey;
+ const filtered = reminderKeys.collection('owner', !completed).queryKey;
+ const data: InfiniteData<ReminderCollectionPage> = {
+ pages: [
+ {
+ items: [
+ {
+ reminder: {
+ ...reminder,
+ completedAt: completed ? undefined : '2026-10-01T11:00:00Z',
+ },
+ reference: null,
+ emailFollowup: null,
+ },
+ ],
+ nextCursor: null,
+ },
+ ],
+ pageParams: [undefined],
+ };
+ queryClient.setQueryData(all, data);
+ queryClient.setQueryData(filtered, data);
+ updateReminderCollection(reminder);
+ expect(
+ queryClient.getQueryData<InfiniteData<ReminderCollectionPage>>(all)
+ ?.pages[0].items[0].reminder
+ ).toEqual(reminder);
+ expect(
+ queryClient.getQueryData<InfiniteData<ReminderCollectionPage>>(filtered)
+ ?.pages[0].items
+ ).toEqual([]);
+ }
+);
diff --git a/apps/web/src/lib/queries/reminders/collection.ts b/apps/web/src/lib/queries/reminders/collection.ts
new file mode 100644
index 0000000000..9af45e07ec
--- /dev/null
+++ b/apps/web/src/lib/queries/reminders/collection.ts
@@ -0,0 +1,98 @@
+import { throwOnErr } from '@core/util/result';
+import type { ReminderEntity } from '@entity';
+import { storageServiceClient } from '@service-storage/client';
+import type { Reminder } from '@service-storage/generated/schemas/reminder';
+import type { ReminderCollectionPage } from '@service-storage/generated/schemas/reminderCollectionPage';
+import type { ReminderCollectionRow } from '@service-storage/generated/schemas/reminderCollectionRow';
+import { type InfiniteData, useInfiniteQuery } from '@tanstack/solid-query';
+import type { Accessor } from 'solid-js';
+import { queryClient } from '../client';
+import type { SoupAstItemsData } from '../soup/items';
+import { reminderEntityFromData } from './entity';
+import { reminderKeys } from './keys';
+
+export function collectionReminderEntity(
+ row: ReminderCollectionRow
+): ReminderEntity {
+ const reminder = row.reminder;
+ const entity = reminderEntityFromData({
+ ...reminder,
+ referencedEntity:
+ reminder.entityId && reminder.entityType
+ ? {
+ id: reminder.entityId,
+ entityType: reminder.entityType,
+ fileType: row.reference?.fileType,
+ subType: row.reference?.subType,
+ }
+ : undefined,
+ });
+ return { ...entity, emailFollowup: row.emailFollowup ?? undefined };
+}
+
+/** One paginated query per collection; source metadata and workflow facts arrive together. */
+export function useReminderCollectionQuery(
+ options: Accessor<{
+ userId: string | undefined;
+ enabled: boolean;
+ completed?: boolean;
+ }>
+) {
+ return useInfiniteQuery(() => {
+ const { userId, completed, enabled } = options();
+ return {
+ queryKey: reminderKeys.collection(userId, completed).queryKey,
+ enabled: !!userId && enabled,
+ // Delivery, reply cancellation and recurring firings also happen server-side.
+ // One collection timer refreshes those transitions, never one timer per row.
+ refetchInterval: 30_000,
+ initialPageParam: undefined as string | undefined,
+ queryFn: ({ pageParam }) =>
+ throwOnErr(() =>
+ storageServiceClient.reminders.listCollection({
+ cursor: pageParam,
+ completed,
+ limit: 100,
+ })
+ ),
+ getNextPageParam: (page: ReminderCollectionPage) =>
+ page.nextCursor ?? undefined,
+ select: (data): SoupAstItemsData => ({
+ entities: data.pages.flatMap((page) =>
+ page.items.map(collectionReminderEntity)
+ ),
+ groups: undefined,
+ }),
+ };
+ });
+}
+
+/** Confirmed writes update rows in place; completion alone never removes an unfiltered row. */
+export function updateReminderCollection(reminder: Reminder) {
+ for (const [key, data] of queryClient.getQueriesData<
+ InfiniteData<ReminderCollectionPage>
+ >({ queryKey: reminderKeys.collection._def })) {
+ if (!data) continue;
+ const filters = key.at(-1);
+ const completed =
+ typeof filters === 'object' && filters !== null && 'completed' in filters
+ ? filters.completed
+ : undefined;
+ const matches =
+ typeof completed !== 'boolean' ||
+ (reminder.completedAt != null) === completed;
+ queryClient.setQueryData(key, {
+ ...data,
+ pages: data.pages.map((page) => ({
+ ...page,
+ items: page.items.flatMap((row) =>
+ row.reminder.id !== reminder.id
+ ? [row]
+ : matches
+ ? [{ ...row, reminder }]
+ : []
+ ),
+ })),
+ });
+ }
+}
diff --git a/apps/web/src/lib/queries/reminders/email-followup.ts b/apps/web/src/lib/queries/reminders/email-followup.ts
index e645b87d81..d3facd4686 100644
--- a/apps/web/src/lib/queries/reminders/email-followup.ts
+++ b/apps/web/src/lib/queries/reminders/email-followup.ts
@@ -54,6 +54,7 @@ export async function executeEmailFollowup(
? [refreshActiveGraphqlSoupQueries(), fetchGraphqlEmailThread(threadId)]
: []),
queryClient.invalidateQueries({ queryKey: reminderKeys.list._def }),
+ queryClient.invalidateQueries({ queryKey: reminderKeys.collection._def }),
queryClient.invalidateQueries({
queryKey: reminderKeys.detail(result.reminderId).queryKey,
}),
diff --git a/apps/web/src/lib/queries/reminders/entity.ts b/apps/web/src/lib/queries/reminders/entity.ts
new file mode 100644
index 0000000000..e9a1c9e6e9
--- /dev/null
+++ b/apps/web/src/lib/queries/reminders/entity.ts
@@ -0,0 +1,72 @@
+import type { ReminderEntity } from '@entity';
+import type {
+ SoupReminderReference,
+ SoupReminderSoupPropertiesField,
+} from '@service-storage/generated/schemas';
+import { match, P } from 'ts-pattern';
+
+type ReferencedEntityType = NonNullable<
+ ReminderEntity['referencedEntity']
+>['type'];
+
+function toReferencedEntity(
+ reference: SoupReminderReference | null | undefined
+): ReminderEntity['referencedEntity'] {
+ if (!reference) return undefined;
+ const type = match<string, ReferencedEntityType | undefined>(
+ reference.entityType
+ )
+ .with('email_thread', () => 'email')
+ .with('foreign_entity', () => 'foreign')
+ .with(
+ P.union(
+ 'document',
+ 'chat',
+ 'agent_session',
+ 'project',
+ 'channel',
+ 'channel_message',
+ 'call',
+ 'crm_company',
+ 'crm_contact'
+ ),
+ (t) => t
+ )
+ .otherwise(() => undefined);
+ if (!type) return undefined;
+ return {
+ id: reference.id,
+ type,
+ fileType: reference.fileType ?? undefined,
+ subType: reference.subType ?? undefined,
+ };
+}
+
+export function reminderEntityFromData(
+ data: Omit<SoupReminderSoupPropertiesField, 'properties'>,
+ frecencyScore?: number
+): ReminderEntity {
+ const schedule = data.schedule;
+ const recurring = schedule.type === 'recurring';
+ return {
+ type: 'reminder',
+ id: data.id,
+ // A reminder has no separate title — its description is its name.
+ name: data.description,
+ description: data.description,
+ // Reminders are private to their owner, so the row carries no owner id.
+ ownerId: '',
+ referencedEntity: toReferencedEntity(data.referencedEntity),
+ scheduleType: recurring ? 'recurring' : 'once',
+ cron: recurring ? schedule.cron : undefined,
+ timezone: recurring ? schedule.timezone : undefined,
+ nextRunAt: data.nextRunAt,
+ enabled: data.enabled,
+ completedAt: data.completedAt,
+ createdAt: data.createdAt,
+ updatedAt: data.updatedAt,
+ // Soup orders reminders by when they fire, not when they changed.
+ sortTs: data.nextRunAt,
+ frecencyScore: frecencyScore,
+ } satisfies ReminderEntity;
+}
diff --git a/apps/web/src/lib/queries/reminders/keys.ts b/apps/web/src/lib/queries/reminders/keys.ts
index 0a918ed364..2b77b5f543 100644
--- a/apps/web/src/lib/queries/reminders/keys.ts
+++ b/apps/web/src/lib/queries/reminders/keys.ts
@@ -10,4 +10,8 @@ export const reminderKeys = createQueryKeys('reminders', {
/** A single reminder by id. */
detail: (id: string) => [id],
email: (threadId: string) => [threadId],
+ collection: (userId: string | undefined, completed?: boolean) => [
+ userId,
+ { completed },
+ ],
});
diff --git a/apps/web/src/lib/queries/reminders/reminders.test.ts b/apps/web/src/lib/queries/reminders/reminders.test.ts
index 234215920d..7cf9aed838 100644
--- a/apps/web/src/lib/queries/reminders/reminders.test.ts
+++ b/apps/web/src/lib/queries/reminders/reminders.test.ts
@@ -1,12 +1,68 @@
import type { EntityData } from '@entity';
import type { Reminder } from '@service-storage/generated/schemas/reminder';
-import { describe, expect, it } from 'vitest';
+import { QueryObserver } from '@tanstack/solid-query';
+import { describe, expect, it, vi } from 'vitest';
+import { queryClient } from '../client';
+import { reminderKeys } from './keys';
import {
+ invalidateRemindersById,
reminderEntityType,
reminderSoupPatch,
reminderTarget,
} from './reminders';
+it('invalidates cached email revisions after a reminder completion batch', () => {
+ const key = reminderKeys.email('completion-regression-thread').queryKey;
+ queryClient.setQueryData(key, { revision: 'before-completion' });
+ expect(queryClient.getQueryState(key)?.isInvalidated).toBe(false);
+ invalidateRemindersById(['mirror-1', 'mirror-2']);
+ expect(queryClient.getQueryState(key)?.isInvalidated).toBe(true);
+ queryClient.removeQueries({ queryKey: key });
+});
+
+it.each([false, true])(
+ 'refreshes filtered collections while preserving successful unfiltered batches (failure: %s)',
+ async (refetch) => {
+ const collections = [undefined, false, true].map((completed) => {
+ const key = reminderKeys.collection(
+ 'batch-refetch-test',
+ completed
+ ).queryKey;
+ const queryFn = vi.fn(async () => 'refreshed');
+ queryClient.setQueryData(key, 'patched');
+ const observer = new QueryObserver(queryClient, {
+ queryKey: key,
+ queryFn,
+ staleTime: Infinity,
+ });
+ const unsubscribe = observer.subscribe(() => {});
+ return { key, queryFn, unsubscribe, completed };
+ });
+ try {
+ invalidateRemindersById(['batch-reminder'], { refetch });
+ await vi.waitFor(() => {
+ for (const { key, queryFn, completed } of collections) {
+ const shouldFetch = refetch || typeof completed === 'boolean';
+ expect(queryFn).toHaveBeenCalledTimes(shouldFetch ? 1 : 0);
+ expect(queryClient.getQueryData(key)).toBe(
+ shouldFetch ? 'refreshed' : 'patched'
+ );
+ }
+ });
+ if (!refetch) {
+ expect(
+ queryClient.getQueryState(collections[0].key)?.isInvalidated
+ ).toBe(true);
+ }
+ } finally {
+ for (const { key, unsubscribe } of collections) {
+ unsubscribe();
+ queryClient.removeQueries({ queryKey: key, exact: true });
+ }
+ }
+ }
+);
+
const entity = (type: EntityData['type'], id = 'e1') =>
({ type, id, name: 'Thing' }) as EntityData;
diff --git a/apps/web/src/lib/queries/reminders/reminders.ts b/apps/web/src/lib/queries/reminders/reminders.ts
index d0b39be0d1..4fccda0036 100644
--- a/apps/web/src/lib/queries/reminders/reminders.ts
+++ b/apps/web/src/lib/queries/reminders/reminders.ts
@@ -10,7 +10,7 @@ import { useMutation, useQuery } from '@tanstack/solid-query';
import { queryClient } from '../client';
import { type MutationCallbacks, withCallbacks } from '../utils';
-
+import { updateReminderCollection } from './collection';
import { reminderKeys } from './keys';
/** The entity types a reminder can be attached to, as the API names them. */
@@ -98,9 +98,11 @@ type CreateReminderCallbacks = MutationCallbacks<
* here; `next-soup/utils` keeps only the orchestration.
*/
export async function setReminderCompleted(id: string, completed: boolean) {
- return await throwOnErr(() =>
+ const reminder = await throwOnErr(() =>
storageServiceClient.reminders.updateReminder(id, { completed })
);
+ updateReminderCollection(reminder);
+ return reminder;
}
/**
@@ -108,15 +110,33 @@ export async function setReminderCompleted(id: string, completed: boolean) {
*
* `refetch` should be true only when the server state is unknown — after a
* failed or partly-failed write. On success the optimistic layer already
- * holds the right values, and an immediate refetch would detach the list's
- * Suspense boundary and reset its scroll.
+ * holds the right values. Keep unfiltered collection rows in place; completion
+ * filters still need a refresh to fill gaps left by rows that no longer match.
*/
export function invalidateRemindersById(
ids: string[],
{ refetch = false }: { refetch?: boolean } = {}
) {
if (ids.length === 0) return;
+ // A mirror completion also changes its email workflow. Invalidate once per
+ // batch so a just-opened composer cannot reuse a five-minute-old revision.
+ void queryClient.invalidateQueries({ queryKey: reminderKeys.email._def });
const refetchType = refetch ? undefined : ('none' as const);
+ for (const query of queryClient.getQueryCache().findAll({
+ queryKey: reminderKeys.collection._def,
+ })) {
+ const filters = query.queryKey.at(-1);
+ const completionFiltered =
+ typeof filters === 'object' &&
+ filters !== null &&
+ 'completed' in filters &&
+ typeof filters.completed === 'boolean';
+ void queryClient.invalidateQueries({
+ queryKey: query.queryKey,
+ exact: true,
+ refetchType: completionFiltered ? undefined : refetchType,
+ });
+ }
void queryClient.invalidateQueries({
queryKey: reminderKeys.list._def,
refetchType,
@@ -131,6 +151,10 @@ export function invalidateRemindersById(
/** Invalidate every reminder list, plus one detail when the id is known. */
function invalidateReminders(id?: string) {
+ void queryClient.invalidateQueries({ queryKey: reminderKeys.email._def });
+ void queryClient.invalidateQueries({
+ queryKey: reminderKeys.collection._def,
+ });
void queryClient.invalidateQueries({ queryKey: reminderKeys.list._def });
if (id) {
void queryClient.invalidateQueries({
diff --git a/apps/web/src/lib/queries/soup/transform-utils.ts b/apps/web/src/lib/queries/soup/transform-utils.ts
index c5a32175b8..9db077d6ea 100644
--- a/apps/web/src/lib/queries/soup/transform-utils.ts
+++ b/apps/web/src/lib/queries/soup/transform-utils.ts
@@ -49,13 +49,13 @@ import type {
SoupApiItem,
SoupCalendarEventTime,
SoupPage,
- SoupReminderReference,
} from '@service-storage/generated/schemas';
import type { ChannelType } from '@service-storage/generated/schemas/channelType';
import { formatDocumentName } from '@service-storage/util/filename';
import type { UseQueryResult } from '@tanstack/solid-query';
import { differenceInMilliseconds } from 'date-fns';
-import { match, P } from 'ts-pattern';
+import { match } from 'ts-pattern';
+import { reminderEntityFromData } from '../reminders/entity';
import { mapAgentSessionSearchResult } from './agent-session-search';
type InnerSearchResult =
@@ -706,52 +706,6 @@ function calendarReminderTimestamp(
return latest;
}
-type ReferencedEntityType = NonNullable<
- ReminderEntity['referencedEntity']
->['type'];
-
-/**
- * Map a reminder's referenced entity from canonical API names onto the display
- * {@link EntityType} names used across the frontend. The inverse of
- * `toNotificationEntity`.
- *
- * Types with no display entity (`user`, `team`, `static_file`, and a reminder
- * referencing another reminder) yield `undefined`, which renders the reminder
- * as standalone rather than linking somewhere unresolvable.
- */
-function toReferencedEntity(
- reference: SoupReminderReference | null | undefined
-): ReminderEntity['referencedEntity'] {
- if (!reference) return undefined;
- const type = match<string, ReferencedEntityType | undefined>(
- reference.entityType
- )
- .with('email_thread', () => 'email')
- .with('foreign_entity', () => 'foreign')
- .with(
- P.union(
- 'document',
- 'chat',
- 'agent_session',
- 'project',
- 'channel',
- 'channel_message',
- 'call',
- 'crm_company',
- 'crm_contact'
- ),
- (t) => t
- )
- .otherwise(() => undefined);
- if (!type) return undefined;
- return {
- id: reference.id,
- type,
- fileType: reference.fileType ?? undefined,
- subType: reference.subType ?? undefined,
- };
-}
-
export const mapApiSoupItemToEntity = (
item: DisplayableSoupItem
): SoupEntity => {
@@ -1014,31 +968,9 @@ export const mapApiSoupItemToEntity = (
properties: item.data.properties,
} satisfies CrmCompanyEntity;
})
- .with({ tag: 'reminder' }, (item) => {
- const schedule = item.data.schedule;
- const recurring = schedule.type === 'recurring';
- return {
- type: 'reminder',
- id: item.data.id,
- // A reminder has no separate title — its description is its name.
- name: item.data.description,
- description: item.data.description,
- // Reminders are private to their owner, so the row carries no owner id.
- ownerId: '',
- referencedEntity: toReferencedEntity(item.data.referencedEntity),
- scheduleType: recurring ? 'recurring' : 'once',
- cron: recurring ? schedule.cron : undefined,
- timezone: recurring ? schedule.timezone : undefined,
- nextRunAt: item.data.nextRunAt,
- enabled: item.data.enabled,
- completedAt: item.data.completedAt,
- createdAt: item.data.createdAt,
- updatedAt: item.data.updatedAt,
- // Soup orders reminders by when they fire, not when they changed.
- sortTs: item.data.nextRunAt,
- frecencyScore: item.frecency_score,
- } satisfies ReminderEntity;
- })
+ .with({ tag: 'reminder' }, (item) =>
+ reminderEntityFromData(item.data, item.frecency_score)
+ )
.with({ tag: 'calendarEvent' }, (item) => {
return {
type: 'calendar_event',
diff --git a/apps/web/src/lib/service-clients/service-storage/client.ts b/apps/web/src/lib/service-clients/service-storage/client.ts
index 54363e3656..c5e3a74449 100644
--- a/apps/web/src/lib/service-clients/service-storage/client.ts
+++ b/apps/web/src/lib/service-clients/service-storage/client.ts
@@ -121,6 +121,7 @@ import type { GroupedSoupSort } from './generated/schemas/groupedSoupSort';
import type { Item } from './generated/schemas/item';
import type { ListFavoritesParams } from './generated/schemas/listFavoritesParams';
import type { ListOccurrencesParams } from './generated/schemas/listOccurrencesParams';
+import type { ListReminderCollectionParams } from './generated/schemas/listReminderCollectionParams';
import type { ListRemindersParams } from './generated/schemas/listRemindersParams';
import type { ListTeamOutOfOfficeParams } from './generated/schemas/listTeamOutOfOfficeParams';
import type { LocationResponseV3 } from './generated/schemas/locationResponseV3';
@@ -135,6 +136,7 @@ import type { PostSoupAstRequest } from './generated/schemas/postSoupAstRequest'
import type { PostSoupRequest } from './generated/schemas/postSoupRequest';
import type { Project } from './generated/schemas/project';
import type { Reminder } from './generated/schemas/reminder';
+import type { ReminderCollectionPage } from './generated/schemas/reminderCollectionPage';
import type { RemindersList } from './generated/schemas/remindersList';
import type { RemoveParticipantsRequest } from './generated/schemas/removeParticipantsRequest';
import type { RenameChannelLabelRequest } from './generated/schemas/renameChannelLabelRequest';
@@ -2409,6 +2411,18 @@ export const storageServiceClient = {
},
},
reminders: {
+ async listCollection(params: ListReminderCollectionParams) {
+ const query = new URLSearchParams();
+ if (params.completed !== undefined)
+ query.set('completed', String(params.completed));
+ if (params.limit !== undefined) query.set('limit', String(params.limit));
+ if (params.cursor) query.set('cursor', params.cursor);
+ return await dssFetch<ReminderCollectionPage>(
+ `/reminders/collection?${query}`,
+ { method: 'GET' }
+ );
+ },
+
async getEmailFollowup(threadId: string) {
return (
await dssFetch<{ followup: EmailFollowup | null }>(
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts
index 9c09fe72de..4e1fadcc97 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/index.ts
@@ -842,6 +842,7 @@ export * from './linkShare';
export * from './listFavoritesEntityTypeItem';
export * from './listFavoritesParams';
export * from './listOccurrencesParams';
+export * from './listReminderCollectionParams';
export * from './listRemindersEntityTypeItem';
export * from './listRemindersParams';
export * from './listTeamOutOfOfficeParams';
@@ -1085,12 +1086,20 @@ export * from './reactionInput';
export * from './reactionInputNonce';
export * from './recentlyDeletedResponseData';
export * from './reminder';
+export * from './reminderCollectionPage';
+export * from './reminderCollectionPageNextCursor';
+export * from './reminderCollectionRow';
+export * from './reminderCollectionRowEmailFollowup';
+export * from './reminderCollectionRowReference';
export * from './reminderCompletedAt';
export * from './reminderEntityId';
export * from './reminderEntityType';
export * from './reminderFilters';
export * from './reminderFiltersCompleted';
export * from './reminderFiltersFired';
+export * from './reminderReference';
+export * from './reminderReferenceFileType';
+export * from './reminderReferenceSubType';
export * from './reminderSchedule';
export * from './reminderScheduleOneOf';
export * from './reminderScheduleOneOfThree';
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/listReminderCollectionParams.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/listReminderCollectionParams.ts
new file mode 100644
index 0000000000..bee17c71dc
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/listReminderCollectionParams.ts
@@ -0,0 +1,22 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+export type ListReminderCollectionParams = {
+ /**
+ * Omit to include both done and not-done occurrences.
+ */
+ completed?: boolean;
+ /**
+ * Page size, bounded to 1–500.
+ * @minimum 0
+ */
+ limit?: number;
+ /**
+ * Position returned by the previous page.
+ */
+ cursor?: string;
+};
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderCollectionPage.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderCollectionPage.ts
new file mode 100644
index 0000000000..89648ac416
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderCollectionPage.ts
@@ -0,0 +1,19 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+import type { ReminderCollectionPageNextCursor } from './reminderCollectionPageNextCursor';
+import type { ReminderCollectionRow } from './reminderCollectionRow';
+
+/**
+ * One continuous collection, including completed recurring reminders that still fire.
+ */
+export interface ReminderCollectionPage {
+ /** Rows in server order. */
+ items: ReminderCollectionRow[];
+ /** Absent only on the final page. */
+ nextCursor?: ReminderCollectionPageNextCursor;
+}
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderCollectionPageNextCursor.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderCollectionPageNextCursor.ts
new file mode 100644
index 0000000000..a45aa9ac4f
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderCollectionPageNextCursor.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * Absent only on the final page.
+ */
+export type ReminderCollectionPageNextCursor = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderCollectionRow.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderCollectionRow.ts
new file mode 100644
index 0000000000..510c8ca538
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderCollectionRow.ts
@@ -0,0 +1,20 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+import type { Reminder } from './reminder';
+import type { ReminderCollectionRowEmailFollowup } from './reminderCollectionRowEmailFollowup';
+import type { ReminderCollectionRowReference } from './reminderCollectionRowReference';
+
+/**
+ * A native reminder row with its source and workflow capabilities resolved in bulk.
+ */
+export interface ReminderCollectionRow {
+ emailFollowup?: ReminderCollectionRowEmailFollowup;
+ reference?: ReminderCollectionRowReference;
+ /** The caller's private reminder. */
+ reminder: Reminder;
+}
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderCollectionRowEmailFollowup.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderCollectionRowEmailFollowup.ts
new file mode 100644
index 0000000000..564192ec57
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderCollectionRowEmailFollowup.ts
@@ -0,0 +1,9 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { EmailFollowup } from './emailFollowup';
+
+export type ReminderCollectionRowEmailFollowup = null | EmailFollowup;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderCollectionRowReference.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderCollectionRowReference.ts
new file mode 100644
index 0000000000..2550d972ae
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderCollectionRowReference.ts
@@ -0,0 +1,9 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { ReminderReference } from './reminderReference';
+
+export type ReminderCollectionRowReference = null | ReminderReference;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderReference.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderReference.ts
new file mode 100644
index 0000000000..43501cfcdc
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderReference.ts
@@ -0,0 +1,27 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+import type { ReminderReferenceFileType } from './reminderReferenceFileType';
+import type { ReminderReferenceSubType } from './reminderReferenceSubType';
+
+/**
+ * Display details of the entity a reminder is about, resolved alongside the
+reminder itself.
+
+A reminder has no block of its own — it opens, and is iconed as, whatever it
+references. Which block that is depends on the referenced document's file
+type, so resolving it client-side would mean a second fetch per row against
+a synchronous icon path. Reading it here keeps Soup to one round trip.
+
+Only documents populate these; every other entity type is identified by its
+[`EntityType`] alone.
+ */
+export interface ReminderReference {
+ /** The referenced document's file type, e.g. `md` or `pdf`. */
+ fileType?: ReminderReferenceFileType;
+ /** The referenced document's sub type, e.g. `task` or `snippet`. */
+ subType?: ReminderReferenceSubType;
+}
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderReferenceFileType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderReferenceFileType.ts
new file mode 100644
index 0000000000..8c132a4fde
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderReferenceFileType.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * The referenced document's file type, e.g. `md` or `pdf`.
+ */
+export type ReminderReferenceFileType = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderReferenceSubType.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderReferenceSubType.ts
new file mode 100644
index 0000000000..8b45c38076
--- /dev/null
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/reminderReferenceSubType.ts
@@ -0,0 +1,11 @@
+/**
+ * Generated by orval v7.21.0 🍺
+ * Do not edit manually.
+ * document_storage_service
+ * OpenAPI spec version: 0.1.0
+ */
+
+/**
+ * The referenced document's sub type, e.g. `task` or `snippet`.
+ */
+export type ReminderReferenceSubType = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupReminderSoupPropertiesFieldAllOfTwo.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupReminderSoupPropertiesFieldAllOfTwo.ts
index bd3d90c5fc..e4da096d85 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupReminderSoupPropertiesFieldAllOfTwo.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupReminderSoupPropertiesFieldAllOfTwo.ts
@@ -10,7 +10,7 @@ import type { SoupReminderSoupPropertiesFieldAllOfTwoCompletedAt } from './soupR
import type { SoupReminderSoupPropertiesFieldAllOfTwoReferencedEntity } from './soupReminderSoupPropertiesFieldAllOfTwoReferencedEntity';
export type SoupReminderSoupPropertiesFieldAllOfTwo = {
- /** Set once a one-shot reminder has fired. */
+ /** When the owner acknowledged the occurrence; independent of future scheduling. */
completedAt?: SoupReminderSoupPropertiesFieldAllOfTwoCompletedAt;
/** When the reminder was created. */
createdAt: string;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupReminderSoupPropertiesFieldAllOfTwoCompletedAt.ts b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupReminderSoupPropertiesFieldAllOfTwoCompletedAt.ts
index 524b92d735..a4d4074519 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupReminderSoupPropertiesFieldAllOfTwoCompletedAt.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/schemas/soupReminderSoupPropertiesFieldAllOfTwoCompletedAt.ts
@@ -6,6 +6,6 @@
*/
/**
- * Set once a one-shot reminder has fired.
+ * When the owner acknowledged the occurrence; independent of future scheduling.
*/
export type SoupReminderSoupPropertiesFieldAllOfTwoCompletedAt = string | null;
diff --git a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts b/apps/web/src/lib/service-clients/service-storage/generated/zod.ts
index a7f492dfc5..5ec211e83b 100644
--- a/apps/web/src/lib/service-clients/service-storage/generated/zod.ts
+++ b/apps/web/src/lib/service-clients/service-storage/generated/zod.ts
@@ -12507,7 +12507,9 @@ export const getItemsSoupResponse = zod
completedAt: zod.iso
.datetime({})
.nullish()
- .describe('Set once a one-shot reminder has fired.'),
+ .describe(
+ 'When the owner acknowledged the occurrence; independent of future scheduling.'
+ ),
createdAt: zod.iso
.datetime({})
.describe('When the reminder was created.'),
@@ -16905,7 +16907,9 @@ export const postItemsSoupResponse = zod
completedAt: zod.iso
.datetime({})
.nullish()
- .describe('Set once a one-shot reminder has fired.'),
+ .describe(
+ 'When the owner acknowledged the occurrence; independent of future scheduling.'
+ ),
createdAt: zod.iso
.datetime({})
.describe('When the reminder was created.'),
@@ -20711,7 +20715,9 @@ export const postItemsSoupAstResponse = zod
completedAt: zod.iso
.datetime({})
.nullish()
- .describe('Set once a one-shot reminder has fired.'),
+ .describe(
+ 'When the owner acknowledged the occurrence; independent of future scheduling.'
+ ),
createdAt: zod.iso
.datetime({})
.describe('When the reminder was created.'),
@@ -24892,7 +24898,7 @@ export const postItemsSoupAstGroupedResponse = zod
.datetime({})
.nullish()
.describe(
- 'Set once a one-shot reminder has fired.'
+ 'When the owner acknowledged the occurrence; independent of future scheduling.'
),
createdAt: zod.iso
.datetime({})
@@ -28702,7 +28708,7 @@ export const postItemsSoupAstGroupedResponse = zod
.datetime({})
.nullish()
.describe(
- 'Set once a one-shot reminder has fired.'
+ 'When the owner acknowledged the occurrence; independent of future scheduling.'
),
createdAt: zod.iso
.datetime({})
@@ -33809,6 +33815,210 @@ export const createReminderBody = zod
})
.describe('Request body for creating a reminder.');
+/**
+ * @summary Native reminder rows, ordered and paginated by the owning domain.
+ */
+export const listReminderCollectionQueryLimitMin = 0;
+
+export const listReminderCollectionQueryParams = zod.object({
+ completed: zod
+ .boolean()
+ .optional()
+ .describe('Omit to include both done and not-done occurrences.'),
+ limit: zod
+ .number()
+ .min(listReminderCollectionQueryLimitMin)
+ .optional()
+ .describe('Page size, bounded to 1–500.'),
+ cursor: zod
+ .string()
+ .optional()
+ .describe('Position returned by the previous page.'),
+});
+
+export const listReminderCollectionResponse = zod
+ .object({
+ items: zod
+ .array(
+ zod
+ .object({
+ emailFollowup: zod
+ .union([
+ zod.null(),
+ zod
+ .object({
+ condition: zod
+ .enum(['if_no_reply', 'regardless'])
+ .describe(
+ 'When an email follow-up should return the conversation.'
+ ),
+ linkId: zod
+ .uuid()
+ .describe('Canonical owned\/delegated inbox.'),
+ remindAt: zod.iso
+ .datetime({})
+ .describe('Confirmed schedule.'),
+ reminderId: zod
+ .uuid()
+ .describe(
+ 'Its ordinary reminder, used by the existing alert\/management surfaces.'
+ ),
+ revision: zod
+ .uuid()
+ .describe(
+ 'Last accepted operation; edits\/removal compare this to prevent stale undo.'
+ ),
+ state: zod
+ .enum([
+ 'archiving',
+ 'pending',
+ 'returning',
+ 'returned',
+ 'cancelled',
+ 'removed',
+ ])
+ .describe('Durable progress of an email operation.'),
+ threadId: zod.uuid().describe('Conversation identity.'),
+ })
+ .describe(
+ 'Public status shown on email and in the Reminders editor.'
+ ),
+ ])
+ .optional(),
+ reference: zod
+ .union([
+ zod.null(),
+ zod
+ .object({
+ fileType: zod
+ .string()
+ .nullish()
+ .describe(
+ "The referenced document's file type, e.g. `md` or `pdf`."
+ ),
+ subType: zod
+ .string()
+ .nullish()
+ .describe(
+ "The referenced document's sub type, e.g. `task` or `snippet`."
+ ),
+ })
+ .describe(
+ "Display details of the entity a reminder is about, resolved alongside the\nreminder itself.\n\nA reminder has no block of its own — it opens, and is iconed as, whatever it\nreferences. Which block that is depends on the referenced document's file\ntype, so resolving it client-side would mean a second fetch per row against\na synchronous icon path. Reading it here keeps Soup to one round trip.\n\nOnly documents populate these; every other entity type is identified by its\n[`EntityType`] alone."
+ ),
+ ])
+ .optional(),
+ reminder: zod
+ .object({
+ completedAt: zod.iso
+ .datetime({})
+ .nullish()
+ .describe(
+ 'Set once the owner marks the reminder as dealt with. Firing does not\nset it — a delivered reminder is waiting on its owner, not finished.'
+ ),
+ createdAt: zod.iso
+ .datetime({})
+ .describe('When the reminder was created.'),
+ description: zod
+ .string()
+ .describe('What to remind the user about.'),
+ enabled: zod
+ .boolean()
+ .describe('When false, the dispatcher skips this reminder.'),
+ entityId: zod
+ .string()
+ .nullish()
+ .describe(
+ 'Id of the associated entity, when the reminder is attached to one.'
+ ),
+ entityType: zod
+ .union([
+ zod.null(),
+ zod
+ .enum([
+ 'user',
+ 'chat',
+ 'channel',
+ 'channel_message',
+ 'document',
+ 'project',
+ 'email_thread',
+ 'calendar_event',
+ 'team',
+ 'call',
+ 'foreign_entity',
+ 'static_file',
+ 'crm_company',
+ 'crm_contact',
+ 'reminder',
+ 'skill',
+ 'agent_session',
+ 'scheduled_action',
+ 'initiative',
+ ])
+ .describe('The type of an entity in Macro'),
+ ])
+ .optional()
+ .describe(
+ 'Type of the associated entity, when the reminder is attached to one.'
+ ),
+ id: zod.uuid().describe('Reminder id.'),
+ nextRunAt: zod.iso
+ .datetime({})
+ .describe(
+ 'The next firing, derived from `schedule` on write.'
+ ),
+ schedule: zod
+ .union([
+ zod
+ .object({
+ remindAt: zod.iso
+ .datetime({})
+ .describe('The instant to fire at.'),
+ type: zod.enum(['once']),
+ })
+ .describe('Fires once, at a fixed instant.'),
+ zod
+ .object({
+ cron: zod
+ .string()
+ .describe(
+ 'Cron expression, either the conventional 5-field\n`min hour dom mon dow` or the 6-\/7-field\n`sec min hour dom mon dow [year]`. A 5-field expression is stored\nnormalized to 6 fields with a zero seconds field, so `0 9 \* \* \*` and\n`0 0 9 \* \* \*` are the same schedule and both read back as the latter.'
+ ),
+ timezone: zod
+ .string()
+ .describe(
+ 'The timezone the cron expression is evaluated in.'
+ ),
+ type: zod.enum(['recurring']),
+ })
+ .describe(
+ 'Fires repeatedly, on a cron schedule evaluated in `timezone`.'
+ ),
+ ])
+ .describe('When a reminder fires.'),
+ updatedAt: zod.iso
+ .datetime({})
+ .describe('When the reminder was last modified.'),
+ })
+ .describe(
+ 'A reminder belonging to a user.\n\n`user_id` is deliberately absent: a reminder is only ever read by its owner,\nso the field would be redundant on the wire.'
+ ),
+ })
+ .describe(
+ 'A native reminder row with its source and workflow capabilities resolved in bulk.'
+ )
+ )
+ .describe('Rows in server order.'),
+ nextCursor: zod
+ .string()
+ .nullish()
+ .describe('Absent only on the final page.'),
+ })
+ .describe(
+ 'One continuous collection, including completed recurring reminders that still fire.'
+ );
+
/**
* @summary Read an email follow-up and reconcile inbound reply cancellation.
*/
diff --git a/apps/web/src/lib/service-clients/service-storage/openapi.json b/apps/web/src/lib/service-clients/service-storage/openapi.json
index 9f85450542..73a22bb2b4 100644
--- a/apps/web/src/lib/service-clients/service-storage/openapi.json
+++ b/apps/web/src/lib/service-clients/service-storage/openapi.json
@@ -12742,6 +12742,86 @@
}
}
},
+ "/reminders/collection": {
+ "get": {
+ "tags": ["reminders"],
+ "summary": "Native reminder rows, ordered and paginated by the owning domain.",
+ "operationId": "list_reminder_collection",
+ "parameters": [
+ {
+ "name": "completed",
+ "in": "query",
+ "description": "Omit to include both done and not-done occurrences.",
+ "required": false,
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "description": "Page size, bounded to 1–500.",
+ "required": false,
+ "schema": {
+ "type": "integer",
+ "format": "int32",
+ "minimum": 0
+ }
+ },
+ {
+ "name": "cursor",
+ "in": "query",
+ "description": "Position returned by the previous page.",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ReminderCollectionPage"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/reminders/email/{thread_id}": {
"get": {
"tags": ["reminders"],
@@ -26552,6 +26632,57 @@
}
}
},
+ "ReminderCollectionPage": {
+ "type": "object",
+ "description": "One continuous collection, including completed recurring reminders that still fire.",
+ "required": ["items"],
+ "properties": {
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ReminderCollectionRow"
+ },
+ "description": "Rows in server order."
+ },
+ "nextCursor": {
+ "type": ["string", "null"],
+ "description": "Absent only on the final page."
+ }
+ }
+ },
+ "ReminderCollectionRow": {
+ "type": "object",
+ "description": "A native reminder row with its source and workflow capabilities resolved in bulk.",
+ "required": ["reminder"],
+ "properties": {
+ "emailFollowup": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/EmailFollowup",
+ "description": "Present only for an email-follow-up mirror, never inferred from its target type."
+ }
+ ]
+ },
+ "reference": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/ReminderReference",
+ "description": "Document display metadata, if applicable."
+ }
+ ]
+ },
+ "reminder": {
+ "$ref": "#/components/schemas/Reminder",
+ "description": "The caller's private reminder."
+ }
+ }
+ },
"ReminderFilters": {
"type": "object",
"description": "Filters for reminders.",
@@ -26584,6 +26715,20 @@
}
}
},
+ "ReminderReference": {
+ "type": "object",
+ "description": "Display details of the entity a reminder is about, resolved alongside the\nreminder itself.\n\nA reminder has no block of its own — it opens, and is iconed as, whatever it\nreferences. Which block that is depends on the referenced document's file\ntype, so resolving it client-side would mean a second fetch per row against\na synchronous icon path. Reading it here keeps Soup to one round trip.\n\nOnly documents populate these; every other entity type is identified by its\n[`EntityType`] alone.",
+ "properties": {
+ "fileType": {
+ "type": ["string", "null"],
+ "description": "The referenced document's file type, e.g. `md` or `pdf`."
+ },
+ "subType": {
+ "type": ["string", "null"],
+ "description": "The referenced document's sub type, e.g. `task` or `snippet`."
+ }
+ }
+ },
"ReminderSchedule": {
"oneOf": [
{
@@ -29224,7 +29369,7 @@
"completedAt": {
"type": ["string", "null"],
"format": "date-time",
- "description": "Set once a one-shot reminder has fired."
+ "description": "When the owner acknowledged the occurrence; independent of future scheduling."
},
"createdAt": {
"type": "string",
diff --git a/crates/models_soup/src/reminder.rs b/crates/models_soup/src/reminder.rs
index 86a9f60d01..5cb63b3a4f 100644
--- a/crates/models_soup/src/reminder.rs
+++ b/crates/models_soup/src/reminder.rs
@@ -86,7 +86,7 @@ pub struct SoupReminder<T = ()> {
pub next_run_at: DateTime<Utc>,
/// When false, the dispatcher skips this reminder.
pub enabled: bool,
- /// Set once a one-shot reminder has fired.
+ /// When the owner acknowledged the occurrence; independent of future scheduling.
#[serde(skip_serializing_if = "Option::is_none")]
pub completed_at: Option<DateTime<Utc>>,
/// When the reminder was created.
diff --git a/crates/reminders/src/domain.rs b/crates/reminders/src/domain.rs
index f5f05a096e..a67551be85 100644
--- a/crates/reminders/src/domain.rs
+++ b/crates/reminders/src/domain.rs
@@ -1,5 +1,7 @@
//! Domain layer for reminders.
+#[cfg(feature = "ports")]
+pub mod collection;
pub mod models;
#[cfg(feature = "ports")]
pub mod ports;
diff --git a/crates/reminders/src/domain/collection.rs b/crates/reminders/src/domain/collection.rs
new file mode 100644
index 0000000000..607a50d033
--- /dev/null
+++ b/crates/reminders/src/domain/collection.rs
@@ -0,0 +1,124 @@
+//! Read projection for the single, private Reminders collection.
+
+use chrono::{DateTime, Utc};
+use serde::{Deserialize, Serialize};
+
+use super::{
+ email_followup::EmailFollowup,
+ models::{InvalidCursor, Reminder, ReminderCursor, ReminderReference},
+};
+
+/// A native reminder row with its source and workflow capabilities resolved in bulk.
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(rename_all = "camelCase")]
+pub struct ReminderCollectionRow {
+ /// The caller's private reminder.
+ pub reminder: Reminder,
+ /// Document display metadata, if applicable.
+ pub reference: Option<ReminderReference>,
+ /// Present only for an email-follow-up mirror, never inferred from its target type.
+ pub email_followup: Option<EmailFollowup>,
+}
+
+/// A storage batch retains progress through malformed rows as well as readable ones.
+#[derive(Debug, Clone, Default)]
+pub struct CollectionBatch {
+ /// Decoded rows in collection order.
+ pub items: Vec<ReminderCollectionRow>,
+ /// Number of stored rows examined, including those skipped during decoding.
+ pub examined: usize,
+ /// Last position examined, even when that row could not be decoded.
+ pub last_examined: Option<CollectionCursor>,
+}
+
+/// Stable position within the collection's actionable-first ordering.
+#[derive(Debug, Clone, Copy)]
+pub struct CollectionCursor {
+ /// Snapshot clock keeps priority stable while paging.
+ pub as_of: DateTime<Utc>,
+ /// Actionable rows precede completed/paused history.
+ pub history: bool,
+ /// Ascending schedule and stable identity tie breakers within the section.
+ pub position: ReminderCursor,
+}
+
+impl CollectionCursor {
+ /// URL-safe cursor containing no user data.
+ pub fn encode(self) -> String {
+ format!(
+ "{}.{}.{}",
+ self.as_of.timestamp_micros(),
+ u8::from(self.history),
+ self.position.encode()
+ )
+ }
+
+ /// Reject malformed positions rather than silently restarting pagination.
+ pub fn decode(value: &str) -> Result<Self, InvalidCursor> {
+ let mut parts = value.splitn(3, '.');
+ let as_of = parts
+ .next()
+ .and_then(|v| v.parse().ok())
+ .and_then(DateTime::from_timestamp_micros)
+ .ok_or(InvalidCursor)?;
+ let history = match parts.next() {
+ Some("0") => false,
+ Some("1") => true,
+ _ => return Err(InvalidCursor),
+ };
+ let position = ReminderCursor::decode(parts.next().ok_or(InvalidCursor)?)?;
+ Ok(Self {
+ as_of,
+ history,
+ position,
+ })
+ }
+}
+
+/// Filters apply before pagination; absence includes both completion states.
+#[derive(Debug, Clone, Default)]
+pub struct CollectionQuery {
+ /// Optional explicit completion filter.
+ pub completed: Option<bool>,
+ /// Position returned by the preceding page.
+ pub cursor: Option<CollectionCursor>,
+ /// Requested page size, bounded by the domain service.
+ pub limit: Option<u32>,
+}
+
+/// One continuous collection, including completed recurring reminders that still fire.
+#[derive(Debug, Clone, Serialize, Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(rename_all = "camelCase")]
+pub struct ReminderCollectionPage {
+ /// Rows in server order.
+ pub items: Vec<ReminderCollectionRow>,
+ /// Absent only on the final page.
+ pub next_cursor: Option<String>,
+}
+
+/// Done recurring reminders remain actionable while their next schedule is enabled.
+pub fn is_history(reminder: &Reminder, now: DateTime<Utc>) -> bool {
+ is_history_facts(
+ reminder.completed_at.is_some(),
+ reminder.enabled,
+ matches!(
+ reminder.schedule,
+ super::models::ReminderSchedule::Recurring { .. }
+ ),
+ reminder.next_run_at,
+ now,
+ )
+}
+
+/// Ordering facts remain usable when a stored schedule cannot be decoded.
+pub fn is_history_facts(
+ completed: bool,
+ enabled: bool,
+ recurring: bool,
+ next_run_at: DateTime<Utc>,
+ now: DateTime<Utc>,
+) -> bool {
+ !((!completed && next_run_at <= now) || (enabled && (!completed || recurring)))
+}
diff --git a/crates/reminders/src/domain/email_followup/reminder_service.rs b/crates/reminders/src/domain/email_followup/reminder_service.rs
index 01888c2349..76f44e8e2c 100644
--- a/crates/reminders/src/domain/email_followup/reminder_service.rs
+++ b/crates/reminders/src/domain/email_followup/reminder_service.rs
@@ -25,6 +25,13 @@ impl<S, R, E, C> EmailRemindersService<S, R, E, C> {
impl<S: RemindersService, R: EmailFollowupRepo, E: EmailFollowupMailbox, C: Clock> RemindersService
for EmailRemindersService<S, R, E, C>
{
+ async fn list_collection(
+ &self,
+ user: &MacroUserIdStr<'_>,
+ query: crate::domain::collection::CollectionQuery,
+ ) -> Result<crate::domain::collection::ReminderCollectionPage, ReminderError> {
+ self.generic.list_collection(user, query).await
+ }
async fn get_email_followup(
&self,
user: MacroUserIdStr<'static>,
diff --git a/crates/reminders/src/domain/models.rs b/crates/reminders/src/domain/models.rs
index ed85b44a93..ad93d32842 100644
--- a/crates/reminders/src/domain/models.rs
+++ b/crates/reminders/src/domain/models.rs
@@ -247,7 +247,9 @@ impl Reminder {
///
/// Only documents populate these; every other entity type is identified by its
/// [`EntityType`] alone.
-#[derive(Debug, Clone, PartialEq, Eq, Default)]
+#[derive(Debug, Clone, PartialEq, Eq, Default, Serialize, Deserialize)]
+#[cfg_attr(feature = "inbound", derive(utoipa::ToSchema))]
+#[serde(rename_all = "camelCase")]
pub struct ReminderReference {
/// The referenced document's file type, e.g. `md` or `pdf`.
pub file_type: Option<String>,
diff --git a/crates/reminders/src/domain/ports.rs b/crates/reminders/src/domain/ports.rs
index a9eebefb44..d3e3c61aa2 100644
--- a/crates/reminders/src/domain/ports.rs
+++ b/crates/reminders/src/domain/ports.rs
@@ -39,6 +39,15 @@ pub trait RemindersRepo: Send + Sync + 'static {
/// The error type returned by repository operations.
type Err: std::error::Error + Send + Sync + 'static;
+ /// Read private native rows in actionable-first order, with filters and cursor applied before the limit.
+ fn list_collection(
+ &self,
+ user_id: &MacroUserIdStr<'_>,
+ query: &super::collection::CollectionQuery,
+ as_of: DateTime<Utc>,
+ limit: i64,
+ ) -> impl Future<Output = Result<super::collection::CollectionBatch, Self::Err>> + Send;
+
/// Insert a reminder for the user.
fn create_reminder(
&self,
@@ -297,6 +306,12 @@ pub trait ReminderDispatch: Send + Sync + 'static {
/// Inbound service port: the reminders API used by drivers (HTTP).
pub trait RemindersService: Send + Sync + 'static {
+ /// Paginate the caller's private Reminders collection with native source metadata.
+ fn list_collection(
+ &self,
+ user: &MacroUserIdStr<'_>,
+ query: super::collection::CollectionQuery,
+ ) -> impl Future<Output = Result<super::collection::ReminderCollectionPage, ReminderError>> + Send;
/// Read the email workflow when this service has email capabilities wired.
fn get_email_followup(
&self,
diff --git a/crates/reminders/src/domain/service.rs b/crates/reminders/src/domain/service.rs
index e02d455068..a0e9303acc 100644
--- a/crates/reminders/src/domain/service.rs
+++ b/crates/reminders/src/domain/service.rs
@@ -289,6 +289,59 @@ where
R: RemindersRepo,
C: Clock,
{
+ #[tracing::instrument(err, skip_all)]
+ async fn list_collection(
+ &self,
+ user: &MacroUserIdStr<'_>,
+ query: super::collection::CollectionQuery,
+ ) -> Result<super::collection::ReminderCollectionPage, ReminderError> {
+ use super::collection::{CollectionCursor, ReminderCollectionPage, is_history};
+ let limit = query.limit.unwrap_or(100).clamp(1, 500);
+ let as_of = query
+ .cursor
+ .map(|cursor| cursor.as_of)
+ .unwrap_or_else(|| self.clock.now());
+ let mut items = Vec::new();
+ let mut cursor = query.cursor;
+ let mut next_cursor = None;
+ // Match the ordinary reminder list's bounded recovery from malformed rows.
+ for _ in 0..MAX_LIST_BATCHES {
+ let probe = super::collection::CollectionQuery {
+ cursor,
+ ..query.clone()
+ };
+ let batch = self
+ .repo
+ .list_collection(user, &probe, as_of, i64::from(limit) + 1)
+ .await
+ .map_err(|error| rootcause::Report::new(error).into_dynamic())?;
+ let exhausted = batch.examined <= limit as usize;
+ items.extend(batch.items);
+ if items.len() > limit as usize {
+ items.truncate(limit as usize);
+ next_cursor = items.last().map(|row| CollectionCursor {
+ as_of,
+ history: is_history(&row.reminder, as_of),
+ position: super::models::ReminderCursor::after(&row.reminder),
+ });
+ break;
+ }
+ if exhausted {
+ next_cursor = None;
+ break;
+ }
+ cursor = batch.last_examined;
+ next_cursor = cursor;
+ if items.len() == limit as usize {
+ break;
+ }
+ }
+ Ok(ReminderCollectionPage {
+ items,
+ next_cursor: next_cursor.map(CollectionCursor::encode),
+ })
+ }
+
// `user_id` is the auth-provider composite id (it embeds the user's email)
// and `request`/`patch` carry the user-authored description, so neither is
// recorded as a span field.
@@ -508,6 +561,17 @@ where
pub struct NoOpRemindersService;
impl RemindersService for NoOpRemindersService {
+ async fn list_collection(
+ &self,
+ _user: &MacroUserIdStr<'_>,
+ _query: super::collection::CollectionQuery,
+ ) -> Result<super::collection::ReminderCollectionPage, ReminderError> {
+ Ok(super::collection::ReminderCollectionPage {
+ items: vec![],
+ next_cursor: None,
+ })
+ }
+
async fn create_reminder(
&self,
_user_id: &MacroUserIdStr<'_>,
diff --git a/crates/reminders/src/domain/service/test.rs b/crates/reminders/src/domain/service/test.rs
index 73424e07ed..5d2a7e26a9 100644
--- a/crates/reminders/src/domain/service/test.rs
+++ b/crates/reminders/src/domain/service/test.rs
@@ -202,6 +202,59 @@ fn sort_key(reminder: &Reminder) -> (DateTime<Utc>, DateTime<Utc>, Uuid) {
}
impl RemindersRepo for FakeRemindersRepo {
+ async fn list_collection(
+ &self,
+ user: &MacroUserIdStr<'_>,
+ query: &crate::domain::collection::CollectionQuery,
+ as_of: DateTime<Utc>,
+ limit: i64,
+ ) -> Result<crate::domain::collection::CollectionBatch, Self::Err> {
+ use crate::domain::collection::{ReminderCollectionRow, is_history};
+ self.check_failing()?;
+ let key = |r: &Reminder| (is_history(r, as_of), r.next_run_at, r.created_at, r.id);
+ let mut rows: Vec<_> = self
+ .rows()
+ .into_iter()
+ .filter(|(owner, r)| {
+ owner == user.as_ref()
+ && query
+ .completed
+ .is_none_or(|done| r.completed_at.is_some() == done)
+ && query.cursor.is_none_or(|c| {
+ key(r)
+ > (
+ c.history,
+ c.position.next_run_at,
+ c.position.created_at,
+ c.position.id,
+ )
+ })
+ })
+ .map(|(_, r)| r)
+ .collect();
+ rows.sort_by_key(key);
+ rows.truncate(limit as usize);
+ let last_examined = rows
+ .last()
+ .map(|r| crate::domain::collection::CollectionCursor {
+ as_of,
+ history: is_history(r, as_of),
+ position: ReminderCursor::after(r),
+ });
+ Ok(crate::domain::collection::CollectionBatch {
+ examined: rows.len(),
+ last_examined,
+ items: rows
+ .into_iter()
+ .map(|reminder| ReminderCollectionRow {
+ reminder,
+ reference: None,
+ email_followup: None,
+ })
+ .collect(),
+ })
+ }
+
type Err = FakeRepoError;
async fn create_reminder(
diff --git a/crates/reminders/src/inbound/axum_router.rs b/crates/reminders/src/inbound/axum_router.rs
index 79f27d527d..a564bacaea 100644
--- a/crates/reminders/src/inbound/axum_router.rs
+++ b/crates/reminders/src/inbound/axum_router.rs
@@ -105,6 +105,10 @@ where
.put(set_email_followup_handler::<S, Eas, Auth>),
)
.route("/", get(list_reminders_handler::<S, Eas, Auth>))
+ .route(
+ "/collection",
+ get(list_reminder_collection_handler::<S, Eas, Auth>),
+ )
.route("/", post(create_reminder_handler::<S, Eas, Auth>))
.route("/{id}", get(get_reminder_handler::<S, Eas, Auth>))
.route("/{id}", patch(update_reminder_handler::<S, Eas, Auth>))
@@ -112,6 +116,52 @@ where
.with_state(state)
}
+/// Optional filters for the single Reminders collection.
+#[derive(Debug, Default, Deserialize, utoipa::IntoParams)]
+#[serde(rename_all = "camelCase")]
+#[into_params(parameter_in = Query)]
+pub struct ReminderCollectionParams {
+ /// Omit to include both done and not-done occurrences.
+ pub completed: Option<bool>,
+ /// Page size, bounded to 1–500.
+ pub limit: Option<u32>,
+ /// Position returned by the previous page.
+ pub cursor: Option<String>,
+}
+
+/// Native reminder rows, ordered and paginated by the owning domain.
+#[utoipa::path(get, tag = "reminders", operation_id = "list_reminder_collection",
+ path = "/reminders/collection", params(ReminderCollectionParams),
+ responses((status = 200, body = crate::domain::collection::ReminderCollectionPage),
+ (status = 400, body = ErrorResponse), (status = 401, body = ErrorResponse), (status = 500, body = ErrorResponse)))]
+#[tracing::instrument(err, skip_all)]
+pub async fn list_reminder_collection_handler<S, Eas, Auth>(
+ State(state): State<RemindersRouterState<S, Eas, Auth>>,
+ user: MacroAuthorizationExtractor<Auth, UserOrInternal>,
+ Query(params): Query<ReminderCollectionParams>,
+) -> Result<Json<crate::domain::collection::ReminderCollectionPage>, ReminderError>
+where
+ S: RemindersService,
+ Eas: EntityAccessService,
+ Auth: MacroAuthorizationService,
+{
+ let query = crate::domain::collection::CollectionQuery {
+ completed: params.completed,
+ limit: params.limit,
+ cursor: params
+ .cursor
+ .as_deref()
+ .map(crate::domain::collection::CollectionCursor::decode)
+ .transpose()?,
+ };
+ Ok(Json(
+ state
+ .service
+ .list_collection(&user.authorization.user.macro_user_id, query)
+ .await?,
+ ))
+}
+
/// Request body for creating a reminder.
#[derive(Debug, Deserialize, utoipa::ToSchema)]
#[serde(rename_all = "camelCase")]
diff --git a/crates/reminders/src/inbound/axum_router/test.rs b/crates/reminders/src/inbound/axum_router/test.rs
index 5d90a795b5..213b09392e 100644
--- a/crates/reminders/src/inbound/axum_router/test.rs
+++ b/crates/reminders/src/inbound/axum_router/test.rs
@@ -251,6 +251,11 @@ fn sample_reminder(entity_id: Option<&str>) -> Reminder {
/// transport input into domain calls can be asserted.
#[derive(Debug, Clone, PartialEq)]
enum ServiceCall {
+ Collection {
+ user: String,
+ completed: Option<bool>,
+ limit: Option<u32>,
+ },
Create {
description: String,
entity: Option<(EntityType, String)>,
@@ -326,6 +331,23 @@ fn receipt_entity_pair(
}
impl RemindersService for FakeRemindersService {
+ async fn list_collection(
+ &self,
+ user: &MacroUserIdStr<'_>,
+ query: crate::domain::collection::CollectionQuery,
+ ) -> Result<crate::domain::collection::ReminderCollectionPage, ReminderError> {
+ self.fail_if_configured()?;
+ self.record(ServiceCall::Collection {
+ user: user.to_string(),
+ completed: query.completed,
+ limit: query.limit,
+ });
+ Ok(crate::domain::collection::ReminderCollectionPage {
+ items: vec![],
+ next_cursor: None,
+ })
+ }
+
async fn create_reminder(
&self,
_user_id: &MacroUserIdStr<'_>,
@@ -1372,3 +1394,38 @@ async fn creating_against_a_missing_entity_says_the_entity_is_missing() {
"create failure should not blame a reminder: {message}"
);
}
+
+#[tokio::test]
+async fn native_collection_authenticates_and_validates_cursor() {
+ for (path, authenticated, expected) in [
+ ("/collection", false, StatusCode::UNAUTHORIZED),
+ ("/collection?cursor=invalid", true, StatusCode::BAD_REQUEST),
+ ("/collection?completed=true&limit=25", true, StatusCode::OK),
+ ] {
+ let service = FakeRemindersService::default();
+ let router = build_router(service.clone(), FakeEntityAccessService::default());
+ let request = axum::http::Request::get(path);
+ let request = if authenticated {
+ authed(request)
+ } else {
+ request
+ };
+ let response = router
+ .oneshot(request.body(axum::body::Body::empty()).unwrap())
+ .await
+ .unwrap();
+ assert_eq!(response.status(), expected);
+ if expected == StatusCode::OK {
+ assert!(matches!(
+ service.calls().as_slice(),
+ [ServiceCall::Collection {
+ completed: Some(true),
+ limit: Some(25),
+ ..
+ }]
+ ));
+ } else {
+ assert!(service.calls().is_empty());
+ }
+ }
+}
diff --git a/crates/reminders/src/outbound/pg_reminders_repo.rs b/crates/reminders/src/outbound/pg_reminders_repo.rs
index ebfeb22db5..59e0330f5c 100644
--- a/crates/reminders/src/outbound/pg_reminders_repo.rs
+++ b/crates/reminders/src/outbound/pg_reminders_repo.rs
@@ -1,5 +1,6 @@
//! PostgreSQL implementation of the [`RemindersRepo`] port.
+mod collection;
mod email_followup;
#[cfg(test)]
mod test;
@@ -248,6 +249,15 @@ fn schedule_columns(
}
impl RemindersRepo for PgRemindersRepo {
+ async fn list_collection(
+ &self,
+ user: &MacroUserIdStr<'_>,
+ query: &crate::domain::collection::CollectionQuery,
+ as_of: DateTime<Utc>,
+ limit: i64,
+ ) -> Result<crate::domain::collection::CollectionBatch, Self::Err> {
+ self.read_collection(user, query, as_of, limit).await
+ }
type Err = RemindersRepoErr;
#[tracing::instrument(err, skip(self, user_id, new))]
diff --git a/crates/reminders/src/outbound/pg_reminders_repo/collection.rs b/crates/reminders/src/outbound/pg_reminders_repo/collection.rs
new file mode 100644
index 0000000000..b0d6522413
--- /dev/null
+++ b/crates/reminders/src/outbound/pg_reminders_repo/collection.rs
@@ -0,0 +1,124 @@
+use super::{PgRemindersRepo, ReminderRow, RemindersRepoErr};
+use crate::domain::{
+ collection::{
+ CollectionBatch, CollectionCursor, CollectionQuery, ReminderCollectionRow, is_history_facts,
+ },
+ email_followup::FollowupRecord,
+ models::{ReminderCursor, ReminderReference},
+};
+use chrono::{DateTime, Utc};
+use macro_user_id::user_id::MacroUserIdStr;
+
+impl PgRemindersRepo {
+ pub(super) async fn read_collection(
+ &self,
+ user: &MacroUserIdStr<'_>,
+ query: &CollectionQuery,
+ as_of: DateTime<Utc>,
+ limit: i64,
+ ) -> Result<CollectionBatch, RemindersRepoErr> {
+ let cursor = query.cursor;
+ let rows = sqlx::query!(
+ r#"
+ WITH candidates AS (
+ SELECT r.*, NOT (
+ (r.completed_at IS NULL AND r.next_run_at <= $3)
+ OR (r.enabled AND (r.completed_at IS NULL OR r.cron IS NOT NULL))
+ ) AS history
+ FROM reminder r
+ WHERE r.user_id = $1
+ AND ($2::bool IS NULL OR (r.completed_at IS NOT NULL) = $2)
+ )
+ SELECT r.id, r.description, r.entity_type, r.entity_id,
+ r.remind_at, r.cron, r.timezone, r.next_run_at, r.enabled,
+ r.completed_at, r.created_at, r.updated_at,
+ d."fileType" AS "file_type?", dst.sub_type::text AS "sub_type?",
+ f.payload AS "followup?"
+ FROM candidates r
+ LEFT JOIN "Document" d ON r.entity_type = 'document'
+ AND d.id = r.entity_id::text AND d."deletedAt" IS NULL
+ LEFT JOIN document_sub_type dst ON dst.document_id = d.id
+ LEFT JOIN reminder_email_followup f ON f.reminder_id = r.id AND f.user_id = $1
+ WHERE $4::bool IS NULL
+ OR (r.history, r.next_run_at, r.created_at, r.id) > ($4, $5, $6, $7)
+ ORDER BY r.history, r.next_run_at, r.created_at, r.id
+ LIMIT $8
+ "#,
+ user.as_ref(),
+ query.completed,
+ as_of,
+ cursor.map(|c| c.history),
+ cursor.map(|c| c.position.next_run_at),
+ cursor.map(|c| c.position.created_at),
+ cursor.map(|c| c.position.id),
+ limit,
+ )
+ .fetch_all(&self.pool)
+ .await?;
+ let last_examined = rows.last().map(|row| CollectionCursor {
+ as_of,
+ history: is_history_facts(
+ row.completed_at.is_some(),
+ row.enabled,
+ row.cron.is_some(),
+ row.next_run_at,
+ as_of,
+ ),
+ position: ReminderCursor {
+ next_run_at: row.next_run_at,
+ created_at: row.created_at,
+ id: row.id,
+ },
+ });
+ let mut batch = CollectionBatch {
+ items: Vec::with_capacity(rows.len()),
+ examined: rows.len(),
+ last_examined,
+ };
+ for row in rows {
+ let email_followup = match row.followup {
+ Some(payload) => match serde_json::from_value::<FollowupRecord>(payload) {
+ Ok(record) => Some(record.followup),
+ Err(error) => {
+ tracing::error!(error = ?error, "skipping unreadable email reminder in collection");
+ continue;
+ }
+ },
+ None => None,
+ };
+ let reminder = ReminderRow {
+ id: row.id,
+ description: row.description,
+ entity_type: row.entity_type,
+ entity_id: row.entity_id,
+ remind_at: row.remind_at,
+ cron: row.cron,
+ timezone: row.timezone,
+ next_run_at: row.next_run_at,
+ enabled: row.enabled,
+ completed_at: row.completed_at,
+ created_at: row.created_at,
+ updated_at: row.updated_at,
+ }
+ .into_reminder();
+ let reminder = match reminder {
+ Ok(reminder) => reminder,
+ Err(error) => {
+ tracing::error!(error = ?error, "skipping unreadable reminder in collection");
+ continue;
+ }
+ };
+ let reference =
+ (row.file_type.is_some() || row.sub_type.is_some()).then_some(ReminderReference {
+ file_type: row.file_type,
+ sub_type: row.sub_type,
+ });
+ batch.items.push(ReminderCollectionRow {
+ reminder,
+ reference,
+ email_followup,
+ })
+ }
+ Ok(batch)
+ }
+}
diff --git a/crates/reminders/src/outbound/pg_reminders_repo/email_followup/test.rs b/crates/reminders/src/outbound/pg_reminders_repo/email_followup/test.rs
index 1530856b6f..1d7c49dc2d 100644
--- a/crates/reminders/src/outbound/pg_reminders_repo/email_followup/test.rs
+++ b/crates/reminders/src/outbound/pg_reminders_repo/email_followup/test.rs
@@ -980,3 +980,97 @@ async fn undo_and_archive_rollback_restore_original_inbox_order(pool: PgPool) {
service.mailbox.0.lock().unwrap().archive_fails = false;
}
}
+
+#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
+async fn collection_skips_corrupt_email_probe_without_hiding_generic_reminders(pool: PgPool) {
+ use crate::domain::{
+ collection::{CollectionCursor, CollectionQuery},
+ models::{NewReminder, ReminderSchedule},
+ };
+ let service = setup(pool).await;
+ let now = service.clock.now();
+ let created = service
+ .execute(
+ user(),
+ THREAD,
+ set(
+ now + Duration::seconds(100),
+ EmailReminderCondition::Regardless,
+ ),
+ )
+ .await
+ .unwrap();
+ sqlx::query!(
+ "UPDATE reminder_email_followup SET payload = '{}'::jsonb WHERE reminder_id = $1",
+ created.reminder_id,
+ )
+ .execute(&service.repo.pool)
+ .await
+ .unwrap();
+ let mut expected = Vec::new();
+ for i in 0..105 {
+ if i == 100 {
+ continue;
+ }
+ let at = now + Duration::seconds(i);
+ let reminder = service
+ .repo
+ .create_reminder(
+ &user(),
+ &NewReminder {
+ description: "readable collection row".into(),
+ entity: None,
+ schedule: ReminderSchedule::Once { remind_at: at },
+ next_run_at: at,
+ },
+ )
+ .await
+ .unwrap();
+ expected.push(reminder.id);
+ }
+ let batch = service
+ .repo
+ .list_collection(&user(), &CollectionQuery::default(), now, 101)
+ .await
+ .unwrap();
+ assert_eq!(batch.examined, 101);
+ assert_eq!(batch.items.len(), 100);
+ assert_eq!(
+ batch.last_examined.unwrap().position.id,
+ created.reminder_id
+ );
+ let reminders = RemindersServiceImpl::with_clock(
+ PgRemindersRepo::new(service.repo.pool.clone()),
+ service.clock.clone(),
+ );
+ let first = reminders
+ .list_collection(&user(), CollectionQuery::default())
+ .await
+ .unwrap();
+ assert_eq!(first.items.len(), 100);
+ let second = reminders
+ .list_collection(
+ &user(),
+ CollectionQuery {
+ cursor: Some(
+ CollectionCursor::decode(first.next_cursor.as_deref().unwrap()).unwrap(),
+ ),
+ ..Default::default()
+ },
+ )
+ .await
+ .unwrap();
+ assert_eq!(second.items.len(), 4);
+ assert!(second.next_cursor.is_none());
+ let actual: Vec<_> = first
+ .items
+ .into_iter()
+ .chain(second.items)
+ .map(|row| row.reminder.id)
+ .collect();
+ assert_eq!(actual, expected);
+ assert!(
+ !actual.contains(&created.reminder_id),
+ "a corrupt mirror must never become an ordinary reminder"
+ );
+}
diff --git a/crates/reminders/src/outbound/pg_reminders_repo/test.rs b/crates/reminders/src/outbound/pg_reminders_repo/test.rs
index 7f149d6844..230dab501a 100644
--- a/crates/reminders/src/outbound/pg_reminders_repo/test.rs
+++ b/crates/reminders/src/outbound/pg_reminders_repo/test.rs
@@ -1,4 +1,5 @@
use chrono::{Duration, TimeZone};
+mod collection;
use chrono_tz::America::New_York;
use macro_db_migrator::MACRO_DB_MIGRATIONS;
use macro_user_id::user_id::MacroUserIdStr;
diff --git a/crates/reminders/src/outbound/pg_reminders_repo/test/collection.rs b/crates/reminders/src/outbound/pg_reminders_repo/test/collection.rs
new file mode 100644
index 0000000000..9c8d42cb0a
--- /dev/null
+++ b/crates/reminders/src/outbound/pg_reminders_repo/test/collection.rs
@@ -0,0 +1,181 @@
+use super::*;
+use crate::domain::collection::{CollectionCursor, CollectionQuery, is_history};
+
+#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
+async fn collection_paginates_due_upcoming_and_history_without_starvation(pool: PgPool) {
+ insert_user(&pool, USER_A).await;
+ insert_user(&pool, USER_B).await;
+ let repo = PgRemindersRepo::new(pool);
+ let now = at(2026, 10, 1, 12);
+ // More than a page of old completions must not consume the actionable page.
+ for i in 0..105 {
+ let r = repo
+ .create_reminder(
+ &user(USER_A),
+ &new_reminder(
+ "history",
+ once_at(now - Duration::days(10) + Duration::seconds(i)),
+ ),
+ )
+ .await
+ .unwrap();
+ repo.update_reminder(
+ &user(USER_A),
+ r.id,
+ &ReminderUpdate {
+ completed: Some(true),
+ ..Default::default()
+ },
+ )
+ .await
+ .unwrap();
+ repo.create_reminder(
+ &user(USER_A),
+ &new_reminder(
+ "future",
+ once_at(now + Duration::days(10) + Duration::seconds(i)),
+ ),
+ )
+ .await
+ .unwrap();
+ }
+ let due = repo
+ .create_reminder(
+ &user(USER_A),
+ &new_reminder("due", once_at(now - Duration::hours(1))),
+ )
+ .await
+ .unwrap();
+ let mut repeating = new_reminder("done and scheduled", recurring());
+ repeating.next_run_at = now + Duration::hours(1);
+ let recurring = repo
+ .create_reminder(&user(USER_A), &repeating)
+ .await
+ .unwrap();
+ repo.update_reminder(
+ &user(USER_A),
+ recurring.id,
+ &ReminderUpdate {
+ completed: Some(true),
+ ..Default::default()
+ },
+ )
+ .await
+ .unwrap();
+ repo.create_reminder(
+ &user(USER_B),
+ &new_reminder("private", once_at(now - Duration::days(2))),
+ )
+ .await
+ .unwrap();
+
+ let mut query = CollectionQuery::default();
+ let mut rows = Vec::new();
+ loop {
+ let page = repo
+ .list_collection(&user(USER_A), &query, now, 100)
+ .await
+ .unwrap()
+ .items;
+ let Some(last) = page.last() else { break };
+ query.cursor = Some(CollectionCursor {
+ as_of: now,
+ history: is_history(&last.reminder, now),
+ position: ReminderCursor::after(&last.reminder),
+ });
+ rows.extend(page);
+ }
+ assert_eq!(rows.len(), 212);
+ assert_eq!(rows[0].reminder.id, due.id);
+ assert_eq!(rows[1].reminder.id, recurring.id);
+ assert!(rows[1].reminder.completed_at.is_some());
+ assert!(
+ rows[..107]
+ .iter()
+ .all(|row| !is_history(&row.reminder, now))
+ );
+ assert!(rows[107..].iter().all(|row| is_history(&row.reminder, now)));
+ let ids: std::collections::HashSet<_> = rows.iter().map(|r| r.reminder.id).collect();
+ assert_eq!(ids.len(), rows.len());
+ let done = repo
+ .list_collection(
+ &user(USER_A),
+ &CollectionQuery {
+ completed: Some(true),
+ ..Default::default()
+ },
+ now,
+ 500,
+ )
+ .await
+ .unwrap();
+ let done = done.items;
+ assert_eq!(done.len(), 106);
+ assert_eq!(done[0].reminder.id, recurring.id);
+}
+
+#[derive(Clone)]
+struct CollectionClock(DateTime<Utc>);
+impl crate::domain::ports::Clock for CollectionClock {
+ fn now(&self) -> DateTime<Utc> {
+ self.0
+ }
+}
+
+#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
+async fn collection_skips_unreadable_probe_rows_without_losing_following_pages(pool: PgPool) {
+ use crate::domain::{ports::RemindersService, service::RemindersServiceImpl};
+ insert_user(&pool, USER_A).await;
+ let repo = PgRemindersRepo::new(pool.clone());
+ let now = at(2026, 10, 1, 12);
+ let mut expected = Vec::new();
+ for i in 0..105 {
+ let row = repo
+ .create_reminder(
+ &user(USER_A),
+ &new_reminder("row", once_at(now + Duration::seconds(i))),
+ )
+ .await
+ .unwrap();
+ if i == 0 || i == 100 {
+ sqlx::query("UPDATE reminder SET entity_type = 'unknown_type', entity_id = $2::uuid WHERE id = $1")
+ .bind(row.id).bind(DOC_1).execute(&pool).await.unwrap();
+ } else {
+ expected.push(row.id);
+ }
+ }
+ let batch = repo
+ .list_collection(&user(USER_A), &CollectionQuery::default(), now, 101)
+ .await
+ .unwrap();
+ assert_eq!(batch.examined, 101);
+ assert_eq!(batch.items.len(), 99);
+ assert!(batch.last_examined.is_some());
+ let service = RemindersServiceImpl::with_clock(repo, CollectionClock(now));
+ let first = service
+ .list_collection(&user(USER_A), CollectionQuery::default())
+ .await
+ .unwrap();
+ assert_eq!(first.items.len(), 100);
+ let second = service
+ .list_collection(
+ &user(USER_A),
+ CollectionQuery {
+ cursor: Some(
+ CollectionCursor::decode(first.next_cursor.as_deref().unwrap()).unwrap(),
+ ),
+ ..Default::default()
+ },
+ )
+ .await
+ .unwrap();
+ assert_eq!(second.items.len(), 3);
+ assert!(second.next_cursor.is_none());
+ let actual: Vec<_> = first
+ .items
+ .into_iter()
+ .chain(second.items)
+ .map(|row| row.reminder.id)
+ .collect();
+ assert_eq!(actual, expected);
+}
diff --git a/crates/soup/src/domain/service/tests.rs b/crates/soup/src/domain/service/tests.rs
index 7ece5fccdd..e182ac50b8 100644
--- a/crates/soup/src/domain/service/tests.rs
+++ b/crates/soup/src/domain/service/tests.rs
@@ -2931,6 +2931,17 @@ struct RecordingRemindersService {
}
impl RemindersService for RecordingRemindersService {
+ async fn list_collection(
+ &self,
+ _user: &MacroUserIdStr<'_>,
+ _query: reminders::domain::collection::CollectionQuery,
+ ) -> Result<reminders::domain::collection::ReminderCollectionPage, ReminderError> {
+ Ok(reminders::domain::collection::ReminderCollectionPage {
+ items: vec![],
+ next_cursor: None,
+ })
+ }
+
async fn create_reminder(
&self,
_user_id: &MacroUserIdStr<'_>,
diff --git a/docs/AGENT_GUIDE/reminders.md b/docs/AGENT_GUIDE/reminders.md
index ec5c23439f..f4e95815fc 100644
--- a/docs/AGENT_GUIDE/reminders.md
+++ b/docs/AGENT_GUIDE/reminders.md
@@ -6,6 +6,40 @@ controls; reminder creation is a real hosted-data mutation, so use request
interception when checking failures and cancel any draft used only for visual
inspection.
+## One collection, independent completion and schedule
+
+The Reminders workspace is one continuous list, without Active/Scheduled/Done
+tabs. Due reminders come first, then upcoming schedules, then completed history;
+ordering applies before pagination. An old saved tab opens the unified view.
+Completion is acknowledgment of an occurrence: a done recurring reminder can
+still have a future schedule. Its quiet completed check and clock appear together.
+Hover/focus reveals the native undo action; incomplete rows reveal Mark done.
+Touch keeps these actions visible. Neither control uses a filled status pill.
+Tab can focus completion and clock buttons; Enter activates that button, while
+Enter on the list row still opens its entity.
+Marking done keeps the row in the unfiltered collection. The explicit Completion
+filter can limit the collection to Done or Not done. These choices are exclusive;
+selecting the active choice again or using Clear all restores the full collection.
+
+A persistent clock beside the row metadata shows a compact exact date/time,
+human-readable repeat rule, and relevant email condition on hover or keyboard
+focus. A short timezone appears only for a foreign zone or ambiguous local hour;
+raw cron and IANA zone names never appear in the summary. Custom schedules show
+the actual next occurrence when known, without guessing a cadence. Click or tap it to
+edit using the existing reminder form. It remains available when row-hover
+actions or notification metadata are visible and on narrow/touch layouts. Paused
+and due tooltips describe those states without claiming a future firing or
+successful delivery. Completed one-shot reminders have no scheduled clock.
+
+An email-follow-up mirror's completed control opens its owning email composer
+to schedule again; it must not call generic mark-not-done. Its completion toast
+does not offer generic Undo, because the server rejects that operation.
+
+For verification, include a done recurring reminder, due and completed one-shots,
+a paused schedule, and a long recurrence. Verify hover/focus tooltips, editor
+dismissal focus, retained rows after completion, and narrow notification rows.
+Collection reads are paginated and refreshed in bulk, with no per-row polling.
+
## Create or edit a reminder
**New reminder** opens **Remind me about…**, an entity picker with recent items.
@@ -16,8 +50,8 @@ selecting a task/document opens a time-first form with its title and icon.
selection. **Write a reminder instead** opens the freeform form, where
**Reminder description** is required. The **When** field accepts date language such as
`tomorrow 9am`, `in 30 minutes`, weekdays, and explicit dates. The resolved
-weekday, date, time, and timezone appear in the **Scheduled:** preview before
-saving.
+date and time appear in the **Scheduled:** preview before saving. The
+preview includes a timezone only when it is needed to interpret that time.
Quick choices are **In 30m**, **Later today** (only before 5 PM), **Tomorrow**,
**Next week**, and **Custom**. Each choice names its resolved time. Custom reveals
diff --git a/docs/AGENT_GUIDE/surfaces.md b/docs/AGENT_GUIDE/surfaces.md
index 5cda809585..b413b3605f 100644
--- a/docs/AGENT_GUIDE/surfaces.md
+++ b/docs/AGENT_GUIDE/surfaces.md
@@ -1988,6 +1988,11 @@ contracts and test coverage.
### Email reminders
+The global Reminders workspace uses one continuous collection with completion
+and schedule shown independently on the existing entity rows. Its persistent
+clock exposes the full schedule on hover/focus and opens the existing editor;
+see [collection verification](reminders.md#one-collection-independent-completion-and-schedule).
+
Use **H** on one selected email or its open conversation, **Remind me** in the
menu, or the header bell. These share the email-specific, time-first workflow
in [Reminders](reminders.md#email-follow-ups-h). A successful new reminder moves
diff --git a/packages/sdk/generated/storage/index.ts b/packages/sdk/generated/storage/index.ts
index 1635b9000a..6b47d30d8b 100644
--- a/packages/sdk/generated/storage/index.ts
+++ b/packages/sdk/generated/storage/index.ts
@@ -1,4 +1,4 @@
// This file is auto-generated by @hey-api/openapi-ts
export { type Options, Sdk } from './sdk.gen';
-export type { AccessLevel, ActiveCallsResponse, ActiveCallSummary, ActiveMeeting, ActiveMeetingsResponse, ActivityType, AddFavoriteData, AddFavoriteError, AddFavoriteErrors, AddFavoriteRequest, AddFavoriteResponse, AddFavoriteResponses, AddParticipantsData, AddParticipantsError, AddParticipantsErrors, AddParticipantsRequest, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerError, AddPinHandlerErrors, AddPinHandlerResponse, AddPinHandlerResponses, AddPinRequest, Agent, AgentActionId, AgentChannelScope, AgentMcpServer, AgentMcpServers, AgentPullRequestState, AgentSessionFilters, AgentSessionLifecycleEvent, Anchor, AnchorId, AnchorResponse, AnnotationIncrementalUpdate, ApiActivity, ApiAttachmentChannelReference, ApiAttachmentEntityReference, ApiAttachmentGenericReference, ApiChannelAttachment, ApiChannelAttachmentsPage, ApiChannelDetail, ApiChannelListMessage, ApiChannelListPage, ApiChannelListParticipant, ApiChannelListType, ApiChannelParticipant, ApiChannelWithLatest, ApiEntityFilterAst, ApiGroupByField, ApiGroupMeta, ApiParticipantListRole, ApiParticipantRole, ApiPropertyEntityType, ApproveHarnessPairingData, ApproveHarnessPairingError, ApproveHarnessPairingErrors, ApproveHarnessPairingResponse, ApproveHarnessPairingResponses, ApprovePairingRequest, AssignInitiativeTasksData, AssignInitiativeTasksError, AssignInitiativeTasksErrors, AssignInitiativeTasksResponse, AssignInitiativeTasksResponses, AssignTasksRequest, AssignTasksResponse, AssignTasksResult, AssignTaskStatus, AttachmentChange, AttendeeResponseStatus, BasicDocument, BasicDocumentSubType, BomPart, Bot, BotChannel, BotChannelType, BotId, BotKind, BotOwner, BotOwnerProfile, BotSenderProfile, BotToken, BranchNameResponse, BTreeMap, BulkWakeupRequest, BulkWakeupResponse, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponse, BulkWakeupSyncServiceDocumentsResponses, CalendarAttendee, CalendarEvent, CalendarEventFilters, CalendarEventSourceContent, CalendarMentionEvent, CalendarMentionPreviewItem, CalendarMentionPreviewKind, CalendarMentionPreviewRequest, CalendarMentionPreviewRequestItem, CalendarMentionPreviewResponse, CalendarOccurrence, CalendarOccurrenceItem, CalendarOccurrenceResponse, CalendarSyncStatus, CallActiveResponse, CallFilters, CallRecord, CallRecordGuest, CallRecordParticipant, CallRecordPreview, CallRecordPreviewData, CallRecordTranscriptSegment, CallStatus, CallTokenResponse, CallWebhookData, CallWebhookError, CallWebhookErrors, CallWebhookResponses, Channel, ChannelCreatedMetadata, ChannelDeletedMetadata, ChannelFilters, ChannelJoinCodeResponse, ChannelLabel, ChannelLabelRule, ChannelLabelsList, ChannelMessage, ChannelParticipant, ChannelParticipantAddedMetadata, ChannelParticipantRemovedMetadata, ChannelPreview, ChannelPreviewData, ChannelSender, ChannelSharePermission, ChannelThreadFilters, ChannelTopicEvent, ChannelType, ChannelUpdatedMetadata, ChannelWebhookRequest, ChannelWebhookResponse, ChannelWithParticipants, Chat, ChatFilters, CheckActiveCallData, CheckActiveCallError, CheckActiveCallErrors, CheckActiveCallResponse, CheckActiveCallResponses, ClaimedPairing, ClaimHarnessPairingData, ClaimHarnessPairingError, ClaimHarnessPairingErrors, ClaimHarnessPairingResponse, ClaimHarnessPairingResponses, ClaimPairingRequest, ClientOptions, CloudStorageItemType, CollabSurfaceResponse, CollabSurfaceTokenResponse, CommandFailure, CommandRejectedMetadata, ConferenceProvider, CopyDocumentData, CopyDocumentError, CopyDocumentErrors, CopyDocumentQueryParams, CopyDocumentRequest, CopyDocumentResponse, CopyDocumentResponse2, CopyDocumentResponses, CountedReaction, CreateAgentData, CreateAgentError, CreateAgentErrors, CreateAgentRequest, CreateAgentResponse, CreateAgentResponses, CreateAnchorData, CreateAnchorError, CreateAnchorErrors, CreateAnchorResponse, CreateAnchorResponses, CreateBotRequest, CreateBulkDocumentResponse, CreateBulkDocumentResponseData, CreateChannelData, CreateChannelError, CreateChannelErrors, CreateChannelLabelData, CreateChannelLabelError, CreateChannelLabelErrors, CreateChannelLabelRequest, CreateChannelLabelResponse, CreateChannelLabelResponses, CreateChannelRequest, CreateChannelResponse, CreateChannelResponse2, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotError, CreateChannelScopedBotErrors, CreateChannelScopedBotRequest, CreateChannelScopedBotResponse, CreateChannelScopedBotResponse2, CreateChannelScopedBotResponses, CreateCollabSurfaceTokenData, CreateCollabSurfaceTokenError, CreateCollabSurfaceTokenErrors, CreateCollabSurfaceTokenResponse, CreateCollabSurfaceTokenResponses, CreateCrmCompanyData, CreateCrmCompanyError, CreateCrmCompanyErrors, CreateCrmCompanyRequest, CreateCrmCompanyResponse, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactError, CreateCrmContactErrors, CreateCrmContactRequest, CreateCrmContactResponse, CreateCrmContactResponses, CreateDocumentData, CreateDocumentError, CreateDocumentErrors, CreateDocumentRequest, CreateDocumentResponse, CreateDocumentResponseData, CreateDocumentResponses, CreatedPairing, CreatedUserApiKey, CreateEntityMentionData, CreateEntityMentionError, CreateEntityMentionErrors, CreateEntityMentionRequest, CreateEntityMentionResponse, CreateEntityMentionResponse2, CreateEntityMentionResponses, CreateHarnessPairingData, CreateHarnessPairingError, CreateHarnessPairingErrors, CreateHarnessPairingResponse, CreateHarnessPairingResponses, CreateInitiativeData, CreateInitiativeError, CreateInitiativeErrors, CreateInitiativeRequest, CreateInitiativeResponse, CreateInitiativeResponses, CreateInstructionsDocumentResponse, CreateInstructionsHandlerData, CreateInstructionsHandlerError, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponse, CreateInstructionsHandlerResponses, CreateMarkdownDocumentRequest, CreateMarkdownDocumentResponse, CreateMarkdownHandlerData, CreateMarkdownHandlerError, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponse, CreateMarkdownHandlerResponses, CreateMeetingRequest, CreatePairingRequest, CreateProjectHandlerData, CreateProjectHandlerError, CreateProjectHandlerErrors, CreateProjectHandlerResponse, CreateProjectHandlerResponses, CreateProjectRequest, CreateProjectResponse, CreateReminderData, CreateReminderError, CreateReminderErrors, CreateReminderRequest, CreateReminderResponse, CreateReminderResponses, CreateSkillHandlerData, CreateSkillHandlerError, CreateSkillHandlerErrors, CreateSkillHandlerResponse, CreateSkillHandlerResponses, CreateSkillRequest, CreateSkillResponse, CreateSnippetHandlerData, CreateSnippetHandlerError, CreateSnippetHandlerErrors, CreateSnippetHandlerResponse, CreateSnippetHandlerResponses, CreateSnippetRequest, CreateSnippetResponse, CreateTaskHandlerData, CreateTaskHandlerError, CreateTaskHandlerErrors, CreateTaskHandlerResponse, CreateTaskHandlerResponses, CreateTaskRequest, CreateTaskResponse, CreateUnthreadedAnchorRequest, CreateUnthreadedAnchorResponse, CreateUnthreadedPdfAnchorRequest, CreateUserApiKeyData, CreateUserApiKeyError, CreateUserApiKeyErrors, CreateUserApiKeyRequest, CreateUserApiKeyResponse, CreateUserApiKeyResponses, CreateViewHandlerData, CreateViewHandlerError, CreateViewHandlerErrors, CreateViewHandlerResponse, CreateViewHandlerResponses, CreateViewRequest, CreateWebhookData, CreateWebhookError, CreateWebhookErrors, CreateWebhookRequest, CreateWebhookResponse, CreateWebhookResponse2, CreateWebhookResponses, CrmCompanyFilters, CrmCompanyResponse, CrmContactResponse, CrmDomainResponse, CrmPermissionRole, CrmStageInput, CrmStageResponse, CrmStagesResponse, CrmTeamSettingsResponse, CustomSpeakerAssignment, DataType, DeleteAnchorData, DeleteAnchorError, DeleteAnchorErrors, DeleteAnchorResponse, DeleteAnchorResponses, DeleteCallRecordData, DeleteCallRecordError, DeleteCallRecordErrors, DeleteCallRecordResponse, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelError, DeleteChannelErrors, DeleteChannelLabelData, DeleteChannelLabelError, DeleteChannelLabelErrors, DeleteChannelLabelResponse, DeleteChannelLabelResponses, DeleteChannelResponse, DeleteChannelResponses, DeleteCollabSurfaceData, DeleteCollabSurfaceError, DeleteCollabSurfaceErrors, DeleteCollabSurfaceResponse, DeleteCollabSurfaceResponses, DeleteDocumentData, DeleteDocumentError, DeleteDocumentErrors, DeleteDocumentResponse, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionError, DeleteEntityMentionErrors, DeleteEntityMentionResponse, DeleteEntityMentionResponse2, DeleteEntityMentionResponses, DeleteHarnessData, DeleteHarnessError, DeleteHarnessErrors, DeleteHarnessResponse, DeleteHarnessResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerError, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponse, DeleteHistoryHandlerResponses, DeleteInitiativeData, DeleteInitiativeError, DeleteInitiativeErrors, DeleteInitiativeResponse, DeleteInitiativeResponses, DeleteProjectHandlerData, DeleteProjectHandlerError, DeleteProjectHandlerErrors, DeleteProjectHandlerResponse, DeleteProjectHandlerResponses, DeleteReminderData, DeleteReminderError, DeleteReminderErrors, DeleteReminderResponse, DeleteReminderResponses, DeleteSelfHarnessData, DeleteSelfHarnessError, DeleteSelfHarnessErrors, DeleteSelfHarnessResponse, DeleteSelfHarnessResponses, DeleteUnthreadedAnchorRequest, DeleteUnthreadedAnchorResponse, DeleteUnthreadedPdfAnchorRequest, DeleteUserApiKeyData, DeleteUserApiKeyError, DeleteUserApiKeyErrors, DeleteUserApiKeyResponse, DeleteUserApiKeyResponses, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationError, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponse, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerError, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookError, DeleteWebhookErrors, DeleteWebhookResponse, DeleteWebhookResponses, DescriptionDocumentId, DocumentBasic, DocumentContent, DocumentContentLocation, DocumentContentState, DocumentContentUploadedMetadata, DocumentCopiedMetadata, DocumentCreatedMetadata, DocumentDeletedMetadata, DocumentFilters, DocumentId, DocumentInteractionMetadata, DocumentMetadata, DocumentMetadataWithContent, DocumentPermissionsToken, DocumentPermissionsTokenRequest, DocumentPermissionsTokenResponse, DocumentPreview, DocumentPreviewData, DocumentPreviewDataSubType, DocumentPurgedMetadata, DocumentResponse, DocumentResponseMetadata, DocumentResponseMetadataWithContent, DocumentStorageServiceApiVersion, DocumentSubType, DocumentSyncContentUpdatedMetadata, DocumentSyncEditor, DocumentTeamShareResponse, DocumentTopicEvent, DocumentUpdatedMetadata, EditAnchorData, EditAnchorError, EditAnchorErrors, EditAnchorRequest, EditAnchorResponse, EditAnchorResponse2, EditAnchorResponses, EditCallRecordData, EditCallRecordError, EditCallRecordErrors, EditCallRecordRequest, EditCallRecordResponse, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptError, EditCallTranscriptErrors, EditCallTranscriptRequest, EditCallTranscriptResponse, EditCallTranscriptResponses, EditDocumentData, EditDocumentError, EditDocumentErrors, EditDocumentResponse, EditDocumentResponse2, EditDocumentResponses, EditDocumentServiceArgs, EditPdfAnchorRequest, EditPdfPlaceableCommentAnchorRequest, EditProjectV2Data, EditProjectV2Error, EditProjectV2Errors, EditProjectV2Response, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Error, EditThreadV2Errors, EditThreadV2Response, EditThreadV2Responses, EmailFilters, EmailFollowup, EmailFollowupCommand, EmailFollowupResponse, EmailReminderCondition, EmptyResponse, EnsureCollabSurfaceData, EnsureCollabSurfaceError, EnsureCollabSurfaceErrors, EnsureCollabSurfaceRequest, EnsureCollabSurfaceResponse, EnsureCollabSurfaceResponses, EntityFilters, EntityMessageCreateData, EntityMessageCreateResponse, EntityMessageCreateResponses, EntityMessageDeleteMessageData, EntityMessageDeleteMessageResponse, EntityMessageDeleteMessageResponses, EntityMessageDeleteThreadData, EntityMessageDeleteThreadResponse, EntityMessageDeleteThreadResponses, EntityMessageEditData, EntityMessageEditResponse, EntityMessageEditResponses, EntityMessageGetMessageData, EntityMessageGetMessageResponse, EntityMessageGetMessageResponses, EntityMessageGetThreadData, EntityMessageGetThreadResponse, EntityMessageGetThreadResponses, EntityMessageLegacyData, EntityMessageLegacyResponse, EntityMessageLegacyResponses, EntityMessagePatchThreadData, EntityMessagePatchThreadResponse, EntityMessagePatchThreadResponses, EntityMessageReactData, EntityMessageReactResponse, EntityMessageReactResponses, EntityMessageTypingData, EntityMessageTypingResponse, EntityMessageTypingResponses, EntityPermission, EntityPermissionResponse, EntityReference, EntityType, ErrorResponse, EventReminderOverride, EventReminders, EventStatus, EventTime, EventTransparency, EventType, EventVisibility, ExcludedDefaultView, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerError, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewRequest, ExportDocumentData, ExportDocumentError, ExportDocumentErrors, ExportDocumentResponse, ExportDocumentResponse2, ExportDocumentResponses, Favorite, FavoriteEntityRef, FavoritesList, FileSystemNodeWithIds, FileType, FileTypeUpdate, FolderItem, FollowupState, ForeignEntity, ForeignEntityFilters, GenericErrorResponse, GenericResponse, GenericSuccessResponse, GetActiveCallsData, GetActiveCallsError, GetActiveCallsErrors, GetActiveCallsResponse, GetActiveCallsResponses, GetActivityData, GetActivityError, GetActivityErrors, GetActivityResponse, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesError, GetAttachmentReferencesErrors, GetAttachmentReferencesResponse, GetAttachmentReferencesResponse2, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewError, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewRequest, GetBatchCallRecordPreviewResponse, GetBatchCallRecordPreviewResponse2, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewError, GetBatchChannelPreviewErrors, GetBatchChannelPreviewRequest, GetBatchChannelPreviewResponse, GetBatchChannelPreviewResponse2, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerError, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponse, GetBatchPreviewHandlerResponses, GetBatchPreviewRequest, GetBatchPreviewResponse, GetBatchProjectPreviewData, GetBatchProjectPreviewError, GetBatchProjectPreviewErrors, GetBatchProjectPreviewRequest, GetBatchProjectPreviewResponse, GetBatchProjectPreviewResponse2, GetBatchProjectPreviewResponses, GetBotOwnerProfilesData, GetBotOwnerProfilesError, GetBotOwnerProfilesErrors, GetBotOwnerProfilesResponse, GetBotOwnerProfilesResponses, GetCallRecordData, GetCallRecordError, GetCallRecordErrors, GetCallRecordResponse, GetCallRecordResponses, GetChannelAttachmentsData, GetChannelAttachmentsError, GetChannelAttachmentsErrors, GetChannelAttachmentsResponse, GetChannelAttachmentsResponses, GetChannelData, GetChannelError, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkError, GetChannelJoinLinkErrors, GetChannelJoinLinkResponse, GetChannelJoinLinkResponses, GetChannelParticipantsData, GetChannelParticipantsError, GetChannelParticipantsErrors, GetChannelParticipantsResponse, GetChannelParticipantsResponses, GetChannelResponse, GetChannelResponses, GetChannelsData, GetChannelsError, GetChannelsErrors, GetChannelsResponse, GetChannelsResponses, GetCollabSurfaceData, GetCollabSurfaceError, GetCollabSurfaceErrors, GetCollabSurfaceResponse, GetCollabSurfaceResponses, GetCompanyData, GetCompanyError, GetCompanyErrors, GetCompanyResponse, GetCompanyResponses, GetContactByEmailData, GetContactByEmailError, GetContactByEmailErrors, GetContactByEmailResponse, GetContactByEmailResponse2, GetContactByEmailResponses, GetContactData, GetContactError, GetContactErrors, GetContactResponse, GetContactResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsError, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponse, GetCrmTeamSettingsResponses, GetDocumentAnchorsData, GetDocumentAnchorsError, GetDocumentAnchorsErrors, GetDocumentAnchorsResponse, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameError, GetDocumentBranchNameErrors, GetDocumentBranchNameResponse, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugError, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponse, GetDocumentByTeamSlugResponses, GetDocumentData, GetDocumentError, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsError, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponse, GetDocumentGithubPullRequestsResponses, GetDocumentKeyResponse, GetDocumentKeyResponseData, GetDocumentListHandlerData, GetDocumentListHandlerError, GetDocumentListHandlerErrors, GetDocumentListHandlerResponse, GetDocumentListHandlerResponses, GetDocumentListResult, GetDocumentLocationV3Data, GetDocumentLocationV3Error, GetDocumentLocationV3Errors, GetDocumentLocationV3Response, GetDocumentLocationV3Responses, GetDocumentPermissionsResponseDataV2, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenError, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponse, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Error, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Response, GetDocumentPermissionsV2Responses, GetDocumentProcessingResult, GetDocumentProcessingResultData, GetDocumentProcessingResultError, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponse, GetDocumentProcessingResultResponse2, GetDocumentProcessingResultResponses, GetDocumentResponse, GetDocumentResponse2, GetDocumentResponseData, GetDocumentResponses, GetDocumentSearchResponse, GetDocumentShortIdData, GetDocumentShortIdError, GetDocumentShortIdErrors, GetDocumentShortIdResponse, GetDocumentShortIdResponses, GetDocumentsResponse, GetDocumentTeamShareData, GetDocumentTeamShareError, GetDocumentTeamShareErrors, GetDocumentTeamShareResponse, GetDocumentTeamShareResponses, GetDocumentUserAccessLevelResponse, GetDocumentVersionData, GetDocumentVersionError, GetDocumentVersionErrors, GetDocumentVersionResponse, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerError, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponse, GetDocumentViewsHandlerResponses, GetEmailFollowupData, GetEmailFollowupError, GetEmailFollowupErrors, GetEmailFollowupResponse, GetEmailFollowupResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponse, GetEntityPermissionResponses, GetForeignEntityBySourceData, GetForeignEntityBySourceError, GetForeignEntityBySourceErrors, GetForeignEntityBySourceResponse, GetForeignEntityBySourceResponses, GetForeignEntityData, GetForeignEntityError, GetForeignEntityErrors, GetForeignEntityResponse, GetForeignEntityResponses, GetHarnessPairingData, GetHarnessPairingError, GetHarnessPairingErrors, GetHarnessPairingResponse, GetHarnessPairingResponses, GetHistoryHandlerData, GetHistoryHandlerError, GetHistoryHandlerErrors, GetHistoryHandlerResponse, GetHistoryHandlerResponses, GetInitiativeData, GetInitiativeError, GetInitiativeErrors, GetInitiativeResponse, GetInitiativeResponses, GetInstructionsDocumentResponse, GetInstructionsHandlerData, GetInstructionsHandlerError, GetInstructionsHandlerErrors, GetInstructionsHandlerResponse, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupError, GetItemsSoupErrors, GetItemsSoupResponse, GetItemsSoupResponses, GetLocationHandlerData, GetLocationHandlerError, GetLocationHandlerErrors, GetLocationHandlerResponse, GetLocationHandlerResponses, GetOrCreateAction, GetOrCreateCallData, GetOrCreateCallError, GetOrCreateCallErrors, GetOrCreateCallResponse, GetOrCreateCallResponses, GetOrCreateChannelResponse, GetOrCreateDmData, GetOrCreateDmError, GetOrCreateDmErrors, GetOrCreateDmRequest, GetOrCreateDmResponse, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateError, GetOrCreatePrivateErrors, GetOrCreatePrivateRequest, GetOrCreatePrivateResponse, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerError, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponse, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerError, GetPinsHandlerErrors, GetPinsHandlerResponse, GetPinsHandlerResponses, GetPinsResponse, GetProjectContentHandlerData, GetProjectContentHandlerError, GetProjectContentHandlerErrors, GetProjectContentHandlerResponse, GetProjectContentHandlerResponses, GetProjectContentResponse, GetProjectHandlerData, GetProjectHandlerError, GetProjectHandlerErrors, GetProjectHandlerResponse, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Error, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Response, GetProjectPermissionsV2Responses, GetProjectResponse, GetProjectResponseData, GetProjectsHandlerData, GetProjectsHandlerError, GetProjectsHandlerErrors, GetProjectsHandlerResponse, GetProjectsHandlerResponses, GetProjectsResponse, GetProjectUserAccessLevelData, GetProjectUserAccessLevelError, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponse, GetProjectUserAccessLevelResponses, GetReminderData, GetReminderError, GetReminderErrors, GetReminderResponse, GetReminderResponses, GetRingStatusData, GetRingStatusError, GetRingStatusErrors, GetRingStatusResponse, GetRingStatusResponses, GetSelfBotData, GetSelfBotError, GetSelfBotErrors, GetSelfBotResponse, GetSelfBotResponses, GetSelfHarnessData, GetSelfHarnessError, GetSelfHarnessErrors, GetSelfHarnessResponse, GetSelfHarnessResponses, GetSystemSkillsHandlerData, GetSystemSkillsHandlerError, GetSystemSkillsHandlerErrors, GetSystemSkillsHandlerResponse, GetSystemSkillsHandlerResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerError, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponse, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationError, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponse, GetUserDocumentViewLocationResponses, GetUserHistoryResponse, GetViewsHandlerData, GetViewsHandlerError, GetViewsHandlerErrors, GetViewsHandlerResponse, GetViewsHandlerResponses, GetWebhookData, GetWebhookError, GetWebhookErrors, GetWebhookResponse, GetWebhookResponses, GithubPullRequest, GithubPullRequestCheckRun, GithubPullRequestComment, GithubPullRequestsResponse, GroupedInitialParams, GroupedPageParams, GroupedSoupGroupPage, GroupedSoupInitialPage, GroupedSoupPage, GroupedSoupSort, GuestId, GuestJoinRequest, HandlerData, HandlerError, HandlerErrors, HandlerResponse, HandlerResponses, Harness, HarnessAgent, HarnessId, HarnessOwner, HarnessSession, HashMap, HealthHandlerData, HealthHandlerResponse, HealthHandlerResponses, HighlightType, ImportedAuthor, InFlightTurnSummary, IngestTranscriptData, IngestTranscriptError, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsError, InitializeUserDocumentsErrors, InitializeUserDocumentsResponse, InitializeUserDocumentsResponses, InitialPropertyValue, InitiativeDetail, InitiativeFilters, InitiativeId, InitiativeList, InitiativeSummary, InputReceivedMetadata, InstallSyncData, InstallSyncErrors, InteractionReason, InviteMeetingRequest, InviteMeetingUsersRequest, Item, ItemWithUserAccessLevel, JobProcessingResultHandlerData, JobProcessingResultHandlerError, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponse, JobProcessingResultHandlerResponses, JoinChannelByCodeData, JoinChannelByCodeError, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelError, JoinChannelErrors, JoinChannelResponses, LatestMessage, LeaveCallResponse, LeaveChannelData, LeaveChannelError, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallError, LeaveOrEndCallErrors, LeaveOrEndCallResponse, LeaveOrEndCallResponses, LinkShare, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListBotChannelsData, ListBotChannelsError, ListBotChannelsErrors, ListBotChannelsResponse, ListBotChannelsResponses, ListChannelLabelsData, ListChannelLabelsError, ListChannelLabelsErrors, ListChannelLabelsResponse, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsError, ListCompanyContactsErrors, ListCompanyContactsResponse, ListCompanyContactsResponses, ListFavoritesData, ListFavoritesError, ListFavoritesErrors, ListFavoritesResponse, ListFavoritesResponses, ListHarnessAgentsData, ListHarnessAgentsError, ListHarnessAgentsErrors, ListHarnessAgentsResponse, ListHarnessAgentsResponses, ListHarnessesData, ListHarnessesError, ListHarnessesErrors, ListHarnessesResponse, ListHarnessesResponses, ListHarnessSessionsData, ListHarnessSessionsError, ListHarnessSessionsErrors, ListHarnessSessionsResponse, ListHarnessSessionsResponses, ListInitiativesData, ListInitiativesError, ListInitiativesErrors, ListInitiativesResponse, ListInitiativesResponses, ListOccurrencesData, ListOccurrencesErrors, ListOccurrencesResponse, ListOccurrencesResponses, ListRemindersData, ListRemindersError, ListRemindersErrors, ListRemindersResponse, ListRemindersResponses, ListTeamOutOfOfficeData, ListTeamOutOfOfficeErrors, ListTeamOutOfOfficeResponse, ListTeamOutOfOfficeResponses, ListUserApiKeysData, ListUserApiKeysError, ListUserApiKeysErrors, ListUserApiKeysResponse, ListUserApiKeysResponses, ListWebhooksData, ListWebhooksError, ListWebhooksErrors, ListWebhooksResponse, ListWebhooksResponse2, ListWebhooksResponses, LocationResponseData, LocationResponseV3, MacroUserIdStr, Meeting, MeetingCancelData, MeetingCancelError, MeetingCancelErrors, MeetingCancelPreparationData, MeetingCancelPreparationError, MeetingCancelPreparationErrors, MeetingCancelPreparationResponse, MeetingCancelPreparationResponses, MeetingCancelResponse, MeetingCancelResponses, MeetingCreateData, MeetingCreateError, MeetingCreateErrors, MeetingCreateResponse, MeetingCreateResponses, MeetingGuestJoinData, MeetingGuestJoinError, MeetingGuestJoinErrors, MeetingGuestJoinResponse, MeetingGuestJoinResponses, MeetingGuestParticipantsData, MeetingGuestParticipantsError, MeetingGuestParticipantsErrors, MeetingGuestParticipantsResponse, MeetingGuestParticipantsResponses, MeetingInviteData, MeetingInviteError, MeetingInviteErrors, MeetingInvitePermissions, MeetingInvitePermissionsData, MeetingInvitePermissionsError, MeetingInvitePermissionsErrors, MeetingInvitePermissionsResponse, MeetingInvitePermissionsResponses, MeetingInviteResponse, MeetingInviteResponses, MeetingInviteUsersData, MeetingInviteUsersError, MeetingInviteUsersErrors, MeetingInviteUsersResponse, MeetingInviteUsersResponses, MeetingJoinData, MeetingJoinError, MeetingJoinErrors, MeetingJoinResponse, MeetingJoinResponses, MeetingLeaveData, MeetingLeaveError, MeetingLeaveErrors, MeetingLeaveResponse, MeetingLeaveResponses, MeetingListActiveData, MeetingListActiveError, MeetingListActiveErrors, MeetingListActiveResponse, MeetingListActiveResponses, MeetingListData, MeetingListError, MeetingListErrors, MeetingListResponse, MeetingListResponses, MeetingLookupData, MeetingLookupError, MeetingLookupErrors, MeetingLookupResponse, MeetingLookupResponses, MeetingParticipant, MeetingParticipants, MeetingParticipantsData, MeetingParticipantsError, MeetingParticipantsErrors, MeetingParticipantsResponse, MeetingParticipantsResponses, MeetingPreparation, MeetingPrepareData, MeetingPrepareError, MeetingPrepareErrors, MeetingPrepareResponse, MeetingPrepareResponses, MeetingShareData, MeetingShareError, MeetingShareErrors, MeetingShareResponse, MeetingShareResponses, MeetingsResponse, MeetingToken, MeetingUpdateData, MeetingUpdateError, MeetingUpdateErrors, MeetingUpdateResponse, MeetingUpdateResponses, MentionPreviewsData, MentionPreviewsErrors, MentionPreviewsResponse, MentionPreviewsResponses, Message, MessageAttachment, MessageAttachmentCreatedMetadata, MessageAttachmentRemovedMetadata, MessageChange, MessageCursor, MessageDeletedMetadata, MessageDirection, MessageEvent, MessageEventAttachment, MessageListItem, MessageMentionedMetadata, MessagePage, MessageParent, MessagePatch, MessagePatchedMetadata, MessagePostedMetadata, MessageThread, MessageThreadPreview, MessageTimelineData, MessageTimelineQuery, MessageTimelineResponse, MessageTimelineResponses, MessageTopicEvent, NewAttachment, NewThreadAnchor, NotificationFilters, NotificationState, PairingDetails, Params, ParticipantRole, PatchBotRequest, PatchChannelData, PatchChannelError, PatchChannelErrors, PatchChannelRequest, PatchChannelResponse, PatchChannelResponses, PatchMessageNotificationPolicy, PatchProjectRequestV2, PatchThreadRequestV2, PatchViewHandlerData, PatchViewHandlerError, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookError, PatchWebhookErrors, PatchWebhookRequest, PatchWebhookResponse, PatchWebhookResponses, PdfAnchor, PdfAnchorId, PdfHighlightAnchor, PdfHighlightAnchorRequest, PdfHighlightRect, PdfHighlightRectAnchorRequest, PdfPlaceableCommentAnchor, PendingClaimResponse, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentError, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponse, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectError, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponse, PermanentlyDeleteProjectResponses, PinnedItem, PinRequest, PostActivityData, PostActivityError, PostActivityErrors, PostActivityRequest, PostActivityResponse, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookError, PostChannelBotWebhookErrors, PostChannelBotWebhookResponse, PostChannelBotWebhookResponses, PostGroupedSoupAstGroupPageRequest, PostGroupedSoupAstInitialRequest, PostGroupedSoupAstRequest, PostItemsSoupAstData, PostItemsSoupAstError, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedError, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponse, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponse, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupError, PostItemsSoupErrors, PostItemsSoupResponse, PostItemsSoupResponses, PostMessage, PostMessageNotificationPolicy, PostSoupAstRequest, PostSoupRequest, PresaveDocumentHandlerData, PresaveDocumentHandlerError, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponse, PresaveDocumentHandlerResponses, PreSaveDocumentRequest, PreSaveDocumentResponse, PreSaveDocumentResponseData, PresignedUrl, PreviewSmartTagData, PreviewSmartTagError, PreviewSmartTagErrors, PreviewSmartTagResponse, PreviewSmartTagResponses, Project, ProjectDeleteResponseData, ProjectDocumentStatus, ProjectFilters, ProjectPreview, ProjectPreviewData, PropertyDefinition, PropertyFilter, PropertyInput, PropertyOwner, PropertyValue, PutCrmTeamSettingsData, PutCrmTeamSettingsError, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponse, PutCrmTeamSettingsResponses, PutCrmTeamStagesData, PutCrmTeamStagesError, PutCrmTeamStagesErrors, PutCrmTeamStagesResponse, PutCrmTeamStagesResponses, ReactionInput, RecentlyDeletedData, RecentlyDeletedError, RecentlyDeletedErrors, RecentlyDeletedResponse, RecentlyDeletedResponseData, RecentlyDeletedResponses, Reminder, ReminderFilters, ReminderSchedule, RemindersList, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotError, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponse, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityError, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsError, RemoveParticipantsErrors, RemoveParticipantsRequest, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerError, RemovePinHandlerErrors, RemovePinHandlerResponse, RemovePinHandlerResponses, RenameChannelLabelData, RenameChannelLabelError, RenameChannelLabelErrors, RenameChannelLabelRequest, RenameChannelLabelResponse, RenameChannelLabelResponses, ReorderFavoritesData, ReorderFavoritesError, ReorderFavoritesErrors, ReorderFavoritesRequest, ReorderFavoritesResponses, ReorderPinRequest, ReorderPinsHandlerData, ReorderPinsHandlerError, ReorderPinsHandlerErrors, ReorderPinsHandlerResponse, ReorderPinsHandlerResponses, ReplaceCrmStagesRequest, RequestedHarnessScope, ResetCrmTeamStagesData, ResetCrmTeamStagesError, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponse, ResetCrmTeamStagesResponses, RevertDeleteDocumentData, RevertDeleteDocumentError, RevertDeleteDocumentErrors, RevertDeleteDocumentResponse, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectError, RevertDeleteProjectErrors, RevertDeleteProjectResponse, RevertDeleteProjectResponses, RingStatus, RingStatusResponse, S3ObjectInfo, SaveBomPart, SaveDocumentHandlerData, SaveDocumentHandlerError, SaveDocumentHandlerErrors, SaveDocumentHandlerResponse, SaveDocumentHandlerResponses, SaveDocumentRequest, SaveDocumentResponse, SaveDocumentResponseData, SearchContactsData, SearchContactsError, SearchContactsErrors, SearchContactsResponse, SearchContactsResponse2, SearchContactsResponses, SessionDeletedMetadata, SessionIdentity, SessionMentionedMetadata, SessionOpenedMetadata, SessionRenamedMetadata, SessionSettledMetadata, SessionStoppedMetadata, SetChannelLabelData, SetChannelLabelError, SetChannelLabelErrors, SetChannelLabelRequest, SetChannelLabelResponse, SetChannelLabelResponses, SetChannelPictureData, SetChannelPictureError, SetChannelPictureErrors, SetChannelPictureRequest, SetChannelPictureResponse, SetChannelPictureResponses, SetCompanyHiddenData, SetCompanyHiddenError, SetCompanyHiddenErrors, SetCompanyHiddenRequest, SetCompanyHiddenResponse, SetCompanyHiddenResponses, SetCompanyNameRequest, SetContactHiddenData, SetContactHiddenError, SetContactHiddenErrors, SetContactHiddenRequest, SetContactHiddenResponse, SetContactHiddenResponses, SetContactNameRequest, SetCrmCompanyNameData, SetCrmCompanyNameError, SetCrmCompanyNameErrors, SetCrmCompanyNameResponse, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameError, SetCrmContactNameErrors, SetCrmContactNameResponse, SetCrmContactNameResponses, SetDocumentTeamShareData, SetDocumentTeamShareError, SetDocumentTeamShareErrors, SetDocumentTeamShareRequest, SetDocumentTeamShareResponse, SetDocumentTeamShareResponses, SetEmailFollowupData, SetEmailFollowupError, SetEmailFollowupErrors, SetEmailFollowupResponse, SetEmailFollowupResponses, SetEmailSyncData, SetEmailSyncError, SetEmailSyncErrors, SetEmailSyncRequest, SetEmailSyncResponse, SetEmailSyncResponses, SetPropertyValue, SharedEmailFilter, SharePermissionV2, ShortIdResponse, SimpleMention, SimpleSaveData, SimpleSaveError, SimpleSaveErrors, SimpleSaveResponse, SimpleSaveResponses, SmartTagChannelMatch, SmartTagPreview, SoupAgentSessionSoupPropertiesField, SoupApiItem, SoupApiSort, SoupApiSortDirection, SoupAttachment, SoupCalendarEventSoupPropertiesField, SoupCalendarEventTime, SoupCallRecordGuest, SoupCallRecordParticipant, SoupCallRecordSoupPropertiesField, SoupChannel, SoupChannelThread, SoupChatSoupPropertiesField, SoupContact, SoupCountedReaction, SoupCrmCompanySoupPropertiesField, SoupCrmDomain, SoupDocumentSoupPropertiesField, SoupDocumentSubType, SoupEmailThreadPreview, SoupEnrichedEmailThreadPreviewSoupPropertiesField, SoupForeignEntity, SoupInitiativeSoupPropertiesField, SoupItem, SoupLabel, SoupLabelListVisibility, SoupLabelType, SoupMessageAttachment, SoupMessageListVisibility, SoupMessageSender, SoupMessageSenderType, SoupPage, SoupProjectSoupPropertiesField, SoupPropertiesField, SoupProperty, SoupReminderReference, SoupReminderSchedule, SoupReminderSoupPropertiesField, SoupThreadInfo, SoupThreadReply, StarterDocumentsResponse, StreamEventsData, StreamEventsError, StreamEventsErrors, StreamEventsResponse, StreamEventsResponses, String, SuccessResponse, SurfaceState, SyncServiceVersionId, SystemSkillSummary, TagFilterMode, TaskFilters, TeamOutOfOfficeItem, TeamOutOfOfficeResponse, TeamRole, ThreadAnchor, ThreadOrigin, ThreadPatch, ThreadState, ToggleShareWithTeamData, ToggleShareWithTeamError, ToggleShareWithTeamErrors, ToggleShareWithTeamResponse, ToggleShareWithTeamResponses, TranscribeDictationData, TranscribeDictationError, TranscribeDictationErrors, TranscribeDictationResponse, TranscribeDictationResponses, TranscribeResponse, TranscriptSegmentRequest, TurnEndedMetadata, TurnStartedMetadata, TurnSummary, TypedSuccessResponse, TypedSuccessResponseGetDocumentResponseData, TypingInput, UnassignInitiativeTaskData, UnassignInitiativeTaskError, UnassignInitiativeTaskErrors, UnassignInitiativeTaskResponse, UnassignInitiativeTaskResponses, UpdateAgentData, UpdateAgentError, UpdateAgentErrors, UpdateAgentRequest, UpdateAgentResponse, UpdateAgentResponses, UpdateChannelSharePermission, UpdateCrmTeamSettingsRequest, UpdateInitiativeData, UpdateInitiativeError, UpdateInitiativeErrors, UpdateInitiativeRequest, UpdateInitiativeResponse, UpdateInitiativeResponses, UpdateMeetingRequest, UpdateOperation, UpdateReminderData, UpdateReminderError, UpdateReminderErrors, UpdateReminderRequest, UpdateReminderResponse, UpdateReminderResponses, UpdateSharePermissionRequestV2, UploadDocumentStatus, UploadExtractFolderHandlerData, UploadExtractFolderHandlerError, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponse, UploadExtractFolderHandlerResponses, UploadExtractFolderRequest, UploadFolderHandlerData, UploadFolderHandlerError, UploadFolderHandlerErrors, UploadFolderHandlerResponse, UploadFolderHandlerResponses, UploadFolderRequest, UpsertHistoryHandlerData, UpsertHistoryHandlerError, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponse, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationError, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationRequest, UpsertUserDocumentViewLocationResponse, UpsertUserDocumentViewLocationResponses, UserApiKeyId, UserApiKeyInfo, UserApiKeysList, UserDocumentsResponse, UserDocumentViewLocation, UserDocumentViewLocationResponse, UserPinsResponse, UserViewsResponse, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenError, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponse, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookError, ValidateWebhookErrors, ValidateWebhookResponse, ValidateWebhookResponse2, ValidateWebhookResponses, Vec, View, ViewPatch, ViewsResponse, WaitingForInputMetadata, Webhook, WebhookEvent, WebhookFilter, WebhookScope, WebhookStatus, WebhookValidationTestEvent, WithCallId, WithChannelId, WithDocumentId, WithProjectId } from './types.gen';
+export type { AccessLevel, ActiveCallsResponse, ActiveCallSummary, ActiveMeeting, ActiveMeetingsResponse, ActivityType, AddFavoriteData, AddFavoriteError, AddFavoriteErrors, AddFavoriteRequest, AddFavoriteResponse, AddFavoriteResponses, AddParticipantsData, AddParticipantsError, AddParticipantsErrors, AddParticipantsRequest, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerError, AddPinHandlerErrors, AddPinHandlerResponse, AddPinHandlerResponses, AddPinRequest, Agent, AgentActionId, AgentChannelScope, AgentMcpServer, AgentMcpServers, AgentPullRequestState, AgentSessionFilters, AgentSessionLifecycleEvent, Anchor, AnchorId, AnchorResponse, AnnotationIncrementalUpdate, ApiActivity, ApiAttachmentChannelReference, ApiAttachmentEntityReference, ApiAttachmentGenericReference, ApiChannelAttachment, ApiChannelAttachmentsPage, ApiChannelDetail, ApiChannelListMessage, ApiChannelListPage, ApiChannelListParticipant, ApiChannelListType, ApiChannelParticipant, ApiChannelWithLatest, ApiEntityFilterAst, ApiGroupByField, ApiGroupMeta, ApiParticipantListRole, ApiParticipantRole, ApiPropertyEntityType, ApproveHarnessPairingData, ApproveHarnessPairingError, ApproveHarnessPairingErrors, ApproveHarnessPairingResponse, ApproveHarnessPairingResponses, ApprovePairingRequest, AssignInitiativeTasksData, AssignInitiativeTasksError, AssignInitiativeTasksErrors, AssignInitiativeTasksResponse, AssignInitiativeTasksResponses, AssignTasksRequest, AssignTasksResponse, AssignTasksResult, AssignTaskStatus, AttachmentChange, AttendeeResponseStatus, BasicDocument, BasicDocumentSubType, BomPart, Bot, BotChannel, BotChannelType, BotId, BotKind, BotOwner, BotOwnerProfile, BotSenderProfile, BotToken, BranchNameResponse, BTreeMap, BulkWakeupRequest, BulkWakeupResponse, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponse, BulkWakeupSyncServiceDocumentsResponses, CalendarAttendee, CalendarEvent, CalendarEventFilters, CalendarEventSourceContent, CalendarMentionEvent, CalendarMentionPreviewItem, CalendarMentionPreviewKind, CalendarMentionPreviewRequest, CalendarMentionPreviewRequestItem, CalendarMentionPreviewResponse, CalendarOccurrence, CalendarOccurrenceItem, CalendarOccurrenceResponse, CalendarSyncStatus, CallActiveResponse, CallFilters, CallRecord, CallRecordGuest, CallRecordParticipant, CallRecordPreview, CallRecordPreviewData, CallRecordTranscriptSegment, CallStatus, CallTokenResponse, CallWebhookData, CallWebhookError, CallWebhookErrors, CallWebhookResponses, Channel, ChannelCreatedMetadata, ChannelDeletedMetadata, ChannelFilters, ChannelJoinCodeResponse, ChannelLabel, ChannelLabelRule, ChannelLabelsList, ChannelMessage, ChannelParticipant, ChannelParticipantAddedMetadata, ChannelParticipantRemovedMetadata, ChannelPreview, ChannelPreviewData, ChannelSender, ChannelSharePermission, ChannelThreadFilters, ChannelTopicEvent, ChannelType, ChannelUpdatedMetadata, ChannelWebhookRequest, ChannelWebhookResponse, ChannelWithParticipants, Chat, ChatFilters, CheckActiveCallData, CheckActiveCallError, CheckActiveCallErrors, CheckActiveCallResponse, CheckActiveCallResponses, ClaimedPairing, ClaimHarnessPairingData, ClaimHarnessPairingError, ClaimHarnessPairingErrors, ClaimHarnessPairingResponse, ClaimHarnessPairingResponses, ClaimPairingRequest, ClientOptions, CloudStorageItemType, CollabSurfaceResponse, CollabSurfaceTokenResponse, CommandFailure, CommandRejectedMetadata, ConferenceProvider, CopyDocumentData, CopyDocumentError, CopyDocumentErrors, CopyDocumentQueryParams, CopyDocumentRequest, CopyDocumentResponse, CopyDocumentResponse2, CopyDocumentResponses, CountedReaction, CreateAgentData, CreateAgentError, CreateAgentErrors, CreateAgentRequest, CreateAgentResponse, CreateAgentResponses, CreateAnchorData, CreateAnchorError, CreateAnchorErrors, CreateAnchorResponse, CreateAnchorResponses, CreateBotRequest, CreateBulkDocumentResponse, CreateBulkDocumentResponseData, CreateChannelData, CreateChannelError, CreateChannelErrors, CreateChannelLabelData, CreateChannelLabelError, CreateChannelLabelErrors, CreateChannelLabelRequest, CreateChannelLabelResponse, CreateChannelLabelResponses, CreateChannelRequest, CreateChannelResponse, CreateChannelResponse2, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotError, CreateChannelScopedBotErrors, CreateChannelScopedBotRequest, CreateChannelScopedBotResponse, CreateChannelScopedBotResponse2, CreateChannelScopedBotResponses, CreateCollabSurfaceTokenData, CreateCollabSurfaceTokenError, CreateCollabSurfaceTokenErrors, CreateCollabSurfaceTokenResponse, CreateCollabSurfaceTokenResponses, CreateCrmCompanyData, CreateCrmCompanyError, CreateCrmCompanyErrors, CreateCrmCompanyRequest, CreateCrmCompanyResponse, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactError, CreateCrmContactErrors, CreateCrmContactRequest, CreateCrmContactResponse, CreateCrmContactResponses, CreateDocumentData, CreateDocumentError, CreateDocumentErrors, CreateDocumentRequest, CreateDocumentResponse, CreateDocumentResponseData, CreateDocumentResponses, CreatedPairing, CreatedUserApiKey, CreateEntityMentionData, CreateEntityMentionError, CreateEntityMentionErrors, CreateEntityMentionRequest, CreateEntityMentionResponse, CreateEntityMentionResponse2, CreateEntityMentionResponses, CreateHarnessPairingData, CreateHarnessPairingError, CreateHarnessPairingErrors, CreateHarnessPairingResponse, CreateHarnessPairingResponses, CreateInitiativeData, CreateInitiativeError, CreateInitiativeErrors, CreateInitiativeRequest, CreateInitiativeResponse, CreateInitiativeResponses, CreateInstructionsDocumentResponse, CreateInstructionsHandlerData, CreateInstructionsHandlerError, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponse, CreateInstructionsHandlerResponses, CreateMarkdownDocumentRequest, CreateMarkdownDocumentResponse, CreateMarkdownHandlerData, CreateMarkdownHandlerError, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponse, CreateMarkdownHandlerResponses, CreateMeetingRequest, CreatePairingRequest, CreateProjectHandlerData, CreateProjectHandlerError, CreateProjectHandlerErrors, CreateProjectHandlerResponse, CreateProjectHandlerResponses, CreateProjectRequest, CreateProjectResponse, CreateReminderData, CreateReminderError, CreateReminderErrors, CreateReminderRequest, CreateReminderResponse, CreateReminderResponses, CreateSkillHandlerData, CreateSkillHandlerError, CreateSkillHandlerErrors, CreateSkillHandlerResponse, CreateSkillHandlerResponses, CreateSkillRequest, CreateSkillResponse, CreateSnippetHandlerData, CreateSnippetHandlerError, CreateSnippetHandlerErrors, CreateSnippetHandlerResponse, CreateSnippetHandlerResponses, CreateSnippetRequest, CreateSnippetResponse, CreateTaskHandlerData, CreateTaskHandlerError, CreateTaskHandlerErrors, CreateTaskHandlerResponse, CreateTaskHandlerResponses, CreateTaskRequest, CreateTaskResponse, CreateUnthreadedAnchorRequest, CreateUnthreadedAnchorResponse, CreateUnthreadedPdfAnchorRequest, CreateUserApiKeyData, CreateUserApiKeyError, CreateUserApiKeyErrors, CreateUserApiKeyRequest, CreateUserApiKeyResponse, CreateUserApiKeyResponses, CreateViewHandlerData, CreateViewHandlerError, CreateViewHandlerErrors, CreateViewHandlerResponse, CreateViewHandlerResponses, CreateViewRequest, CreateWebhookData, CreateWebhookError, CreateWebhookErrors, CreateWebhookRequest, CreateWebhookResponse, CreateWebhookResponse2, CreateWebhookResponses, CrmCompanyFilters, CrmCompanyResponse, CrmContactResponse, CrmDomainResponse, CrmPermissionRole, CrmStageInput, CrmStageResponse, CrmStagesResponse, CrmTeamSettingsResponse, CustomSpeakerAssignment, DataType, DeleteAnchorData, DeleteAnchorError, DeleteAnchorErrors, DeleteAnchorResponse, DeleteAnchorResponses, DeleteCallRecordData, DeleteCallRecordError, DeleteCallRecordErrors, DeleteCallRecordResponse, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelError, DeleteChannelErrors, DeleteChannelLabelData, DeleteChannelLabelError, DeleteChannelLabelErrors, DeleteChannelLabelResponse, DeleteChannelLabelResponses, DeleteChannelResponse, DeleteChannelResponses, DeleteCollabSurfaceData, DeleteCollabSurfaceError, DeleteCollabSurfaceErrors, DeleteCollabSurfaceResponse, DeleteCollabSurfaceResponses, DeleteDocumentData, DeleteDocumentError, DeleteDocumentErrors, DeleteDocumentResponse, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionError, DeleteEntityMentionErrors, DeleteEntityMentionResponse, DeleteEntityMentionResponse2, DeleteEntityMentionResponses, DeleteHarnessData, DeleteHarnessError, DeleteHarnessErrors, DeleteHarnessResponse, DeleteHarnessResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerError, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponse, DeleteHistoryHandlerResponses, DeleteInitiativeData, DeleteInitiativeError, DeleteInitiativeErrors, DeleteInitiativeResponse, DeleteInitiativeResponses, DeleteProjectHandlerData, DeleteProjectHandlerError, DeleteProjectHandlerErrors, DeleteProjectHandlerResponse, DeleteProjectHandlerResponses, DeleteReminderData, DeleteReminderError, DeleteReminderErrors, DeleteReminderResponse, DeleteReminderResponses, DeleteSelfHarnessData, DeleteSelfHarnessError, DeleteSelfHarnessErrors, DeleteSelfHarnessResponse, DeleteSelfHarnessResponses, DeleteUnthreadedAnchorRequest, DeleteUnthreadedAnchorResponse, DeleteUnthreadedPdfAnchorRequest, DeleteUserApiKeyData, DeleteUserApiKeyError, DeleteUserApiKeyErrors, DeleteUserApiKeyResponse, DeleteUserApiKeyResponses, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationError, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponse, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerError, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookError, DeleteWebhookErrors, DeleteWebhookResponse, DeleteWebhookResponses, DescriptionDocumentId, DocumentBasic, DocumentContent, DocumentContentLocation, DocumentContentState, DocumentContentUploadedMetadata, DocumentCopiedMetadata, DocumentCreatedMetadata, DocumentDeletedMetadata, DocumentFilters, DocumentId, DocumentInteractionMetadata, DocumentMetadata, DocumentMetadataWithContent, DocumentPermissionsToken, DocumentPermissionsTokenRequest, DocumentPermissionsTokenResponse, DocumentPreview, DocumentPreviewData, DocumentPreviewDataSubType, DocumentPurgedMetadata, DocumentResponse, DocumentResponseMetadata, DocumentResponseMetadataWithContent, DocumentStorageServiceApiVersion, DocumentSubType, DocumentSyncContentUpdatedMetadata, DocumentSyncEditor, DocumentTeamShareResponse, DocumentTopicEvent, DocumentUpdatedMetadata, EditAnchorData, EditAnchorError, EditAnchorErrors, EditAnchorRequest, EditAnchorResponse, EditAnchorResponse2, EditAnchorResponses, EditCallRecordData, EditCallRecordError, EditCallRecordErrors, EditCallRecordRequest, EditCallRecordResponse, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptError, EditCallTranscriptErrors, EditCallTranscriptRequest, EditCallTranscriptResponse, EditCallTranscriptResponses, EditDocumentData, EditDocumentError, EditDocumentErrors, EditDocumentResponse, EditDocumentResponse2, EditDocumentResponses, EditDocumentServiceArgs, EditPdfAnchorRequest, EditPdfPlaceableCommentAnchorRequest, EditProjectV2Data, EditProjectV2Error, EditProjectV2Errors, EditProjectV2Response, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Error, EditThreadV2Errors, EditThreadV2Response, EditThreadV2Responses, EmailFilters, EmailFollowup, EmailFollowupCommand, EmailFollowupResponse, EmailReminderCondition, EmptyResponse, EnsureCollabSurfaceData, EnsureCollabSurfaceError, EnsureCollabSurfaceErrors, EnsureCollabSurfaceRequest, EnsureCollabSurfaceResponse, EnsureCollabSurfaceResponses, EntityFilters, EntityMessageCreateData, EntityMessageCreateResponse, EntityMessageCreateResponses, EntityMessageDeleteMessageData, EntityMessageDeleteMessageResponse, EntityMessageDeleteMessageResponses, EntityMessageDeleteThreadData, EntityMessageDeleteThreadResponse, EntityMessageDeleteThreadResponses, EntityMessageEditData, EntityMessageEditResponse, EntityMessageEditResponses, EntityMessageGetMessageData, EntityMessageGetMessageResponse, EntityMessageGetMessageResponses, EntityMessageGetThreadData, EntityMessageGetThreadResponse, EntityMessageGetThreadResponses, EntityMessageLegacyData, EntityMessageLegacyResponse, EntityMessageLegacyResponses, EntityMessagePatchThreadData, EntityMessagePatchThreadResponse, EntityMessagePatchThreadResponses, EntityMessageReactData, EntityMessageReactResponse, EntityMessageReactResponses, EntityMessageTypingData, EntityMessageTypingResponse, EntityMessageTypingResponses, EntityPermission, EntityPermissionResponse, EntityReference, EntityType, ErrorResponse, EventReminderOverride, EventReminders, EventStatus, EventTime, EventTransparency, EventType, EventVisibility, ExcludedDefaultView, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerError, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExcludeDefaultViewRequest, ExportDocumentData, ExportDocumentError, ExportDocumentErrors, ExportDocumentResponse, ExportDocumentResponse2, ExportDocumentResponses, Favorite, FavoriteEntityRef, FavoritesList, FileSystemNodeWithIds, FileType, FileTypeUpdate, FolderItem, FollowupState, ForeignEntity, ForeignEntityFilters, GenericErrorResponse, GenericResponse, GenericSuccessResponse, GetActiveCallsData, GetActiveCallsError, GetActiveCallsErrors, GetActiveCallsResponse, GetActiveCallsResponses, GetActivityData, GetActivityError, GetActivityErrors, GetActivityResponse, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesError, GetAttachmentReferencesErrors, GetAttachmentReferencesResponse, GetAttachmentReferencesResponse2, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewError, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewRequest, GetBatchCallRecordPreviewResponse, GetBatchCallRecordPreviewResponse2, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewError, GetBatchChannelPreviewErrors, GetBatchChannelPreviewRequest, GetBatchChannelPreviewResponse, GetBatchChannelPreviewResponse2, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerError, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponse, GetBatchPreviewHandlerResponses, GetBatchPreviewRequest, GetBatchPreviewResponse, GetBatchProjectPreviewData, GetBatchProjectPreviewError, GetBatchProjectPreviewErrors, GetBatchProjectPreviewRequest, GetBatchProjectPreviewResponse, GetBatchProjectPreviewResponse2, GetBatchProjectPreviewResponses, GetBotOwnerProfilesData, GetBotOwnerProfilesError, GetBotOwnerProfilesErrors, GetBotOwnerProfilesResponse, GetBotOwnerProfilesResponses, GetCallRecordData, GetCallRecordError, GetCallRecordErrors, GetCallRecordResponse, GetCallRecordResponses, GetChannelAttachmentsData, GetChannelAttachmentsError, GetChannelAttachmentsErrors, GetChannelAttachmentsResponse, GetChannelAttachmentsResponses, GetChannelData, GetChannelError, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkError, GetChannelJoinLinkErrors, GetChannelJoinLinkResponse, GetChannelJoinLinkResponses, GetChannelParticipantsData, GetChannelParticipantsError, GetChannelParticipantsErrors, GetChannelParticipantsResponse, GetChannelParticipantsResponses, GetChannelResponse, GetChannelResponses, GetChannelsData, GetChannelsError, GetChannelsErrors, GetChannelsResponse, GetChannelsResponses, GetCollabSurfaceData, GetCollabSurfaceError, GetCollabSurfaceErrors, GetCollabSurfaceResponse, GetCollabSurfaceResponses, GetCompanyData, GetCompanyError, GetCompanyErrors, GetCompanyResponse, GetCompanyResponses, GetContactByEmailData, GetContactByEmailError, GetContactByEmailErrors, GetContactByEmailResponse, GetContactByEmailResponse2, GetContactByEmailResponses, GetContactData, GetContactError, GetContactErrors, GetContactResponse, GetContactResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsError, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponse, GetCrmTeamSettingsResponses, GetDocumentAnchorsData, GetDocumentAnchorsError, GetDocumentAnchorsErrors, GetDocumentAnchorsResponse, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameError, GetDocumentBranchNameErrors, GetDocumentBranchNameResponse, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugError, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponse, GetDocumentByTeamSlugResponses, GetDocumentData, GetDocumentError, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsError, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponse, GetDocumentGithubPullRequestsResponses, GetDocumentKeyResponse, GetDocumentKeyResponseData, GetDocumentListHandlerData, GetDocumentListHandlerError, GetDocumentListHandlerErrors, GetDocumentListHandlerResponse, GetDocumentListHandlerResponses, GetDocumentListResult, GetDocumentLocationV3Data, GetDocumentLocationV3Error, GetDocumentLocationV3Errors, GetDocumentLocationV3Response, GetDocumentLocationV3Responses, GetDocumentPermissionsResponseDataV2, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenError, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponse, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Error, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Response, GetDocumentPermissionsV2Responses, GetDocumentProcessingResult, GetDocumentProcessingResultData, GetDocumentProcessingResultError, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponse, GetDocumentProcessingResultResponse2, GetDocumentProcessingResultResponses, GetDocumentResponse, GetDocumentResponse2, GetDocumentResponseData, GetDocumentResponses, GetDocumentSearchResponse, GetDocumentShortIdData, GetDocumentShortIdError, GetDocumentShortIdErrors, GetDocumentShortIdResponse, GetDocumentShortIdResponses, GetDocumentsResponse, GetDocumentTeamShareData, GetDocumentTeamShareError, GetDocumentTeamShareErrors, GetDocumentTeamShareResponse, GetDocumentTeamShareResponses, GetDocumentUserAccessLevelResponse, GetDocumentVersionData, GetDocumentVersionError, GetDocumentVersionErrors, GetDocumentVersionResponse, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerError, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponse, GetDocumentViewsHandlerResponses, GetEmailFollowupData, GetEmailFollowupError, GetEmailFollowupErrors, GetEmailFollowupResponse, GetEmailFollowupResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponse, GetEntityPermissionResponses, GetForeignEntityBySourceData, GetForeignEntityBySourceError, GetForeignEntityBySourceErrors, GetForeignEntityBySourceResponse, GetForeignEntityBySourceResponses, GetForeignEntityData, GetForeignEntityError, GetForeignEntityErrors, GetForeignEntityResponse, GetForeignEntityResponses, GetHarnessPairingData, GetHarnessPairingError, GetHarnessPairingErrors, GetHarnessPairingResponse, GetHarnessPairingResponses, GetHistoryHandlerData, GetHistoryHandlerError, GetHistoryHandlerErrors, GetHistoryHandlerResponse, GetHistoryHandlerResponses, GetInitiativeData, GetInitiativeError, GetInitiativeErrors, GetInitiativeResponse, GetInitiativeResponses, GetInstructionsDocumentResponse, GetInstructionsHandlerData, GetInstructionsHandlerError, GetInstructionsHandlerErrors, GetInstructionsHandlerResponse, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupError, GetItemsSoupErrors, GetItemsSoupResponse, GetItemsSoupResponses, GetLocationHandlerData, GetLocationHandlerError, GetLocationHandlerErrors, GetLocationHandlerResponse, GetLocationHandlerResponses, GetOrCreateAction, GetOrCreateCallData, GetOrCreateCallError, GetOrCreateCallErrors, GetOrCreateCallResponse, GetOrCreateCallResponses, GetOrCreateChannelResponse, GetOrCreateDmData, GetOrCreateDmError, GetOrCreateDmErrors, GetOrCreateDmRequest, GetOrCreateDmResponse, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateError, GetOrCreatePrivateErrors, GetOrCreatePrivateRequest, GetOrCreatePrivateResponse, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerError, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponse, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerError, GetPinsHandlerErrors, GetPinsHandlerResponse, GetPinsHandlerResponses, GetPinsResponse, GetProjectContentHandlerData, GetProjectContentHandlerError, GetProjectContentHandlerErrors, GetProjectContentHandlerResponse, GetProjectContentHandlerResponses, GetProjectContentResponse, GetProjectHandlerData, GetProjectHandlerError, GetProjectHandlerErrors, GetProjectHandlerResponse, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Error, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Response, GetProjectPermissionsV2Responses, GetProjectResponse, GetProjectResponseData, GetProjectsHandlerData, GetProjectsHandlerError, GetProjectsHandlerErrors, GetProjectsHandlerResponse, GetProjectsHandlerResponses, GetProjectsResponse, GetProjectUserAccessLevelData, GetProjectUserAccessLevelError, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponse, GetProjectUserAccessLevelResponses, GetReminderData, GetReminderError, GetReminderErrors, GetReminderResponse, GetReminderResponses, GetRingStatusData, GetRingStatusError, GetRingStatusErrors, GetRingStatusResponse, GetRingStatusResponses, GetSelfBotData, GetSelfBotError, GetSelfBotErrors, GetSelfBotResponse, GetSelfBotResponses, GetSelfHarnessData, GetSelfHarnessError, GetSelfHarnessErrors, GetSelfHarnessResponse, GetSelfHarnessResponses, GetSystemSkillsHandlerData, GetSystemSkillsHandlerError, GetSystemSkillsHandlerErrors, GetSystemSkillsHandlerResponse, GetSystemSkillsHandlerResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerError, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponse, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationError, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponse, GetUserDocumentViewLocationResponses, GetUserHistoryResponse, GetViewsHandlerData, GetViewsHandlerError, GetViewsHandlerErrors, GetViewsHandlerResponse, GetViewsHandlerResponses, GetWebhookData, GetWebhookError, GetWebhookErrors, GetWebhookResponse, GetWebhookResponses, GithubPullRequest, GithubPullRequestCheckRun, GithubPullRequestComment, GithubPullRequestsResponse, GroupedInitialParams, GroupedPageParams, GroupedSoupGroupPage, GroupedSoupInitialPage, GroupedSoupPage, GroupedSoupSort, GuestId, GuestJoinRequest, HandlerData, HandlerError, HandlerErrors, HandlerResponse, HandlerResponses, Harness, HarnessAgent, HarnessId, HarnessOwner, HarnessSession, HashMap, HealthHandlerData, HealthHandlerResponse, HealthHandlerResponses, HighlightType, ImportedAuthor, InFlightTurnSummary, IngestTranscriptData, IngestTranscriptError, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsError, InitializeUserDocumentsErrors, InitializeUserDocumentsResponse, InitializeUserDocumentsResponses, InitialPropertyValue, InitiativeDetail, InitiativeFilters, InitiativeId, InitiativeList, InitiativeSummary, InputReceivedMetadata, InstallSyncData, InstallSyncErrors, InteractionReason, InviteMeetingRequest, InviteMeetingUsersRequest, Item, ItemWithUserAccessLevel, JobProcessingResultHandlerData, JobProcessingResultHandlerError, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponse, JobProcessingResultHandlerResponses, JoinChannelByCodeData, JoinChannelByCodeError, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelError, JoinChannelErrors, JoinChannelResponses, LatestMessage, LeaveCallResponse, LeaveChannelData, LeaveChannelError, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallError, LeaveOrEndCallErrors, LeaveOrEndCallResponse, LeaveOrEndCallResponses, LinkShare, ListAgentsData, ListAgentsError, ListAgentsErrors, ListAgentsResponse, ListAgentsResponses, ListBotChannelsData, ListBotChannelsError, ListBotChannelsErrors, ListBotChannelsResponse, ListBotChannelsResponses, ListChannelLabelsData, ListChannelLabelsError, ListChannelLabelsErrors, ListChannelLabelsResponse, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsError, ListCompanyContactsErrors, ListCompanyContactsResponse, ListCompanyContactsResponses, ListFavoritesData, ListFavoritesError, ListFavoritesErrors, ListFavoritesResponse, ListFavoritesResponses, ListHarnessAgentsData, ListHarnessAgentsError, ListHarnessAgentsErrors, ListHarnessAgentsResponse, ListHarnessAgentsResponses, ListHarnessesData, ListHarnessesError, ListHarnessesErrors, ListHarnessesResponse, ListHarnessesResponses, ListHarnessSessionsData, ListHarnessSessionsError, ListHarnessSessionsErrors, ListHarnessSessionsResponse, ListHarnessSessionsResponses, ListInitiativesData, ListInitiativesError, ListInitiativesErrors, ListInitiativesResponse, ListInitiativesResponses, ListOccurrencesData, ListOccurrencesErrors, ListOccurrencesResponse, ListOccurrencesResponses, ListReminderCollectionData, ListReminderCollectionError, ListReminderCollectionErrors, ListReminderCollectionResponse, ListReminderCollectionResponses, ListRemindersData, ListRemindersError, ListRemindersErrors, ListRemindersResponse, ListRemindersResponses, ListTeamOutOfOfficeData, ListTeamOutOfOfficeErrors, ListTeamOutOfOfficeResponse, ListTeamOutOfOfficeResponses, ListUserApiKeysData, ListUserApiKeysError, ListUserApiKeysErrors, ListUserApiKeysResponse, ListUserApiKeysResponses, ListWebhooksData, ListWebhooksError, ListWebhooksErrors, ListWebhooksResponse, ListWebhooksResponse2, ListWebhooksResponses, LocationResponseData, LocationResponseV3, MacroUserIdStr, Meeting, MeetingCancelData, MeetingCancelError, MeetingCancelErrors, MeetingCancelPreparationData, MeetingCancelPreparationError, MeetingCancelPreparationErrors, MeetingCancelPreparationResponse, MeetingCancelPreparationResponses, MeetingCancelResponse, MeetingCancelResponses, MeetingCreateData, MeetingCreateError, MeetingCreateErrors, MeetingCreateResponse, MeetingCreateResponses, MeetingGuestJoinData, MeetingGuestJoinError, MeetingGuestJoinErrors, MeetingGuestJoinResponse, MeetingGuestJoinResponses, MeetingGuestParticipantsData, MeetingGuestParticipantsError, MeetingGuestParticipantsErrors, MeetingGuestParticipantsResponse, MeetingGuestParticipantsResponses, MeetingInviteData, MeetingInviteError, MeetingInviteErrors, MeetingInvitePermissions, MeetingInvitePermissionsData, MeetingInvitePermissionsError, MeetingInvitePermissionsErrors, MeetingInvitePermissionsResponse, MeetingInvitePermissionsResponses, MeetingInviteResponse, MeetingInviteResponses, MeetingInviteUsersData, MeetingInviteUsersError, MeetingInviteUsersErrors, MeetingInviteUsersResponse, MeetingInviteUsersResponses, MeetingJoinData, MeetingJoinError, MeetingJoinErrors, MeetingJoinResponse, MeetingJoinResponses, MeetingLeaveData, MeetingLeaveError, MeetingLeaveErrors, MeetingLeaveResponse, MeetingLeaveResponses, MeetingListActiveData, MeetingListActiveError, MeetingListActiveErrors, MeetingListActiveResponse, MeetingListActiveResponses, MeetingListData, MeetingListError, MeetingListErrors, MeetingListResponse, MeetingListResponses, MeetingLookupData, MeetingLookupError, MeetingLookupErrors, MeetingLookupResponse, MeetingLookupResponses, MeetingParticipant, MeetingParticipants, MeetingParticipantsData, MeetingParticipantsError, MeetingParticipantsErrors, MeetingParticipantsResponse, MeetingParticipantsResponses, MeetingPreparation, MeetingPrepareData, MeetingPrepareError, MeetingPrepareErrors, MeetingPrepareResponse, MeetingPrepareResponses, MeetingShareData, MeetingShareError, MeetingShareErrors, MeetingShareResponse, MeetingShareResponses, MeetingsResponse, MeetingToken, MeetingUpdateData, MeetingUpdateError, MeetingUpdateErrors, MeetingUpdateResponse, MeetingUpdateResponses, MentionPreviewsData, MentionPreviewsErrors, MentionPreviewsResponse, MentionPreviewsResponses, Message, MessageAttachment, MessageAttachmentCreatedMetadata, MessageAttachmentRemovedMetadata, MessageChange, MessageCursor, MessageDeletedMetadata, MessageDirection, MessageEvent, MessageEventAttachment, MessageListItem, MessageMentionedMetadata, MessagePage, MessageParent, MessagePatch, MessagePatchedMetadata, MessagePostedMetadata, MessageThread, MessageThreadPreview, MessageTimelineData, MessageTimelineQuery, MessageTimelineResponse, MessageTimelineResponses, MessageTopicEvent, NewAttachment, NewThreadAnchor, NotificationFilters, NotificationState, PairingDetails, Params, ParticipantRole, PatchBotRequest, PatchChannelData, PatchChannelError, PatchChannelErrors, PatchChannelRequest, PatchChannelResponse, PatchChannelResponses, PatchMessageNotificationPolicy, PatchProjectRequestV2, PatchThreadRequestV2, PatchViewHandlerData, PatchViewHandlerError, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookError, PatchWebhookErrors, PatchWebhookRequest, PatchWebhookResponse, PatchWebhookResponses, PdfAnchor, PdfAnchorId, PdfHighlightAnchor, PdfHighlightAnchorRequest, PdfHighlightRect, PdfHighlightRectAnchorRequest, PdfPlaceableCommentAnchor, PendingClaimResponse, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentError, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponse, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectError, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponse, PermanentlyDeleteProjectResponses, PinnedItem, PinRequest, PostActivityData, PostActivityError, PostActivityErrors, PostActivityRequest, PostActivityResponse, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookError, PostChannelBotWebhookErrors, PostChannelBotWebhookResponse, PostChannelBotWebhookResponses, PostGroupedSoupAstGroupPageRequest, PostGroupedSoupAstInitialRequest, PostGroupedSoupAstRequest, PostItemsSoupAstData, PostItemsSoupAstError, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedError, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponse, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponse, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupError, PostItemsSoupErrors, PostItemsSoupResponse, PostItemsSoupResponses, PostMessage, PostMessageNotificationPolicy, PostSoupAstRequest, PostSoupRequest, PresaveDocumentHandlerData, PresaveDocumentHandlerError, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponse, PresaveDocumentHandlerResponses, PreSaveDocumentRequest, PreSaveDocumentResponse, PreSaveDocumentResponseData, PresignedUrl, PreviewSmartTagData, PreviewSmartTagError, PreviewSmartTagErrors, PreviewSmartTagResponse, PreviewSmartTagResponses, Project, ProjectDeleteResponseData, ProjectDocumentStatus, ProjectFilters, ProjectPreview, ProjectPreviewData, PropertyDefinition, PropertyFilter, PropertyInput, PropertyOwner, PropertyValue, PutCrmTeamSettingsData, PutCrmTeamSettingsError, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponse, PutCrmTeamSettingsResponses, PutCrmTeamStagesData, PutCrmTeamStagesError, PutCrmTeamStagesErrors, PutCrmTeamStagesResponse, PutCrmTeamStagesResponses, ReactionInput, RecentlyDeletedData, RecentlyDeletedError, RecentlyDeletedErrors, RecentlyDeletedResponse, RecentlyDeletedResponseData, RecentlyDeletedResponses, Reminder, ReminderCollectionPage, ReminderCollectionRow, ReminderFilters, ReminderReference, ReminderSchedule, RemindersList, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotError, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponse, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityError, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsError, RemoveParticipantsErrors, RemoveParticipantsRequest, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerError, RemovePinHandlerErrors, RemovePinHandlerResponse, RemovePinHandlerResponses, RenameChannelLabelData, RenameChannelLabelError, RenameChannelLabelErrors, RenameChannelLabelRequest, RenameChannelLabelResponse, RenameChannelLabelResponses, ReorderFavoritesData, ReorderFavoritesError, ReorderFavoritesErrors, ReorderFavoritesRequest, ReorderFavoritesResponses, ReorderPinRequest, ReorderPinsHandlerData, ReorderPinsHandlerError, ReorderPinsHandlerErrors, ReorderPinsHandlerResponse, ReorderPinsHandlerResponses, ReplaceCrmStagesRequest, RequestedHarnessScope, ResetCrmTeamStagesData, ResetCrmTeamStagesError, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponse, ResetCrmTeamStagesResponses, RevertDeleteDocumentData, RevertDeleteDocumentError, RevertDeleteDocumentErrors, RevertDeleteDocumentResponse, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectError, RevertDeleteProjectErrors, RevertDeleteProjectResponse, RevertDeleteProjectResponses, RingStatus, RingStatusResponse, S3ObjectInfo, SaveBomPart, SaveDocumentHandlerData, SaveDocumentHandlerError, SaveDocumentHandlerErrors, SaveDocumentHandlerResponse, SaveDocumentHandlerResponses, SaveDocumentRequest, SaveDocumentResponse, SaveDocumentResponseData, SearchContactsData, SearchContactsError, SearchContactsErrors, SearchContactsResponse, SearchContactsResponse2, SearchContactsResponses, SessionDeletedMetadata, SessionIdentity, SessionMentionedMetadata, SessionOpenedMetadata, SessionRenamedMetadata, SessionSettledMetadata, SessionStoppedMetadata, SetChannelLabelData, SetChannelLabelError, SetChannelLabelErrors, SetChannelLabelRequest, SetChannelLabelResponse, SetChannelLabelResponses, SetChannelPictureData, SetChannelPictureError, SetChannelPictureErrors, SetChannelPictureRequest, SetChannelPictureResponse, SetChannelPictureResponses, SetCompanyHiddenData, SetCompanyHiddenError, SetCompanyHiddenErrors, SetCompanyHiddenRequest, SetCompanyHiddenResponse, SetCompanyHiddenResponses, SetCompanyNameRequest, SetContactHiddenData, SetContactHiddenError, SetContactHiddenErrors, SetContactHiddenRequest, SetContactHiddenResponse, SetContactHiddenResponses, SetContactNameRequest, SetCrmCompanyNameData, SetCrmCompanyNameError, SetCrmCompanyNameErrors, SetCrmCompanyNameResponse, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameError, SetCrmContactNameErrors, SetCrmContactNameResponse, SetCrmContactNameResponses, SetDocumentTeamShareData, SetDocumentTeamShareError, SetDocumentTeamShareErrors, SetDocumentTeamShareRequest, SetDocumentTeamShareResponse, SetDocumentTeamShareResponses, SetEmailFollowupData, SetEmailFollowupError, SetEmailFollowupErrors, SetEmailFollowupResponse, SetEmailFollowupResponses, SetEmailSyncData, SetEmailSyncError, SetEmailSyncErrors, SetEmailSyncRequest, SetEmailSyncResponse, SetEmailSyncResponses, SetPropertyValue, SharedEmailFilter, SharePermissionV2, ShortIdResponse, SimpleMention, SimpleSaveData, SimpleSaveError, SimpleSaveErrors, SimpleSaveResponse, SimpleSaveResponses, SmartTagChannelMatch, SmartTagPreview, SoupAgentSessionSoupPropertiesField, SoupApiItem, SoupApiSort, SoupApiSortDirection, SoupAttachment, SoupCalendarEventSoupPropertiesField, SoupCalendarEventTime, SoupCallRecordGuest, SoupCallRecordParticipant, SoupCallRecordSoupPropertiesField, SoupChannel, SoupChannelThread, SoupChatSoupPropertiesField, SoupContact, SoupCountedReaction, SoupCrmCompanySoupPropertiesField, SoupCrmDomain, SoupDocumentSoupPropertiesField, SoupDocumentSubType, SoupEmailThreadPreview, SoupEnrichedEmailThreadPreviewSoupPropertiesField, SoupForeignEntity, SoupInitiativeSoupPropertiesField, SoupItem, SoupLabel, SoupLabelListVisibility, SoupLabelType, SoupMessageAttachment, SoupMessageListVisibility, SoupMessageSender, SoupMessageSenderType, SoupPage, SoupProjectSoupPropertiesField, SoupPropertiesField, SoupProperty, SoupReminderReference, SoupReminderSchedule, SoupReminderSoupPropertiesField, SoupThreadInfo, SoupThreadReply, StarterDocumentsResponse, StreamEventsData, StreamEventsError, StreamEventsErrors, StreamEventsResponse, StreamEventsResponses, String, SuccessResponse, SurfaceState, SyncServiceVersionId, SystemSkillSummary, TagFilterMode, TaskFilters, TeamOutOfOfficeItem, TeamOutOfOfficeResponse, TeamRole, ThreadAnchor, ThreadOrigin, ThreadPatch, ThreadState, ToggleShareWithTeamData, ToggleShareWithTeamError, ToggleShareWithTeamErrors, ToggleShareWithTeamResponse, ToggleShareWithTeamResponses, TranscribeDictationData, TranscribeDictationError, TranscribeDictationErrors, TranscribeDictationResponse, TranscribeDictationResponses, TranscribeResponse, TranscriptSegmentRequest, TurnEndedMetadata, TurnStartedMetadata, TurnSummary, TypedSuccessResponse, TypedSuccessResponseGetDocumentResponseData, TypingInput, UnassignInitiativeTaskData, UnassignInitiativeTaskError, UnassignInitiativeTaskErrors, UnassignInitiativeTaskResponse, UnassignInitiativeTaskResponses, UpdateAgentData, UpdateAgentError, UpdateAgentErrors, UpdateAgentRequest, UpdateAgentResponse, UpdateAgentResponses, UpdateChannelSharePermission, UpdateCrmTeamSettingsRequest, UpdateInitiativeData, UpdateInitiativeError, UpdateInitiativeErrors, UpdateInitiativeRequest, UpdateInitiativeResponse, UpdateInitiativeResponses, UpdateMeetingRequest, UpdateOperation, UpdateReminderData, UpdateReminderError, UpdateReminderErrors, UpdateReminderRequest, UpdateReminderResponse, UpdateReminderResponses, UpdateSharePermissionRequestV2, UploadDocumentStatus, UploadExtractFolderHandlerData, UploadExtractFolderHandlerError, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponse, UploadExtractFolderHandlerResponses, UploadExtractFolderRequest, UploadFolderHandlerData, UploadFolderHandlerError, UploadFolderHandlerErrors, UploadFolderHandlerResponse, UploadFolderHandlerResponses, UploadFolderRequest, UpsertHistoryHandlerData, UpsertHistoryHandlerError, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponse, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationError, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationRequest, UpsertUserDocumentViewLocationResponse, UpsertUserDocumentViewLocationResponses, UserApiKeyId, UserApiKeyInfo, UserApiKeysList, UserDocumentsResponse, UserDocumentViewLocation, UserDocumentViewLocationResponse, UserPinsResponse, UserViewsResponse, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenError, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponse, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookError, ValidateWebhookErrors, ValidateWebhookResponse, ValidateWebhookResponse2, ValidateWebhookResponses, Vec, View, ViewPatch, ViewsResponse, WaitingForInputMetadata, Webhook, WebhookEvent, WebhookFilter, WebhookScope, WebhookStatus, WebhookValidationTestEvent, WithCallId, WithChannelId, WithDocumentId, WithProjectId } from './types.gen';
diff --git a/packages/sdk/generated/storage/sdk.gen.ts b/packages/sdk/generated/storage/sdk.gen.ts
index be77964bb6..980b6045de 100644
--- a/packages/sdk/generated/storage/sdk.gen.ts
+++ b/packages/sdk/generated/storage/sdk.gen.ts
@@ -2,7 +2,7 @@
import type { Client, ClientMeta, Options as Options2, RequestResult, ServerSentEventsResult, TDataShape } from './client';
import { client } from './client.gen';
-import type { AddFavoriteData, AddFavoriteErrors, AddFavoriteResponses, AddParticipantsData, AddParticipantsErrors, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerErrors, AddPinHandlerResponses, ApproveHarnessPairingData, ApproveHarnessPairingErrors, ApproveHarnessPairingResponses, AssignInitiativeTasksData, AssignInitiativeTasksErrors, AssignInitiativeTasksResponses, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponses, CallWebhookData, CallWebhookErrors, CallWebhookResponses, CheckActiveCallData, CheckActiveCallErrors, CheckActiveCallResponses, ClaimHarnessPairingData, ClaimHarnessPairingErrors, ClaimHarnessPairingResponses, CopyDocumentData, CopyDocumentErrors, CopyDocumentResponses, CreateAgentData, CreateAgentErrors, CreateAgentResponses, CreateAnchorData, CreateAnchorErrors, CreateAnchorResponses, CreateChannelData, CreateChannelErrors, CreateChannelLabelData, CreateChannelLabelErrors, CreateChannelLabelResponses, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotErrors, CreateChannelScopedBotResponses, CreateCollabSurfaceTokenData, CreateCollabSurfaceTokenErrors, CreateCollabSurfaceTokenResponses, CreateCrmCompanyData, CreateCrmCompanyErrors, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactErrors, CreateCrmContactResponses, CreateDocumentData, CreateDocumentErrors, CreateDocumentResponses, CreateEntityMentionData, CreateEntityMentionErrors, CreateEntityMentionResponses, CreateHarnessPairingData, CreateHarnessPairingErrors, CreateHarnessPairingResponses, CreateInitiativeData, CreateInitiativeErrors, CreateInitiativeResponses, CreateInstructionsHandlerData, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponses, CreateMarkdownHandlerData, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponses, CreateProjectHandlerData, CreateProjectHandlerErrors, CreateProjectHandlerResponses, CreateReminderData, CreateReminderErrors, CreateReminderResponses, CreateSkillHandlerData, CreateSkillHandlerErrors, CreateSkillHandlerResponses, CreateSnippetHandlerData, CreateSnippetHandlerErrors, CreateSnippetHandlerResponses, CreateTaskHandlerData, CreateTaskHandlerErrors, CreateTaskHandlerResponses, CreateUserApiKeyData, CreateUserApiKeyErrors, CreateUserApiKeyResponses, CreateViewHandlerData, CreateViewHandlerErrors, CreateViewHandlerResponses, CreateWebhookData, CreateWebhookErrors, CreateWebhookResponses, DeleteAnchorData, DeleteAnchorErrors, DeleteAnchorResponses, DeleteCallRecordData, DeleteCallRecordErrors, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelErrors, DeleteChannelLabelData, DeleteChannelLabelErrors, DeleteChannelLabelResponses, DeleteChannelResponses, DeleteCollabSurfaceData, DeleteCollabSurfaceErrors, DeleteCollabSurfaceResponses, DeleteDocumentData, DeleteDocumentErrors, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionErrors, DeleteEntityMentionResponses, DeleteHarnessData, DeleteHarnessErrors, DeleteHarnessResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponses, DeleteInitiativeData, DeleteInitiativeErrors, DeleteInitiativeResponses, DeleteProjectHandlerData, DeleteProjectHandlerErrors, DeleteProjectHandlerResponses, DeleteReminderData, DeleteReminderErrors, DeleteReminderResponses, DeleteSelfHarnessData, DeleteSelfHarnessErrors, DeleteSelfHarnessResponses, DeleteUserApiKeyData, DeleteUserApiKeyErrors, DeleteUserApiKeyResponses, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookErrors, DeleteWebhookResponses, EditAnchorData, EditAnchorErrors, EditAnchorResponses, EditCallRecordData, EditCallRecordErrors, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptErrors, EditCallTranscriptResponses, EditDocumentData, EditDocumentErrors, EditDocumentResponses, EditProjectV2Data, EditProjectV2Errors, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Errors, EditThreadV2Responses, EnsureCollabSurfaceData, EnsureCollabSurfaceErrors, EnsureCollabSurfaceResponses, EntityMessageCreateData, EntityMessageCreateResponses, EntityMessageDeleteMessageData, EntityMessageDeleteMessageResponses, EntityMessageDeleteThreadData, EntityMessageDeleteThreadResponses, EntityMessageEditData, EntityMessageEditResponses, EntityMessageGetMessageData, EntityMessageGetMessageResponses, EntityMessageGetThreadData, EntityMessageGetThreadResponses, EntityMessageLegacyData, EntityMessageLegacyResponses, EntityMessagePatchThreadData, EntityMessagePatchThreadResponses, EntityMessageReactData, EntityMessageReactResponses, EntityMessageTypingData, EntityMessageTypingResponses, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExportDocumentData, ExportDocumentErrors, ExportDocumentResponses, GetActiveCallsData, GetActiveCallsErrors, GetActiveCallsResponses, GetActivityData, GetActivityErrors, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesErrors, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewErrors, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponses, GetBatchProjectPreviewData, GetBatchProjectPreviewErrors, GetBatchProjectPreviewResponses, GetBotOwnerProfilesData, GetBotOwnerProfilesErrors, GetBotOwnerProfilesResponses, GetCallRecordData, GetCallRecordErrors, GetCallRecordResponses, GetChannelAttachmentsData, GetChannelAttachmentsErrors, GetChannelAttachmentsResponses, GetChannelData, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkErrors, GetChannelJoinLinkResponses, GetChannelParticipantsData, GetChannelParticipantsErrors, GetChannelParticipantsResponses, GetChannelResponses, GetChannelsData, GetChannelsErrors, GetChannelsResponses, GetCollabSurfaceData, GetCollabSurfaceErrors, GetCollabSurfaceResponses, GetCompanyData, GetCompanyErrors, GetCompanyResponses, GetContactByEmailData, GetContactByEmailErrors, GetContactByEmailResponses, GetContactData, GetContactErrors, GetContactResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponses, GetDocumentAnchorsData, GetDocumentAnchorsErrors, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameErrors, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponses, GetDocumentData, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponses, GetDocumentListHandlerData, GetDocumentListHandlerErrors, GetDocumentListHandlerResponses, GetDocumentLocationV3Data, GetDocumentLocationV3Errors, GetDocumentLocationV3Responses, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Responses, GetDocumentProcessingResultData, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponses, GetDocumentResponses, GetDocumentShortIdData, GetDocumentShortIdErrors, GetDocumentShortIdResponses, GetDocumentTeamShareData, GetDocumentTeamShareErrors, GetDocumentTeamShareResponses, GetDocumentVersionData, GetDocumentVersionErrors, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponses, GetEmailFollowupData, GetEmailFollowupErrors, GetEmailFollowupResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponses, GetForeignEntityBySourceData, GetForeignEntityBySourceErrors, GetForeignEntityBySourceResponses, GetForeignEntityData, GetForeignEntityErrors, GetForeignEntityResponses, GetHarnessPairingData, GetHarnessPairingErrors, GetHarnessPairingResponses, GetHistoryHandlerData, GetHistoryHandlerErrors, GetHistoryHandlerResponses, GetInitiativeData, GetInitiativeErrors, GetInitiativeResponses, GetInstructionsHandlerData, GetInstructionsHandlerErrors, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupErrors, GetItemsSoupResponses, GetLocationHandlerData, GetLocationHandlerErrors, GetLocationHandlerResponses, GetOrCreateCallData, GetOrCreateCallErrors, GetOrCreateCallResponses, GetOrCreateDmData, GetOrCreateDmErrors, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateErrors, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerErrors, GetPinsHandlerResponses, GetProjectContentHandlerData, GetProjectContentHandlerErrors, GetProjectContentHandlerResponses, GetProjectHandlerData, GetProjectHandlerErrors, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Responses, GetProjectsHandlerData, GetProjectsHandlerErrors, GetProjectsHandlerResponses, GetProjectUserAccessLevelData, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponses, GetReminderData, GetReminderErrors, GetReminderResponses, GetRingStatusData, GetRingStatusErrors, GetRingStatusResponses, GetSelfBotData, GetSelfBotErrors, GetSelfBotResponses, GetSelfHarnessData, GetSelfHarnessErrors, GetSelfHarnessResponses, GetSystemSkillsHandlerData, GetSystemSkillsHandlerErrors, GetSystemSkillsHandlerResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponses, GetViewsHandlerData, GetViewsHandlerErrors, GetViewsHandlerResponses, GetWebhookData, GetWebhookErrors, GetWebhookResponses, HandlerData, HandlerErrors, HandlerResponses, HealthHandlerData, HealthHandlerResponses, IngestTranscriptData, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsErrors, InitializeUserDocumentsResponses, InstallSyncData, InstallSyncErrors, JobProcessingResultHandlerData, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponses, JoinChannelByCodeData, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelErrors, JoinChannelResponses, LeaveChannelData, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallErrors, LeaveOrEndCallResponses, ListAgentsData, ListAgentsErrors, ListAgentsResponses, ListBotChannelsData, ListBotChannelsErrors, ListBotChannelsResponses, ListChannelLabelsData, ListChannelLabelsErrors, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsErrors, ListCompanyContactsResponses, ListFavoritesData, ListFavoritesErrors, ListFavoritesResponses, ListHarnessAgentsData, ListHarnessAgentsErrors, ListHarnessAgentsResponses, ListHarnessesData, ListHarnessesErrors, ListHarnessesResponses, ListHarnessSessionsData, ListHarnessSessionsErrors, ListHarnessSessionsResponses, ListInitiativesData, ListInitiativesErrors, ListInitiativesResponses, ListOccurrencesData, ListOccurrencesErrors, ListOccurrencesResponses, ListRemindersData, ListRemindersErrors, ListRemindersResponses, ListTeamOutOfOfficeData, ListTeamOutOfOfficeErrors, ListTeamOutOfOfficeResponses, ListUserApiKeysData, ListUserApiKeysErrors, ListUserApiKeysResponses, ListWebhooksData, ListWebhooksErrors, ListWebhooksResponses, MeetingCancelData, MeetingCancelErrors, MeetingCancelPreparationData, MeetingCancelPreparationErrors, MeetingCancelPreparationResponses, MeetingCancelResponses, MeetingCreateData, MeetingCreateErrors, MeetingCreateResponses, MeetingGuestJoinData, MeetingGuestJoinErrors, MeetingGuestJoinResponses, MeetingGuestParticipantsData, MeetingGuestParticipantsErrors, MeetingGuestParticipantsResponses, MeetingInviteData, MeetingInviteErrors, MeetingInvitePermissionsData, MeetingInvitePermissionsErrors, MeetingInvitePermissionsResponses, MeetingInviteResponses, MeetingInviteUsersData, MeetingInviteUsersErrors, MeetingInviteUsersResponses, MeetingJoinData, MeetingJoinErrors, MeetingJoinResponses, MeetingLeaveData, MeetingLeaveErrors, MeetingLeaveResponses, MeetingListActiveData, MeetingListActiveErrors, MeetingListActiveResponses, MeetingListData, MeetingListErrors, MeetingListResponses, MeetingLookupData, MeetingLookupErrors, MeetingLookupResponses, MeetingParticipantsData, MeetingParticipantsErrors, MeetingParticipantsResponses, MeetingPrepareData, MeetingPrepareErrors, MeetingPrepareResponses, MeetingShareData, MeetingShareErrors, MeetingShareResponses, MeetingUpdateData, MeetingUpdateErrors, MeetingUpdateResponses, MentionPreviewsData, MentionPreviewsErrors, MentionPreviewsResponses, MessageTimelineData, MessageTimelineResponses, PatchChannelData, PatchChannelErrors, PatchChannelResponses, PatchViewHandlerData, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookErrors, PatchWebhookResponses, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponses, PostActivityData, PostActivityErrors, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookErrors, PostChannelBotWebhookResponses, PostItemsSoupAstData, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupErrors, PostItemsSoupResponses, PresaveDocumentHandlerData, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponses, PreviewSmartTagData, PreviewSmartTagErrors, PreviewSmartTagResponses, PutCrmTeamSettingsData, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponses, PutCrmTeamStagesData, PutCrmTeamStagesErrors, PutCrmTeamStagesResponses, RecentlyDeletedData, RecentlyDeletedErrors, RecentlyDeletedResponses, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsErrors, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerErrors, RemovePinHandlerResponses, RenameChannelLabelData, RenameChannelLabelErrors, RenameChannelLabelResponses, ReorderFavoritesData, ReorderFavoritesErrors, ReorderFavoritesResponses, ReorderPinsHandlerData, ReorderPinsHandlerErrors, ReorderPinsHandlerResponses, ResetCrmTeamStagesData, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponses, RevertDeleteDocumentData, RevertDeleteDocumentErrors, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectErrors, RevertDeleteProjectResponses, SaveDocumentHandlerData, SaveDocumentHandlerErrors, SaveDocumentHandlerResponses, SearchContactsData, SearchContactsErrors, SearchContactsResponses, SetChannelLabelData, SetChannelLabelErrors, SetChannelLabelResponses, SetChannelPictureData, SetChannelPictureErrors, SetChannelPictureResponses, SetCompanyHiddenData, SetCompanyHiddenErrors, SetCompanyHiddenResponses, SetContactHiddenData, SetContactHiddenErrors, SetContactHiddenResponses, SetCrmCompanyNameData, SetCrmCompanyNameErrors, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameErrors, SetCrmContactNameResponses, SetDocumentTeamShareData, SetDocumentTeamShareErrors, SetDocumentTeamShareResponses, SetEmailFollowupData, SetEmailFollowupErrors, SetEmailFollowupResponses, SetEmailSyncData, SetEmailSyncErrors, SetEmailSyncResponses, SimpleSaveData, SimpleSaveErrors, SimpleSaveResponses, StreamEventsData, StreamEventsErrors, StreamEventsResponse, StreamEventsResponses, ToggleShareWithTeamData, ToggleShareWithTeamErrors, ToggleShareWithTeamResponses, TranscribeDictationData, TranscribeDictationErrors, TranscribeDictationResponses, UnassignInitiativeTaskData, UnassignInitiativeTaskErrors, UnassignInitiativeTaskResponses, UpdateAgentData, UpdateAgentErrors, UpdateAgentResponses, UpdateInitiativeData, UpdateInitiativeErrors, UpdateInitiativeResponses, UpdateReminderData, UpdateReminderErrors, UpdateReminderResponses, UploadExtractFolderHandlerData, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponses, UploadFolderHandlerData, UploadFolderHandlerErrors, UploadFolderHandlerResponses, UpsertHistoryHandlerData, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationResponses, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookErrors, ValidateWebhookResponses } from './types.gen';
+import type { AddFavoriteData, AddFavoriteErrors, AddFavoriteResponses, AddParticipantsData, AddParticipantsErrors, AddParticipantsResponses, AddPinHandlerData, AddPinHandlerErrors, AddPinHandlerResponses, ApproveHarnessPairingData, ApproveHarnessPairingErrors, ApproveHarnessPairingResponses, AssignInitiativeTasksData, AssignInitiativeTasksErrors, AssignInitiativeTasksResponses, BulkWakeupSyncServiceDocumentsData, BulkWakeupSyncServiceDocumentsErrors, BulkWakeupSyncServiceDocumentsResponses, CallWebhookData, CallWebhookErrors, CallWebhookResponses, CheckActiveCallData, CheckActiveCallErrors, CheckActiveCallResponses, ClaimHarnessPairingData, ClaimHarnessPairingErrors, ClaimHarnessPairingResponses, CopyDocumentData, CopyDocumentErrors, CopyDocumentResponses, CreateAgentData, CreateAgentErrors, CreateAgentResponses, CreateAnchorData, CreateAnchorErrors, CreateAnchorResponses, CreateChannelData, CreateChannelErrors, CreateChannelLabelData, CreateChannelLabelErrors, CreateChannelLabelResponses, CreateChannelResponses, CreateChannelScopedBotData, CreateChannelScopedBotErrors, CreateChannelScopedBotResponses, CreateCollabSurfaceTokenData, CreateCollabSurfaceTokenErrors, CreateCollabSurfaceTokenResponses, CreateCrmCompanyData, CreateCrmCompanyErrors, CreateCrmCompanyResponses, CreateCrmContactData, CreateCrmContactErrors, CreateCrmContactResponses, CreateDocumentData, CreateDocumentErrors, CreateDocumentResponses, CreateEntityMentionData, CreateEntityMentionErrors, CreateEntityMentionResponses, CreateHarnessPairingData, CreateHarnessPairingErrors, CreateHarnessPairingResponses, CreateInitiativeData, CreateInitiativeErrors, CreateInitiativeResponses, CreateInstructionsHandlerData, CreateInstructionsHandlerErrors, CreateInstructionsHandlerResponses, CreateMarkdownHandlerData, CreateMarkdownHandlerErrors, CreateMarkdownHandlerResponses, CreateProjectHandlerData, CreateProjectHandlerErrors, CreateProjectHandlerResponses, CreateReminderData, CreateReminderErrors, CreateReminderResponses, CreateSkillHandlerData, CreateSkillHandlerErrors, CreateSkillHandlerResponses, CreateSnippetHandlerData, CreateSnippetHandlerErrors, CreateSnippetHandlerResponses, CreateTaskHandlerData, CreateTaskHandlerErrors, CreateTaskHandlerResponses, CreateUserApiKeyData, CreateUserApiKeyErrors, CreateUserApiKeyResponses, CreateViewHandlerData, CreateViewHandlerErrors, CreateViewHandlerResponses, CreateWebhookData, CreateWebhookErrors, CreateWebhookResponses, DeleteAnchorData, DeleteAnchorErrors, DeleteAnchorResponses, DeleteCallRecordData, DeleteCallRecordErrors, DeleteCallRecordResponses, DeleteChannelData, DeleteChannelErrors, DeleteChannelLabelData, DeleteChannelLabelErrors, DeleteChannelLabelResponses, DeleteChannelResponses, DeleteCollabSurfaceData, DeleteCollabSurfaceErrors, DeleteCollabSurfaceResponses, DeleteDocumentData, DeleteDocumentErrors, DeleteDocumentResponses, DeleteEntityMentionData, DeleteEntityMentionErrors, DeleteEntityMentionResponses, DeleteHarnessData, DeleteHarnessErrors, DeleteHarnessResponses, DeleteHistoryHandlerData, DeleteHistoryHandlerErrors, DeleteHistoryHandlerResponses, DeleteInitiativeData, DeleteInitiativeErrors, DeleteInitiativeResponses, DeleteProjectHandlerData, DeleteProjectHandlerErrors, DeleteProjectHandlerResponses, DeleteReminderData, DeleteReminderErrors, DeleteReminderResponses, DeleteSelfHarnessData, DeleteSelfHarnessErrors, DeleteSelfHarnessResponses, DeleteUserApiKeyData, DeleteUserApiKeyErrors, DeleteUserApiKeyResponses, DeleteUserDocumentViewLocationData, DeleteUserDocumentViewLocationErrors, DeleteUserDocumentViewLocationResponses, DeleteViewHandlerData, DeleteViewHandlerErrors, DeleteViewHandlerResponses, DeleteWebhookData, DeleteWebhookErrors, DeleteWebhookResponses, EditAnchorData, EditAnchorErrors, EditAnchorResponses, EditCallRecordData, EditCallRecordErrors, EditCallRecordResponses, EditCallTranscriptData, EditCallTranscriptErrors, EditCallTranscriptResponses, EditDocumentData, EditDocumentErrors, EditDocumentResponses, EditProjectV2Data, EditProjectV2Errors, EditProjectV2Responses, EditThreadV2Data, EditThreadV2Errors, EditThreadV2Responses, EnsureCollabSurfaceData, EnsureCollabSurfaceErrors, EnsureCollabSurfaceResponses, EntityMessageCreateData, EntityMessageCreateResponses, EntityMessageDeleteMessageData, EntityMessageDeleteMessageResponses, EntityMessageDeleteThreadData, EntityMessageDeleteThreadResponses, EntityMessageEditData, EntityMessageEditResponses, EntityMessageGetMessageData, EntityMessageGetMessageResponses, EntityMessageGetThreadData, EntityMessageGetThreadResponses, EntityMessageLegacyData, EntityMessageLegacyResponses, EntityMessagePatchThreadData, EntityMessagePatchThreadResponses, EntityMessageReactData, EntityMessageReactResponses, EntityMessageTypingData, EntityMessageTypingResponses, ExcludeDefaultViewHandlerData, ExcludeDefaultViewHandlerErrors, ExcludeDefaultViewHandlerResponses, ExportDocumentData, ExportDocumentErrors, ExportDocumentResponses, GetActiveCallsData, GetActiveCallsErrors, GetActiveCallsResponses, GetActivityData, GetActivityErrors, GetActivityResponses, GetAttachmentReferencesData, GetAttachmentReferencesErrors, GetAttachmentReferencesResponses, GetBatchCallRecordPreviewData, GetBatchCallRecordPreviewErrors, GetBatchCallRecordPreviewResponses, GetBatchChannelPreviewData, GetBatchChannelPreviewErrors, GetBatchChannelPreviewResponses, GetBatchPreviewHandlerData, GetBatchPreviewHandlerErrors, GetBatchPreviewHandlerResponses, GetBatchProjectPreviewData, GetBatchProjectPreviewErrors, GetBatchProjectPreviewResponses, GetBotOwnerProfilesData, GetBotOwnerProfilesErrors, GetBotOwnerProfilesResponses, GetCallRecordData, GetCallRecordErrors, GetCallRecordResponses, GetChannelAttachmentsData, GetChannelAttachmentsErrors, GetChannelAttachmentsResponses, GetChannelData, GetChannelErrors, GetChannelJoinLinkData, GetChannelJoinLinkErrors, GetChannelJoinLinkResponses, GetChannelParticipantsData, GetChannelParticipantsErrors, GetChannelParticipantsResponses, GetChannelResponses, GetChannelsData, GetChannelsErrors, GetChannelsResponses, GetCollabSurfaceData, GetCollabSurfaceErrors, GetCollabSurfaceResponses, GetCompanyData, GetCompanyErrors, GetCompanyResponses, GetContactByEmailData, GetContactByEmailErrors, GetContactByEmailResponses, GetContactData, GetContactErrors, GetContactResponses, GetCrmTeamSettingsData, GetCrmTeamSettingsErrors, GetCrmTeamSettingsResponses, GetDocumentAnchorsData, GetDocumentAnchorsErrors, GetDocumentAnchorsResponses, GetDocumentBranchNameData, GetDocumentBranchNameErrors, GetDocumentBranchNameResponses, GetDocumentByTeamSlugData, GetDocumentByTeamSlugErrors, GetDocumentByTeamSlugResponses, GetDocumentData, GetDocumentErrors, GetDocumentGithubPullRequestsData, GetDocumentGithubPullRequestsErrors, GetDocumentGithubPullRequestsResponses, GetDocumentListHandlerData, GetDocumentListHandlerErrors, GetDocumentListHandlerResponses, GetDocumentLocationV3Data, GetDocumentLocationV3Errors, GetDocumentLocationV3Responses, GetDocumentPermissionsTokenData, GetDocumentPermissionsTokenErrors, GetDocumentPermissionsTokenResponses, GetDocumentPermissionsV2Data, GetDocumentPermissionsV2Errors, GetDocumentPermissionsV2Responses, GetDocumentProcessingResultData, GetDocumentProcessingResultErrors, GetDocumentProcessingResultResponses, GetDocumentResponses, GetDocumentShortIdData, GetDocumentShortIdErrors, GetDocumentShortIdResponses, GetDocumentTeamShareData, GetDocumentTeamShareErrors, GetDocumentTeamShareResponses, GetDocumentVersionData, GetDocumentVersionErrors, GetDocumentVersionResponses, GetDocumentViewsHandlerData, GetDocumentViewsHandlerErrors, GetDocumentViewsHandlerResponses, GetEmailFollowupData, GetEmailFollowupErrors, GetEmailFollowupResponses, GetEntityPermissionData, GetEntityPermissionErrors, GetEntityPermissionResponses, GetForeignEntityBySourceData, GetForeignEntityBySourceErrors, GetForeignEntityBySourceResponses, GetForeignEntityData, GetForeignEntityErrors, GetForeignEntityResponses, GetHarnessPairingData, GetHarnessPairingErrors, GetHarnessPairingResponses, GetHistoryHandlerData, GetHistoryHandlerErrors, GetHistoryHandlerResponses, GetInitiativeData, GetInitiativeErrors, GetInitiativeResponses, GetInstructionsHandlerData, GetInstructionsHandlerErrors, GetInstructionsHandlerResponses, GetItemsSoupData, GetItemsSoupErrors, GetItemsSoupResponses, GetLocationHandlerData, GetLocationHandlerErrors, GetLocationHandlerResponses, GetOrCreateCallData, GetOrCreateCallErrors, GetOrCreateCallResponses, GetOrCreateDmData, GetOrCreateDmErrors, GetOrCreateDmResponses, GetOrCreatePrivateData, GetOrCreatePrivateErrors, GetOrCreatePrivateResponses, GetPendingProjectsHandlerData, GetPendingProjectsHandlerErrors, GetPendingProjectsHandlerResponses, GetPinsHandlerData, GetPinsHandlerErrors, GetPinsHandlerResponses, GetProjectContentHandlerData, GetProjectContentHandlerErrors, GetProjectContentHandlerResponses, GetProjectHandlerData, GetProjectHandlerErrors, GetProjectHandlerResponses, GetProjectPermissionsV2Data, GetProjectPermissionsV2Errors, GetProjectPermissionsV2Responses, GetProjectsHandlerData, GetProjectsHandlerErrors, GetProjectsHandlerResponses, GetProjectUserAccessLevelData, GetProjectUserAccessLevelErrors, GetProjectUserAccessLevelResponses, GetReminderData, GetReminderErrors, GetReminderResponses, GetRingStatusData, GetRingStatusErrors, GetRingStatusResponses, GetSelfBotData, GetSelfBotErrors, GetSelfBotResponses, GetSelfHarnessData, GetSelfHarnessErrors, GetSelfHarnessResponses, GetSystemSkillsHandlerData, GetSystemSkillsHandlerErrors, GetSystemSkillsHandlerResponses, GetUserDocumentsHandlerData, GetUserDocumentsHandlerErrors, GetUserDocumentsHandlerResponses, GetUserDocumentViewLocationData, GetUserDocumentViewLocationErrors, GetUserDocumentViewLocationResponses, GetViewsHandlerData, GetViewsHandlerErrors, GetViewsHandlerResponses, GetWebhookData, GetWebhookErrors, GetWebhookResponses, HandlerData, HandlerErrors, HandlerResponses, HealthHandlerData, HealthHandlerResponses, IngestTranscriptData, IngestTranscriptErrors, IngestTranscriptResponses, InitializeUserDocumentsData, InitializeUserDocumentsErrors, InitializeUserDocumentsResponses, InstallSyncData, InstallSyncErrors, JobProcessingResultHandlerData, JobProcessingResultHandlerErrors, JobProcessingResultHandlerResponses, JoinChannelByCodeData, JoinChannelByCodeErrors, JoinChannelByCodeResponses, JoinChannelData, JoinChannelErrors, JoinChannelResponses, LeaveChannelData, LeaveChannelErrors, LeaveChannelResponses, LeaveOrEndCallData, LeaveOrEndCallErrors, LeaveOrEndCallResponses, ListAgentsData, ListAgentsErrors, ListAgentsResponses, ListBotChannelsData, ListBotChannelsErrors, ListBotChannelsResponses, ListChannelLabelsData, ListChannelLabelsErrors, ListChannelLabelsResponses, ListCompanyContactsData, ListCompanyContactsErrors, ListCompanyContactsResponses, ListFavoritesData, ListFavoritesErrors, ListFavoritesResponses, ListHarnessAgentsData, ListHarnessAgentsErrors, ListHarnessAgentsResponses, ListHarnessesData, ListHarnessesErrors, ListHarnessesResponses, ListHarnessSessionsData, ListHarnessSessionsErrors, ListHarnessSessionsResponses, ListInitiativesData, ListInitiativesErrors, ListInitiativesResponses, ListOccurrencesData, ListOccurrencesErrors, ListOccurrencesResponses, ListReminderCollectionData, ListReminderCollectionErrors, ListReminderCollectionResponses, ListRemindersData, ListRemindersErrors, ListRemindersResponses, ListTeamOutOfOfficeData, ListTeamOutOfOfficeErrors, ListTeamOutOfOfficeResponses, ListUserApiKeysData, ListUserApiKeysErrors, ListUserApiKeysResponses, ListWebhooksData, ListWebhooksErrors, ListWebhooksResponses, MeetingCancelData, MeetingCancelErrors, MeetingCancelPreparationData, MeetingCancelPreparationErrors, MeetingCancelPreparationResponses, MeetingCancelResponses, MeetingCreateData, MeetingCreateErrors, MeetingCreateResponses, MeetingGuestJoinData, MeetingGuestJoinErrors, MeetingGuestJoinResponses, MeetingGuestParticipantsData, MeetingGuestParticipantsErrors, MeetingGuestParticipantsResponses, MeetingInviteData, MeetingInviteErrors, MeetingInvitePermissionsData, MeetingInvitePermissionsErrors, MeetingInvitePermissionsResponses, MeetingInviteResponses, MeetingInviteUsersData, MeetingInviteUsersErrors, MeetingInviteUsersResponses, MeetingJoinData, MeetingJoinErrors, MeetingJoinResponses, MeetingLeaveData, MeetingLeaveErrors, MeetingLeaveResponses, MeetingListActiveData, MeetingListActiveErrors, MeetingListActiveResponses, MeetingListData, MeetingListErrors, MeetingListResponses, MeetingLookupData, MeetingLookupErrors, MeetingLookupResponses, MeetingParticipantsData, MeetingParticipantsErrors, MeetingParticipantsResponses, MeetingPrepareData, MeetingPrepareErrors, MeetingPrepareResponses, MeetingShareData, MeetingShareErrors, MeetingShareResponses, MeetingUpdateData, MeetingUpdateErrors, MeetingUpdateResponses, MentionPreviewsData, MentionPreviewsErrors, MentionPreviewsResponses, MessageTimelineData, MessageTimelineResponses, PatchChannelData, PatchChannelErrors, PatchChannelResponses, PatchViewHandlerData, PatchViewHandlerErrors, PatchViewHandlerResponses, PatchWebhookData, PatchWebhookErrors, PatchWebhookResponses, PermanentlyDeleteDocumentData, PermanentlyDeleteDocumentErrors, PermanentlyDeleteDocumentResponses, PermanentlyDeleteProjectData, PermanentlyDeleteProjectErrors, PermanentlyDeleteProjectResponses, PostActivityData, PostActivityErrors, PostActivityResponses, PostChannelBotWebhookData, PostChannelBotWebhookErrors, PostChannelBotWebhookResponses, PostItemsSoupAstData, PostItemsSoupAstErrors, PostItemsSoupAstGroupedData, PostItemsSoupAstGroupedErrors, PostItemsSoupAstGroupedResponses, PostItemsSoupAstResponses, PostItemsSoupData, PostItemsSoupErrors, PostItemsSoupResponses, PresaveDocumentHandlerData, PresaveDocumentHandlerErrors, PresaveDocumentHandlerResponses, PreviewSmartTagData, PreviewSmartTagErrors, PreviewSmartTagResponses, PutCrmTeamSettingsData, PutCrmTeamSettingsErrors, PutCrmTeamSettingsResponses, PutCrmTeamStagesData, PutCrmTeamStagesErrors, PutCrmTeamStagesResponses, RecentlyDeletedData, RecentlyDeletedErrors, RecentlyDeletedResponses, RemoveBotFromChannelByBotData, RemoveBotFromChannelByBotErrors, RemoveBotFromChannelByBotResponses, RemoveFavoriteByEntityData, RemoveFavoriteByEntityErrors, RemoveFavoriteByEntityResponses, RemoveParticipantsData, RemoveParticipantsErrors, RemoveParticipantsResponses, RemovePinHandlerData, RemovePinHandlerErrors, RemovePinHandlerResponses, RenameChannelLabelData, RenameChannelLabelErrors, RenameChannelLabelResponses, ReorderFavoritesData, ReorderFavoritesErrors, ReorderFavoritesResponses, ReorderPinsHandlerData, ReorderPinsHandlerErrors, ReorderPinsHandlerResponses, ResetCrmTeamStagesData, ResetCrmTeamStagesErrors, ResetCrmTeamStagesResponses, RevertDeleteDocumentData, RevertDeleteDocumentErrors, RevertDeleteDocumentResponses, RevertDeleteProjectData, RevertDeleteProjectErrors, RevertDeleteProjectResponses, SaveDocumentHandlerData, SaveDocumentHandlerErrors, SaveDocumentHandlerResponses, SearchContactsData, SearchContactsErrors, SearchContactsResponses, SetChannelLabelData, SetChannelLabelErrors, SetChannelLabelResponses, SetChannelPictureData, SetChannelPictureErrors, SetChannelPictureResponses, SetCompanyHiddenData, SetCompanyHiddenErrors, SetCompanyHiddenResponses, SetContactHiddenData, SetContactHiddenErrors, SetContactHiddenResponses, SetCrmCompanyNameData, SetCrmCompanyNameErrors, SetCrmCompanyNameResponses, SetCrmContactNameData, SetCrmContactNameErrors, SetCrmContactNameResponses, SetDocumentTeamShareData, SetDocumentTeamShareErrors, SetDocumentTeamShareResponses, SetEmailFollowupData, SetEmailFollowupErrors, SetEmailFollowupResponses, SetEmailSyncData, SetEmailSyncErrors, SetEmailSyncResponses, SimpleSaveData, SimpleSaveErrors, SimpleSaveResponses, StreamEventsData, StreamEventsErrors, StreamEventsResponse, StreamEventsResponses, ToggleShareWithTeamData, ToggleShareWithTeamErrors, ToggleShareWithTeamResponses, TranscribeDictationData, TranscribeDictationErrors, TranscribeDictationResponses, UnassignInitiativeTaskData, UnassignInitiativeTaskErrors, UnassignInitiativeTaskResponses, UpdateAgentData, UpdateAgentErrors, UpdateAgentResponses, UpdateInitiativeData, UpdateInitiativeErrors, UpdateInitiativeResponses, UpdateReminderData, UpdateReminderErrors, UpdateReminderResponses, UploadExtractFolderHandlerData, UploadExtractFolderHandlerErrors, UploadExtractFolderHandlerResponses, UploadFolderHandlerData, UploadFolderHandlerErrors, UploadFolderHandlerResponses, UpsertHistoryHandlerData, UpsertHistoryHandlerErrors, UpsertHistoryHandlerResponses, UpsertUserDocumentViewLocationData, UpsertUserDocumentViewLocationErrors, UpsertUserDocumentViewLocationResponses, ValidateDocumentPermissionsTokenData, ValidateDocumentPermissionsTokenErrors, ValidateDocumentPermissionsTokenResponses, ValidateWebhookData, ValidateWebhookErrors, ValidateWebhookResponses } from './types.gen';
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
/**
@@ -2150,6 +2150,13 @@ export class Sdk extends HeyApiClient {
});
}
+ /**
+ * Native reminder rows, ordered and paginated by the owning domain.
+ */
+ public listReminderCollection<ThrowOnError extends boolean = false>(options?: Options<ListReminderCollectionData, ThrowOnError>): RequestResult<ListReminderCollectionResponses, ListReminderCollectionErrors, ThrowOnError> {
+ return (options?.client ?? this.client).get<ListReminderCollectionResponses, ListReminderCollectionErrors, ThrowOnError>({ url: '/reminders/collection', ...options });
+ }
+
/**
* Read an email follow-up and reconcile inbound reply cancellation.
*/
diff --git a/packages/sdk/generated/storage/types.gen.ts b/packages/sdk/generated/storage/types.gen.ts
index 08ca209b14..a27e8d8f12 100644
--- a/packages/sdk/generated/storage/types.gen.ts
+++ b/packages/sdk/generated/storage/types.gen.ts
@@ -7828,6 +7828,32 @@ export type Reminder = {
updatedAt: string;
};
+/**
+ * One continuous collection, including completed recurring reminders that still fire.
+ */
+export type ReminderCollectionPage = {
+ /**
+ * Rows in server order.
+ */
+ items: Array<ReminderCollectionRow>;
+ /**
+ * Absent only on the final page.
+ */
+ nextCursor?: string | null;
+};
+
+/**
+ * A native reminder row with its source and workflow capabilities resolved in bulk.
+ */
+export type ReminderCollectionRow = {
+ emailFollowup?: null | EmailFollowup;
+ reference?: null | ReminderReference;
+ /**
+ * The caller's private reminder.
+ */
+ reminder: Reminder;
+};
+
/**
* Filters for reminders.
*/
@@ -7862,6 +7888,29 @@ export type ReminderFilters = {
include?: boolean;
};
+/**
+ * Display details of the entity a reminder is about, resolved alongside the
+ * reminder itself.
+ *
+ * A reminder has no block of its own — it opens, and is iconed as, whatever it
+ * references. Which block that is depends on the referenced document's file
+ * type, so resolving it client-side would mean a second fetch per row against
+ * a synchronous icon path. Reading it here keeps Soup to one round trip.
+ *
+ * Only documents populate these; every other entity type is identified by its
+ * [`EntityType`] alone.
+ */
+export type ReminderReference = {
+ /**
+ * The referenced document's file type, e.g. `md` or `pdf`.
+ */
+ fileType?: string | null;
+ /**
+ * The referenced document's sub type, e.g. `task` or `snippet`.
+ */
+ subType?: string | null;
+};
+
/**
* When a reminder fires.
*/
@@ -9625,7 +9674,7 @@ export type SoupReminderSoupPropertiesField = {
properties: Array<SoupProperty>;
} & {
/**
- * Set once a one-shot reminder has fired.
+ * When the owner acknowledged the occurrence; independent of future scheduling.
*/
completedAt?: string | null;
/**
@@ -15924,6 +15973,40 @@ export type CreateReminderResponses = {
export type CreateReminderResponse = CreateReminderResponses[keyof CreateReminderResponses];
+export type ListReminderCollectionData = {
+ body?: never;
+ path?: never;
+ query?: {
+ /**
+ * Omit to include both done and not-done occurrences.
+ */
+ completed?: boolean;
+ /**
+ * Page size, bounded to 1–500.
+ */
+ limit?: number;
+ /**
+ * Position returned by the previous page.
+ */
+ cursor?: string;
+ };
+ url: '/reminders/collection';
+};
+
+export type ListReminderCollectionErrors = {
+ 400: ErrorResponse;
+ 401: ErrorResponse;
+ 500: ErrorResponse;
+};
+
+export type ListReminderCollectionError = ListReminderCollectionErrors[keyof ListReminderCollectionErrors];
+
+export type ListReminderCollectionResponses = {
+ 200: ReminderCollectionPage;
+};
+
+export type ListReminderCollectionResponse = ListReminderCollectionResponses[keyof ListReminderCollectionResponses];
+
export type GetEmailFollowupData = {
body?: never;
path: {
diff --git a/packages/sdk/specs/storage.json b/packages/sdk/specs/storage.json
index 9f85450542..73a22bb2b4 100644
--- a/packages/sdk/specs/storage.json
+++ b/packages/sdk/specs/storage.json
@@ -12742,6 +12742,86 @@
}
}
},
+ "/reminders/collection": {
+ "get": {
+ "tags": ["reminders"],
+ "summary": "Native reminder rows, ordered and paginated by the owning domain.",
+ "operationId": "list_reminder_collection",
+ "parameters": [
+ {
+ "name": "completed",
+ "in": "query",
+ "description": "Omit to include both done and not-done occurrences.",
+ "required": false,
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "description": "Page size, bounded to 1–500.",
+ "required": false,
+ "schema": {
+ "type": "integer",
+ "format": "int32",
+ "minimum": 0
+ }
+ },
+ {
+ "name": "cursor",
+ "in": "query",
+ "description": "Position returned by the previous page.",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ReminderCollectionPage"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ },
+ "401": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ },
+ "500": {
+ "description": "",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/ErrorResponse"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"/reminders/email/{thread_id}": {
"get": {
"tags": ["reminders"],
@@ -26552,6 +26632,57 @@
}
}
},
+ "ReminderCollectionPage": {
+ "type": "object",
+ "description": "One continuous collection, including completed recurring reminders that still fire.",
+ "required": ["items"],
+ "properties": {
+ "items": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/ReminderCollectionRow"
+ },
+ "description": "Rows in server order."
+ },
+ "nextCursor": {
+ "type": ["string", "null"],
+ "description": "Absent only on the final page."
+ }
+ }
+ },
+ "ReminderCollectionRow": {
+ "type": "object",
+ "description": "A native reminder row with its source and workflow capabilities resolved in bulk.",
+ "required": ["reminder"],
+ "properties": {
+ "emailFollowup": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/EmailFollowup",
+ "description": "Present only for an email-follow-up mirror, never inferred from its target type."
+ }
+ ]
+ },
+ "reference": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "$ref": "#/components/schemas/ReminderReference",
+ "description": "Document display metadata, if applicable."
+ }
+ ]
+ },
+ "reminder": {
+ "$ref": "#/components/schemas/Reminder",
+ "description": "The caller's private reminder."
+ }
+ }
+ },
"ReminderFilters": {
"type": "object",
"description": "Filters for reminders.",
@@ -26584,6 +26715,20 @@
}
}
},
+ "ReminderReference": {
+ "type": "object",
+ "description": "Display details of the entity a reminder is about, resolved alongside the\nreminder itself.\n\nA reminder has no block of its own — it opens, and is iconed as, whatever it\nreferences. Which block that is depends on the referenced document's file\ntype, so resolving it client-side would mean a second fetch per row against\na synchronous icon path. Reading it here keeps Soup to one round trip.\n\nOnly documents populate these; every other entity type is identified by its\n[`EntityType`] alone.",
+ "properties": {
+ "fileType": {
+ "type": ["string", "null"],
+ "description": "The referenced document's file type, e.g. `md` or `pdf`."
+ },
+ "subType": {
+ "type": ["string", "null"],
+ "description": "The referenced document's sub type, e.g. `task` or `snippet`."
+ }
+ }
+ },
"ReminderSchedule": {
"oneOf": [
{
@@ -29224,7 +29369,7 @@
"completedAt": {
"type": ["string", "null"],
"format": "date-time",
- "description": "Set once a one-shot reminder has fired."
+ "description": "When the owner acknowledged the occurrence; independent of future scheduling."
},
"createdAt": {
"type": "string",
diff --git a/packages/sdk/src/coverage/skipped.ts b/packages/sdk/src/coverage/skipped.ts
index d5ff5f965a..86b50226f5 100644
--- a/packages/sdk/src/coverage/skipped.ts
+++ b/packages/sdk/src/coverage/skipped.ts
@@ -402,6 +402,7 @@ export const storageBacklog = [
'listInitiatives',
'listOccurrences',
'listReminders',
+ 'listReminderCollection',
'listTeamOutOfOffice',
'listUserApiKeys',
// Meeting management uses the generated client.
diff --git a/services/document_storage_service/src/api/swagger.rs b/services/document_storage_service/src/api/swagger.rs
index 7e081b38db..bffbab2538 100644
--- a/services/document_storage_service/src/api/swagger.rs
+++ b/services/document_storage_service/src/api/swagger.rs
@@ -372,6 +372,7 @@ use utoipa::OpenApi;
reminders::inbound::axum_router::get_email_followup_handler,
reminders::inbound::axum_router::set_email_followup_handler,
reminders::inbound::axum_router::list_reminders_handler,
+ reminders::inbound::axum_router::list_reminder_collection_handler,
reminders::inbound::axum_router::create_reminder_handler,
reminders::inbound::axum_router::get_reminder_handler,
reminders::inbound::axum_router::update_reminder_handler,