feat: support scoped Smart Heartbeat plans

Smart Heartbeat plans were implicitly bound to one active project and duplicated across multiple configuration surfaces. Plans can now target Global or selected projects from one authoritative editor, aggregate bounded input across that scope, validate project-specific outputs, and preserve existing data through the schema migration.

Reports remain unscoped with frozen scope metadata, while duplicate Heartbeat forms are removed from Settings and Task Center.

Release note: 智能心跳计划现在可从统一入口选择 Global 或一个、多个 Project;旧配置和历史会自动保留,项目级记忆与后续任务会严格写入所选范围。
This commit is contained in:
mesalogo
2026-08-19 07:51:52 +08:00
parent 28b1590749
commit 3935f50017
21 changed files with 1218 additions and 542 deletions
@@ -127,7 +127,7 @@ describe('AssistantDatabase', () => {
user_version: number
}
).user_version
).toBe(20)
).toBe(21)
expect(
current
.prepare(
@@ -231,7 +231,7 @@ describe('AssistantDatabase', () => {
user_version: number
}
).user_version
).toBe(20)
).toBe(21)
expect(
current
.prepare(
@@ -2834,7 +2834,7 @@ describe('AssistantDatabase', () => {
})
database.createHeartbeatConfig(
{
projectId: project.id,
scope: { kind: 'projects', projectIds: [project.id] },
name: '待清除心跳',
timezone: 'Asia/Shanghai',
recurrence: { type: 'daily', localTime: '09:00' },