feat: add long-term projects with AI creation

- Add project model, schema v4, sync triggers, and server support\n- Add project panel, deadline countdown, manual create/edit/complete/delete\n- Parse AI project operations and show them in the proposal diff\n- Sync projects to Android and display them read-only\n- Rebuild AppImage and update validation docs and screenshots
This commit is contained in:
Misaki
2026-10-31 15:52:48 +08:00
parent 9dae003b93
commit 35cabb37b2
54 changed files with 1722 additions and 41 deletions
@@ -0,0 +1,60 @@
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.7/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
> Task :app:checkKotlinGradlePluginConfigurationErrors
> Task :app:checkDebugAarMetadata UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:mapDebugSourceSetPaths UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources UP-TO-DATE
> Task :app:packageDebugResources UP-TO-DATE
> Task :app:parseDebugLocalResources UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksDebug UP-TO-DATE
> Task :app:processDebugMainManifest UP-TO-DATE
> Task :app:processDebugManifest UP-TO-DATE
> Task :app:processDebugManifestForPackage UP-TO-DATE
> Task :app:processDebugResources UP-TO-DATE
> Task :app:compileDebugKotlin UP-TO-DATE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:compileDebugJavaWithJavac NO-SOURCE
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders NO-SOURCE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets UP-TO-DATE
> Task :app:compressDebugAssets UP-TO-DATE
> Task :app:desugarDebugFileDependencies UP-TO-DATE
> Task :app:dexBuilderDebug UP-TO-DATE
> Task :app:mergeDebugGlobalSynthetics UP-TO-DATE
> Task :app:processDebugJavaRes UP-TO-DATE
> Task :app:mergeDebugJavaResource UP-TO-DATE
> Task :app:checkDebugDuplicateClasses UP-TO-DATE
> Task :app:mergeDebugStartupProfile UP-TO-DATE
> Task :app:mergeExtDexDebug UP-TO-DATE
> Task :app:mergeLibDexDebug UP-TO-DATE
> Task :app:mergeProjectDexDebug UP-TO-DATE
> Task :app:mergeDebugJniLibFolders UP-TO-DATE
> Task :app:mergeDebugNativeLibs NO-SOURCE
> Task :app:stripDebugDebugSymbols NO-SOURCE
> Task :app:validateSigningDebug UP-TO-DATE
> Task :app:writeDebugAppMetadata UP-TO-DATE
> Task :app:writeDebugSigningConfigVersions UP-TO-DATE
> Task :app:packageDebug UP-TO-DATE
> Task :app:createDebugApkListingFileRedirect UP-TO-DATE
> Task :app:assembleDebug UP-TO-DATE
> Task :app:bundleDebugClassesToRuntimeJar UP-TO-DATE
> Task :app:bundleDebugClassesToCompileJar UP-TO-DATE
> Task :app:compileDebugUnitTestKotlin UP-TO-DATE
> Task :app:preDebugUnitTestBuild UP-TO-DATE
> Task :app:javaPreCompileDebugUnitTest UP-TO-DATE
> Task :app:compileDebugUnitTestJavaWithJavac NO-SOURCE
> Task :app:processDebugUnitTestJavaRes UP-TO-DATE
> Task :app:testDebugUnitTest UP-TO-DATE
BUILD SUCCESSFUL in 9s
41 actionable tasks: 1 executed, 40 up-to-date
APK: android/app/build/outputs/apk/debug/app-debug.apk (6.6 MB)
JVM unit tests: LwwTest 3, TimeUtilsTest 3, CompletionMergeTest 2; 8 passed, 0 failed.
+16 -9
View File
@@ -9,9 +9,16 @@ Preset CMake variables:
-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
-- Configuring done (0.2s)
-- Generating done (0.0s)
-- Generating done (0.1s)
-- Build files have been written to: /home/misaki/MisakiCodes/Schedule/build/linux-gcc-release
[1/1] Building Go sync server
[1/9] Automatic MOC and UIC for target schedule_ui
[2/8] Building Go sync server
[3/8] Building CXX object client/src/CMakeFiles/schedule_ui.dir/ui/panels/ProjectCard.cpp.o
[4/8] Linking CXX static library client/src/libschedule_ui.a
[5/8] Linking CXX executable client/tests/test_grid
[6/8] Linking CXX executable client/tests/test_mainwindow
[7/8] Linking CXX executable bin/Schedule
[8/8] Linking CXX executable client/tests/test_compactwindow
Installing application files...
-- Install configuration: "Release"
-- Installing: /home/misaki/MisakiCodes/Schedule/build/linux-gcc-release/AppDir/usr/./Schedule
@@ -416,18 +423,18 @@ Generating squashfs...
Parallel mksquashfs: Using 12 processors
Creating 4.0 filesystem on /home/misaki/MisakiCodes/Schedule/dist/AI-Schedule-0.1.0-x86_64.AppImage, block size 131072.
[===============================================================/] 746/746 100%
[===============================================================/] 747/747 100%
Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
compressed data, compressed metadata, compressed fragments,
compressed xattrs, compressed ids
duplicates are removed
Filesystem size 34362.88 Kbytes (33.56 Mbytes)
41.71% of uncompressed filesystem size (82381.50 Kbytes)
Inode table size 4261 bytes (4.16 Kbytes)
41.69% of uncompressed inode table size (10220 bytes)
Directory table size 2467 bytes (2.41 Kbytes)
41.90% of uncompressed directory table size (5888 bytes)
Filesystem size 34396.47 Kbytes (33.59 Mbytes)
41.70% of uncompressed filesystem size (82486.72 Kbytes)
Inode table size 4271 bytes (4.17 Kbytes)
41.77% of uncompressed inode table size (10224 bytes)
Directory table size 2463 bytes (2.41 Kbytes)
41.83% of uncompressed directory table size (5888 bytes)
Number of duplicate files found 13
Number of inodes 232
Number of files 147
+1 -1
View File
@@ -1 +1 @@
2314cec2b9f09aaf9a69d4cf8725e6d68058f383bd9c0a6d419658ee51bdc9bb dist/AI-Schedule-0.1.0-x86_64.AppImage
4413057bb4e10df4824d1ff4dc8c009cdaafbd5fd2b91c066fca950cb97fede9 dist/AI-Schedule-0.1.0-x86_64.AppImage
Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 74 KiB

+29
View File
@@ -0,0 +1,29 @@
Test project /home/misaki/MisakiCodes/Schedule/build/linux-gcc
Start 1: go_server_tests
1/12 Test #1: go_server_tests .................. Passed 0.12 sec
Start 2: storage
2/12 Test #2: storage .......................... Passed 0.02 sec
Start 3: services
3/12 Test #3: services ......................... Passed 0.05 sec
Start 4: grid
4/12 Test #4: grid ............................. Passed 0.39 sec
Start 5: mainwindow
5/12 Test #5: mainwindow ....................... Passed 1.26 sec
Start 6: compactwindow
6/12 Test #6: compactwindow .................... Passed 4.66 sec
Start 7: config
7/12 Test #7: config ........................... Passed 0.02 sec
Start 8: scheduler
8/12 Test #8: scheduler ........................ Passed 0.01 sec
Start 9: energy
9/12 Test #9: energy ........................... Passed 0.00 sec
Start 10: ai
10/12 Test #10: ai ............................... Passed 0.12 sec
Start 11: openai_provider
11/12 Test #11: openai_provider .................. Passed 0.21 sec
Start 12: sync_integration
12/12 Test #12: sync_integration ................. Passed 11.41 sec
100% tests passed, 0 tests failed out of 12
Total Test time (real) = 18.29 sec
+7
View File
@@ -0,0 +1,7 @@
? github.com/misaki/Schedule/server/cmd/server [no test files]
ok github.com/misaki/Schedule/server/internal/api (cached)
? github.com/misaki/Schedule/server/internal/auth [no test files]
? github.com/misaki/Schedule/server/internal/config [no test files]
? github.com/misaki/Schedule/server/internal/model [no test files]
ok github.com/misaki/Schedule/server/internal/service (cached)
ok github.com/misaki/Schedule/server/internal/store (cached)
+1 -1
View File
@@ -17,7 +17,7 @@
```text
dist/AI-Schedule-0.1.0-x86_64.AppImage
大小:约 34 MB
SHA-256:2314cec2b9f09aaf9a69d4cf8725e6d68058f383bd9c0a6d419658ee51bdc9bb
SHA-256:4413057bb4e10df4824d1ff4dc8c009cdaafbd5fd2b91c066fca950cb97fede9
```
脚本会:
+84
View File
@@ -0,0 +1,84 @@
# 阶段 4.4 验证报告:长期项目 / AI 识别 / 跨端展示
> 日期:2026-10-31
> 环境:Ubuntu 24.04 / Qt 6.6.3 / Android SDK 34 / Go 1.27.1
## 1. 本次交付
1. **Project 领域模型**:长期项目拥有标题、说明、模糊截止日期、优先级、状态;不创建 timeblock,不参与日常排程。
2. **SQLite schema v4**:新增 `project` 表与 insert/update/delete outbox 触发器;`entity_type=project` 进入同步变更流。
3. **桌面 UI**:
- 今日任务面板顶部新增「长期项目」区,显示剩余天数/逾期状态。
- 文件夹按钮手工新建长期项目;项目卡片可编辑、标记完成、删除。
- 手工项目对话框包含标题、说明、截止日期。
4. **AI 识别**:
- Prompt 增加长期项目规则和 `type=project` 操作。
- 跨多天/数周/数月的模糊目标生成长期项目 Diff,而不是塞进某一天。
- Diff 卡片显示「长期项目」和截止日期,接受后写入项目表;AI 不直接写库。
- AI 上下文包含已有长期项目,降低重复创建概率。
5. **同步**:Go 服务端接受 `project` 变更;桌面双端项目创建/修改/删除集成测试通过。
6. **Android**:接收并只读展示长期项目及截止倒计时(移动端暂不支持创建/编辑)。
## 2. 验证
```bash
cmake --preset linux-gcc
cmake --build --preset linux-gcc --clean-first -j$(nproc)
ctest --preset linux-gcc
cd server && go test ./...
cd android && ./gradlew :app:assembleDebug :app:testDebugUnitTest
```
| 项目 | 结果 |
|---|---|
| 桌面全量构建 | 成功,0 警告 |
| 桌面 `ctest` | **12/12 通过** |
| 项目 CRUD/持久化 | 通过(`test_services::projectCrudAndPersistence`) |
| AI 项目操作 | 通过(`test_ai::createsLongTermProjectFromOperation`) |
| 双桌面同步 | 通过(`test_sync_integration`:创建/更新/删除项目) |
| Go 服务端 | `go test ./...` 通过 |
| Android APK | Debug 构建成功,约 6.6 MB |
| Android JVM 测试 | 8/8 通过 |
输出:
- [`ctest-phase-4-4.txt`](ctest-phase-4-4.txt)
- [`go-test-phase-4-4.txt`](go-test-phase-4-4.txt)
- [`android-build-test-phase-4-4.txt`](android-build-test-phase-4-4.txt)
## 3. 界面截图
| 截图 | 说明 |
|---|---|
| [`project-dialog-dark.png`](project-dialog-dark.png) / [`project-dialog-light.png`](project-dialog-light.png) | 手工创建长期项目 |
| [`compact-dark.png`](compact-dark.png) | 紧凑窗口中的长期项目 + 今日任务 |
| [`schedule-day.png`](schedule-day.png) | 详细日程中的长期项目区 |
## 4. 行为说明
- 长期项目只保存截止日期,不指定具体小时,也不占用日程网格。
- 项目列表按截止日期升序;没有截止日期的项目排在最后。
- 项目完成(done)后会从活动列表隐藏;目前没有「已完成项目」历史视图。
- AI 只负责创建项目;修改/完成/删除由人工操作。
- AI 不会自动把项目拆成每日执行块;需要用户明确要求拆解时才会创建具体任务。
- AI 创建的项目通过普通 `project` 同步变更同步到其他桌面端和 Android。
- Android 当前只展示项目,不提供项目创建/编辑入口。
## 5. 已知限制
1. Android 项目为只读;需要在桌面端创建/编辑。
2. AI 项目操作只支持 create,不支持项目 update/delete 的 Diff。
3. 项目截止日期为日期级,不支持「月底前」「Q4」等自然语言时间段的独立结构化表示。
4. 没有项目进度百分比、任务分解清单或里程碑。
5. Prompt 增加长期项目规则后尚未重新跑完整 50 条真实模型回归。
6. 旧客户端需升级到 schema v4(桌面)或 DB v3(Android)才能正确同步项目。
## 6. 人工验收建议
1. 点击今日任务面板的文件夹按钮,创建「飞行控制器项目」,确认顶部项目卡片和剩余天数。
2. 编辑截止日期、标记完成、删除项目,确认列表与同步数据一致。
3. 对 AI 说「一个月内完成飞行控制器项目,先不要排具体时间」,确认 Diff 卡片是「长期项目」而不是时间块。
4. 接受后确认项目进入列表、日程网格没有新增时间块。
5. 在另一台桌面端/Android 上确认项目同步出现,安卓端仅展示。
6. 用已有长期项目再次提出相同目标,确认 AI 上下文能避免明显重复创建。
Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 103 KiB