feat: 新增日程面板、复盘页面与 Agent 读写接口
- 日程:单次/每日/每周/每月重复,JSON 存储,月历按优先级着色圆点 + 悬停提示 - 复盘页:可自定义折线图卡片(SVG) + 每日心得总览(按日期/任务展开) - Agent 接口:GET /api/agent/overview 读日程+进度,POST /api/agent/schedules 建日程(PPM_API_TOKEN Bearer 鉴权) - 导出/导入/统计纳入日程与图表;47 项测试全绿
This commit is contained in:
@@ -16,12 +16,15 @@ ALLOWED_COMPONENTS = {
|
||||
"metric-progress",
|
||||
"activity-heatmap",
|
||||
"task-settings",
|
||||
"schedule-board",
|
||||
"review-charts",
|
||||
"review-notes",
|
||||
}
|
||||
|
||||
# 每个组件允许出现的页面与区域。组件在各自区域内必须单例,避免重复 ID
|
||||
# 与重复事件绑定;跨页/跨区错放(例如把 today-record 放进首页)视为非法布局。
|
||||
COMPONENT_SCOPES: dict[str, tuple[tuple[str, ...], str]] = {
|
||||
"task-list": (("home", "task-detail"), "sidebar"),
|
||||
"task-list": (("home", "task-detail", "review"), "sidebar"),
|
||||
"overview-summary": (("home",), "main"),
|
||||
"task-progress-grid": (("home",), "main"),
|
||||
"task-gantt": (("home",), "main"),
|
||||
@@ -30,6 +33,9 @@ COMPONENT_SCOPES: dict[str, tuple[tuple[str, ...], str]] = {
|
||||
"metric-progress": (("task-detail",), "main"),
|
||||
"activity-heatmap": (("task-detail",), "main"),
|
||||
"task-settings": (("task-detail",), "main"),
|
||||
"schedule-board": (("home",), "main"),
|
||||
"review-charts": (("review",), "main"),
|
||||
"review-notes": (("review",), "main"),
|
||||
}
|
||||
|
||||
FALLBACKS = {
|
||||
@@ -42,6 +48,7 @@ FALLBACKS = {
|
||||
{"component": "overview-summary"},
|
||||
{"component": "task-progress-grid"},
|
||||
{"component": "task-gantt"},
|
||||
{"component": "schedule-board"},
|
||||
],
|
||||
},
|
||||
},
|
||||
@@ -59,6 +66,14 @@ FALLBACKS = {
|
||||
],
|
||||
},
|
||||
},
|
||||
"review": {
|
||||
"schemaVersion": 1,
|
||||
"page": "review",
|
||||
"regions": {
|
||||
"sidebar": [{"component": "task-list"}],
|
||||
"main": [{"component": "review-charts"}, {"component": "review-notes"}],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -102,4 +117,3 @@ def load_layout(layout_dir: Path, page: str) -> dict[str, Any]:
|
||||
except (OSError, json.JSONDecodeError):
|
||||
pass
|
||||
return deepcopy(FALLBACKS[page])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user