You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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:
Do not invent a fourth writer. If the rows must come from the action bodies to be honest, say so — that changes the shape of this card and is worth reporting rather than working around.
crm_forecast's precedent is relevant: demo-bootstrap.flow.ts claims owner-scoped seeded objects, and forecast_snapshot 与启动重播种的互动:每次 dev 重启后,当季出现一条无 owner 的幻影快照行与 owner 键控行并存 #702 ruled the current-quarter window has exactly one producer. Check whether sys_activity has the same ownership/visibility constraints before assuming plain seed rows are enough.
Keep it proportionate — 「不扩散需求」. This is demo data, not a feature.
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.
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:
Every row is an audit entry. The three writers that produce real interaction rows —
log_call,log_meeting,send_emailinsrc/actions/global.actions.tsandsrc/actions/contact.actions.ts— are action bodies, and nothing in the seed path calls them. So on a freshpnpm 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_activityrows 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:crm_forecast's precedent is relevant:demo-bootstrap.flow.tsclaims owner-scoped seeded objects, and forecast_snapshot 与启动重播种的互动:每次 dev 重启后,当季出现一条无 owner 的幻影快照行与 owner 键控行并存 #702 ruled the current-quarter window has exactly one producer. Check whethersys_activityhas the same ownership/visibility constraints before assuming plain seed rows are enough.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