1598 lines
81 KiB
Markdown
1598 lines
81 KiB
Markdown
# YINIAN Desktop Next Phase Plan
|
||
|
||
## Goal
|
||
|
||
Move from M1 foundation closure to an M2 product slice that a business customer can actually pilot: authenticated desktop entry, stable workspace context, visible daily operations surface, skill lifecycle primitives, and a clear path to connect the real server without disturbing ClawX/OpenClaw basics.
|
||
|
||
## 2026-06-04 应用中心清理后项目体检
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 审视移除两个应用中心内置应用后的项目结构、残留引用、打包链路、测试状态和当前风险。
|
||
- 区分本次清理范围与工作区中已有的模型配置、系统文档、渠道插件等未提交改动。
|
||
|
||
Tasks:
|
||
- [x] 扫描应用中心/NianxxPlay/Product Center 残留引用与删除产物。
|
||
- [x] 检查入口路由、Host API、打包脚本、README/i18n/测试是否一致。
|
||
- [x] 跑针对性验证,必要时补一个小的清理修复。
|
||
- [x] 汇总当前项目结构、风险和下一步建议。
|
||
|
||
Verification:
|
||
- `pnpm exec vitest run tests/unit/app-center.test.tsx tests/unit/app-routes.test.ts`: passed.
|
||
- `pnpm exec tsc --noEmit --pretty false`: passed.
|
||
- `pnpm run build:vite`: passed with existing dynamic-import/chunk-size warnings.
|
||
- `git diff --check`: passed.
|
||
- `pnpm test`: passed, 111 files / 712 tests, with existing MaxListeners warnings.
|
||
|
||
## 2026-06-04 Git 推送前安全与安装性整理
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 将当前工作推送到 `origin/main`。
|
||
- 确保提交不包含真实密钥、token、API key、client secret、证书、`.env.local`、打包产物或本地生成报告。
|
||
- 让客户/测试人员能从仓库快速安装、配置、运行或打包。
|
||
|
||
Tasks:
|
||
- [x] 审计 git 状态、远端和待提交范围。
|
||
- [x] 扫描已跟踪和未跟踪源码中的常见密钥/token/API key 模式。
|
||
- [x] 将 `.env.example` 改成纯占位模板,移除真实服务域名/Basic 示例/凭据示例。
|
||
- [x] 忽略本地生成 `.docx` 报告,确认 `build/`、`release/`、`.env.local` 被忽略。
|
||
- [x] 运行最终验证并整理 staged 内容。
|
||
- [x] 提交并推送到远端仓库。
|
||
|
||
Verification:
|
||
- `git diff --check`: passed.
|
||
- `pnpm exec tsc --noEmit --pretty false`: passed.
|
||
- `pnpm test`: passed, 111 files / 712 tests, with existing MaxListeners warnings.
|
||
- Pushed `84128db` to `origin/main`.
|
||
|
||
## 2026-06-04 正式版本发布
|
||
|
||
Status: in_progress
|
||
|
||
Goal:
|
||
- 发布一个非 pilot 的正式版本安装包,并推送源码版本提交和正式 tag 到仓库。
|
||
- 正式包不能内置模型 API key、token、client secret、`.env.local` 或客户专属配置。
|
||
|
||
Tasks:
|
||
- [x] 确认当前分支/远端干净且开发进程已停止。
|
||
- [x] 选择未占用的正式版本号 `0.1.24`。
|
||
- [x] 将 `package.json` 升级到 `0.1.24`,暂不创建正式 tag。
|
||
- [x] 运行非 pilot 打包,生成正式 macOS arm64 安装包。
|
||
- [x] 验证正式包资源不含内测模型凭据或已清除的应用中心内置应用。
|
||
- [ ] 提交版本更新并创建 `v0.1.24` tag。
|
||
- [ ] 推送 `main` 和 `v0.1.24` 到远端。
|
||
|
||
Notes:
|
||
- `pnpm version 0.1.24 --no-git-tag-version` 仍触发了项目 `postversion` hook 的 `git push --tags`,因此本地历史 tags 被推送到 `origin`。未创建或推送 `v0.1.24`。
|
||
- 正式非 pilot 包产物:
|
||
- `release/智念助手-0.1.24-mac-arm64.dmg`
|
||
- `release/智念助手-0.1.24-mac-arm64.zip`
|
||
- SHA256:
|
||
- dmg: `562931df3f91ff538f74e651adeb03c48e962b6e41e2bc6a0c0ef166b0258a89`
|
||
- zip: `b7b8a0551dc5314cf77f8112c23167c42a55989f6ca2d5282dc4e1d7008ca7fb`
|
||
- `codesign --verify --deep --strict --verbose=2 release/mac-arm64/智念助手.app`: passed.
|
||
- `hdiutil verify release/智念助手-0.1.24-mac-arm64.dmg`: passed.
|
||
- `spctl --assess --type execute --verbose=4 release/mac-arm64/智念助手.app`: rejected as `Unnotarized Developer ID`; Apple notarization env vars are unset, so this build is signed but not notarized.
|
||
- `build/yinian-internal/model-auth-profiles.json` and packaged `resources/yinian-internal/model-auth-profiles.json` both report `"bundled": false`.
|
||
|
||
## 2026-06-03 模型 API 自定义 Provider 同步修复
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 让设置中的模型 API 配置成为运行时唯一默认来源,避免切换 DeepSeek/自定义模型后仍调用 MiniMax。
|
||
- 移除启动诊断里会重新种回 `yinian-model/custom-model` 或 MiniMax 旧默认的逻辑。
|
||
|
||
Tasks:
|
||
- [x] 对比 provider account store 与 `~/.openclaw/openclaw.json`,确认默认源漂移。
|
||
- [x] 将 provider 保存、更新、默认切换后的 Gateway 刷新策略改为 restart。
|
||
- [x] 让 legacy provider 读取优先接入 account-store 默认值。
|
||
- [x] 清理 `model-diagnostics` 中的旧占位 provider/auth 兜底。
|
||
- [x] 补充 DeepSeek account 默认同步、占位 provider 清理和不再种回 MiniMax 的单测。
|
||
- [x] 修复本机运行时配置并确认 Gateway 使用 DeepSeek 启动。
|
||
|
||
Verification:
|
||
- `pnpm exec vitest run tests/unit/model-diagnostics.test.ts tests/unit/provider-runtime-sync.test.ts`: passed.
|
||
- `pnpm exec vitest run tests/unit/model-diagnostics.test.ts tests/unit/provider-runtime-sync.test.ts tests/unit/provider-service-stale-cleanup.test.ts tests/unit/yinian-initializer.test.ts tests/unit/settings-advanced-model-config.test.tsx`: passed.
|
||
- `pnpm exec tsc --noEmit --pretty false`: passed.
|
||
- `pnpm run build:vite`: passed with existing Vite dynamic-import/chunk-size warnings.
|
||
- `git diff --check`: passed.
|
||
- Runtime check: `agents.defaults.model.primary = deepseek/deepseek-v4-pro`; `yinian-model` provider/auth leftovers removed.
|
||
|
||
## 2026-06-03 Agent 系统级文档管理
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 在设置中新增一个管理 Agent 系统级文档的模块,覆盖 soul、agent、tool 这类运行时文档。
|
||
- 让用户可以查看、编辑、恢复默认内容,并尽量贴合 OpenClaw 现有文件路径和配置边界。
|
||
|
||
Tasks:
|
||
- [x] 定位 OpenClaw/Agent 系统文档的真实落盘路径与命名。
|
||
- [x] 新增主进程/Host API 的系统文档读写能力。
|
||
- [x] 在设置页新增系统文档管理入口和编辑 UI。
|
||
- [x] 补充单测覆盖列表、保存、重置和 UI 行为。
|
||
- [x] 运行针对性测试和类型检查。
|
||
|
||
Verification:
|
||
- `pnpm exec vitest run tests/unit/agent-system-documents.test.ts tests/unit/agent-system-documents-routes.test.ts tests/unit/agent-system-documents-settings.test.tsx tests/unit/settings-advanced-model-config.test.tsx`: passed.
|
||
- `pnpm exec tsc --noEmit --pretty false`: passed.
|
||
- `pnpm run build:vite`: passed with existing dynamic-import/chunk-size warnings.
|
||
|
||
## 2026-05-14 渠道插件运行产物与飞书加固
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 修复客户侧 `openclaw-weixin` 安装为 TypeScript 源码包、缺少 Gateway 可加载 JS 入口的问题。
|
||
- 把官方飞书插件纳入内测包,解除“当前内测版本未启用该渠道”的硬禁用。
|
||
- 让同版本但缺运行入口的旧插件在启动或保存配置时自动被新镜像覆盖。
|
||
|
||
Tasks:
|
||
- [x] 将微信插件镜像编译为 `dist/index.js` 并修正 `package.json#openclaw.extensions`。
|
||
- [x] 新增 `@larksuite/openclaw-lark` 依赖并打包到 `openclaw-plugins/openclaw-lark`。
|
||
- [x] 安装器检测同版本 source-only 插件并自动重装。
|
||
- [x] 飞书保存前安装官方插件,并从 API/IPC/OpenClaw auth 过滤逻辑中解除禁用。
|
||
- [x] 补充插件安装、飞书配置和路由测试。
|
||
- [x] 用临时 HOME 跑 OpenClaw 插件扫描,确认微信/飞书均为 `loaded` 且无缺失依赖。
|
||
|
||
Verification:
|
||
- `pnpm run bundle:openclaw-plugins`: passed.
|
||
- OpenClaw temp-HOME plugin smoke: `openclaw-weixin` and `openclaw-lark` both `loaded`, diagnostics empty.
|
||
- `pnpm vitest run tests/unit/plugin-install.test.ts tests/unit/channel-config.test.ts tests/unit/channel-routes.test.ts tests/unit/config-sync.test.ts`: passed.
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm run package:mac:pilot:arm64`: passed; regenerated `release/智念助手-0.1.0-mac-arm64.dmg`.
|
||
- Packaged plugin check: app resources include `openclaw-weixin/dist/index.js` and `openclaw-lark/index.js`.
|
||
- `codesign --verify --deep --strict --verbose=2 release/mac-arm64/智念助手.app`: passed.
|
||
- `hdiutil verify release/智念助手-0.1.0-mac-arm64.dmg`: passed.
|
||
|
||
## 2026-05-14 客户安装初始化凭据失败加固
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 解释客户安装页卡在 10% 并显示“写入内测模型配置/准备文档处理环境”失败的原因。
|
||
- 加固初始化错误呈现,避免把未执行步骤误标为失败。
|
||
- 让缺少内测模型凭据的安装包显示可操作的明确原因。
|
||
|
||
Tasks:
|
||
- [x] 定位安装页步骤映射和主进程初始化流程。
|
||
- [x] 修复前端安装步骤失败映射和错误详情。
|
||
- [x] 修复主进程内测模型凭据缺失的诊断消息。
|
||
- [x] 补充单测覆盖非 pilot 包与安装页状态映射。
|
||
- [x] 运行验证并给出客户处理建议。
|
||
|
||
Verification:
|
||
- `pnpm vitest run tests/unit/setup-initialization.test.ts tests/unit/yinian-initializer.test.ts`: passed.
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm run package:mac:pilot:arm64`: passed.
|
||
- Packaged app resource check: `resources/yinian-internal/model-auth-profiles.json` has `bundled=true` and 2 MiniMax profile ids.
|
||
- `codesign --verify --deep --strict --verbose=2 release/mac-arm64/智念助手.app`: passed.
|
||
- `hdiutil verify release/智念助手-0.1.0-mac-arm64.dmg`: passed.
|
||
|
||
## 2026-05-13 macOS DMG 打包
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 生成可安装的 macOS DMG 包。
|
||
- 确认新增/预置 skills 默认随安装包进入 `resources/preinstalled-skills`。
|
||
|
||
Tasks:
|
||
- [x] 确认使用正式 `package:mac`,不使用会跳过预置技能的 `package:mac:local`。
|
||
- [x] 检查 `resources/skills/preinstalled-manifest.json` 与 preinstalled skills 打包链路。
|
||
- [x] 停止当前 dev 进程,避免 Electron/Gateway 干扰打包。
|
||
- [x] 重建 `build/preinstalled-skills` 并确认技能清单。
|
||
- [x] 执行 macOS arm64 DMG 打包。
|
||
- [x] 验证产物路径和 DMG 内预置技能资源。
|
||
|
||
Notes:
|
||
- `pnpm run package:mac` 首次执行在 `prep:mac-binaries` 阶段下载 x64 `uv` 时因 GitHub 连接超时中断;本机 arm64 `node`/`uv` 已存在,改走 `pnpm run package` + `electron-builder --mac --arm64 --publish never`。
|
||
|
||
Verification:
|
||
- `pnpm run package`: passed.
|
||
- `pnpm exec electron-builder --mac --arm64 --publish never`: passed.
|
||
- DMG: `release/智念助手-0.1.0-mac-arm64.dmg`.
|
||
- Packaged `.app` includes all 8 preinstalled skills: `docx`、`pdf`、`pptx`、`xlsx`、`design`、`html-slides`、`image-search`、`web-search`.
|
||
- `codesign --verify --deep --strict --verbose=2 release/mac-arm64/智念助手.app`: passed.
|
||
- `hdiutil verify release/智念助手-0.1.0-mac-arm64.dmg`: passed.
|
||
|
||
## 2026-05-13 对话 Markdown 与隐藏提示泄漏修复
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 防止业务回答准则作为可见内容污染真实对话。
|
||
- 增强会话内 Markdown 结构、表格展示,并把执行思考收成无框时间线。
|
||
|
||
Tasks:
|
||
- [x] 停止在 chat/cron 运行时消息里追加隐藏业务准则。
|
||
- [x] 历史里已有的隐藏准则在用户消息展示、标签和去重时自动剥离。
|
||
- [x] 为 Markdown 标题、列表、引用和表格增加工作台风格渲染。
|
||
- [x] 执行过程卡从边框卡片改为无框时间线。
|
||
- [x] 新对话空态删除品牌小标题和图标,只保留核心引导文案。
|
||
- [x] 补充测试并运行验证。
|
||
|
||
Verification:
|
||
- `pnpm vitest run tests/unit/chat-message.test.tsx tests/unit/chat-target-routing.test.ts tests/unit/cron-routes.test.ts tests/unit/business-guidance.test.ts`: passed, 4 files / 24 tests.
|
||
- `pnpm vitest run tests/unit/chat-page-execution-graph.test.tsx tests/unit/task-visualization.test.ts tests/unit/chat-store-history-retry.test.ts`: passed, 3 files / 18 tests.
|
||
- `pnpm vitest run tests/unit/chat-message.test.tsx tests/unit/chat-target-routing.test.ts tests/unit/cron-routes.test.ts tests/unit/chat-store-history-retry.test.ts`: passed, 4 files / 27 tests.
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm run build:vite`: passed with existing dynamic-import/chunk-size warnings.
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`: passed, 1 test.
|
||
- `pnpm exec playwright test --config=playwright.legacy.config.ts tests/e2e/yinian-visual-smoke.spec.ts`: passed, 1 test.
|
||
- `pnpm exec playwright test --config=playwright.legacy.config.ts tests/e2e/chat-table-header-light.spec.ts`: passed, 1 test after fixing the test route to load `/chat`.
|
||
- `git diff --check`: passed.
|
||
- `pnpm run typecheck`: passed after the new-chat empty-state cleanup.
|
||
|
||
Notes:
|
||
- The first `chat-table-header-light.spec.ts` attempt failed because the legacy E2E started on the default new-chat route and never loaded seeded chat history. The test now sets `#/chat` before reload.
|
||
|
||
## 2026-05-13 桌面任务提醒与业务回答渲染
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 将任务提醒从任务卡片状态升级为 Electron 桌面系统通知。
|
||
- 将业务型回答从纯 Markdown 增强为可扫读的结构化摘要 UI。
|
||
|
||
Tasks:
|
||
- [x] 新增 cron 完成事件到桌面通知的解析、去重和展示转换。
|
||
- [x] 主进程监听 Gateway cron 终态通知,弹出系统通知,点击回到任务中心并定位任务。
|
||
- [x] 任务中心支持 `?task=` 高亮目标任务。
|
||
- [x] 聊天消息识别“状态/依据/影响/下一步”等业务标签,渲染业务摘要面板。
|
||
- [x] 更新隐藏业务回答准则,引导 OpenClaw 输出稳定标签。
|
||
- [x] 补充单测并运行类型检查、构建和 Electron 冒烟。
|
||
|
||
Verification:
|
||
- `pnpm vitest run tests/unit/cron-desktop-reminder.test.ts tests/unit/chat-message.test.tsx tests/unit/tasks-page.test.tsx tests/unit/business-guidance.test.ts`: passed, 4 files / 20 tests.
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm run build:vite`: passed with existing dynamic-import/chunk-size warnings.
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`: passed, 1 test.
|
||
|
||
Notes:
|
||
- First E2E attempt failed because `pnpm run build:vite` was running in parallel and temporarily removed `dist/index.html`; a clean rerun after build completion passed.
|
||
|
||
## 2026-05-13 聊天页字体与 UI 统一
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 修正对话页字体、空态、消息气泡、执行过程和输入框与智念工作台整体 UI 不一致的问题。
|
||
|
||
Tasks:
|
||
- [x] 明确全局桌面中文系统字体栈,并让输入控件继承。
|
||
- [x] 将聊天外层从半透明玻璃感收敛为智念标准面板。
|
||
- [x] 将空态从卡片式居中块改成轻量无框状态。
|
||
- [x] 统一消息气泡、业务摘要、工具状态、文件/图片卡、执行过程卡的边框、圆角、底色与字号。
|
||
- [x] 统一聊天输入框、快捷任务 chip、知识库选择器和工具按钮样式。
|
||
- [x] 运行单测、类型检查、构建、主 E2E 和视觉截图验证。
|
||
|
||
Verification:
|
||
- `pnpm vitest run tests/unit/chat-message.test.tsx`: passed, 1 file / 8 tests.
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm run build:vite`: passed with existing dynamic-import/chunk-size warnings.
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`: passed, 1 test.
|
||
- `pnpm exec playwright test --config=playwright.legacy.config.ts tests/e2e/yinian-visual-smoke.spec.ts`: passed, 1 test.
|
||
- Visual chat screenshot reviewed at `test-results/yinian-visual/02-chat.png`.
|
||
|
||
## 2026-05-13 商品中心 Web 应用接入
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 在应用中心新增“商品中心”,内嵌 `https://ticket.nianxx.cn/`,用于酒店企业底价采购旅游资源。
|
||
- 当前版本不注入真实 SSO 凭证,但 URL 构造和宿主页面要留下后续服务端单点登录接入边界。
|
||
|
||
Tasks:
|
||
- [x] 调研目标站点和当前应用中心接入方式。
|
||
- [x] 新增商品中心应用配置、路由和内嵌 Web 宿主页。
|
||
- [x] 补充中英文文案和操作状态。
|
||
- [x] 增加应用中心/商品中心的单元或冒烟测试。
|
||
- [x] 运行验证并确认本地开发预览。
|
||
|
||
Notes:
|
||
- 目标站点当前页面标题为“一感旅游”,描述为景区商品采购、余额管理、订单退款、报表对账一体化工作台。
|
||
- `curl -I https://ticket.nianxx.cn/` 返回 `HTTP/2 200`,未看到 `X-Frame-Options` 或阻断性 `Content-Security-Policy`,可先按 iframe 内嵌处理。
|
||
|
||
Errors Encountered:
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts` 首次失败在找不到 `app-center-item-product-center`;原因是 Electron E2E 使用的 `dist` 仍是旧构建。下一步先运行 `pnpm run build:vite`,再重跑 E2E。
|
||
- 重建后 E2E 已进入 `product-center-page`,但中文 iframe title 定位失败;改为在 iframe 上增加稳定的 `data-testid="product-center-frame"`。
|
||
|
||
Verification:
|
||
- `pnpm vitest run tests/unit/app-center.test.tsx tests/unit/product-center-url.test.ts`: passed, 2 files / 3 tests.
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm run build:vite`: passed with existing Vite dynamic-import/chunk-size warnings.
|
||
- `pnpm test`: passed, 106 files / 675 tests; existing MaxListeners warnings remain.
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`: passed, 1 test.
|
||
|
||
## 2026-05-13 旅游资源订购 Login-State Follow-Up
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 将应用名称从“商品中心”改为“旅游资源订购”。
|
||
- 内置 Web 使用持久化会话容器,保持 `ticket.nianxx.cn` 登录态。
|
||
|
||
Tasks:
|
||
- [x] 更新 zh/en 展示名、标题和测试用例命名。
|
||
- [x] 确认目标站点登录态存储方式。
|
||
- [x] 将宿主容器切换为 Electron `<webview>` 并指定持久 partition。
|
||
- [x] 运行单测、类型检查、构建和 E2E 验证。
|
||
|
||
Errors Encountered:
|
||
- 首次 follow-up 单测失败在 `app-center.test.tsx`,原因是断言仍匹配“底价采购”,实际新文案已改为“底价订购”;已更新断言。
|
||
|
||
Verification:
|
||
- `pnpm vitest run tests/unit/app-center.test.tsx tests/unit/product-center-url.test.ts tests/unit/product-center-page.test.tsx`: passed, 3 files / 4 tests.
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm run build:vite`: passed with existing Vite dynamic-import/chunk-size warnings.
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`: passed, 1 test.
|
||
|
||
## 2026-05-13 快速视频创作 Rename And English Coverage
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 将“智念视频助手”展示名改为“快速视频创作”。
|
||
- 核实英文状态下应用中心两个内置应用都有英文覆盖,不暴露 i18n key。
|
||
|
||
Tasks:
|
||
- [x] 更新 zh/en app-center 文案,包括应用卡片、宿主页标题、导航和启动/失败状态。
|
||
- [x] 增加英文应用中心覆盖测试。
|
||
- [x] 运行针对性单测、类型检查、构建和 Electron 冒烟。
|
||
|
||
Verification:
|
||
- `pnpm vitest run tests/unit/app-center.test.tsx tests/unit/product-center-page.test.tsx tests/unit/product-center-url.test.ts`: passed, 3 files / 5 tests.
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm run build:vite`: passed with existing Vite dynamic-import/chunk-size warnings.
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`: passed, 1 test.
|
||
|
||
## 2026-05-13 快速视频创作内置 Web 英文覆盖
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 英文状态下,快速视频创作内置 Web 应用不再暴露主要中文导航、标题、按钮、表单标签和项目页文案。
|
||
- 桌面宿主需要把当前语言传给内置 Web,并让内置应用在跨页面导航后保持该语言状态。
|
||
|
||
Tasks:
|
||
- [x] 定位英文漏覆盖来源,区分桌面外壳 i18n 与 NianxxPlay 内置 Web 硬编码中文。
|
||
- [x] 桌面端 NianxxPlay 宿主 URL 注入 `zhinianLang`。
|
||
- [x] NianxxPlay 内置应用新增英文覆盖桥,并持久化嵌入语言状态。
|
||
- [x] 补充针对 URL 语言参数和英文覆盖字典的测试。
|
||
- [x] 重建内置 Web bundle,运行桌面验证。
|
||
|
||
Verification:
|
||
- `pnpm vitest run tests/unit/nianxx-play-url.test.ts tests/unit/app-center.test.tsx`: passed, 2 files / 4 tests.
|
||
- `/Users/inmanx/Documents/NianxxPlay`: `npm test`: passed, 4 files / 14 tests.
|
||
- `/Users/inmanx/Documents/NianxxPlay`: `npm run build`: passed with existing `ali-oss/urllib` dynamic dependency warning.
|
||
- `NIANXX_PLAY_SKIP_BUILD=1 pnpm run prepare:nianxx-play`: passed; refreshed `build/apps/nianxx-play`.
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm run build:vite`: passed with existing Vite dynamic-import/chunk-size warnings.
|
||
- Playwright page probe on `http://127.0.0.1:3010/studio?zhinianEmbed=1&zhinianLang=en`: key English checks passed and first-screen continuous Chinese matches were empty.
|
||
- Playwright page probe on `/planning?zhinianEmbed=1&zhinianLang=en`: key English checks passed and continuous Chinese matches were empty.
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`: passed, 1 test.
|
||
|
||
## 2026-05-13 设置偏好深色 UI 修复
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 修复设置/使用偏好在深色主题下的色彩层级、对比度和局部浅色残留。
|
||
- 顺带补上全局 app surface 和标题栏的深色背景兜底,减少其它深色页面出现同类问题。
|
||
|
||
Tasks:
|
||
- [x] 抓取当前深色偏好页截图并定位色彩问题。
|
||
- [x] 重构偏好页容器、分组和分段按钮的深色样式。
|
||
- [x] 调整全局深色背景与标题栏深色样式。
|
||
- [x] 运行类型检查/构建并重新截图验证。
|
||
|
||
Verification:
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm exec vitest run tests/unit/title-bar.test.tsx tests/unit/launch-at-startup.test.ts tests/unit/app-center.test.tsx tests/unit/nianxx-play-url.test.ts`: passed, 4 files / 11 tests.
|
||
- `pnpm run build:vite`: passed with existing dynamic-import/chunk-size warnings.
|
||
- Electron visual screenshot: `test-results/settings-preferences-dark-electron-after.png`.
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`: passed, 1 test.
|
||
|
||
Notes:
|
||
- `pnpm exec playwright test --config=playwright.legacy.config.ts tests/e2e/settings-proxy.spec.ts` was attempted but failed before reaching Settings because the legacy setup helper still expects `main-layout` immediately after setup, while the current product flow is login-first.
|
||
|
||
## 2026-05-13 WhatsApp 二维码生成检查
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 修复 WhatsApp 扫码连接时二维码生成不出来的问题,至少确保失败时不被前端吞掉,并让 WhatsApp WebSocket 走应用代理设置。
|
||
|
||
Tasks:
|
||
- [x] 检查前端扫码 Modal、Host API 路由、主进程 WhatsApp 登录管理器和 QR 渲染链路。
|
||
- [x] 用临时 HOME 拉起 WhatsApp 登录管理器,确认当前网络下直连 `web.whatsapp.com` WebSocket 超时/失败。
|
||
- [x] 给 WhatsApp 登录管理器接入应用代理设置,支持 HTTP/HTTPS 与 SOCKS 代理。
|
||
- [x] 修复 Host API unified envelope 非 2xx 时未抛错的问题,扫码启动失败时前端恢复状态并显示错误。
|
||
- [x] 补充 WhatsApp 网络/代理失败的本地化提示。
|
||
- [x] 补充代理解析和 Host API 非 2xx 单测。
|
||
- [x] 运行类型检查、相关单测和 Vite 构建。
|
||
|
||
Verification:
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm exec vitest run tests/unit/host-api.test.ts tests/unit/whatsapp-proxy.test.ts tests/unit/channel-routes.test.ts`: passed, 3 files / 38 tests.
|
||
- `pnpm run build:vite`: passed with existing Vite dynamic-import/chunk-size warnings.
|
||
- 临时 HOME 直连实测仍无法连接 WhatsApp WebSocket(当前网络环境预期如此),但现在会返回明确错误:需要检查网络或开启高级设置里的代理。
|
||
|
||
## 2026-05-13 OpenClaw 内核升级
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- 将桌面端内置 OpenClaw 内核从 `2026.4.29` 升级到 npm stable latest,并确认当前运行时补丁、依赖打包和核心验证仍可用。
|
||
|
||
Tasks:
|
||
- [x] 查询当前依赖版本和 npm dist-tag。
|
||
- [x] 更新 `openclaw` 依赖与 lockfile。
|
||
- [x] 检查 OpenClaw 运行时补丁是否仍能匹配新版 bundle。
|
||
- [x] 运行类型检查、相关单测、构建/打包前置验证。
|
||
- [x] 记录升级结果和残余风险。
|
||
|
||
Verification:
|
||
- `node build/openclaw/openclaw.mjs --version`: `OpenClaw 2026.5.7 (eeef486)`.
|
||
- `pnpm run typecheck`: passed.
|
||
- `node scripts/assert-electron-runtime-deps.mjs`: passed.
|
||
- `pnpm exec vitest run tests/unit/openclaw-cli.test.ts tests/unit/openclaw-proxy.test.ts tests/unit/channel-config.test.ts tests/unit/channel-routes.test.ts tests/unit/whatsapp-proxy.test.ts tests/unit/host-api.test.ts`: passed, 6 files / 58 tests.
|
||
- `pnpm run build:vite`: passed with existing Vite dynamic-import/chunk-size warnings.
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`: passed, 1 test.
|
||
|
||
Notes:
|
||
- npm stable latest is `2026.5.7`; beta remains newer at `2026.5.12-beta.4`, but this upgrade intentionally stays on stable.
|
||
- `bundle-openclaw` now builds `build/openclaw` from `openclaw@2026.5.7` and critical YINIAN runtime boundaries are present in the bundled output.
|
||
- Several old bundle patch snippets no longer match because OpenClaw 2026.5.7 moved or upstreamed equivalent logic; verified equivalents include raw-model fast path, disabled main-session recovery, stuck-session active abort threshold, agents skill discovery disable, and Windows hidden process spawn handling.
|
||
|
||
## Current Baseline
|
||
|
||
- M1 auth/config/skill registry foundation implemented.
|
||
- Typecheck passed.
|
||
- Unit tests passed: 89 files, 572 tests.
|
||
- E2E passed: 26 passed, 1 skipped.
|
||
- Production flow: login first, then Today.
|
||
- E2E compatibility flow: legacy ClawX setup/main pages remain testable.
|
||
|
||
## Phase 1: Stabilize M1 For Handoff
|
||
|
||
Status: complete
|
||
|
||
Tasks:
|
||
- [x] Review all uncommitted files and separate intentional YINIAN changes from accidental drift.
|
||
- [x] Add or update a concise M1 implementation note in `docs/`.
|
||
- [x] Document environment switches:
|
||
- `YINIAN_API_BASE_URL`
|
||
- `CLAWX_LEGACY_AUTOSTART`
|
||
- `CLAWX_E2E`
|
||
- [x] Confirm storage namespace and logout cleanup behavior are captured in docs.
|
||
- [x] Run final verification after any cleanup:
|
||
- `pnpm run typecheck`
|
||
- `pnpm run test`
|
||
- `pnpm run test:e2e`
|
||
|
||
Exit Criteria:
|
||
- Working tree changes are explainable by module.
|
||
- M1 behavior can be handed to another engineer without reading the full chat.
|
||
|
||
Result:
|
||
- Completed in this session.
|
||
- Added `docs/M1_HANDOFF.md`.
|
||
- Updated `docs/START_HERE.md`.
|
||
- Fixed a channel health timestamp edge case where success/failure could share the same millisecond.
|
||
- Verification passed.
|
||
|
||
## Phase 2: Real Server Contract v0
|
||
|
||
Status: complete
|
||
|
||
Tasks:
|
||
- [x] Define the first stable backend API contract for:
|
||
- SMS login
|
||
- password login
|
||
- restore/refresh session
|
||
- hotel list/current workspace
|
||
- config snapshot
|
||
- skills manifest
|
||
- [x] Add mock fixtures that mirror the proposed server JSON exactly.
|
||
- [x] Add response normalization tests for missing/extra fields.
|
||
- [x] Decide refresh-token persistence boundary:
|
||
- mock can use local store
|
||
- HTTP should persist refresh token only when server contract is explicit
|
||
- [x] Add failure states for expired session and unavailable server.
|
||
|
||
Exit Criteria:
|
||
- Backend engineer can implement against a documented contract.
|
||
- UI/store can tolerate server errors without breaking the shell.
|
||
|
||
Result:
|
||
- Added `docs/SERVER_CONTRACT_V0.md`.
|
||
- Added `tests/fixtures/yinian-server-contract.ts`.
|
||
- HTTP mode now refreshes persisted sessions through `/auth/refresh`.
|
||
- HTTP mode normalizes contract v0 config and manifest responses.
|
||
- Verification passed.
|
||
|
||
## Phase 3: Today Page M2 Pilot Surface
|
||
|
||
Status: complete
|
||
|
||
Tasks:
|
||
- [x] Turn Today from foundation dashboard into B-end business cockpit.
|
||
- [x] Add real sections for:
|
||
- pending guest requests
|
||
- urgent exceptions
|
||
- today arrival/departure summary
|
||
- active skills and sync status
|
||
- recent agent actions
|
||
- [x] Add empty/loading/error states that are operational, not marketing copy.
|
||
- [x] Merge entitlement and local registry states into clear labels:
|
||
- enabled but not synced
|
||
- installed
|
||
- update available
|
||
- disabled
|
||
- [x] Add tests for at least empty state, populated state, and workspace switch refresh.
|
||
|
||
Exit Criteria:
|
||
- A business operator can understand what needs attention within 10 seconds.
|
||
|
||
Result:
|
||
- Rebuilt `src/pages/Today/index.tsx` as an operations cockpit.
|
||
- Added `tests/unit/today-page.test.tsx`.
|
||
- Verification passed.
|
||
|
||
## Phase 4: Skills Manager M2
|
||
|
||
Status: complete
|
||
|
||
Tasks:
|
||
- [x] Expand local registry UI beyond list/sync:
|
||
- per-skill status
|
||
- version
|
||
- last synced time
|
||
- entitlement source
|
||
- retry failed sync
|
||
- [x] Keep real bundle download out of scope unless explicitly promoted.
|
||
- [x] Define install/update/skip/fail result semantics in UI state mapping over shared registry/status types.
|
||
- [x] Add tests for:
|
||
- empty registry
|
||
- manifest changes
|
||
- disabled entitlement
|
||
- sync failure
|
||
- workspace switch isolation
|
||
|
||
Exit Criteria:
|
||
- Skills page can explain exactly why a skill is available, unavailable, or stale.
|
||
|
||
Result:
|
||
- Rebuilt `src/pages/YinianSkills/index.tsx` into an operator-facing Skills Manager.
|
||
- Added `tests/unit/yinian-skills-page.test.tsx`.
|
||
- Verification passed.
|
||
|
||
## Phase 5: Design System Pass
|
||
|
||
Status: complete
|
||
|
||
Tasks:
|
||
- [x] Establish YINIAN visual language over the inherited ClawX shell:
|
||
- calmer B-end business density
|
||
- refined sidebar/topbar
|
||
- consistent status chips, tables, and panels
|
||
- no decorative landing-page treatment
|
||
- [x] Replace one-off page styling with reusable UI patterns where it reduces duplication.
|
||
- [x] Verify with typecheck, unit tests, Vite build, and Playwright E2E.
|
||
|
||
Exit Criteria:
|
||
- Login, Today, Skills, and tenant switcher feel like one product.
|
||
|
||
Result:
|
||
- Added lightweight YINIAN UI primitives in `src/components/yinian/ui.tsx`.
|
||
- Unified Login, Today, Skills, sidebar service context, main workspace background, and sidebar active states around a calmer navy/slate operations style.
|
||
- Verification passed.
|
||
|
||
## Phase 6: Pilot Packaging And QA
|
||
|
||
Status: complete
|
||
|
||
Tasks:
|
||
- [x] Prepare a pilot checklist:
|
||
- install/start
|
||
- mock login
|
||
- server login when configured
|
||
- switch workspace
|
||
- sync skills
|
||
- logout
|
||
- gateway starts only after auth
|
||
- [x] Add a known-issues section.
|
||
- [x] Decide whether to commit a clean M1 checkpoint before M2.
|
||
|
||
Exit Criteria:
|
||
- The build can be handed to a stakeholder for a guided demo.
|
||
|
||
Result:
|
||
- Added `docs/PILOT_QA.md` with demo script, QA checklist, verification gate, packaging notes, and known issues.
|
||
- Updated `docs/START_HERE.md` and `docs/M1_HANDOFF.md` to point at the pilot QA baseline.
|
||
- No git commit was created because the working assumption remains "do not commit unless explicitly requested".
|
||
|
||
## Risks
|
||
|
||
- E2E compatibility now has explicit YINIAN bypass logic; keep it narrow and documented.
|
||
- Real server auth semantics may force storage changes, especially refresh token handling.
|
||
- ClawX legacy pages still exist; YINIAN navigation must avoid exposing implementation/admin surfaces to business customers too early.
|
||
- Skill registry is ready for OTA later, but real bundle download/signature verification remains intentionally out of scope.
|
||
|
||
## Next Recommended Action
|
||
|
||
Next, either create a clean checkpoint commit when requested, or start the next product phase: real server integration and first real business skill execution path.
|
||
|
||
## 2026-05-13 Task And Skill Management Clarification
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Remove ambiguity between quick tasks, ability-pack tasks, and scheduled tasks.
|
||
- Restore ability-pack-owned quick-task management to the ability-pack/skills area.
|
||
- Preserve the earlier scheduled-task creation design, including push channel selection.
|
||
- Support adding skills into task editing content through `@` mentions.
|
||
|
||
Tasks:
|
||
- [x] Inspect current ability-pack, quick-task, scheduled-task, and task editor code paths.
|
||
- [x] Recover earlier scheduled-task and quick-task design from local git history if current code no longer contains it.
|
||
- [x] Implement UI/data-flow changes with minimal disruption to existing stores and APIs.
|
||
- [x] Add or update focused tests for quick-task management, scheduled-task push channels, and skill insertion.
|
||
- [x] Run typecheck and targeted tests.
|
||
|
||
Exit Criteria:
|
||
- Quick tasks that belong to ability packs are managed from the ability-pack UI.
|
||
- Scheduled-task creation/editing still exposes the important earlier fields, especially push channels.
|
||
- Task editing can insert a skill mention into the editor via `@`.
|
||
|
||
Result:
|
||
- Restored the ability-pack quick-task tab in `YinianSkills`, including edit/save support.
|
||
- Renamed the user-facing ability-pack concept from “快捷任务” to “快捷能力” to avoid confusion with scheduled/manual tasks.
|
||
- Changed Task Center's quick tab into a run-now surface and removed quick-task creation/editing from it.
|
||
- Brought scheduled-task delivery mode, channel, account, and target selection into the Task Center scheduled dialog.
|
||
- Added `@` skill insertion in manual/scheduled task textareas, inserting the existing `使用{name} skill` trigger text.
|
||
- Verification passed:
|
||
- `pnpm run typecheck`
|
||
- `pnpm vitest run tests/unit/yinian-skills-page.test.tsx tests/unit/tasks-page.test.tsx`
|
||
- `pnpm test` (97 files / 638 tests; existing MaxListeners warnings remain)
|
||
|
||
## 2026-05-13 Task Center Separation Follow-up
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Fully separate quick capabilities from Task Center.
|
||
- Keep Task Center focused on scheduled tasks and run history.
|
||
- Remove quick-capability template selection from scheduled-task creation.
|
||
- Fix `@` capability mention keyboard navigation.
|
||
- Make custom execution time friendlier than raw cron entry.
|
||
|
||
Tasks:
|
||
- [x] Remove quick-capability run/manage surfaces from Task Center.
|
||
- [x] Remove quick-capability template selection and binding creation from scheduled-task dialog.
|
||
- [x] Improve `@` mention keyboard selection behavior.
|
||
- [x] Replace raw custom cron entry with a structured custom schedule form while preserving cron payload output.
|
||
- [x] Update locale copy and focused tests.
|
||
- [x] Run typecheck and relevant tests.
|
||
|
||
Exit Criteria:
|
||
- Task Center no longer exposes quick capabilities as a task type.
|
||
- New scheduled tasks are authored directly with content plus optional `@` capability insertion.
|
||
- ArrowUp/ArrowDown/Enter can reliably choose a capability mention.
|
||
- Custom execution time is understandable through form controls and still saves a cron expression.
|
||
|
||
Result:
|
||
- `/tasks` now defaults to scheduled tasks and only exposes Scheduled Tasks plus Run History tabs.
|
||
- Scheduled-task creation/editing no longer offers quick-capability template selection or creates quick-capability bindings.
|
||
- Existing scheduled-task binding cleanup remains on edit/delete so stale local quick-capability associations are removed opportunistically.
|
||
- `@` mention suggestions now preserve active selection across keyup, support Enter insertion, and scroll the active option into view when the browser supports it.
|
||
- Custom execution time now uses structured controls for daily, weekly, monthly, and minute-interval schedules, with advanced Cron kept as a fallback.
|
||
- Verification passed:
|
||
- `pnpm run typecheck`
|
||
- `pnpm vitest run tests/unit/tasks-page.test.tsx tests/unit/task-center-store.test.ts`
|
||
- `pnpm test` (97 files / 638 tests; existing MaxListeners warnings remain)
|
||
- `pnpm run build:vite` (existing Vite chunk warnings remain)
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
|
||
|
||
Errors Encountered:
|
||
- The first targeted E2E run still saw `tasks-tab-quick` because Electron E2E was using stale `dist` output. Rebuilt with `pnpm run build:vite` and reran the same E2E successfully.
|
||
- jsdom does not implement `scrollIntoView`; guarded the mention-list scroll call so browser scrolling remains while tests and older DOM environments do not fail.
|
||
|
||
## 2026-05-13 Task Center Pinning Follow-up
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Rename the scheduled-task surface to Task Center without changing any time-setting controls.
|
||
- Let each task card pin/unpin itself to the left sidebar.
|
||
- Let pinned sidebar tasks trigger immediately from the sidebar.
|
||
|
||
Tasks:
|
||
- [x] Update task-center copy that still says scheduled task where it names the product surface, leaving execution-time labels untouched.
|
||
- [x] Add persisted pinned task ids to task-center store.
|
||
- [x] Add pin/unpin controls to task cards.
|
||
- [x] Render pinned task quick triggers in the left sidebar and wire immediate execution.
|
||
- [x] Add/update focused tests.
|
||
- [x] Run typecheck and relevant test/build checks.
|
||
|
||
Exit Criteria:
|
||
- Time configuration controls and labels are unchanged.
|
||
- Task cards can be pinned to the sidebar.
|
||
- Sidebar pinned tasks can be clicked to run immediately.
|
||
|
||
Result:
|
||
- Renamed the scheduled-task product surface copy to “任务中心” / “Task Center” while preserving execution-time labels and controls.
|
||
- Added `yinian:pinned-task-ids` local persistence through `useTaskCenterStore`.
|
||
- Added task-card pin/unpin controls.
|
||
- Sidebar now renders pinned task quick triggers and calls the existing cron trigger API immediately on click.
|
||
- Sidebar-triggered runs are also recorded in task run history.
|
||
- Verification passed:
|
||
- `pnpm run typecheck`
|
||
- `pnpm vitest run tests/unit/tasks-page.test.tsx tests/unit/task-center-store.test.ts tests/unit/today-page.test.tsx`
|
||
- `pnpm test` (97 files / 640 tests; existing MaxListeners warnings remain)
|
||
- `pnpm run build:vite` (existing Vite chunk warnings remain)
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
|
||
|
||
## 2026-05-13 Task Center Density And Sidebar Structure
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Convert Task Center from card-grid management to dense list management.
|
||
- Preserve important task actions: enable/disable, pin, run now, edit, open session, delete, delivery visibility, and execution metadata.
|
||
- Improve sidebar structure so pinned quick triggers are contained and the navigation remains scannable.
|
||
|
||
Tasks:
|
||
- [x] Apply data-dense dashboard guidance to Task Center layout.
|
||
- [x] Replace task-card grid with a responsive list/table layout.
|
||
- [x] Keep all execution-time controls untouched.
|
||
- [x] Restructure sidebar navigation and pinned triggers into a scrollable, organized area.
|
||
- [x] Update focused tests if accessible labels or copy change.
|
||
- [x] Run typecheck, focused tests, full tests, and E2E/build checks as needed.
|
||
|
||
Exit Criteria:
|
||
- Task Center uses a compact list layout and shows more tasks per screen.
|
||
- All existing task actions remain available.
|
||
- Sidebar groups are clearly separated and pinned tasks do not overwhelm the menu.
|
||
|
||
Result:
|
||
- Replaced the task card grid with a compact list/table layout that keeps task name/content, enabled state, schedule metadata, delivery info, pin, run, edit, open-session, and delete actions in each row.
|
||
- Moved scheduled-task metrics into compact chips in the panel header.
|
||
- Kept `ScheduledTaskDialog` execution-time controls unchanged.
|
||
- Put sidebar navigation into a scrollable structured area and bounded pinned quick triggers so chat/settings remain reachable.
|
||
- Verification passed:
|
||
- `pnpm run typecheck`
|
||
- `pnpm vitest run tests/unit/tasks-page.test.tsx tests/unit/task-center-store.test.ts tests/unit/today-page.test.tsx`
|
||
- `pnpm test` (97 files / 640 tests; existing MaxListeners warnings remain)
|
||
- `pnpm run build:vite` (existing Vite chunk warnings remain)
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
|
||
|
||
## 2026-05-13 Immediate History Session Visibility
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Make newly started sessions appear in the sidebar history immediately instead of waiting for `sessions.list`.
|
||
- Cover both desktop new chats and Task Center / background automation sessions.
|
||
|
||
Tasks:
|
||
- [x] Add a shared local session visibility patch for optimistic history rows.
|
||
- [x] Mark new desktop sessions with `updatedAt` so they sort into the visible history area without turning into permanent activity.
|
||
- [x] Mark outgoing messages as active sessions immediately.
|
||
- [x] Mark cron trigger and Gateway started/completed sessions visible immediately.
|
||
- [x] Add focused regression tests.
|
||
- [x] Run typecheck, focused tests, full tests, build, and smoke E2E.
|
||
|
||
Result:
|
||
- New blank sessions get a local `updatedAt` immediately, so the history list can show them near the top while `cleanupEmptySession` can still remove unused blanks.
|
||
- Sending a first message now upserts the session row, label, and activity timestamp in one store update.
|
||
- Cron trigger calls insert a visible `agent:main:cron:<id>` session with the task name before the backend refresh returns.
|
||
- Gateway started/completed notifications insert background sessions optimistically, so scheduled automation runs appear as soon as the frontend hears about them.
|
||
- Verification passed:
|
||
- `pnpm run typecheck`
|
||
- `pnpm vitest run tests/unit/chat-session-actions.test.ts tests/unit/gateway-events.test.ts tests/unit/cron-store-fetch-dedupe.test.ts tests/unit/tasks-page.test.tsx tests/unit/task-center-store.test.ts`
|
||
- `pnpm test` (98 files / 645 tests; existing MaxListeners warnings remain)
|
||
- `pnpm run build:vite` (existing Vite chunk warnings remain)
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
|
||
|
||
## 2026-05-13 Task Execution Conversation Follow-up
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Treat each Task Center task as one stable follow-up conversation.
|
||
- Jump to that conversation immediately after user-triggered execution.
|
||
|
||
Tasks:
|
||
- [x] Use a stable `agent:main:cron:<jobId>` session key for Task Center execution records and open-session actions.
|
||
- [x] Switch to the fixed task session and navigate to Chat when clicking Task Center "Run now".
|
||
- [x] Switch to the fixed task session and navigate to Chat when using sidebar pinned task triggers.
|
||
- [x] Add a regression test for Task Center "Run now" switching to the fixed task conversation.
|
||
- [x] Run typecheck, focused tests, full tests, build, and smoke E2E.
|
||
|
||
Result:
|
||
- Task Center run-now and sidebar pinned triggers now immediately open the task's fixed conversation.
|
||
- Each execution of the same task continues to land in the same `agent:main:cron:<jobId>` session, keeping follow-up context together.
|
||
- Verification passed:
|
||
- `pnpm run typecheck`
|
||
- `pnpm vitest run tests/unit/tasks-page.test.tsx tests/unit/task-center-store.test.ts tests/unit/cron-store-fetch-dedupe.test.ts tests/unit/chat-session-actions.test.ts`
|
||
- `pnpm test` (98 files / 646 tests; existing MaxListeners warnings remain)
|
||
- `pnpm run build:vite` (existing Vite chunk warnings remain)
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
|
||
|
||
## 2026-05-13 Task Conversation Naming
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Show Task Center conversations directly with the task name.
|
||
- Prevent task conversations from being renamed to the first execution prompt.
|
||
|
||
Tasks:
|
||
- [x] Force task session label/displayName to the task name when running, opening, or sidebar-triggering a task.
|
||
- [x] Keep cron session labels protected during history hydration and message sends.
|
||
- [x] Let Gateway automation events backfill the task name from local cron jobs when available.
|
||
- [x] Add focused regression coverage.
|
||
- [x] Run typecheck, focused tests, full tests, build, and smoke E2E.
|
||
|
||
Result:
|
||
- Task sessions now display the task name directly instead of `agent:main:cron:<id>` or task prompt text.
|
||
- History refresh no longer overwrites cron task names with the first user message.
|
||
- Verification passed:
|
||
- `pnpm run typecheck`
|
||
- `pnpm vitest run tests/unit/tasks-page.test.tsx tests/unit/chat-history-actions.test.ts tests/unit/cron-store-fetch-dedupe.test.ts tests/unit/gateway-events.test.ts tests/unit/chat-session-actions.test.ts`
|
||
- `pnpm test` (98 files / 647 tests; existing MaxListeners warnings remain)
|
||
- `pnpm run build:vite` (existing Vite chunk warnings remain)
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
|
||
|
||
## 2026-05-13 Task History Merge Reliability
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Fix task conversations sometimes showing no prior history or only the current prompt.
|
||
- Preserve the stable task conversation while merging available Gateway transcript and cron run-log fallback history.
|
||
|
||
Tasks:
|
||
- [x] Diagnose task conversation history loading.
|
||
- [x] Merge cron fallback history even when `chat.history` returns partial messages.
|
||
- [x] Deduplicate near-identical fallback/Gateway messages.
|
||
- [x] Make failed cron run fallback messages visible instead of filtered as system messages.
|
||
- [x] Add regression tests for partial Gateway history and failed run fallback visibility.
|
||
- [x] Run typecheck, focused tests, full tests, build, and smoke E2E.
|
||
|
||
Result:
|
||
- Cron task sessions now combine Gateway `chat.history` with `/api/cron/session-history` instead of using the fallback only when Gateway history is empty.
|
||
- If Gateway only returns the current execution prompt, previous cron run summaries still appear in the same task conversation.
|
||
- Failed task run fallback messages now render as assistant messages with `isError`, so failures are visible in the task conversation.
|
||
- Verification passed:
|
||
- `pnpm run typecheck`
|
||
- `pnpm vitest run tests/unit/chat-history-actions.test.ts tests/unit/cron-routes.test.ts tests/unit/tasks-page.test.tsx tests/unit/gateway-events.test.ts tests/unit/cron-store-fetch-dedupe.test.ts`
|
||
- `pnpm test` (98 files / 649 tests; existing MaxListeners warnings remain)
|
||
- `pnpm run build:vite` (existing Vite chunk warnings remain)
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
|
||
|
||
## 2026-05-12 Customer Clean Install Stabilization
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Fix the customer clean-install path where the app restores an old login/session, skips initialization, starts Gateway, then cannot chat because the managed OpenClaw runtime is incomplete.
|
||
|
||
Tasks:
|
||
- [x] Inspect customer logs and screenshots.
|
||
- [x] Confirm packaged runtime is missing `docs/reference/templates/AGENTS.md`.
|
||
- [x] Confirm managed runtime cannot resolve OpenClaw self-imports such as `openclaw/plugin-sdk/provider-model-shared`.
|
||
- [x] Preserve required OpenClaw runtime templates in bundled and packaged resources.
|
||
- [x] Add a self-reference package/symlink for managed runtime module resolution.
|
||
- [x] Make setup status validate actual runtime files instead of trusting only `setupComplete`.
|
||
- [x] Prevent Gateway auto-start unless setup is verified complete and user is authenticated.
|
||
- [x] Restore NianxxPlay compiled `generated-results` route while still excluding user generated files.
|
||
- [x] Verify with bundle/build checks and targeted tests.
|
||
|
||
Current Findings:
|
||
- Customer log shows `Missing workspace template: AGENTS.md` during chat.
|
||
- Customer log shows `ERR_MODULE_NOT_FOUND: Cannot find package 'openclaw' imported from .../dist/extensions/codex/prompt-overlay.js`.
|
||
- Customer log shows `providerKeys=0` and diagnostics screenshot shows missing local model credentials; this remains a likely next blocker after runtime repair.
|
||
- NianxxPlay also reported missing `.next/server/app/generated-results/[...path]/route.js` after excluding generated results; the bundle filter now keeps compiled routes while continuing to exclude `public/generated-results`.
|
||
|
||
## Enterprise Space Service Integration
|
||
|
||
Status: in_progress
|
||
|
||
Goal:
|
||
- Connect the desktop client to the service-side enterprise space and application/skill distribution APIs.
|
||
- Keep the current single-account-single-service product assumption, while making backend endpoints configurable enough to match CloudClaw once repository access is available.
|
||
|
||
Tasks:
|
||
- [x] Check whether `https://git.nianxx.cn/brother7/CloudClaw` can be read from this workspace.
|
||
- [x] Record the current desktop API assumptions for enterprise space, config, and app manifest.
|
||
|
||
## 2026-05-13 Task Center Iteration
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Promote tasks into a primary product module so ordinary business users can reuse capability-pack workflows manually or on a schedule.
|
||
|
||
Completed:
|
||
- Added `/tasks` and redirected `/cron` to `/tasks?tab=scheduled`.
|
||
- Reworked the customer sidebar into 快速使用 / 任务 / 对话 business groups.
|
||
- Added task center tabs: 快捷任务、定时任务、执行记录.
|
||
- Moved visible quick-task configuration out of the capability-pack settings tab.
|
||
- Added unified quick-task prompt composition shared by chat and task execution.
|
||
- Added local scheduled-task bindings and task run record persistence with separate storage keys:
|
||
- `yinian:scheduled-task-bindings`
|
||
- `yinian:task-run-records`
|
||
- Added `tasks` i18n namespace for Chinese and English.
|
||
- Updated delivery smoke to cover task center and `/cron` compatibility.
|
||
- Added unit coverage for prompt construction and task-center store behavior.
|
||
|
||
Verification:
|
||
- `pnpm run typecheck`
|
||
- `pnpm test`
|
||
- `pnpm run build:vite`
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
|
||
- [x] Add configurable endpoint support for enterprise space/config/app manifest APIs.
|
||
- [x] Normalize common backend field names for app/skill manifests.
|
||
- [x] Add fallback behavior when the enterprise space service has not implemented config or manifest endpoints yet.
|
||
- [x] Add focused tests for enterprise space and manifest normalization.
|
||
- [x] Run `typecheck` and focused unit tests.
|
||
|
||
Known Blocker:
|
||
- Anonymous git access requires authentication, but source was readable through the user's logged-in Chrome session.
|
||
- Current CloudClaw backend does not yet expose enterprise app/skill distribution APIs; desktop falls back to empty registry until those routes are added.
|
||
|
||
## Product Simplification Pass
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Remove customer-facing fields and metrics that are not supported by the real service today.
|
||
- Keep the product lighter and more credible for non-technical enterprise users.
|
||
|
||
Tasks:
|
||
- [x] Audit login, sidebar, Today, Settings, mock control-plane, and tests for unsupported business claims.
|
||
- [x] Remove account profile fields such as role/job/location when they are not returned by the server contract.
|
||
- [x] Remove or replace unsupported operational metrics such as health score/运营健康度.
|
||
- [ ] Keep only service-backed or local-real features:
|
||
- 登录
|
||
- 当前服务名称
|
||
- 应用列表/同步状态
|
||
- 知识库文件
|
||
- 对话与历史
|
||
- 定时任务入口
|
||
- [x] Run focused and full verification.
|
||
|
||
Result:
|
||
- Today now shows service/application readiness instead of unsupported operational health, fake pending business metrics, or recent run traces.
|
||
- Login no longer claims fixed time savings, fixed v1 app counts, or frontend key ownership.
|
||
- Sidebar and Settings no longer show service city/role/profile metadata.
|
||
- Shared YINIAN service type no longer models role/city/permissions/OTA as product-level fields.
|
||
- Mock fixtures and contract examples now use generic B-end service/application language.
|
||
|
||
## UI Customization Phase 1: Brand Foundation
|
||
|
||
Status: complete
|
||
|
||
Tasks:
|
||
- [x] Persist project-level design system for `智念助手`.
|
||
- [x] Create a new app icon concept and SVG sources.
|
||
- [x] Generate desktop icon outputs for macOS, Windows, and Linux.
|
||
- [x] Rename customer-facing product surfaces to `智念助手`.
|
||
- [x] Update packaging metadata, desktop shortcut names, tray labels, and window title.
|
||
- [x] Keep low-level ClawX/OpenClaw technical compatibility names where they still protect inherited behavior.
|
||
|
||
Result:
|
||
- Added `design-system/智念助手/MASTER.md`.
|
||
- Updated `resources/icons/`, `src/assets/logo.svg`, `electron-builder.yml`, `package.json`, Login, Sidebar, TitleBar, tray, and startup metadata.
|
||
- Verification passed.
|
||
|
||
Next UI Step:
|
||
- Continue with UI Customization Phase 2: extend YINIAN primitives into a fuller design kit and refactor Login/Today/Skills shell details against the new brand system.
|
||
|
||
## UI Customization Phase 2: Core Surface Refinement
|
||
|
||
Status: complete
|
||
|
||
Tasks:
|
||
- [x] Extend `src/components/yinian/ui.tsx` with reusable primitives for mature product surfaces.
|
||
- [x] Refine Login into a more branded enterprise desktop entry.
|
||
- [x] Refactor Today onto section panels, metric cards, info rows, and list items.
|
||
- [x] Refactor Skills Manager card internals onto shared info rows and panels.
|
||
- [x] Refine sidebar service context as a workspace context surface.
|
||
- [x] Verify typecheck, focused unit tests, and Vite build.
|
||
|
||
Result:
|
||
- Core YINIAN pages now share a stronger design vocabulary without changing backend/session/skill semantics.
|
||
|
||
Next UI Step:
|
||
- Continue with UI Customization Phase 3: visual QA and polish pass across sidebar density, Chat/Settings inherited ClawX pages, and customer/admin navigation boundaries.
|
||
|
||
## UI Customization Phase 3: Inherited Surface Brand Boundary
|
||
|
||
Status: complete
|
||
|
||
Tasks:
|
||
- [x] Group Sidebar navigation into B-end operations, AI work, and extension sections.
|
||
- [x] Keep existing route test ids and navigation behavior stable.
|
||
- [x] Replace major Chinese customer-visible Chat/Settings/Setup ClawX strings with 智念助手.
|
||
- [x] Swap Setup welcome logo alt/asset to 智念助手.
|
||
- [x] Verify typecheck, focused unit tests, Vite build, and navigation E2E.
|
||
|
||
Result:
|
||
- Customer-facing shell now has a clearer information architecture and less inherited ClawX branding.
|
||
|
||
Next UI Step:
|
||
- Continue with UI Customization Phase 4: full visual QA screenshots and deeper inherited page polish for Chat, Settings, Channels, Agents, Models, and Cron.
|
||
|
||
## UI Customization Phase 4: Inherited Page Visual Polish
|
||
|
||
Status: complete
|
||
|
||
Tasks:
|
||
- [x] Remove oversized serif title treatment from inherited Chat, Settings, Models, Agents, Channels, and Cron surfaces.
|
||
- [x] Normalize inherited page headings toward the 智念助手 system-font dashboard style.
|
||
- [x] Remove remaining major Chinese customer-visible ClawX copy from Agents, Cron, Channels, Chat, Settings, and Setup.
|
||
- [x] Keep technical GitHub/upstream references available where still useful.
|
||
- [x] Verify typecheck, focused unit tests, Vite build, and inherited navigation/provider E2E.
|
||
|
||
Result:
|
||
- Inherited pages now feel less like the original ClawX shell and closer to the 智念助手 product system while preserving behavior.
|
||
|
||
Next UI Step:
|
||
- Continue with UI Customization Phase 5: screenshot-based visual QA across authenticated YINIAN flow and legacy E2E flow, then fix concrete layout issues found at desktop widths.
|
||
|
||
## UI Customization Phase 5: Screenshot Visual QA
|
||
|
||
Status: complete
|
||
|
||
Tasks:
|
||
- [x] Add a production YINIAN visual smoke test that bypasses legacy setup only at the renderer level.
|
||
- [x] Capture desktop screenshots for Login, Today, and Skills at 1440x900.
|
||
- [x] Fix the fresh-user production routing issue where legacy setup could override the 智念登录入口.
|
||
- [x] Verify typecheck, Vite build, and the new visual smoke test.
|
||
|
||
Result:
|
||
- Added `tests/e2e/yinian-visual-smoke.spec.ts`.
|
||
- Baseline screenshots are written to `test-results/yinian-visual/01-login.png`, `02-today.png`, and `03-skills.png`.
|
||
- Fresh production sessions now land on `/login` before authentication and `/today` after login.
|
||
|
||
Next UI Step:
|
||
- Continue with per-surface detail polish for Settings, Channels, Agents, Models, and Cron, using screenshot comparison as the acceptance gate.
|
||
|
||
## Product Positioning Pass: B-end Workspace Model
|
||
|
||
Status: complete
|
||
|
||
Tasks:
|
||
- [x] Change the primary navigation group to `快速使用`.
|
||
- [x] Replace customer-visible hotel-specific copy with workspace/business-object language.
|
||
- [x] Update mock tenant names and demo skill labels for broader B-end demos.
|
||
- [x] Add forward-compatible workspace aliases without breaking existing storage/API field names.
|
||
- [x] Refresh visual screenshots and verification after the repositioning pass.
|
||
|
||
Result:
|
||
- 智念助手 now reads as a configurable B-end AI Agent desktop product, where different customers can install or receive tailored Skills for their own business object.
|
||
- Existing `hotelId`/`hotel_id` internals remain intentionally stable until a dedicated server-contract migration is planned.
|
||
|
||
Next Product Step:
|
||
- Define the generic tenant model in the PRD/server contract (`workspace` / `businessObject`) and plan a controlled API rename only after server compatibility is clear.
|
||
|
||
## Shell Simplification Pass: Account-Bound Service
|
||
|
||
Status: complete
|
||
|
||
Tasks:
|
||
- [x] Remove the old top workspace bar from the authenticated shell.
|
||
- [x] Move current service identity into the left sidebar.
|
||
- [x] Remove workspace selection from the customer-facing shell.
|
||
- [x] Move sync and logout controls into the sidebar footer.
|
||
- [x] Refresh screenshot QA after the shell change.
|
||
|
||
Result:
|
||
- The product now assumes one account corresponds to one B-end service in the UI, while lower-level compatibility fields remain untouched.
|
||
|
||
Next UI Step:
|
||
- Continue simplifying inherited admin surfaces so the left sidebar remains the single persistent navigation and account-control surface.
|
||
|
||
## Sidebar IA Pass: Service-Managed Configuration
|
||
|
||
Status: complete
|
||
|
||
Tasks:
|
||
- [x] Hide developer/configuration surfaces from the production sidebar.
|
||
- [x] Keep Models, Agents, Channels, and Cron available only through E2E compatibility navigation.
|
||
- [x] Reorganize the customer-facing sidebar around two primary areas: `快速使用` and `对话`.
|
||
- [x] Move account actions and service-managed capability notices into Settings.
|
||
- [x] Add Settings to the visual smoke baseline.
|
||
|
||
Result:
|
||
- The production shell now presents Today, Skills, New Chat, Chat, and Settings as the only persistent customer navigation.
|
||
- Model/provider, Agent orchestration, channel, and scheduled-task configuration are documented in Settings as service-side managed capabilities.
|
||
- Logout and service config sync live in Settings instead of competing with the primary sidebar navigation.
|
||
|
||
Next UI Step:
|
||
- Continue refining the Chat landing layout so the `对话` area feels as deliberate as `快速使用`.
|
||
|
||
## Sidebar UX Pass: Dashboard Card, Quick Use, Chat History
|
||
|
||
Status: complete
|
||
|
||
Tasks:
|
||
- [x] Move Dashboard entry from the quick-use menu to the top service card.
|
||
- [x] Rebuild `快速使用` as three direct actions: Skills, 定时任务, 知识库.
|
||
- [x] Add a Knowledge page and route for user-uploaded files.
|
||
- [x] Rebuild the `对话` area as New Chat plus hoverable History.
|
||
- [x] Make History click open the latest session and hover reveal the history list.
|
||
- [x] Refresh visual smoke screenshots and compatibility navigation E2E.
|
||
|
||
Result:
|
||
- The sidebar now reads as a compact launch surface: service card for Dashboard, quick actions for tools, and a quiet chat module with history on demand.
|
||
- Knowledge Base v0 is implemented as a local upload/list/search surface, ready for later server indexing.
|
||
|
||
Next UI Step:
|
||
- Upgrade Knowledge Base from local UI state to persisted service-scoped registry when the server API is ready.
|
||
|
||
## CloudClaw Direct Plugin Install Pass
|
||
|
||
Status: complete
|
||
|
||
Tasks:
|
||
- [x] Read CloudClaw repository through the user's logged-in browser session.
|
||
- [x] Confirm the available integration point is `plugins/openclaw-cloud-sync`.
|
||
- [x] Build a 智念内置 `cloud-sync` OpenClaw plugin mirror.
|
||
- [x] Auto-install the mirror into `~/.openclaw/extensions/cloud-sync` before Gateway launch.
|
||
- [x] Auto-write `plugins.entries.cloud-sync.config.serverUrl` into `openclaw.json`.
|
||
- [x] Include the static plugin mirror in dev build and packaged afterPack flows.
|
||
- [x] Patch plugin metadata and command registration shape for the current OpenClaw runtime.
|
||
- [x] Verify Gateway startup and `openclaw plugins list` show `cloud-sync` as loaded.
|
||
|
||
Result:
|
||
- CloudClaw's existing OpenClaw cloud-sync plugin is now directly installed and enabled by 智念助手.
|
||
- This does not yet mean enterprise application/skill distribution is available from CloudClaw; that server API still does not exist in the inspected repo.
|
||
|
||
Next Integration Step:
|
||
- Decide whether 智念助手 should expose Cloud Sync as a customer-facing setting/action, or keep it hidden as infrastructure until the CloudClaw server URL and account contract are finalized.
|
||
|
||
## Version 3.5: Application Center Large-App Integration
|
||
|
||
Status: planned
|
||
|
||
Goal:
|
||
- Move 应用中心 from a lightweight launcher into the first real large-application host inside 智念助手.
|
||
- Keep 能力包 focused on agent/skill capability expansion, while 应用中心 hosts fixed product applications that may be native React modules or embedded web applications.
|
||
- Use one large application as the 3.5 proving ground for routing, launch/close behavior, state persistence, permissions, service context, and desktop-grade UX.
|
||
|
||
Current Baseline:
|
||
- 应用中心 exists at `/app-center` with a compact app-launcher layout.
|
||
- Built-in app registry exists in `src/stores/app-center.ts`.
|
||
- App item typing exists in `src/types/app-center.ts` and shared YINIAN app-center types.
|
||
- Small built-in demo apps have been removed from the customer-facing app center.
|
||
- 应用中心 now focuses on the single NianxxPlay large-app entry.
|
||
- 能力包 has been renamed from application/skill language and now owns 快捷任务配置.
|
||
- 快捷任务 can inject `使用{能力包名称} skill` into the chat send path, is single-select, and is single-use per send.
|
||
- Dev port has moved from `5173` to `5188` to avoid local project conflicts.
|
||
|
||
Target Large App Candidate:
|
||
- Local project path: `/Users/inmanx/Documents/NianxxPlay`.
|
||
- Product name: `NianxxPlay智念视频助手`.
|
||
- Current positioning: Seedance 2.0 AI video generation workspace for ordinary users and local merchants.
|
||
- Current modes:
|
||
- 宣传片制作
|
||
- 创意复刻
|
||
- Technical shape:
|
||
- Next.js 15 app router application.
|
||
- Own routes for home, studio, projects, project details, billing, and API routes.
|
||
- Own local MVP data layer at `.data/app-state.json`.
|
||
- Own asset upload, OSS, Seedance task creation/query, prompt assembly, project history, and credit logic.
|
||
- Verified status:
|
||
- `npm test`: passed, 3 files / 11 tests.
|
||
- `npm run build`: passed, with existing `ali-oss` dependency-chain dynamic require warning.
|
||
- Integration implication:
|
||
- NianxxPlay is too large to treat like a small native utility route.
|
||
- It is a good 3.5 candidate for an embedded web large-app host, with a local service process during internal testing and a packaged/served app strategy later.
|
||
|
||
Scope For 3.5:
|
||
- Define the large-app host contract:
|
||
- app identity, source, type, route/url, icon, description, permissions, and service-context needs
|
||
- native app vs embedded web app launch behavior
|
||
- close/back behavior and app-level route ownership
|
||
- app state restore boundary
|
||
- Upgrade 应用中心 UI from static launcher-only semantics to an app hub:
|
||
- launch large apps
|
||
- show fixed built-in apps clearly
|
||
- keep tag filtering compact
|
||
- avoid introducing “enable/disable” semantics for applications
|
||
- Integrate the first large application:
|
||
- choose app name and business workflow
|
||
- decide native React implementation vs embedded web
|
||
- define data/API dependencies and local fallback behavior
|
||
- add route shell, loading/error/empty states, and close behavior
|
||
- Add verification:
|
||
- app-center unit tests for registry/filter/launch decisions
|
||
- large-app smoke tests
|
||
- `pnpm run typecheck`
|
||
- `pnpm run build:vite`
|
||
- targeted visual check at desktop size
|
||
|
||
Out Of Scope Until Explicitly Promoted:
|
||
- App marketplace/downloading from server.
|
||
- Multi-window app management.
|
||
- Server-driven per-user app permissions unless the backend contract is ready.
|
||
- Real embedded web sandbox hardening beyond the first controlled integration.
|
||
|
||
Risks:
|
||
- Current 应用中心 uses a static local registry; large-app delivery may need a stronger manifest and app lifecycle model.
|
||
- Current webview-type apps open externally; true embedded web applications need a safer host strategy.
|
||
- Large apps may need their own navigation and data domain, so they should not be crammed into the small-card launcher model.
|
||
- Customer-facing naming must keep 应用中心 and 能力包 distinct: 应用中心 opens product apps; 能力包 expands agent capabilities.
|
||
|
||
Next Recommended Action:
|
||
- Use NianxxPlay as the concrete 3.5 target.
|
||
- First implement an embedded-web app host inside 智念助手:
|
||
- app launcher entry
|
||
- app detail/host route
|
||
- loading, error, reload, close/back controls
|
||
- local development URL support
|
||
- safe external-link behavior
|
||
- Then connect the NianxxPlay local dev app as the first hosted large application before deciding the production packaging strategy.
|
||
|
||
## Version 3.5: Bundled NianxxPlay Runtime
|
||
|
||
Status: planned
|
||
|
||
Goal:
|
||
- Ship NianxxPlay as a desktop-managed companion application.
|
||
- 智念助手 should install, update, launch, stop, and health-check NianxxPlay together with the desktop app.
|
||
- Customers should not need Node.js, npm, pnpm, Next.js, or terminal knowledge.
|
||
|
||
Preferred Architecture:
|
||
- Build NianxxPlay as a Next.js standalone server bundle.
|
||
- Copy the standalone bundle into `build/apps/nianxx-play/`.
|
||
- Add the bundle to `electron-builder.yml` as an `extraResources` entry, similar to bundled OpenClaw.
|
||
- At first-run or app update, copy the bundled app into an app-managed user runtime directory:
|
||
- macOS/Linux: under app userData or `~/.zhinian/apps/nianxx-play`
|
||
- avoid writing mutable state into `process.resourcesPath`
|
||
- Launch the app from Electron main process as a managed child runtime.
|
||
- Host it in 智念助手 through an embedded web app route, using a local loopback URL.
|
||
|
||
Required NianxxPlay Changes:
|
||
- Add `output: 'standalone'` to `next.config.ts`.
|
||
- Move mutable local data away from `process.cwd()`:
|
||
- `.data/app-state.json`
|
||
- local upload fallback storage
|
||
- Support env-driven runtime paths:
|
||
- `NIANXXPLAY_DATA_DIR`
|
||
- `NIANXXPLAY_UPLOAD_DIR`
|
||
- `NIANXXPLAY_PUBLIC_BASE_URL`
|
||
- Do not bundle `.env.local`.
|
||
- Move real API keys to desktop-managed secure configuration or future server-issued config.
|
||
- Make the app work behind a dynamic local port instead of assuming `localhost:3000`.
|
||
|
||
Required Desktop Changes:
|
||
- Add an `electron/apps/nianxx-play` runtime manager:
|
||
- resolve bundled and managed app paths
|
||
- install/update managed app from bundled resources
|
||
- find a free local port
|
||
- launch and stop the standalone server
|
||
- probe health/readiness
|
||
- expose app status over IPC
|
||
- Add an application host route:
|
||
- `/app-center/nianxx-play`
|
||
- loading, error, reload, close/back controls
|
||
- embedded webview/iframe target URL from app runtime manager
|
||
- Add setup/update integration:
|
||
- initialization step for bundled applications
|
||
- runtime diagnostics in Settings
|
||
- shutdown cleanup on app quit
|
||
- Add packaging scripts:
|
||
- `bundle-nianxx-play.mjs`
|
||
- `package`/`build` pipeline integration
|
||
- release artifact size check
|
||
|
||
Main Risks:
|
||
- `public/seedance-starter-assets` is currently large, roughly hundreds of MB, and will significantly increase installer size.
|
||
- The current NianxxPlay project root is about 1GB mostly due to `node_modules`, `.next/cache`, and media assets; production bundling must exclude dev cache and raw node_modules.
|
||
- Next.js standalone output still needs static assets and selected runtime dependencies.
|
||
- API keys in `.env.local` are sensitive and must never be shipped as a plain file.
|
||
- If NianxxPlay runs as an HTTP server, port management and crash recovery must be owned by the desktop main process.
|
||
- Local-only uploaded files cannot be used by Seedance unless they are reachable via public OSS; the local fallback remains preview-only.
|
||
|
||
Acceptance Criteria:
|
||
- Fresh customer install can open NianxxPlay from 应用中心 without installing Node/npm.
|
||
- App restart restores NianxxPlay project history from the app-managed data directory.
|
||
- Desktop update can replace NianxxPlay code without deleting user projects/assets.
|
||
- App quit stops the managed NianxxPlay process.
|
||
- `pnpm run typecheck`, `pnpm run build:vite`, NianxxPlay `npm test`, and NianxxPlay `npm run build` pass.
|
||
|
||
Service-Managed Boundary:
|
||
- NianxxPlay account, permission, secret, quota, and billing decisions belong to the server.
|
||
- The desktop app must not expose real service credentials in UI or ship them in plain files.
|
||
- Desktop responsibilities are limited to:
|
||
- local installation/update of the application bundle
|
||
- process lifecycle
|
||
- health status
|
||
- embedded display inside 应用中心
|
||
- passing only server-issued, scoped runtime context when needed.
|
||
|
||
## Version 3.5: NianxxPlay Bundling Implementation Pass
|
||
|
||
Status: implemented in first pass
|
||
|
||
Goal:
|
||
- Move NianxxPlay from a development-only embedded URL to a packageable desktop companion app.
|
||
- Keep the existing 应用中心 UI and product flow intact.
|
||
- Make packaged builds launch NianxxPlay without requiring customers to install Node.js, npm, pnpm, or Next.js.
|
||
|
||
Implementation Steps:
|
||
- Configure NianxxPlay for Next.js standalone output.
|
||
- Add a desktop packaging script that:
|
||
- builds NianxxPlay
|
||
- copies only standalone runtime files, static assets, public assets, and content manifests
|
||
- excludes `.env*`, `.data`, dev caches, and raw development dependencies
|
||
- writes a bundle manifest for diagnostics
|
||
- Include the prepared bundle through `electron-builder.yml` extra resources.
|
||
- Update the Electron-side NianxxPlay service manager to:
|
||
- resolve source-project runtime in development
|
||
- resolve bundled standalone runtime in packaged builds
|
||
- start standalone bundles through Electron's own Node runtime via `ELECTRON_RUN_AS_NODE`
|
||
- inject a user-writable data directory and upload/result directories
|
||
- stop the managed process on app quit
|
||
- Update NianxxPlay local persistence to respect desktop-managed runtime paths.
|
||
|
||
Verification:
|
||
- NianxxPlay `npm run build`
|
||
- desktop `pnpm run prepare:nianxx-play`
|
||
- desktop `pnpm run typecheck`
|
||
- desktop `pnpm run build:vite`
|
||
- confirm no `.env*` files are copied into bundled resources
|
||
|
||
## Mac Pilot: Optional Native Clipboard Gatekeeper Fix
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Stop the repeated macOS security prompt for `clipboard.darwin-arm64.node` on customer machines.
|
||
|
||
Implementation:
|
||
- Remove optional `@mariozechner/clipboard*` packages at OpenClaw bundle generation time.
|
||
- Bump the Yinian OpenClaw runtime patch marker so existing managed runtimes reinstall from the cleaned bundle.
|
||
- Clean known user OpenClaw dependency caches before Gateway launch, covering prior pilot installs.
|
||
- Add a focused unit test for runtime cleanup behavior.
|
||
|
||
Verification:
|
||
- `pnpm run typecheck`
|
||
- `pnpm vitest run tests/unit/optional-native-cleanup.test.ts`
|
||
- `pnpm run build:vite`
|
||
- `pnpm exec zx scripts/bundle-openclaw.mjs`
|
||
- `find build/openclaw -name 'clipboard.darwin-arm64.node' -o -path '*@mariozechner/clipboard*'` returns no output.
|
||
|
||
## 2026-05-06 Complete Project Self Check
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Re-run the delivery health checks after the latest mac pilot fixes.
|
||
- Stabilize stale test expectations that no longer matched the current product language and homepage/ability-pack UI.
|
||
- Verify the pilot packaging resource chain without producing a new customer installer.
|
||
|
||
Verification:
|
||
- `pnpm vitest run tests/unit/language-detection.test.ts tests/unit/chat-session-actions.test.ts tests/unit/task-visualization.test.ts tests/unit/today-page.test.tsx tests/unit/yinian-skills-page.test.tsx`: passed, 29 tests.
|
||
- `pnpm test`: passed, 93 files / 620 tests.
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm run package:pilot`: passed.
|
||
- Resource scans:
|
||
- no `tavily` in `resources/skills/preinstalled-manifest.json` or `build/preinstalled-skills`.
|
||
- no `clipboard.darwin-arm64.node` or `@mariozechner/clipboard*` under `build/openclaw` or `release`.
|
||
- NianxxPlay bundle includes `server.js`, `node_modules/next/package.json`, and `.env.runtime`.
|
||
- NianxxPlay bundle scan found no bundled upload directory, generated-results directory, or `.next/cache`.
|
||
|
||
Notes:
|
||
- Removed `tavily-search` from the preinstalled skills manifest and regenerated `build/preinstalled-skills`.
|
||
- `package:pilot` still emits known Vite chunk/dynamic-import warnings and OpenClaw patch-skip warnings.
|
||
- NianxxPlay bundle remains large, currently about 419 MB in `build/apps/nianxx-play`.
|
||
|
||
## 2026-05-09 Office Skills Runtime Hardening
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Consolidate the new MiniMax office/document skills so customer installs do not fall back to "please install LibreOffice/global npm/pip" guidance.
|
||
- Ensure startup/initialization can prepare the common runtime layer for `docx`, `pdf`, `pptx`, and `xlsx`.
|
||
- Keep the public skill names stable as `docx`, `pdf`, `pptx`, and `xlsx`.
|
||
|
||
Implementation Steps:
|
||
- Confirm the MiniMax replacement bundle is generated with stable frontmatter names and Zhinian runtime policies.
|
||
- Add a reusable office-skill dependency check/repair path for:
|
||
- bundled/project Node modules used by `pptx`
|
||
- managed Python 3.12 plus common packages used by `pdf`/`xlsx`
|
||
- .NET availability for `docx`
|
||
- Trigger the repair path during Gateway warmup without blocking normal startup more than necessary.
|
||
- Expose the result through diagnostics/admin tooling so support can see what is missing.
|
||
- Validate with typecheck and targeted runtime scans.
|
||
|
||
Verification:
|
||
- `pnpm run bundle:preinstalled-skills`: passed.
|
||
- Managed Python 3.12 import check: `pypdf`, `reportlab`, `pandas`, `openpyxl`, `matplotlib`, and `bs4` all import successfully.
|
||
- `openclaw config validate`: passed after removing invalid provider `timeoutSeconds` and `models.pricing` writes.
|
||
- `openclaw skills list --json`: `docx`, `pdf`, `pptx`, `xlsx`, and `design` are openclaw-managed and enabled.
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm vitest run tests/unit/model-diagnostics.test.ts tests/unit/diagnostics-routes.test.ts`: passed, 4 tests.
|
||
- `pnpm test`: passed, 93 files / 622 tests.
|
||
- `pnpm run build:vite`: passed with existing Vite chunk/dynamic-import warnings.
|
||
|
||
Notes:
|
||
- `.NET` is still not installed on this machine. The runtime diagnostic treats this as a visible warning for advanced `docx` OpenXML flows, not as a blocker for the basic office runtime.
|
||
- OpenClaw CLI still warns that the config was last written by newer OpenClaw `2026.4.29` while the shell `openclaw` command is `2026.4.15`; the desktop-managed runtime remains the intended source for packaged users.
|
||
|
||
## 2026-05-12 Customer Clean Install Stabilization
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Fix the customer clean-install failure where the app skipped initialization, entered the workspace, and then could not chat on machines without a prior OpenClaw install.
|
||
|
||
Completed:
|
||
- Preserve OpenClaw `docs/reference/templates` in bundled and packaged resources.
|
||
- Create a managed runtime self-reference at `~/.openclaw/runtime/openclaw/node_modules/openclaw`.
|
||
- Treat `setupComplete` as a cached hint only; main-process setup verification now resets stale state when runtime/config/model auth/office markers are missing.
|
||
- Gate Gateway startup behind verified setup plus authenticated Yinian session.
|
||
- Keep NianxxPlay compiled generated-results route code while excluding user-generated output directories.
|
||
- Bundle six preinstalled skills for the pilot package: `docx`, `pdf`, `pptx`, `xlsx`, `design`, `image-search`.
|
||
- Include internal pilot model auth and NianxxPlay runtime env for closed testing only.
|
||
|
||
Verification:
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm test`: passed, 94 files / 628 tests.
|
||
- `pnpm run package:pilot`: passed.
|
||
- `pnpm run package:mac:pilot:arm64`: passed.
|
||
- Packaged resource scan passed for OpenClaw templates, NianxxPlay route code, preinstalled skills, and absence of the optional clipboard native module.
|
||
- `codesign --verify --deep --strict`: passed.
|
||
- `spctl --assess`: rejected as `Unnotarized Developer ID`; notarization remains the next distribution blocker.
|
||
|
||
Deliverable:
|
||
- `/Users/inmanx/Desktop/智念助手-0.1.0-mac-arm64-20260512.dmg`
|
||
|
||
## 2026-05-12 Design And HTML Slides Skill Split
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Keep the design capability in the Zhinian app first, then promote globally after app testing.
|
||
- Split design direction from HTML deck execution.
|
||
|
||
Completed:
|
||
- Upgraded `design` into a general design director/design-system skill for product design, UI/HTML direction, PPT narrative, brand direction, redesigns, and design reviews.
|
||
- Added `html-slides` as a new preinstalled execution skill focused on browser-based HTML decks and PPTX-to-HTML conversion.
|
||
- Bundled `beautiful-html-templates` HTML/JSON/runtime resources without screenshots.
|
||
- Bundled lightweight `frontend-slides` references for viewport fitting, animation patterns, and PPTX extraction.
|
||
- Bumped preinstalled versions:
|
||
- `design`: `2026-05-12-design-system-v2`
|
||
- `html-slides`: `2026-05-12-html-slides-v1`
|
||
- Synced the local OpenClaw test install under `~/.openclaw/skills`.
|
||
|
||
Verification:
|
||
- `python3 resources/skills/local/design/scripts/search.py "B2B SaaS presentation dashboard" --design-system`: passed.
|
||
- `pnpm run bundle:preinstalled-skills`: passed.
|
||
- Preinstalled resource scan found no screenshots and no `.app` directories under `html-slides`.
|
||
- `python3 -m py_compile` passed for both bundled and local `extract-pptx.py`.
|
||
- `node node_modules/openclaw/openclaw.mjs skills list --json`: `design` and `html-slides` are eligible and enabled.
|
||
- Temporary 8-slide HTML smoke deck passed 1280x720, 1440x900, and 390x844 overflow checks.
|
||
|
||
## 2026-05-13 Playwright Chromium Runtime Hardening
|
||
|
||
Status: in_progress
|
||
|
||
Goal:
|
||
- Prevent customer tasks from stalling on task-time `npx playwright install chromium` downloads.
|
||
- Reduce collisions between app-driven browser setup and user/manual Playwright installs.
|
||
- Make Chromium/browser preview readiness visible in diagnostics without blocking PPT/HTML deck delivery.
|
||
|
||
Implementation Steps:
|
||
- Set an app-scoped Playwright browser cache path in Gateway child process environment.
|
||
- Add Office/Slides runtime diagnostics for Playwright module and Chromium binary availability.
|
||
- Update `html-slides` and preinstalled skill bundling policies to forbid task-time Chromium downloads.
|
||
- Run targeted typecheck/tests and update the generated preinstalled skill bundle if needed.
|
||
|
||
Verification:
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm run bundle:preinstalled-skills`: passed after bumping `pdf` and `html-slides` skill versions.
|
||
- `pnpm vitest run tests/unit/playwright-runtime.test.ts`: passed, 2 tests.
|
||
- Real Playwright probe with app-scoped browser cache: Chromium executable exists after symlink mirroring.
|
||
- Generated preinstalled `pdf` policy now forbids task-time browser installers, and `html-slides` policy explicitly forbids `npx playwright install chromium`.
|
||
|
||
## 2026-05-13 Cron Run Final-State Reconciliation
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Prevent Task Center from showing a recovered cron run as failed when the artifact was actually produced.
|
||
|
||
Implementation Steps:
|
||
- Inspect local cron run logs, desktop output, and matching session trajectory files.
|
||
- Reconcile failed cron summaries with `trace.artifacts.data.finalStatus`.
|
||
- Update cron session fallback messages to prefer recovered final assistant summaries.
|
||
- Cover the behavior with cron route tests and run project verification.
|
||
|
||
Verification:
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm vitest run tests/unit/chat-history-actions.test.ts tests/unit/cron-routes.test.ts tests/unit/tasks-page.test.tsx tests/unit/cron-store-fetch-dedupe.test.ts`: passed, 32 tests.
|
||
- `pnpm test`: passed, 98 files / 652 tests; existing MaxListeners warnings remain.
|
||
|
||
## 2026-05-13 Cron Conversation Live Refresh
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Ensure a Task Center run shows this run's query and response/running hint in its fixed task conversation without requiring manual refresh.
|
||
|
||
Implementation Steps:
|
||
- Make cron fallback history produce visible user query and assistant running/empty messages.
|
||
- Optimistically append current run query and running placeholder when a task is manually triggered.
|
||
- After manual trigger completion, refresh the active fixed task conversation and clear running state.
|
||
- Fold run-specific cron event session keys into the fixed task conversation key.
|
||
- Force current cron conversation history refresh on terminal cron events.
|
||
|
||
Verification:
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm vitest run tests/unit/gateway-events.test.ts tests/unit/cron-store-fetch-dedupe.test.ts tests/unit/cron-routes.test.ts tests/unit/tasks-page.test.tsx`: passed, 25 tests.
|
||
- `pnpm vitest run tests/unit/chat-history-actions.test.ts tests/unit/chat-session-actions.test.ts tests/unit/chat-runtime-event-handlers.test.ts tests/unit/gateway-events.test.ts tests/unit/cron-store-fetch-dedupe.test.ts tests/unit/cron-routes.test.ts tests/unit/tasks-page.test.tsx`: passed, 61 tests.
|
||
- `pnpm test`: passed, 98 files / 655 tests; existing MaxListeners warnings remain.
|
||
|
||
## 2026-05-13 Sidebar Navigation Restructure
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Make the left sidebar more structured and space-efficient:
|
||
- conversation entry at the top, directly below Home/Today.
|
||
- Task Center followed by up to five pinned quick tasks.
|
||
- App Center and Knowledge moved to the bottom, above Settings.
|
||
|
||
Implementation Steps:
|
||
- Move App Center and Knowledge from the primary quick-use area into a footer utility group.
|
||
- Add a dedicated conversation container for New Chat and History below the service/home card.
|
||
- Group Task Center and pinned quick task triggers together in the main navigation area.
|
||
- Limit sidebar pinned task rendering to five items.
|
||
- Add a unit test that locks the expected sidebar order and the five-item pinned task cap.
|
||
|
||
Verification:
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm vitest run tests/unit/sidebar-layout.test.tsx`: passed, 1 test.
|
||
- `pnpm vitest run tests/unit/sidebar-layout.test.tsx tests/unit/tasks-page.test.tsx tests/unit/task-center-store.test.ts`: passed, 7 tests.
|
||
- `pnpm run build:vite`: passed with existing Vite chunk/dynamic-import warnings.
|
||
- `pnpm test`: passed, 99 files / 656 tests; existing MaxListeners warnings remain.
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`: passed, 1 test.
|
||
|
||
## 2026-05-13 App-Scoped Local Preference Recovery
|
||
|
||
Status: complete
|
||
|
||
Goal:
|
||
- Restore quick capabilities and channel account remarks after they appeared to disappear when the dev renderer origin changed.
|
||
- Prevent future dev-port or renderer-origin changes from hiding local business preferences.
|
||
|
||
Implementation Steps:
|
||
- Restart the dev app on the original data-bearing origin `http://localhost:5173`.
|
||
- Add an app-level Electron local-preferences store and Host API route.
|
||
- Sync quick capabilities from origin-local storage into app-level preferences, and hydrate from app-level preferences when the current origin has no data.
|
||
- Sync desktop user name, workspace display name, and channel account remarks through the same app-level preference store.
|
||
- Add unit tests for both hydration and migration directions.
|
||
|
||
Verification:
|
||
- Confirmed the app-level preference file contains the user's quick capabilities `写word文章` and `做网页`.
|
||
- Confirmed account remarks are present, including `徐明微信`, `小石的微信`, `徐明飞书`, and `宗琦A2A`.
|
||
- `pnpm run typecheck`: passed.
|
||
- `pnpm vitest run tests/unit/quick-tasks-store.test.ts tests/unit/yinian-local-prefs.test.ts`: passed, 4 tests.
|
||
- `pnpm vitest run tests/unit/yinian-skills-page.test.tsx tests/unit/tasks-page.test.tsx tests/unit/sidebar-layout.test.tsx tests/unit/quick-tasks-store.test.ts tests/unit/yinian-local-prefs.test.ts`: passed, 16 tests.
|
||
- `pnpm run build:vite`: passed with existing Vite chunk/dynamic-import warnings.
|
||
- `pnpm test`: passed, 101 files / 660 tests; existing MaxListeners warnings remain.
|
||
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`: passed, 1 test.
|