Skip to content

record:activity drops every sys_activity.type: "scheduled" row, and 10 of FeedItemType's 13 kinds have no producer at all #5840

Description

@claude

Rebuilt transfer (transfer API unavailable in this session). Origin: objectstack-ai/objectstack#11306, filed by os-zhuang at 2026-08-23T09:50:07Z. Moved by the triage seat (session session_01LsWeHbPzR3i6mmonFfGykk, 2026-08-23) under file-at-destination: record:activity is a console/UI renderer (source lives in this repo; packages/console in objectstack is its built artifact).

record:activity maps sys_activity.type onto feed-item kinds through a hardcoded table, and scheduled has no entry — so a scheduled (not-yet-held) meeting is discarded before any filter runs and can never appear on any activity timeline, whatever the page authors.

Measured

From the shipped bundle (@objectstack/console 17.1.0, dist/assets/plugins-views-BaBStVok.js):

Ya={created:'field_change',updated:'field_change',deleted:'field_change',assigned:'field_change',shared:'field_change',system:'system',completed:'task',commented:undefined,mentioned:undefined,login:undefined,logout:undefined};functionto(e,t){letn=Ya[String(e?.type)];returnn ? {} : null;}// unmapped -> dropped

'scheduled' is not a key, so Ya['scheduled'] is undefined and the row is dropped by to() — upstream of showCompleted, upstream of types, upstream of everything a page can configure.

Executed over a lead's real rows:

created -> field_change
updated -> field_change
completed -> task
scheduled -> undefined <- dropped, 1 of 6 rows never reaches the timeline
system -> system

Who writes scheduled

HotCRM's schedule_meeting action — shipped for crm_lead, crm_contact, crm_account, crm_opportunity and crm_case — writes sys_activity rows with type: EVENT_STATUS === 'held' ? 'completed' : 'scheduled'. The held branch reaches the timeline; the scheduled branch is written, stored, queryable, and invisible on the surface built to display it. commented and mentioned are unmapped the same way, which is more surprising still on a component whose own props include showCommentInput / enableMentions.

The other half: declared kinds nothing can produce

FeedItemType (@objectstack/spec/ui) publishes 13 kinds:

comment | field_change | task | event | email | call | note | file |
record_create | record_delete | approval | sharing | system

Only three are reachable through Ya from sys_activity: field_change, task, system. The other ten are authorable — they parse, they typecheck, build accepts them — and no data path produces them. An author filtering to types: ['event'] to show meetings gets an empty tab and no diagnostic; that is a declared surface enforced by nothing, and it reads to an author (or to an AI writing metadata) as a working feature.

Suggested direction

Either extend the map so the vocabulary sys_activity actually stores reaches the timeline (scheduledevent is the obvious pairing and would make the declared event kind reachable at the same time), or narrow FeedItemType to the kinds a producer exists for. The present state is the worst of both: the enum promises ten kinds that cannot arrive, and a real stored row silently does not.

Found while fixing objectstack-ai/hotcrm#1209; not worked around there, per 「平台相关的功能应该在平台中实现」.


Generated by Claude Code

Metadata

Metadata

Assignees

Labels

domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:queue

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions