Skip to content

Seed logged interactions so the lead Activity tab demonstrates something out of the box #1258

Description

@os-zhuang

Seed logged interactions so the lead Activity tab demonstrates something out of the box

Why now

#1209 fixed the Activity tab to filter to real interactions (types: ['task']) instead of rendering the database audit stream. That was correct — but it exposes an empty tab, because the demo dataset contains no interactions at all.

Measured on a seeded instance:

sys_activity: 200 rows
  updated: 116
  created:  83
  deleted:   1
  (completed / scheduled: 0)

Every row is an audit entry. The three writers that produce real interaction rows — log_call, log_meeting, send_email in src/actions/global.actions.ts and src/actions/contact.actions.ts — are action bodies, and nothing in the seed path calls them. So on a fresh pnpm demo:reset, a rep opening any lead's 活动 / Activity tab sees 暂无活动记录.

Why it matters for this repo specifically

The charter is 「hotcrm 主要是展现平台能力」. An Activity tab that is honest and empty demonstrates less than one that is honest and populated: the timeline component, the interaction model, and the "what did we do with this lead" workflow are all real platform capabilities that the exemplar currently ships switched off in its own demo data.

This is the tab a salesperson opens before every follow-up call. Shipping it blank is the difference between a demo that shows a working CRM and one that shows an empty shell.

Scope

A handful of sys_activity rows for the demo leads/accounts that already carry a narrative — enough that the tab reads like a CRM someone has used, not a fixture. Notes:

Provenance

Maintainer decision in session, verbatim (未译): 「加种子互动,顺带把 #1257 排了」 — taken after seeing the before/after in a browser: the tab went 活动 (3) → 活动 (0) on the same record once #1209 landed.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmetadataDeclarative metadata — schema, security posture, UI surfaces

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions