feat: add growth tracking page and related functionality

- Implemented a new Growth page to track practice time and trends.
- Added API integration for fetching review data.
- Created components for displaying practice statistics and trends.
- Updated navigation titles for the main index and growth pages.
- Removed unused styles from the index page.
- Introduced a Projects management page for adding and editing practice projects.
- Developed a Record form for logging practice sessions with validation.
- Added utility functions for date manipulation and duration formatting.
- Implemented error handling and session management in the practice service.
- Created unit tests for the practice service to ensure reliability.
This commit is contained in:
yuxuanhui
2026-09-29 13:47:26 +08:00
parent 4b42b55928
commit 6224ef5980
49 changed files with 2824 additions and 71 deletions
+31
View File
@@ -0,0 +1,31 @@
# Domain Docs
本仓库采用 single-context 布局,前端和后端共享根目录的领域文档。
## 探索前读取
- 根目录的 `CONTEXT.md`:领域术语、概念和关系。
- 根目录的 `docs/adr/`:仅阅读与当前工作相关的架构决策。
文件不存在时直接继续,不把缺失视为阻塞,也不主动建议预先创建。
后续由 `domain-modeling` 在术语或决策得到验证、且用户明确批准后
按需创建。
## 文件布局
- `CONTEXT.md`:仓库共享的领域上下文。
- `docs/adr/NNNN-<slug>.md`:按编号保存架构决策。
- `miniprogram/` 和 `backend/` 继续按各自的项目约定开发。
## 术语一致性
事项标题、重构建议、假设和测试名称中的领域概念,
使用 `CONTEXT.md` 已定义的术语,遵循其明确规定的用词边界。
所需概念尚未定义时,先判断是否误用了项目之外的术语;
确有缺口时,将其列为后续领域建模的候选。
## 决策冲突
输出与现有 ADR 冲突时,明确指出对应 ADR、冲突内容及重新讨论的理由,
不静默覆盖已有决策。
+40
View File
@@ -0,0 +1,40 @@
# Issue tracker: Local Markdown
本仓库的事项和规格以 Markdown 文件保存在 `.scratch/`。
## 文件约定
- 每个功能一个目录:`.scratch/<feature-slug>/`。
- 规格文件:`.scratch/<feature-slug>/spec.md`。
- 实现事项:`.scratch/<feature-slug>/issues/<NN>-<slug>.md`,
从 `01` 开始编号,每个事项一个文件。
- 分流状态写在事项文件顶部附近的 `Status:` 行;
使用 `triage-labels.md` 中的标签字符串。
- 评论和讨论追加到文件底部的 `## Comments` 下。
## 发布和读取
技能要求“发布到 issue tracker”时,在对应功能目录中创建文件,
按需创建目录。
技能要求“获取相关 ticket”时,读取指定路径的事项文件。
仅提供编号时,在对应功能目录中定位。
## Wayfinding
供 `wayfinder` 使用,一个地图文件对应多个子事项文件。
- 地图:`.scratch/<effort>/map.md`,包含 Notes、
Decisions-so-far 和 Fog。
- 子事项:`.scratch/<effort>/issues/<NN>-<slug>.md`,
从 `01` 编号,正文记录待解决的问题。
- 类型:顶部的 `Type:` 行使用 research、prototype、grilling 或 task。
- 此流程的工作状态:`Status: open`、`Status: claimed`、
`Status: resolved`。
- 依赖:顶部用 `Blocked by: NN, NN` 记录前置事项;
所有前置事项均为 resolved 时解除阻塞。
- 选取:扫描当前 effort 的 issues 目录,按编号选择第一个
open 且未被阻塞的事项。
- 领取:开始工作前写入 `Status: claimed` 并保存。
- 解决:在 `## Answer` 下追加结论,写入 `Status: resolved`,
再向地图的 Decisions-so-far 追加结论摘要及事项链接。
+15
View File
@@ -0,0 +1,15 @@
# Triage Labels
技能中的五种标准分流角色映射如下。
本地 Markdown 事项的 `Status:` 行使用“本仓库标签”列。
| 标准角色 | 本仓库标签 | 含义 |
| --- | --- | --- |
| needs-triage | needs-triage | 等待维护者评估 |
| needs-info | needs-info | 等待补充信息 |
| ready-for-agent | ready-for-agent | 需求明确,可交由代理实现 |
| ready-for-human | ready-for-human | 需要人工实现 |
| wontfix | wontfix | 不予处理 |
技能提及某个分流角色时,使用对应的本仓库标签。
后续调整标签名称时,修改本仓库标签列。