Skip to content

record:activity's authorable types filter is a CLOSED enum over a vocabulary #11507 just ruled open #11658

Description

@os-sam

Found while executing the 2026-08-24 ruling on #11507 (declaration half, domain:services lane). Filed unassigned — not touched there, because the fix is a packages/spec change and that is another seat's call (fences on that card: no packages/spec/**, no objectui).

What was measured

packages/spec/src/ui/component.zod.ts:1088RecordActivityProps:

types: z.array(FeedItemType).optional().describe('Feed item types to show (default: all)'),

FeedItemType (packages/spec/src/data/feed.zod.ts:20) is a closed z.enum of 13 UI kinds (comment, field_change, task, event, email, call, note, file, record_create, record_delete, approval, sharing, system). It is the vocabulary the renderer maps sys_activity.typeonto: objectui's packages/plugin-detail/src/renderers/recordActivityFeed.ts keys its feed-kind map on the activity type and emits a FeedItemType.

The maintainer ruled on 2026-08-24 (#11507, direction 4) that sys_activity.type is an open, author-extensible vocabulary — the declared options are the platform built-in set, ADR-0052 §5b.2 stays a sanctioned author write path — and, verbatim: "every closed map over this vocabulary is now the bug".

This is that closed map one level removed, and it is authorable surface, not just renderer internals: an author who contributes an activity type (say scheduled, which hotcrm writes today) cannot name it in types: [...]. The best the renderer can do is fold it into some built-in kind, at which point the filter cannot separate it from the rows that genuinely are that kind.

Why it is filed separately rather than fixed in the #11507 PR

Options, unranked — this needs the spec seat's judgement, not mine

  1. Leave types closed and document it as "built-in kinds only" — cheapest, and honest only if authors genuinely never need to filter on their own kinds.
  2. Widen the element type to z.union([FeedItemType, z.string()]) (or a branded open string) so an author-contributed kind is nameable — the shape the ruling's logic points at, at the cost of losing the named rejection on a typo'd built-in.
  3. Keep the closed enum but declare a documented other/fallback member so unknown source types have a nameable bucket.

Not measured

Refs: #11507 (the ruling) · ADR-0052 §5b.2 (the author write path) · objectstack-ai/objectui#5840

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions