Files
NianToB/progress.md
2026-06-04 10:23:41 +08:00

1310 lines
90 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Progress Log
## 2026-06-03 Model Provider Runtime Sync
- 用户反馈:设置默认模型改为 DeepSeek 后,实际运行仍使用 MiniMax。
- 已确认本机 provider account store 默认值为 DeepSeek`deepseek-a1e23f39-4296-4762-8bdf-184ca677cce6` / `deepseek-v4-pro`
- 已确认 OpenClaw runtime 仍为 `minimax-portal/MiniMax-M3`,并带有旧 `yinian-model/custom-model` 占位 provider。
- 日志显示 DeepSeek 保存和默认切换后只触发 Gateway reloadGateway reload/reconnect 随后写回旧内存 config覆盖了刚写入的 DeepSeek runtime 配置。
- 已将 provider 保存、更新、默认切换后的 Gateway 刷新策略改为 restart避免 reload 用旧内存状态覆盖 `openclaw.json`
- 已将 legacy `getDefaultProvider()` 改为优先读取 `defaultProviderAccountId`,并让 `getAllProviders()` 合并 legacy provider 与 account storeaccount store 作为新配置源可参与 agent model 同步。
- 已更新 `model-diagnostics`:启动/诊断修复不再把 legacy MiniMax 默认迁移成 `yinian-model/custom-model`,只清理 `https://api.example.com/v1` 这类旧占位 provider并删除对应 `yinian-model:*` auth 残留。
- 已手动修复本机 `~/.openclaw/openclaw.json`,当前默认模型为 `deepseek/deepseek-v4-pro`provider 配置为 `https://api.deepseek.com/v1` + `openai-completions`Gateway 重启日志确认启动前写入 DeepSeek 默认。
- 当前运行态保留 `minimax-portal` provider 条目是因为本机仍有 MiniMax 账号配置,但它不再是默认模型;`yinian-model` provider/auth 残留已清除。
- 用户随后反馈:设置页“模型服务”仍显示 `yinian-model` / MiniMax 固定缺失提示。
- 已修复 diagnostics 数据源:`buildProviderDiagnostics()` 改为只展示当前默认模型和 fallbacks 实际引用的 providerauth profiles 也按这些 provider 过滤,不再把 `yinian-model``minimax``minimax-portal` 当作固定诊断项。
- 已更新设置页文案为空态:`模型服务` 改为 `当前模型服务``调用凭据` 改为 `当前调用凭据`
- 真实 diagnostics 函数输出确认:`providers=[deepseek]``authProviders=[deepseek]`,没有 `yinian-model` / MiniMax 固定缺失项。
- Verification passed:
- `pnpm exec vitest run tests/unit/model-diagnostics.test.ts tests/unit/provider-runtime-sync.test.ts`
- `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`
- `pnpm exec vitest run tests/unit/model-diagnostics.test.ts tests/unit/settings-advanced-model-config.test.tsx`
- `pnpm exec vitest run tests/unit/model-diagnostics.test.ts tests/unit/settings-advanced-model-config.test.tsx tests/unit/provider-runtime-sync.test.ts tests/unit/provider-service-stale-cleanup.test.ts tests/unit/yinian-initializer.test.ts`
- `pnpm exec tsc --noEmit --pretty false`
- `pnpm run build:vite`
- `git diff --check`
## 2026-05-14 渠道插件运行产物与飞书加固
- 客户日志确认:微信渠道失败不是配置本身,而是 `~/.openclaw/extensions/openclaw-weixin` 被安装成 TypeScript 源码包,缺少 Gateway 可直接加载的 JS 运行入口。
- 已新增插件运行入口检测:同版本插件如果已安装但缺 `openclaw.extensions/main/module` 指向的 JS 文件,会自动从 bundled mirror 重装。
- 已修改插件打包链路:
- `@tencent-weixin/openclaw-weixin` 复制后自动转译 `index.ts/src/**/*.ts``dist/`,并把 `openclaw.extensions` 改为 `./dist/index.js`
- `@larksuite/openclaw-lark@2026.5.13` 加入依赖和 bundled plugin 列表。
- 修正官方飞书包 `main` 指向缺失 `dist/index.js` 的问题,使用实际存在的 `./index.js`
- 给缺少 `channelConfigs` 的微信 manifest 补兼容 channel schema避免 OpenClaw 扫描 warning。
- 已解除飞书硬禁用API route、IPC handler、channel-config、openclaw-auth 都不再把 `feishu` 当作内测禁用渠道。
- 保存飞书配置前会安装 `openclaw-lark` 插件Gateway 启动前也会按已配置渠道自动安装/修复。
- 已运行 `pnpm run bundle:openclaw-plugins`,生成:
- `build/openclaw-plugins/openclaw-weixin/dist/index.js`
- `build/openclaw-plugins/openclaw-lark/index.js`
- 使用临时 HOME 把两个插件复制到 `.openclaw/extensions` 后执行 OpenClaw 插件扫描,结果:
- `openclaw-weixin`: `status=loaded`, `channels=["openclaw-weixin"]`, `missing=[]`
- `openclaw-lark`: `status=loaded`, `channels=["feishu"]`, `missing=[]`
- diagnostics 为空。
- Verification passed:
- `pnpm run bundle:openclaw-plugins`
- `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`
- `pnpm run typecheck`
- `pnpm run package:mac:pilot:arm64`
- Packaged resource check for `release/mac-arm64/智念助手.app/Contents/Resources/openclaw-plugins/*`
- `codesign --verify --deep --strict --verbose=2 release/mac-arm64/智念助手.app`
- `hdiutil verify release/智念助手-0.1.0-mac-arm64.dmg`
- Packaging note: first packaging attempt failed because `@larksuite/openclaw-lark` was added under runtime `dependencies`; `scripts/assert-electron-runtime-deps.mjs` correctly flagged it as a double-pack risk. Moved it to `devDependencies`, while the plugin bundle script still copies it into app resources.
- New pilot artifacts:
- `release/智念助手-0.1.0-mac-arm64.dmg` (1.6G)
- `release/智念助手-0.1.0-mac-arm64.zip` (1.5G)
- `release/latest-mac.yml`
- macOS notarization remains skipped by existing builder config: `notarize` options were unable to be generated.
## 2026-05-13 macOS DMG 打包
- 用户要求打 DMG 安装包,并确保新增/预置 skill 默认放进去。
- 已确认不能使用 `package:mac:local`,因为它会设置 `SKIP_PREINSTALLED_SKILLS=1`
- 当前正式 `package:mac` 链路会执行 `scripts/bundle-preinstalled-skills.mjs`,并通过 `electron-builder.yml``build/preinstalled-skills/` 放入 `resources/preinstalled-skills/`
- 当前 preinstalled manifest 包含并默认启用:`docx``pdf``pptx``xlsx``design``html-slides``image-search``web-search`
- 已停止当前 `pnpm dev`Gateway 随 dev 进程停止。
- 已运行 `pnpm run bundle:preinstalled-skills`8 个技能均成功进入 `build/preinstalled-skills`,锁文件已刷新。
- `pnpm run package:mac` 首次执行在 `prep:mac-binaries` 阶段下载 x64 `uv` 时因 GitHub 连接超时中断。
- 本机 arm64 `node`/`uv` 运行时已存在;下一步改用 `pnpm run package` + `pnpm exec electron-builder --mac --arm64 --publish never` 生成 arm64 DMG并继续包含预置 skills。
- 已完成 arm64 DMG 打包:`release/智念助手-0.1.0-mac-arm64.dmg`,约 1.6G。
- 同步生成:`release/智念助手-0.1.0-mac-arm64.zip``.blockmap``release/latest-mac.yml`
- 已验证最终 `.app``resources/preinstalled-skills` 包含 8 个默认 skill且 manifest 中全部为 `autoEnable: true`
- `codesign --verify --deep --strict --verbose=2 release/mac-arm64/智念助手.app` 通过。
- `hdiutil verify release/智念助手-0.1.0-mac-arm64.dmg` 通过checksum valid。
- Electron Builder 本次提示未执行 macOS notarization`notarize` options were unable to be generated。
## 2026-05-13 对话 Markdown 与隐藏提示泄漏修复
- 收到用户反馈:会话里出现 `[[YINIAN_BUSINESS_RESPONSE_GUIDANCE]]`Markdown/表格渲染还不够结构化,执行思考不需要边框。
- 已停止 direct chat 和 cron 路由在真实消息里追加隐藏业务准则,改为依赖 `AGENTS.clawx.md` 中的基础业务行为准则。
- 已在用户消息显示、会话标题/去重清洗链路补上隐藏准则剥离,兼容已经污染的旧历史。
- 已增强 ChatMessage 的 Markdown 标题、列表、引用、表格渲染;表格增加滚动外壳和数据表样式。
- 已将 ExecutionGraphCard 从边框卡片改为无框时间线视觉。
- 已补充单测覆盖隐藏准则不显示、Markdown 表格增强渲染、chat/cron 不再发送隐藏准则。
- 表格专项 E2E 首次失败,原因是旧用例停在默认新会话路由,未加载种子历史;已固定到 `#/chat` 并重跑通过。
- 根据用户反馈,已删除新对话空态中的 icon 和“智念助手对话”小标题,只保留“今天从哪里开始?”。
- 新对话空态 cleanup 后重新运行 `pnpm run typecheck`,通过。
- Verification passed:
- `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`
- `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`
- `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`
- `pnpm run typecheck`
- `pnpm run build:vite`
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
- `pnpm exec playwright test --config=playwright.legacy.config.ts tests/e2e/yinian-visual-smoke.spec.ts`
- `pnpm exec playwright test --config=playwright.legacy.config.ts tests/e2e/chat-table-header-light.spec.ts`
- `git diff --check`
## 2026-05-13 设置偏好深色 UI
- Started dark-mode Preferences investigation after user report.
- Captured current Electron screenshot for `/settings/preferences` in dark mode.
- Identified low-contrast preference buttons, missing Preferences panel hierarchy, translucent dark title bar band, and missing global dark surface fallback as the main issues.
- Updated Preferences into a structured `yinian-panel` with divided rows and higher-contrast active/inactive choice controls.
- Normalized dark backgrounds for `body`, `.yinian-app-surface`, `MainLayout`, `TitleBar`, `Tabs`, and shared YINIAN panels.
- Verified:
- `pnpm run typecheck`
- `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`
- `pnpm run build:vite`
- Electron screenshot at `test-results/settings-preferences-dark-electron-after.png`
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
- Attempted `pnpm exec playwright test --config=playwright.legacy.config.ts tests/e2e/settings-proxy.spec.ts`; it failed before reaching Settings because the legacy setup helper still expects `main-layout` immediately after setup instead of the current login-first flow.
## 2026-04-26
- Completed full test run after M1 foundation work.
- Fixed E2E compatibility around YINIAN login-first routing.
- Fixed E2E default language mismatch by using English in E2E mode.
- Fixed E2E gateway status initialization without reintroducing auto-start.
- Verified:
- `pnpm run typecheck`
- `pnpm run test`
- `pnpm run test:e2e`
- Created persistent planning files:
- `task_plan.md`
- `findings.md`
- `progress.md`
- Began Phase 1 M1 stabilization.
- Added `docs/M1_HANDOFF.md` with module inventory, env switches, storage boundary, public API, and verification baseline.
- Updated `docs/START_HERE.md` to point to the M1 handoff note and E2E command.
- Fixed channel health timestamp edge case in `electron/api/routes/channels.ts`.
- Verified Phase 1:
- `pnpm exec vitest run tests/unit/channel-routes.test.ts`
- `pnpm run typecheck`
- `pnpm run test`
- `pnpm run test:e2e`
- Phase 1 marked complete.
- Began and completed Phase 2 server contract v0.
- Added `docs/SERVER_CONTRACT_V0.md`.
- Added contract fixture `tests/fixtures/yinian-server-contract.ts`.
- Updated `electron/yinian/http-control-plane.ts`:
- `/auth/refresh` session restore.
- access token remains memory-only.
- refresh token persists for restore.
- config entitlement/channel/ui policy normalization.
- manifest sync returns local registry statuses.
- Expanded `tests/unit/yinian-control-plane.test.ts` from 6 to 11 tests, including HTTP contract paths and failure handling.
- Verified Phase 2:
- `pnpm exec vitest run tests/unit/yinian-control-plane.test.ts`
- `pnpm run typecheck`
- `pnpm run test`
- `pnpm run test:e2e`
- Began and completed Phase 3 Today M2 pilot surface.
- Rebuilt `src/pages/Today/index.tsx` into a B-end operations cockpit:
- health summary
- pending/exception queue
- arrival/departure summary
- skill status board
- recent agent actions
- skill sync error state
- Added `tests/unit/today-page.test.tsx`.
- Verified Phase 3:
- `pnpm exec vitest run tests/unit/today-page.test.tsx`
- `pnpm run typecheck`
- `pnpm run test`
- `pnpm run test:e2e`
- Began and completed Phase 4 Skills Manager M2.
- Rebuilt `src/pages/YinianSkills/index.tsx` into an operator-facing Skills Manager:
- entitlement/local registry merged status
- version and update visibility
- sync failure and empty registry states
- local source, bundle hash, install/sync timestamps
- workspace-scoped registry reload
- Added `tests/unit/yinian-skills-page.test.tsx`.
- Verified Phase 4:
- `pnpm exec vitest run tests/unit/yinian-skills-page.test.tsx`
- `pnpm run typecheck`
- `pnpm run test`
- `pnpm run test:e2e`
- Began and completed Phase 5 Design System Pass.
- Added `src/components/yinian/ui.tsx` with shared YINIAN UI primitives:
- page shell
- page header
- panel
- empty state
- notice
- metric card
- primary/accent classes
- Updated Login, Today, Skills, sidebar service context, main layout, and sidebar active states to use a calmer navy/slate B-end business style.
- Verified Phase 5:
- `pnpm run typecheck`
- `pnpm exec vitest run tests/unit/today-page.test.tsx tests/unit/yinian-skills-page.test.tsx tests/unit/yinian-store.test.ts tests/unit/yinian-skills-store.test.ts`
- `pnpm run test`
- `pnpm run build:vite`
- `pnpm run test:e2e`
- Began and completed Phase 6 Pilot Packaging And QA.
- Added `docs/PILOT_QA.md` with:
- pilot scope
- mock/HTTP/E2E modes
- guided demo script
- QA checklist
- verification commands
- packaging notes
- known issues and product gaps
- Updated `docs/START_HERE.md` with pilot QA and `build:vite`.
- Updated `docs/M1_HANDOFF.md` to reference the current pilot QA baseline and current test counts.
## Next
- Await commit instruction, or start the next product phase: real server integration and first real business skill execution path.
## 2026-05-13 Task Center Iteration
- Continued the approved task center implementation after context compaction.
- Added `/tasks` route and redirected legacy `/cron` to `/tasks?tab=scheduled`.
- Reworked the production sidebar into three business groups:
- 快速使用:应用中心、知识库
- 任务:任务中心
- 对话:新对话、历史会话
- Added the task center page with 快捷任务、定时任务、执行记录 tabs.
- Centralized quick-task prompt construction in `src/lib/quick-task-prompt.ts`.
- Added persisted task center bindings/run records in `src/stores/task-center.ts`.
- Split task center persistence into `yinian:scheduled-task-bindings` and `yinian:task-run-records`, with a migration fallback from the temporary combined key.
- Moved visible quick-task management out of the settings capability-pack tabs and into task center.
- Added Chinese and English task-center locale files and wired the `tasks` namespace.
- Updated delivery smoke expectations from the legacy cron page to task center.
- Verified focused tests:
- `pnpm exec vitest run tests/unit/quick-task-prompt.test.ts tests/unit/task-center-store.test.ts tests/unit/chat-input.test.tsx`
- Fixed current test expectations for the managed preinstalled skill list (`web-search` is now included) and current-session execution-graph state.
- Verified final gate for this slice:
- `pnpm run typecheck`
- `pnpm test`
- `pnpm run build:vite`
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
## 2026-05-13 Task Center Separation Follow-up
- Removed quick-capability surfaces from `src/pages/Tasks/index.tsx`; Task Center now has only scheduled tasks and run history.
- Removed quick-capability template selection from the scheduled-task dialog.
- Stopped creating scheduled-task quick-capability bindings; edit/delete still clears stale legacy bindings for the affected cron job.
- Fixed `@` mention keyboard navigation by preserving selection across navigation keyup events and guarding browser-only `scrollIntoView`.
- Replaced raw custom time entry with structured repeat controls that generate cron expressions for daily, weekly, monthly, and interval schedules, with advanced Cron as fallback.
- Updated Chinese/English task-center copy and tests.
- Verification:
- `pnpm run typecheck`
- `pnpm vitest run tests/unit/tasks-page.test.tsx tests/unit/task-center-store.test.ts`
- `pnpm test`
- `pnpm run build:vite`
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
- Notes:
- First E2E attempt failed because `dist` was stale and still exposed `tasks-tab-quick`; rebuilding fixed it.
- Existing MaxListeners and Vite chunk warnings remain unchanged.
- Follow-up fix:
- Allowed `@` capability mentions inside sentence text instead of only after whitespace or at the start.
- Stored the mention replacement end position so clicking a suggestion preserves text after the cursor.
- Verified with `pnpm run typecheck`, `pnpm vitest run tests/unit/tasks-page.test.tsx`, and `pnpm test`.
- Task Center pinning follow-up:
- Renamed the scheduled-task product surface to “任务中心” while leaving execution-time settings unchanged.
- Added pinned task ids in `useTaskCenterStore` and task-card pin/unpin controls.
- Added sidebar quick triggers for pinned tasks; clicking one immediately calls the existing cron trigger path and records a run.
- Updated Today/task/sidebar related copy and tests.
- Verified:
- `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`
- `pnpm run build:vite`
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
- Task Center density and sidebar structure follow-up:
- Converted Task Center management from two-column cards to a compact list/table layout.
- Preserved enable/disable, delivery visibility, execution metadata, pin, run-now, edit, open-session, and delete actions.
- Moved task metrics into compact header chips and kept execution-time settings untouched.
- Reorganized the sidebar navigation into a scrollable structured area with bounded pinned quick triggers.
- Verified with typecheck, focused task tests, full tests, Vite build, and delivery smoke E2E.
- Immediate history visibility follow-up:
- Added shared local session visibility patching for optimistic history rows.
- New desktop sessions now receive local `updatedAt` immediately, while unused blank sessions remain cleanable.
- First sent messages upsert local session row, label, and activity in the same state update.
- Cron trigger and Gateway started/completed notifications now make automation sessions visible before `sessions.list` catches up.
- Verified with typecheck, focused chat/gateway/cron/task tests, full tests, Vite build, and delivery smoke E2E.
- Task execution conversation follow-up:
- Kept each task on its stable `agent:main:cron:<jobId>` conversation.
- Task Center "立即执行" now switches to that task conversation and opens Chat immediately.
- Sidebar pinned task triggers do the same, so customer follow-up lands in the right thread.
- Added a focused regression test and verified with typecheck, focused tests, full tests, Vite build, and delivery smoke E2E.
- Task conversation naming follow-up:
- Task sessions now force label/displayName to the task name on run, open, sidebar trigger, and cron-trigger visibility updates.
- Cron task sessions are protected from the normal "first user message becomes session name" behavior.
- Gateway automation events try to backfill task names from local cron jobs when available.
- Verified with typecheck, focused chat/task/gateway/cron tests, full tests, Vite build, and delivery smoke E2E.
- Task history merge reliability follow-up:
- Fixed task session loads to merge Gateway `chat.history` with cron run-log fallback instead of choosing one source.
- Added near-duplicate filtering and timestamp sorting for merged cron history.
- Failed cron run fallback messages now use assistant role with `isError` so they remain visible.
- Added focused tests for partial Gateway history plus fallback merge and failed fallback visibility.
- Verified with typecheck, focused history/cron/task/gateway tests, full tests, Vite build, and delivery smoke E2E.
## 2026-04-26 Brand/UI System
- Generated and persisted the 智念助手 design system at `design-system/智念助手/MASTER.md`.
- Began project-wide UI customization with the brand foundation:
- replaced the app icon source SVGs in `resources/icons/`
- generated desktop icon outputs with `pnpm run icons`
- replaced renderer wordmark at `src/assets/logo.svg`
- updated package metadata and electron-builder product metadata
- updated window title, Linux desktop identity, tray labels, startup desktop entry, Login, Sidebar, and Windows title bar branding
- Verified:
- `pnpm run typecheck`
- `pnpm run build:vite`
- `pnpm exec vitest run tests/unit/launch-at-startup.test.ts tests/unit/today-page.test.tsx tests/unit/yinian-skills-page.test.tsx`
- Completed UI Customization Phase 2 Core Surface Refinement:
- expanded `src/components/yinian/ui.tsx` with header actions, kicker, status dot, info row, list item, and section panel primitives
- refined Login with stronger product narrative and a cleaner form panel
- refactored Today sections and operational rows onto shared primitives
- refactored Skills Manager cards onto shared panels/info rows
- refined sidebar service context into a clearer workspace context surface
- Verified Phase 2:
- `pnpm run typecheck`
- `pnpm exec vitest run tests/unit/today-page.test.tsx tests/unit/yinian-skills-page.test.tsx tests/unit/yinian-store.test.ts tests/unit/yinian-skills-store.test.ts tests/unit/launch-at-startup.test.ts`
- `pnpm run build:vite`
- Completed UI Customization Phase 3 Inherited Surface Brand Boundary:
- grouped Sidebar navigation into 快速使用, AI 工作, and 扩展
- kept route test ids stable
- updated major Chinese Chat/Settings/Setup customer-facing strings from ClawX to 智念助手
- updated Setup welcome logo alt/asset naming
- Verified Phase 3:
- `pnpm run typecheck`
- `pnpm exec vitest run tests/unit/today-page.test.tsx tests/unit/yinian-skills-page.test.tsx tests/unit/launch-at-startup.test.ts`
- `pnpm run build:vite`
- `pnpm exec playwright test tests/e2e/main-navigation.spec.ts tests/e2e/settings-proxy.spec.ts tests/e2e/app-smoke.spec.ts`
- Completed UI Customization Phase 4 Inherited Page Visual Polish:
- removed inherited oversized serif heading style from Chat, Settings, Models, Agents, Channels, and Cron surfaces
- normalized headings toward compact system-font dashboard treatment
- replaced remaining major Chinese customer-visible ClawX copy in Agents, Cron, Channels, Chat, Settings, and Setup
- retained technical upstream GitHub references where still useful
- Verified Phase 4:
- `pnpm run typecheck`
- `pnpm exec vitest run tests/unit/today-page.test.tsx tests/unit/yinian-skills-page.test.tsx tests/unit/launch-at-startup.test.ts`
- `pnpm run build:vite`
- `pnpm exec playwright test tests/e2e/main-navigation.spec.ts tests/e2e/settings-proxy.spec.ts tests/e2e/provider-lifecycle.spec.ts tests/e2e/app-smoke.spec.ts`
- Completed UI Customization Phase 5 Screenshot Visual QA:
- added `tests/e2e/yinian-visual-smoke.spec.ts`
- captured Login, Today, and Skills desktop baselines in `test-results/yinian-visual/`
- fixed fresh-user production routing so unauthenticated sessions land on 智念登录 instead of legacy setup
- visually inspected the 1440x900 screenshots for obvious overlap, blank states, and brand consistency
- Verified Phase 5:
- `pnpm run typecheck`
- `pnpm run build:vite`
- `pnpm exec playwright test tests/e2e/yinian-visual-smoke.spec.ts`
## 2026-04-26 B-end Repositioning Pass
- Repositioned customer-facing copy from a hotel-only product to a broader B-end AI Agent desktop product.
- Sidebar primary usage group is now `快速使用`.
- Login, Today, Skills, tray tooltip, installer metadata, zh setup/chat/settings copy, and pilot docs now use workspace/business-object language.
- Mock control-plane demo data now uses `智念杭州运营空间` and `智念上海增长空间`.
- Added compatibility aliases (`YinianWorkspace`, `switchWorkspace`) while keeping existing `hotelId`/`switchHotel` internals stable for storage and HTTP contract safety.
- Verified:
- `pnpm run typecheck`
- `pnpm exec vitest run tests/unit/yinian-control-plane.test.ts tests/unit/yinian-store.test.ts tests/unit/yinian-skills-store.test.ts tests/unit/today-page.test.tsx tests/unit/yinian-skills-page.test.tsx tests/unit/launch-at-startup.test.ts`
- `pnpm run build:vite`
- `pnpm exec playwright test tests/e2e/yinian-visual-smoke.spec.ts`
## 2026-04-26 Shell Simplification Pass
- Removed the old top workspace bar from `MainLayout`.
- Moved current service context into the left sidebar as a non-switching account-bound service card.
- Moved sync and logout actions into the sidebar footer.
- Deleted the old `Yiniansidebar service context` component so future work does not reintroduce the top switcher accidentally.
- Refreshed visual baselines for Login, Today, and Skills.
- Verified:
- `pnpm run typecheck`
- `pnpm exec vitest run tests/unit/today-page.test.tsx tests/unit/yinian-skills-page.test.tsx tests/unit/yinian-store.test.ts`
- `pnpm run build:vite`
- `pnpm exec playwright test tests/e2e/yinian-visual-smoke.spec.ts`
## 2026-04-26 Sidebar IA Pass
- Optimized the left sidebar around the two core customer areas:
- `快速使用`: Today and Skills.
- `对话`: New Chat and Chat.
- Hid Models, Agents, Channels, Cron, and Dev Console from the production sidebar because these capabilities should be issued and governed by the service side.
- Kept legacy configuration navigation available only in `e2e=1` compatibility mode so inherited tests can still cover the old surfaces.
- Moved service sync, logout, and the "configuration is service-managed" explanation into Settings.
- Added Settings to the visual smoke screenshot baseline at `test-results/yinian-visual/04-settings.png`.
- Verified:
- `pnpm run build:vite`
- `pnpm exec playwright test tests/e2e/yinian-visual-smoke.spec.ts`
## 2026-04-26 Sidebar UX Pass
- Moved the Dashboard/Today entry onto the top service card, so the current service object doubles as the dashboard launcher.
- Rebuilt `快速使用` as three direct actions:
- Skills
- 定时任务
- 知识库
- Added `src/pages/Knowledge/index.tsx` and `/knowledge` for a v0 knowledge-base upload/search/list surface.
- Reworked `对话` into:
- `新对话`
- `历史会话`
- `历史会话` now opens a hover popover with the session list and clicks through to the latest session.
- Updated visual smoke screenshots:
- `test-results/yinian-visual/04-knowledge.png`
- `test-results/yinian-visual/05-settings.png`
- Verified:
- `pnpm run typecheck`
- `pnpm run build:vite`
- `pnpm exec playwright test tests/e2e/yinian-visual-smoke.spec.ts tests/e2e/main-navigation.spec.ts`
## 2026-04-26 Enterprise Space Service Integration
- Started service integration discovery for CloudClaw.
- Attempted anonymous repository access:
- `git ls-remote https://git.nianxx.cn/brother7/CloudClaw.git`
- Result: repository requires authentication.
- Recorded current desktop assumptions and backend questions in `findings.md`.
- Connected to the user's logged-in Chrome session via CDP and read CloudClaw source pages.
- Confirmed current CloudClaw backend is the OpenClaw cloud sync MVP and does not yet include enterprise app/skill distribution routes.
- Added desktop-side configurable config/app manifest endpoint support and app-shaped manifest normalization.
- Added missing manifest fallback so `/skills/manifest` 404 stores an empty local registry instead of surfacing an operator-facing crash.
- Added the CloudClaw `openclaw-cloud-sync` plugin as a 智念内置 OpenClaw plugin mirror:
- source mirror: `resources/openclaw-plugins/cloud-sync`
- dev mirror: `build/openclaw-plugins/cloud-sync`
- startup install target: `~/.openclaw/extensions/cloud-sync`
- Added startup config sync for `plugins.entries.cloud-sync.config.serverUrl`.
- Added static plugin copying to `scripts/bundle-openclaw-plugins.mjs` and `scripts/after-pack.cjs`.
- Adapted the plugin metadata/commands for the current OpenClaw runtime:
- `openclaw.extensions` is emitted as a string entry list.
- command registrations use `name` / `description` / `handler`.
- Verified:
- `pnpm run typecheck`
- `pnpm vitest run tests/unit/plugin-install.test.ts tests/unit/yinian-control-plane.test.ts`
- `pnpm run bundle:openclaw-plugins`
- `node node_modules/openclaw/openclaw.mjs plugins list | rg -n "cloud-sync|cloud_sync|Cloud Sync|failed|error" -C 2 || true`
## 2026-04-26 Engineering Assessment Snapshot
- Ran a testing-stage engineering assessment after the CloudClaw direct plugin integration.
- Current tracked diff is broad: 69 modified tracked files plus new YINIAN/product modules, docs, design system, Cloud Sync plugin mirror, and tests.
- Verification results:
- `pnpm run typecheck`: passed
- `pnpm run build:vite`: passed, with large renderer chunk warning (~1.6MB minified / ~481KB gzip)
- `pnpm run test`: failed; 88 test files passed, 2 failed; 584 tests passed, 5 failed
- focused E2E (`yinian-visual-smoke`, `main-navigation`, `app-smoke`): 4 passed, 1 failed
- Unit failures are mostly stale expectations after customer-facing terminology changed from Skills/registry to 应用/本机准备.
- Visual E2E failure is a real test-flow gap: production login now requires captcha input, but the visual smoke test still clicks login without filling account/password/captcha.
- Compatibility E2E for legacy setup/main navigation still passed.
- Cloud Sync plugin is loaded by `openclaw plugins list`, but remains infrastructure-only until its server URL/account contract is finalized.
## 2026-04-26 Stabilization Pass
- Fixed stale customer-facing terminology expectations in Today and Applications unit tests.
- Fixed the 智念 visual smoke login flow so it fills account/password, and relaxed captcha submit gating when mock mode has no captcha image.
- Added Cloud Sync startup config tests:
- server URL derivation from explicit env, API base URL, and default.
- plugin entry writing before Gateway launch.
- disabled mode skips install/config writes.
- Added knowledge-base import boundary tests:
- missing files are rejected without registry writes.
- newer imports are listed first.
- invalid `.docx` files are rejected before entering the registry.
- Verification:
- `pnpm run typecheck`: passed
- `pnpm run test`: passed, 90 files / 595 tests
- `pnpm run build:vite`: passed, with existing chunk-size and dynamic/static import warnings
- `pnpm run test:e2e`: passed, 27 passed / 1 skipped
## 2026-04-26 Product Simplification Pass
- Removed unsupported account/service profile signals from customer-facing UI:
- service city / region
- account role / position
- role labels in sidebar and Settings
- Removed unsupported dashboard signals:
- `运营健康度`
- fake business pending metrics
- recent application run traces derived from mock placeholders
- notification-method count from the dashboard
- Reworked Today into a lighter application readiness dashboard:
- opened apps
- locally ready apps
- pending sync
- sync failures
- service/account summary
- Reworked login side panel from numeric marketing claims into stable product areas:
- account login
- application delivery
- knowledge base
- Simplified `YinianHotel` in `shared/yinian.ts` to service identity only: `id`, `name`, optional `brand`.
- Updated mock control-plane, contract fixtures, tests, and pilot QA docs from hotel/OTA samples to generic enterprise service/application samples.
- Verification:
- `pnpm run typecheck`: passed
- focused YINIAN unit tests: passed, 5 files / 37 tests
- `pnpm run test`: passed, 90 files / 595 tests
- `pnpm run build:vite`: passed, with existing Vite warnings
- `pnpm exec playwright test tests/e2e/yinian-visual-smoke.spec.ts`: passed
## 2026-04-26 Interaction And Knowledge Fixes
- Stabilized the sidebar history popover with delayed close handling so it is less likely to close while moving across the New Chat / History area.
- Added saved account/password support on the login page:
- renderer loads saved credentials on login page mount.
- main process stores them in the YINIAN namespace.
- password is encrypted with Electron `safeStorage` when available, with a dev/test fallback.
- Changed knowledge-base chat context from file-path references to actual local-backup content injection through `/api/knowledge/context`.
- Added tests proving a knowledge file still works after the original source file is deleted.
- Updated user-facing `服务空间` language to `组织空间`.
- Removed the preset quick-question buttons from the empty chat screen.
- Fixed the `gateway-ready-fallback` unit test so it no longer tries to start a real Gateway while fake timers are active.
- Verification:
- `pnpm run typecheck`: passed
- focused unit tests: passed, 5 files / 42 tests
- `pnpm run test`: passed, 90 files / 598 tests
- `pnpm run build:vite`: passed, with existing Vite warnings
- `pnpm exec playwright test tests/e2e/yinian-visual-smoke.spec.ts`: passed
## 2026-04-26 Chat Layout Responsiveness Fix
- Fixed chat page sizing after sidebar collapse:
- main content now allows flex children to shrink/grow with `min-w-0`.
- chat page no longer relies on negative margins and viewport-height calculation.
- chat messages and composer now use a wider responsive max width.
- knowledge context popover is capped for narrow windows.
- Electron layout verification at 1120x760:
- expanded sidebar: main 864px, composer 816px.
- collapsed sidebar: main 1056px, composer 1008px.
- Verification:
- `pnpm run typecheck`: passed
- focused chat unit tests: passed, 2 files / 4 tests
- `pnpm run build:vite`: passed, with existing Vite warnings
## 2026-04-26 Settings Tabs Cleanup
- Reworked Settings into tabbed sections:
- 账号与组织
- 使用偏好
- 运行维护
- 高级工具
- 关于
- Kept server-managed capability messaging under account/organization settings.
- Moved advanced diagnostics behind the 高级工具 tab while keeping the unlock switch in 运行维护.
- Removed unrelated external jump buttons from About, including website, GitHub, and FAQ links.
- Verification:
- `pnpm run typecheck`: passed
- `pnpm run build:vite`: passed, with existing Vite warnings
- `pnpm exec playwright test tests/e2e/yinian-visual-smoke.spec.ts`: passed
## 2026-04-27 Settings Information Architecture Update
- Reduced Settings top-level tabs to:
- 账号与组织
- 使用偏好
- 运行维护
- 更新与关于
- Compact account/organization layout:
- tightened the organization card spacing.
- moved account name into a compact inline badge.
- changed service capabilities to show only 渠道管理.
- hid AI service, assistant capability, and automatic-task strategy cards.
- Limited language options to 中文 and English in 使用偏好.
- Folded advanced tools into 运行维护.
- Merged About details into 更新与关于.
- Verification:
- `pnpm run typecheck`: passed
- `pnpm run build:vite`: passed, with existing Vite warnings
- `pnpm exec playwright test tests/e2e/yinian-visual-smoke.spec.ts`: passed
## 2026-04-27 Settings Channel Management Expansion
- Expanded 渠道管理 in Settings from a single service-capability row into a full management summary:
- loads `/api/channels/accounts`.
- displays configured channel count, channel-account count, and connected-account count.
- lists each configured channel, group status, default account, per-account status, binding target, and last error.
- adds refresh and 完整管理 actions; 完整管理 navigates to `/channels`.
- Kept the compact account/organization layout while making channel status visible without leaving Settings.
- Verification:
- `pnpm run typecheck`: passed
- `pnpm exec vitest run tests/unit/channel-routes.test.ts`: passed, 23 tests
- `pnpm run build:vite`: passed, with existing Vite warnings
- `pnpm exec playwright test tests/e2e/yinian-visual-smoke.spec.ts`: passed
## 2026-04-27 Settings Channel Module Integration
- Promoted 渠道管理 to its own Settings tab instead of showing it as a secondary service capability.
- Embedded the existing full Channels management surface in Settings:
- configured channels
- supported channels
- add/edit/delete account flows
- agent binding controls
- gateway health diagnostics
- Removed the 服务能力 module from 账号与组织.
- Merged account and update settings into 账号与更新.
- Reduced About to a bottom footnote inside 账号与更新 without a large section title.
- Verification:
- `pnpm run typecheck`: passed
- `pnpm exec vitest run tests/unit/channel-routes.test.ts`: passed, 23 tests
- `pnpm run build:vite`: passed, with existing Vite warnings
- `pnpm exec playwright test tests/e2e/yinian-visual-smoke.spec.ts`: passed
## 2026-05-05 Project Progress Update For Version 3.5
- Updated planning status for the next phase: 3.5 will focus on integrating one large application inside 应用中心.
- Current product baseline before 3.5:
- 登录 and server auth flow are connected.
- 组织空间/service context is simplified to one account mapping to one B-end service.
- 侧边栏 is focused around Dashboard, 快速使用, 对话, and 设置.
- 应用中心 exists as a compact launcher with tag filtering and built-in app entries.
- 能力包 is separated from 应用中心 and owns service-issued/local skills plus 快捷任务配置.
- 快捷任务 now injects `使用{能力包名称} skill` into the actual user message, is single-select, and is single-use per send.
- Knowledge Base v0 locally backs up imported files and can inject selected file text into chat context.
- Dev server port is now `5188`, avoiding collisions with other projects using `5173`.
- Added a new `Version 3.5: Application Center Large-App Integration` section to `task_plan.md`.
- Added application-center readiness notes to `findings.md`.
- No code was changed for the large application in this update; this was a planning/progress synchronization step.
## 2026-05-05 NianxxPlay Large-App Review
- Located the candidate large app at `/Users/inmanx/Documents/NianxxPlay`.
- Current NianxxPlay scope:
- `NianxxPlay智念视频助手`
- Seedance 2.0 video generation workspace
- creation modes: 宣传片制作 and 创意复刻
- template-first studio, asset upload, prompt assembly, project history, billing/credits, Seedance task APIs
- Engineering shape:
- Next.js 15 App Router project.
- Not a git repository locally.
- Uses local MVP persistence through `.data/app-state.json`.
- Uses Aliyun OSS and Seedance/Ark API environment configuration for real generation.
- Verification:
- `npm test`: passed, 3 files / 11 tests.
- `npm run build`: passed.
- Known build warning remains in the `ali-oss` dependency chain and does not currently block build.
- 3.5 integration direction:
- Treat NianxxPlay as the first large application for 应用中心.
- Prefer embedded-web hosting in 智念助手 first, because NianxxPlay owns full routes, API routes, storage, upload, and generation workflow.
- Next implementation should build the 智念 large-app host route and then connect a local NianxxPlay URL for internal testing.
## 2026-05-05 Bundled Runtime Assessment For NianxxPlay
- Evaluated the clarified target: NianxxPlay should be installed, updated, launched, and maintained together with the 智念助手 desktop app.
- Recommended engineering direction:
- Build NianxxPlay as a Next.js standalone runtime.
- Bundle it into 智念助手 `extraResources`.
- Install/copy it into a desktop-managed user runtime directory.
- Launch it from Electron main process on a local loopback port.
- Render it inside 应用中心 through an embedded app host route.
- Existing desktop precedent:
- bundled OpenClaw already follows the same build -> extraResources -> managed runtime -> process lifecycle model.
- NianxxPlay should reuse this lifecycle style rather than asking customers to install development dependencies.
- Key risks logged:
- NianxxPlay project root is about 1GB in development form.
- starter media assets alone are about hundreds of MB.
- `.env.local` contains real credentials and must never be shipped.
- local data/upload paths currently rely on `process.cwd()` and must move to user-writable app-managed directories.
- the current `localhost:3000` assumption must become dynamic-port aware.
- Updated `task_plan.md` with a new `Version 3.5: Bundled NianxxPlay Runtime` section.
- Updated `findings.md` with size, runtime, security, and packaging findings.
## 2026-05-05 App Center Focus Pass
- Removed the small demo applications from 应用中心:
- calculator
- quick note
- file converter
- web assistant
- help center
- Deleted calculator-specific route/code/test files:
- `src/pages/Calculator/index.tsx`
- `src/lib/calculator.ts`
- `tests/unit/calculator.test.ts`
- Added the single NianxxPlay application entry:
- id: `nianxx-play`
- route: `/app-center/nianxx-play`
- icon: `Clapperboard`
- category: 视频创作
- Added `src/pages/NianxxPlay/index.tsx` as the first large-app host shell:
- back, reload, and browser-open controls
- embedded local app frame
- service-managed account/permission/secret/billing boundary copy
- dev URL defaults to `http://127.0.0.1:3000` and can be overridden with `VITE_NIANXX_PLAY_URL`
- Updated app-center Chinese/English copy around the single-app focus and server-managed boundaries.
- Verification:
- `pnpm run typecheck`: passed
- `pnpm run build:vite`: passed, with existing Vite warnings
- focused vitest command: passed, 1 file / 3 tests
## 2026-05-06 NianxxPlay Bundled Runtime Implementation
- Implemented the first packaging pass for 应用中心 large-app distribution.
- NianxxPlay changes:
- enabled Next.js standalone output in `next.config.ts`.
- added `/api/desktop/health` for desktop runtime identity checks.
- moved local state, uploads, and generated-result fallback paths behind env-driven runtime directories.
- added local file routes for `/uploads/*` and `/generated-results/*` so packaged runtime can serve user-writable files outside app resources.
- Desktop changes:
- added `scripts/prepare-nianxx-play-bundle.mjs`.
- added `pnpm run prepare:nianxx-play`.
- wired NianxxPlay bundling into `package` and `build`.
- prepared `build/apps/nianxx-play` as a Next.js standalone bundle for electron-builder.
- excluded `.env*`, `.data`, local uploads, and local generated results from the shipped bundle.
- updated Electron NianxxPlay service manager to detect source vs standalone runtime.
- packaged standalone runtime now launches via Electron's own Node runtime with `ELECTRON_RUN_AS_NODE`, avoiding customer Node/npm dependency.
- runtime data is injected under the desktop app userData directory.
- existing local NianxxPlay `.data`, uploads, and generated results are migrated once into the desktop-managed runtime directory when empty.
- startup health check now validates the NianxxPlay marker endpoint, so a random service on port 3000 is not mistaken for the app.
- Vite dev watch now ignores built-in app bundles to avoid reload spam while preparing large app resources.
- Verification:
- NianxxPlay `npm test`: passed, 3 files / 11 tests.
- NianxxPlay `npm run build`: passed, with the existing ali-oss dynamic dependency warning.
- `pnpm run prepare:nianxx-play`: passed.
- standalone smoke test with Electron Node mode on port 3317: passed for health endpoint and homepage.
- confirmed no `.env*`, `.data`, `public/uploads`, or `public/generated-results` entries remain in the prepared bundle.
- removed local absolute source paths from the shipped bundle manifest.
- added a secret-value guard to the NianxxPlay bundle script: it scans sensitive-looking values from source env files and fails packaging if any are compiled into the shipped text bundle.
- added an internal-testing packaging path:
- `pnpm run prepare:nianxx-play:pilot`
- `pnpm run package:pilot`
- `pnpm run package:mac:pilot`
- pilot packaging writes `.env.runtime` into the bundled NianxxPlay runtime and Electron injects those values when launching the companion app.
- desktop `pnpm run typecheck`: passed.
- desktop `pnpm run build:vite`: passed, with existing Vite chunk warnings.
- desktop dev server restarted on `http://localhost:5188/`.
## 2026-05-06 Pilot Package Issue Triage
- Reviewed customer screenshots and `/Users/inmanx/Desktop/clawx-2026-05-06.log`.
- Found three packaging/runtime blockers:
- macOS reported `clipboard.darwin-arm64.node` as unverifiable because the shipped app is Developer ID signed but not notarized/stapled.
- NianxxPlay failed immediately with `Cannot find module 'next'` because electron-builder skipped `build/apps/nianxx-play/node_modules` when copying extraResources.
- Packaged mac build lacked bundled `uv`, causing managed Python setup to fail with `spawn uv ENOENT`.
- Applied fixes:
- `prep:mac-binaries` now downloads both uv and Node/npm.
- afterPack now manually copies NianxxPlay `node_modules` into the packaged resources.
- afterPack removes optional `@mariozechner/clipboard*` native packages from OpenClaw packaging so clipboard fallback uses `pbcopy` instead of loading a native `.node`.
- CLI symlink refresh now removes broken symlinks with `rmSync(..., { force: true })` before recreating.
- Follow-up validation:
- `pnpm run typecheck`: passed.
- `pnpm run build:vite`: passed, with existing Vite chunk warnings.
- `pnpm run prep:mac-binaries:arm64`: passed; bundled arm64 `node` and `uv` are present.
- NianxxPlay pilot runtime env contains the required Seedance/OSS keys without printing secret values.
- Manual afterPack mutation of the already-built release app was used only for diagnosis; it invalidates the local app seal and must not be shipped without a fresh electron-builder packaging/signing pass.
## 2026-05-06 Mac arm64 Pilot Package Rebuild
- Rebuilt the internal-testing mac arm64 package with:
- bundled arm64 `node`
- bundled arm64 `uv`
- NianxxPlay standalone runtime env
- afterPack NianxxPlay `node_modules` copy
- optional native clipboard package removal
- Generated arm64 artifacts:
- `release/智念助手-0.1.0-mac-arm64.dmg`
- `release/智念助手-0.1.0-mac-arm64.zip`
- Copied the customer-facing dmg to the desktop:
- `/Users/inmanx/Desktop/智念助手-0.1.0-mac-arm64-内测修复版.dmg`
- Verification:
- packaged app contains NianxxPlay `node_modules/next`.
- packaged app contains `Contents/Resources/bin/node` and `Contents/Resources/bin/uv`.
- optional `@mariozechner/clipboard*` native package is absent.
- `codesign --verify --deep --strict` passes for the arm64 app.
- `hdiutil verify` passes for the arm64 dmg.
- packaged NianxxPlay server starts from the app bundle and `/api/desktop/health` returns ok with Seedance and OSS services configured when `.env.runtime` is loaded.
- Remaining distribution caveat:
- electron-builder skipped notarization because notarize options could not be generated in the current shell; `spctl` still reports `Unnotarized Developer ID`.
- The script still starts redundant x64 packaging from the shared mac target config; this run was interrupted after complete arm64 artifacts were produced.
## 2026-05-06 Long Task + Model Diagnostics Fix
- Fixed the chat running-state regression where Gateway `phase=end` notifications were treated as terminal completion.
- `phase=end` now refreshes history only and keeps `sending` / `activeRunId` intact.
- terminal phases remain `completed`, `done`, and `finished`.
- Added Yinian model runtime diagnostics and repair helpers:
- enforces the internal model timeout at 300s.
- disables OpenClaw startup pricing catalog fetches with `models.pricing.enabled=false`.
- normalizes MiniMax auth profile aliases so stale `minimax-cn:default` credentials also satisfy the `minimax/...` model reference.
- Added a Host API endpoint:
- `GET /api/diagnostics/model-config`
- `GET /api/diagnostics/model-config?repair=1`
- Added an admin-only Settings > 运行维护 card for AI service configuration checks. It shows default model, provider state, credential presence, runtime flags, and config paths without exposing secrets.
- Loosened mac/Linux Gateway heartbeat recovery thresholds to match the more forgiving Windows thresholds: 60s interval, 25s timeout, 5 misses.
- Verification:
- `pnpm run typecheck`: passed.
- `pnpm run build:vite`: passed with existing Vite chunk warnings.
- targeted tests passed:
- `tests/unit/gateway-events.test.ts`
- `tests/unit/model-diagnostics.test.ts`
- `tests/unit/diagnostics-routes.test.ts`
- `tests/unit/gateway-manager-heartbeat.test.ts`
- Full `pnpm test` still has unrelated existing failures in stale page/test expectations (`yinian-skills-page`, `today-page`, `chat-session-actions`, `task-visualization`, `language-detection`).
## 2026-05-06 Optional Native Clipboard Gatekeeper Fix
- Investigated repeated customer macOS security prompt for `clipboard.darwin-arm64.node`.
- Found the current `release/mac-arm64` app no longer contained the clipboard native package, but `build/openclaw` and user-managed OpenClaw directories could still retain `@mariozechner/clipboard*` packages.
- Applied a three-layer fix:
- `scripts/bundle-openclaw.mjs` now skips `@mariozechner/clipboard*` during dependency collection and defensively removes any residual package before writing the runtime marker.
- `electron/utils/paths.ts` now bumps the managed runtime patch marker to `2026-05-06-npm-runner-clipboard-v2`, forcing stale managed runtimes to reinstall from the cleaned bundled runtime.
- `electron/gateway/config-sync.ts` now cleans optional clipboard packages from user OpenClaw runtime/cache/extension dependency directories before Gateway startup.
- Added `electron/utils/optional-native-cleanup.ts` and `tests/unit/optional-native-cleanup.test.ts`.
- Verification:
- `pnpm run typecheck`: passed.
- `pnpm vitest run tests/unit/optional-native-cleanup.test.ts`: passed.
- `pnpm run build:vite`: passed with existing Vite chunk warnings.
- `pnpm exec zx scripts/bundle-openclaw.mjs`: passed.
- `find build/openclaw -name 'clipboard.darwin-arm64.node' -o -path '*@mariozechner/clipboard*'`: no output.
- `find release -name 'clipboard.darwin-arm64.node' -o -path '*@mariozechner/clipboard*'`: no output.
## 2026-05-06 Complete Project Self Check Follow-up
- Fixed stale unit-test expectations for the current product state:
- language detection now expects unsupported `ja_JP` to fall back to English because the visible product language set is Chinese/English.
- new chat session tests now expect desktop-first `agent:main:*` session keys.
- task visualization tests no longer expose internal thinking-only chunks as execution steps.
- Today page tests now cover `开始工作`, `常用应用`, `智念视频助手`, `定时任务`, `知识库`, and recent conversations.
- Ability-pack page tests now select top-level tabs precisely so quick-task skill-source labels do not collide with `服务下发` / `本地安装`.
- Verification:
- targeted failed files: passed, 5 files / 29 tests.
- `pnpm test`: passed, 93 files / 620 tests.
- `pnpm run typecheck`: passed.
- `pnpm run package:pilot`: passed.
- Removed `tavily-search` from `resources/skills/preinstalled-manifest.json` and regenerated `build/preinstalled-skills`.
- Resource checks:
- `tavily` absent from preinstalled manifest and generated preinstalled bundle.
- optional native clipboard package absent from `build/openclaw` and `release`.
- NianxxPlay bundle contains the standalone server, Next runtime, and internal `.env.runtime`.
- NianxxPlay bundle scan only reports `.env.runtime`; no uploads, generated results, or Next cache directories.
- Remaining warnings:
- Vitest still emits `MaxListenersExceededWarning`.
- Vite still warns about large chunks and mixed static/dynamic imports.
- OpenClaw bundling still skips several patch snippets that are not present in the current upstream package.
- NianxxPlay bundle remains heavy at about 419 MB.
## 2026-05-09 Office Skills Runtime Hardening
- Started consolidation after replacing old office skills with MiniMax versions.
- Added an explicit task plan and findings entry so this does not remain a one-off local copy change.
- Added `electron/utils/office-skill-runtime.ts` to check and repair the common office runtime layer:
- managed Python 3.12 plus `pypdf`, `reportlab`, `pandas`, `openpyxl`, `matplotlib`, `beautifulsoup4`.
- project/bundled Node modules for PPT generation.
- `.NET` presence as a visible warning for advanced docx flows.
- Wired office runtime preparation into first-run initialization and Gateway warmup.
- Added admin diagnostics endpoint and Settings > 运行维护 UI for office runtime checks/repair.
- Hardened the MiniMax skill bundler so `docx`, `pdf`, `pptx`, and `xlsx` use stable local slugs and avoid global install guidance.
- Fixed the model runtime repair path so it no longer writes OpenClaw-invalid `models.pricing` or provider `timeoutSeconds` fields.
- Cleaned the local `~/.openclaw/openclaw.json` and kept `agents.defaults.heartbeat.every = "0m"` to disable heartbeat prompts.
- Verification:
- `pnpm run bundle:preinstalled-skills`: passed.
- managed Python imports for office packages: passed.
- `openclaw config validate`: passed.
- `openclaw skills list --json`: `docx`, `pdf`, `pptx`, `xlsx`, and `design` enabled.
- `pnpm run typecheck`: passed.
- `pnpm vitest run tests/unit/model-diagnostics.test.ts tests/unit/diagnostics-routes.test.ts`: passed.
- `pnpm test`: passed, 93 files / 622 tests.
- `pnpm run build:vite`: passed with existing Vite warnings.
## 2026-05-09 Local .NET SDK Install
- Installed .NET SDK 10.0.203 into the user-local runtime path `~/.dotnet` using Microsoft's install script because Homebrew cask installation requires interactive `sudo`.
- Added `DOTNET_ROOT="$HOME/.dotnet"` and `~/.dotnet` to `~/.zprofile` so new zsh sessions can resolve `dotnet`.
- Added desktop runtime path support so Electron/OpenClaw child processes also see user-local `.NET`:
- `electron/utils/dotnet-runtime.ts`
- office runtime diagnostics use the resolved `.NET` executable.
- Gateway launch and doctor-repair environments include the `.NET` path.
- Verification:
- `zsh -lc 'dotnet --version'`: `10.0.203`.
- `pnpm run typecheck`: passed.
- `pnpm run build:vite`: passed with existing Vite warnings.
## 2026-05-09 Office Skill Prompt Cleanup
- Removed remaining desktop office-suite conversion/recalculation branches from generated office skills so the agent does not drift into asking for external office tools.
- `xlsx` now exposes static formula validation only through `formula_check.py`; the dynamic recalculation script is removed from the preinstalled bundle.
- `docx` legacy `.doc` conversion helper is removed from the preinstalled bundle; `.docx` creation/editing stays on the .NET OpenXML path.
- Regenerated `build/preinstalled-skills` and synced `docx`, `pdf`, `pptx`, and `xlsx` into `~/.openclaw/skills`.
- Added `.clawx-preinstalled.json` markers back to the local synced skills so future app startup treats them as app-managed preinstalled skills.
- Verification:
- `node --check scripts/bundle-preinstalled-skills.mjs`: passed.
- `pnpm run bundle:preinstalled-skills`: passed.
- scan of generated and local office skills found no `LibreOffice`, `libreoffice`, `soffice`, `Libra`, `libra`, `libreoffice_recalc`, or `doc_to_docx`.
- `openclaw skills list --json`: `docx`, `pdf`, `pptx`, `xlsx`, and `design` enabled.
- `pnpm run typecheck`: passed.
## 2026-05-09 Assistant Output Sanitizer
- Added a renderer-side assistant output sanitizer for external office-suite guidance that may appear in old history or model-invented final replies.
- Wired the sanitizer into both history hydration and live streaming/final message handling.
- It removes user-visible `LibreOffice` / `soffice` / `Libra` / technical conversion-engine advice while preserving generated file paths, attachments, and tool blocks.
- Verification:
- `pnpm vitest run tests/unit/assistant-output-sanitizer.test.ts`: passed.
- `pnpm run typecheck`: passed.
- `pnpm run build:vite`: passed with existing Vite warnings.
## 2026-05-12 Customer Clean Install Stabilization
- Read the customer logs from both WeChat paths.
- Confirmed the install skipped setup because app state said `setupComplete=true`, even though runtime files were incomplete.
- Confirmed two hard runtime blockers:
- OpenClaw templates were removed from the customer package.
- Managed runtime lacks a self-reference for bare `openclaw/...` package imports.
- Started a focused stabilization plan in `task_plan.md`.
- Fixed OpenClaw packaging cleanup so `docs/reference/templates` survives while the rest of docs can still be pruned.
- Bumped the Yinian managed runtime patch marker to `2026-05-12-runtime-templates-selfref-v1`.
- Added managed runtime self-reference creation at install time so ESM imports like `openclaw/plugin-sdk/...` resolve under `~/.openclaw/runtime/openclaw`.
- Hardened setup status:
- validates runtime files, workspace, config, and initialization marker.
- resets stale `setupComplete=true` if those files are missing.
- renderer settings now reconciles `setupComplete` with `yinian:setup:status`.
- Gateway start is gated by verified setup plus authenticated Yinian session.
- Fixed NianxxPlay bundle filtering so compiled `generated-results` route code ships while `public/generated-results` user output remains excluded.
- Verification:
- `pnpm run typecheck`: passed.
- script syntax checks for after-pack / Nianxx bundle / OpenClaw bundle: passed.
- `pnpm exec zx scripts/bundle-openclaw.mjs`: passed, runtime templates verified.
- managed-runtime simulation with self-reference: `dist/extensions/codex/prompt-overlay.js` imports successfully.
- `pnpm run build:vite`: passed with existing Vite warnings.
- targeted tests passed: `model-diagnostics`, `diagnostics-routes`, `optional-native-cleanup`.
- `pnpm test`: passed, 94 files / 628 tests, with the existing MaxListeners warning.
- `pnpm run package:pilot`: passed.
- resource checks passed: OpenClaw templates present, NianxxPlay compiled generated-results route present, `public/generated-results` absent.
## 2026-05-12 Clean Install Follow-up And Arm64 Pilot Package
- Added internal-pilot model auth packaging and initialization seeding:
- `scripts/prepare-internal-model-auth.mjs`
- `resources/yinian-internal/model-auth-profiles.json` in pilot builds
- setup status now treats missing model auth as not initialized.
- Added OpenClaw package roots to office skill runtime dependency resolution.
- Re-ran verification:
- `pnpm run typecheck`: passed.
- `pnpm vitest run tests/unit/model-diagnostics.test.ts tests/unit/diagnostics-routes.test.ts tests/unit/optional-native-cleanup.test.ts tests/unit/yinian-store.test.ts tests/unit/openclaw-auth.test.ts tests/unit/gateway-events.test.ts`: passed, 40 tests.
- `pnpm test`: passed, 94 files / 628 tests; existing MaxListeners warnings remain.
- `pnpm run package:pilot`: passed.
- managed runtime simulation with `node_modules/openclaw -> ..`: passed.
- Generated new Apple Silicon pilot installer:
- `release/智念助手-0.1.0-mac-arm64.dmg` (about 1.5 GB)
- copied to `/Users/inmanx/Desktop/智念助手-0.1.0-mac-arm64-20260512.dmg`
- Release resource checks passed:
- OpenClaw `AGENTS.md`, `TOOLS.md`, `HEARTBEAT.md` templates present.
- NianxxPlay generated-results route present.
- six preinstalled skills present.
- optional clipboard native module absent.
- no `*.app` directories in preinstalled skills.
- macOS signing status:
- Developer ID code signature verifies.
- Notarization was skipped by electron-builder due missing notarize options, so Gatekeeper still reports `Unnotarized Developer ID`.
## 2026-05-12 NianxxPlay Demo Asset And Runner Fix
- Fixed the NianxxPlay "生成示例" sample video path:
- moved the Wujiang reference video/cover into formal built-in starter assets under `public/starter/promo/`.
- updated `starter-content.ts` and `content/seedance-starter/catalog.json` to reference `/starter/promo/wujiang-reference.mp4` and `.jpg`.
- kept `public/generated-results` excluded from desktop bundles, so user generated history remains out of customer packages.
- Fixed the visible extra Dock process risk:
- NianxxPlay standalone now prefers the bundled Node binary in `Resources/bin/node`.
- it only falls back to `process.execPath + ELECTRON_RUN_AS_NODE` if bundled Node is missing.
- Verification:
- NianxxPlay `npm test`: passed, 3 files / 12 tests.
- NianxxPlay `npm run build`: passed with existing `any-promise/register` warning.
- desktop `pnpm run typecheck`: passed.
- desktop `pnpm run build:vite`: passed with existing Vite warnings.
- `NIANXX_PLAY_BUNDLE_ENV=1 node scripts/prepare-nianxx-play-bundle.mjs`: passed.
- bundle/release resource scans confirm the starter mp4/jpg are included and `public/generated-results` / `public/uploads` remain excluded.
- `pnpm run package:mac:pilot:arm64`: passed.
- `codesign --verify --deep --strict`: passed; notarization still not configured.
- Deliverable:
- `/Users/inmanx/Desktop/智念助手-0.1.0-mac-arm64-20260512-video-node.dmg`
## 2026-05-12 Design And HTML Slides Skill Split
- Upgraded the app-bundled `design` skill into a general design director/design-system capability.
- Added a new app-bundled `html-slides` skill for browser-based presentation decks and PPTX-to-HTML conversion.
- Copied `beautiful-html-templates` `index.json`, `templates/`, and `runtime/` into `html-slides` references; screenshots remain excluded.
- Copied lightweight `frontend-slides` references: viewport base CSS, animation patterns, PPTX extraction script, and license.
- Updated `resources/skills/preinstalled-manifest.json` with new versions and `html-slides` auto-enable.
- Ran `pnpm run bundle:preinstalled-skills`; build output now includes `design` and `html-slides` with updated lock entries.
- Synced local app-managed test skills into `~/.openclaw/skills/design` and `~/.openclaw/skills/html-slides`.
- Verification:
- design database smoke command passed.
- `extract-pptx.py` py_compile passed for build and local copies.
- OpenClaw lists `design` and `html-slides` as eligible and enabled.
- resource scans found 32 bundled templates, no screenshots, no `.app` directories, and license files present.
- a temporary 8-slide HTML deck passed 1280x720, 1440x900, and 390x844 no-overflow checks.
## 2026-05-13 Task And Skill Management Clarification
- Started a new implementation pass for the user's request:
- move ability-pack quick-task management back into the ability-pack area.
- preserve the older scheduled-task creation design, including push channel selection.
- add `@` skill insertion support in task editing.
- Restored planning context from existing `task_plan.md`, `findings.md`, and `progress.md`; session catchup reported no additional unsynced output.
- Confirmed local git history at `0abc481` had the ability-pack quick-task tab as the default skills page surface.
- Confirmed the older Cron page still had the push-channel design: delivery mode, channel/account/target selection, and `delivery` payload fields.
- Implemented the product clarification:
- ability-pack page exposes quick-task management again and supports editing existing quick tasks.
- user-facing copy now calls this concept “快捷能力” / “Quick Capability” instead of “快捷任务” to avoid collision with Task Center tasks.
- Task Center quick tab is now a run-now surface and points users to ability packs for quick-capability management.
- Task Center scheduled-task dialog preserves push delivery configuration.
- manual and scheduled task editors support `@` skill insertion and insert the existing skill trigger phrase.
- Verification:
- `pnpm run typecheck`: passed.
- `pnpm vitest run tests/unit/yinian-skills-page.test.tsx tests/unit/tasks-page.test.tsx`: passed, 9 tests.
- `pnpm test`: passed, 97 files / 638 tests; existing MaxListeners warnings remain.
- Browser visual verification was attempted through the in-app browser twice, but the browser connection timed out before a page snapshot could be captured. The running Vite/Electron dev server continued HMR updates without compile errors.
## 2026-05-13 Playwright Chromium Runtime Hardening
- Started hardening after customer confirmed a stuck `npx playwright install chromium` process was killed by stuck recovery.
- Added `electron/utils/playwright-runtime.ts` for app-scoped Playwright browser cache and install-lock paths.
- Gateway launch env now sets `PLAYWRIGHT_BROWSERS_PATH`, `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD`, and `YINIAN_PLAYWRIGHT_INSTALL_LOCK_PATH` for embedded tasks.
- The app-scoped Playwright cache now best-effort symlinks already-complete Chromium installs from the default Playwright cache, so existing browsers remain usable without re-downloading.
- Office runtime diagnostics now include a warning-level `playwright-chromium` check showing whether Playwright and the Chromium executable are available.
- Updated `html-slides` runtime policy and preinstalled skill bundling sanitation to forbid task-time `npx playwright install chromium`.
- Bumped preinstalled `pdf` and `html-slides` versions so app-managed skill sync can pick up the new guardrails.
- Regenerated `build/preinstalled-skills`.
- Verification:
- `pnpm run typecheck`: passed.
- `pnpm run bundle:preinstalled-skills`: passed.
- `pnpm vitest run tests/unit/playwright-runtime.test.ts`: passed, 2 tests.
- Real Playwright probe with `PLAYWRIGHT_BROWSERS_PATH=~/.openclaw/runtime/ms-playwright`: Chromium executable exists after symlink mirroring.
## 2026-05-13 Cron Run Final-State Reconciliation
- Investigated the reported case where a task showed failure while the desktop artifact existed.
- Confirmed the local "写笑话" cron run produced `/Users/inmanx/Desktop/joke.docx`, while the cron run summary still reported `status: error` from an intermediate edit-tool failure.
- Confirmed the same run's trajectory artifact recorded `finalStatus: success` and the final assistant success text.
- Updated Task Center cron job transformation to reconcile failed cron summaries against the corresponding run trajectory:
- if the trajectory final status is successful, the last run is exposed as successful.
- the stale intermediate tool error is preserved only as a warning/reconciliation note.
- cron session fallback messages use the recovered final assistant summary instead of a false failed message.
- 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
- Fixed the case where a Task Center run did not show this run's query or response hint until manual refresh.
- Backend cron fallback history now emits the task query as a visible user message instead of a hidden system message.
- Backend running/empty fallback states now emit visible assistant messages.
- Manual Task Center triggers now optimistically append the task query and a running assistant placeholder to the fixed task conversation, keep the conversation in active-running state, then refresh the conversation after the trigger completes.
- Gateway agent events for isolated cron run sessions like `agent:main:cron:<jobId>:run:<sessionId>` are folded back into the fixed task conversation `agent:main:cron:<jobId>`.
- Cron completion events force a foreground history refresh for the fixed task conversation so the current run appears without manual refresh.
- 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
- Reworked the left sidebar into clearer zones:
- Home/Today remains the first entry.
- Conversation now sits directly under Home/Today in its own container, with New Chat and History.
- Task Center is followed by pinned quick task triggers.
- Only five pinned quick tasks are shown in the sidebar.
- App Center and Knowledge now live in the footer utility group above Settings.
- Added `tests/unit/sidebar-layout.test.tsx` to lock the requested order and pinned-task cap.
- Started a Vite dev server for review at `http://127.0.0.1:5199/` after the existing `5188` endpoint returned `502`.
- 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
- Investigated why quick capabilities and account remarks appeared to fail.
- Found the existing data was still present under the old renderer origin `http://localhost:5173`, while the app had been started on a new dev origin. The localStorage origin shift made the data invisible rather than deleting it.
- Restarted the dev app on `http://localhost:5173` for immediate recovery.
- Added an Electron app-level `local-preferences` store and `/api/local-preferences` Host API route.
- Quick capabilities now:
- hydrate from app-level preferences when the current origin has no local data.
- push existing origin-local data into app-level preferences on startup.
- save future add/edit/delete/toggle changes to the app-level copy.
- YINIAN local preferences now sync desktop user name, workspace display name, and channel account remarks through the app-level preference store.
- Confirmed migrated data includes:
- quick capabilities: `写word文章`, `做网页`.
- account remarks: `徐明微信`, `小石的微信`, `徐明飞书`, `宗琦A2A`.
- Verification:
- `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.
## 2026-05-13 商品中心 Web 应用接入
- Started implementation for adding “商品中心” to App Center.
- Confirmed target URL `https://ticket.nianxx.cn/` is reachable and appears embeddable based on response headers.
- Found current App Center only lists `nianxx-play`; `webview` item handling still opens the browser externally, so this task needs a real internal web host route.
- Added built-in Product Center app metadata, `/app-center/product-center` route, internal iframe host page, reload/external actions, and zh/en copy.
- Added Product Center launch URL builder with embed context, workspace/user context, and a future short-lived SSO ticket slot.
- Added focused unit tests for App Center routing and Product Center launch URL behavior.
- Browser plugin preview timed out twice while connecting to the in-app browser; switched to the existing Electron E2E smoke path and added Product Center assertions there.
- First E2E run failed because `dist` had not been rebuilt, so the launched Electron app did not include the new Product Center card.
- Second E2E run reached `product-center-page` but failed on locale-specific iframe title lookup; added `data-testid="product-center-frame"` and updated the assertion.
- Verification passed:
- `pnpm vitest run tests/unit/app-center.test.tsx tests/unit/product-center-url.test.ts`
- `pnpm run typecheck`
- `pnpm run build:vite`
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
## 2026-05-13 桌面任务提醒与业务回答渲染
- 将 cron 任务的 Gateway 终态通知接入 Electron 系统通知:完成、需复核、失败分别显示“任务已完成 / 任务需复核 / 任务需要处理”。
- 通知点击会聚焦主窗口并导航到 `/tasks?task=<jobId>`,任务中心会高亮目标任务。
- 新增 `electron/utils/cron-desktop-reminder.ts`,覆盖 cron session 解析、运行去重、通知文案和路由生成。
- 新增 `src/pages/Chat/business-answer.ts`,聊天消息会从“状态/依据/影响/下一步”等标签提取业务摘要,并在 assistant markdown 上方渲染摘要面板。
- 更新隐藏业务回答准则,要求业务回复优先输出稳定段落标签,便于 UI 结构化渲染。
- Verification passed:
- `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`
- `pnpm run typecheck`
- `pnpm run build:vite`
# 2026-06-03 Agent 系统级文档管理
- 用户要求在设置中增加系统级文档管理模块,覆盖 soul、agent、tool 这类文档。
- 已确认项目根目录为 `/Users/inmanx/Documents/念/yinian-desktop`,工作树存在多项既有未提交改动;本次会限定在系统文档管理相关文件。
- 已在 `task_plan.md` 添加本次阶段,当前进入路径/API/设置页结构调研。
- 已确认 OpenClaw 实际使用的文档文件是 per-agent workspace 下的 `SOUL.md``AGENTS.md``TOOLS.md`,默认模板位于 OpenClaw runtime 的 `docs/reference/templates/`
- 新增 `electron/utils/agent-system-documents.ts` 和 Host API 路由 `/api/agent-system-documents`,支持按 Agent 读取、保存、恢复模板。
- 新增设置页 `系统文档` tab 和 `AgentSystemDocumentsSettings` 组件,支持选择 Agent、切换 soul/agent/tool、编辑、保存、恢复模板。
- 新增测试并通过:
- `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`
- 完整相关验证通过:
- `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`
- `pnpm exec tsc --noEmit --pretty false`
- `pnpm run build:vite`(仅保留既有 dynamic-import/chunk-size warnings
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
- Note: an initial E2E attempt timed out because it launched Electron while `build:vite` was rewriting `dist`; a clean rerun passed.
## 2026-05-13 聊天页字体与 UI 统一
- 用户反馈对话字体和整体 UI 与其它页面不一致。
- 使用 `ui-ux-pro-max` 取了一次设计建议,但最终以项目现有 `design-system/智念助手/MASTER.md` 为准:成熟 B 端工作台、系统中文字体、slate/navy、8px 圆角、少阴影。
- 更新全局字体:`body` 使用 `-apple-system / BlinkMacSystemFont / PingFang SC / Microsoft YaHei / Segoe UI / sans-serif`,输入控件继承字体。
- 聊天页外层改为智念标准面板;消息区域为浅 slate 背景;空态改成无框轻量状态,避免卡片套卡片。
- 消息气泡、业务摘要面板、工具状态条、执行过程卡、文件/图片卡、输入框、快捷任务 chip、知识库选择器都收敛到同一套边框/底色/字号。
- Visual QA: `test-results/yinian-visual/02-chat.png` 已重新生成并查看,聊天首屏字体和 UI 气质与工作台更一致。
- Verification passed:
- `pnpm vitest run tests/unit/chat-message.test.tsx`
- `pnpm run typecheck`
- `pnpm run build:vite`
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
- `pnpm exec playwright test --config=playwright.legacy.config.ts tests/e2e/yinian-visual-smoke.spec.ts`
# 2026-05-14 客户安装初始化凭据失败加固
- Reviewed the customer setup screenshot and traced it to `electron/utils/yinian-initializer.ts` plus `src/pages/Setup/index.tsx`.
- Confirmed local `build/yinian-internal/model-auth-profiles.json` is a benign non-pilot manifest (`bundled=false`), while the machine does have usable local `minimax:default` auth material for rebuilding a pilot package.
- Identified a renderer bug: when initialization returns `initialized=false`, pending steps are turned into failed steps, so `准备文档处理环境` can be shown as failed even when initialization stopped earlier at model auth.
- Added `src/pages/Setup/initialization.ts` so first-run result mapping keeps pending steps pending, calculates partial progress from completed steps, and shows failed-step details in the red error panel.
- Updated `electron/utils/yinian-initializer.ts` so missing/disabled internal model auth manifests produce a clear package/credential error instead of the generic “凭据未配置”.
- Updated `scripts/prepare-internal-model-auth.mjs` so ordinary non-pilot packaging logs that customer pilot installers must use `package:pilot` or `YINIAN_BUNDLE_MODEL_AUTH=1`.
- Added tests:
- `tests/unit/setup-initialization.test.ts`
- `tests/unit/yinian-initializer.test.ts`
- Verification passed:
- `pnpm vitest run tests/unit/setup-initialization.test.ts tests/unit/yinian-initializer.test.ts`
- `pnpm run typecheck`
- Rebuilt the Apple Silicon customer pilot package with bundled internal model auth:
- `pnpm run package:mac:pilot:arm64`
- `release/智念助手-0.1.0-mac-arm64.dmg`
- `release/智念助手-0.1.0-mac-arm64.zip`
- Packaged resource verification confirmed `release/mac-arm64/智念助手.app/Contents/Resources/resources/yinian-internal/model-auth-profiles.json` has `bundled=true` and two MiniMax profile ids.
- Release verification passed:
- `codesign --verify --deep --strict --verbose=2 release/mac-arm64/智念助手.app`
- `hdiutil verify release/智念助手-0.1.0-mac-arm64.dmg`
## 2026-05-13 旅游资源订购 Login-State Follow-Up
- Renamed the Product Center surface to “旅游资源订购” in zh copy and “Travel Resource Ordering” in en copy.
- Checked `ticket.nianxx.cn` scripts and confirmed the embedded site stores its session token/user in localStorage keys `ticketService.token` and `ticketService.user`.
- Switched the embedded container from iframe to Electron `<webview>` with `partition="persist:yinian-travel-resource-ordering"` so the embedded web app keeps its own persistent localStorage/cookie state across route changes and app restarts.
- Added unit and E2E assertions for the persistent webview partition.
- Verification passed:
- `pnpm vitest run tests/unit/app-center.test.tsx tests/unit/product-center-url.test.ts tests/unit/product-center-page.test.tsx`
- `pnpm run typecheck`
- `pnpm run build:vite`
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
## 2026-05-13 快速视频创作 Rename And English Coverage
- Renamed the former “智念视频助手” display surface to “快速视频创作” in Chinese copy.
- Updated English copy to “Quick Video Creation”.
- Added an English App Center unit test covering both built-in apps and checking that raw translation keys are not visible.
- Verification passed:
- `pnpm vitest run tests/unit/app-center.test.tsx tests/unit/product-center-page.test.tsx tests/unit/product-center-url.test.ts`
- `pnpm run typecheck`
- `pnpm run build:vite`
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
## 2026-05-13 快速视频创作内置 Web 英文覆盖
- Investigated the remaining English coverage gap reported by the user.
- Confirmed the desktop wrapper copy is covered by `appCenter` i18n, while the embedded NianxxPlay Next app still contains hard-coded Chinese UI/content.
- Added a new planning section for passing desktop language into the embedded app and covering visible English text inside the embedded Web surface.
- Desktop NianxxPlay host now adds `zhinianLang=zh|en` to embedded URLs.
- NianxxPlay source now has an embedded English bridge that persists `zhinianLang`, translates visible text/attributes/default form examples, and keeps working after client-side page changes.
- Added focused tests for the desktop URL language parameter and the NianxxPlay translation helper.
- Extended the bridge with phrase-level coverage for the default live prompt so the English embedded studio first screen no longer exposes continuous Chinese copy.
- Spot-checked the English embedded studio and planning pages with Playwright; the studio first screen and planning page had no continuous Chinese matches after translation. Projects may still show user/history titles, but the system-generated “宣传片创作台” prefix is covered.
- Rebuilt the NianxxPlay standalone output and refreshed the desktop bundled runtime under `build/apps/nianxx-play`.
- Stopped the stale bundled NianxxPlay child process that was still listening on `127.0.0.1:3000`; the desktop host will start the refreshed bundle the next time Quick Video Creation is opened.
- Verification passed:
- `pnpm vitest run tests/unit/nianxx-play-url.test.ts tests/unit/app-center.test.tsx`
- `/Users/inmanx/Documents/NianxxPlay`: `npm test`
- `/Users/inmanx/Documents/NianxxPlay`: `npm run build`
- `NIANXX_PLAY_SKIP_BUILD=1 pnpm run prepare:nianxx-play`
- `pnpm run typecheck`
- `pnpm run build:vite`
- Playwright page probe against `http://127.0.0.1:3010/studio?zhinianEmbed=1&zhinianLang=en`
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
## 2026-05-13 WhatsApp 二维码生成检查
- 调查 WhatsApp 二维码链路:前端扫码 Modal、Host API `/api/channels/whatsapp/start`、主进程 `WhatsAppLoginManager`、QR PNG 渲染和 `channel:whatsapp-qr` 事件。
- 用临时 HOME 拉起登录管理器,避免触碰真实 `~/.openclaw` 凭据;当前网络下 Baileys 对 `wss://web.whatsapp.com/ws/chat` 连续 `WebSocket Error ()`,直接 `ws` 连接也超时。
- 新增 `electron/utils/whatsapp-proxy.ts`,让 WhatsApp WebSocket 使用应用代理设置,优先 `ALL_PROXY/SOCKS`,再用 HTTPS/基础代理,并支持 `web.whatsapp.com` 绕过规则。
- 更新 `electron/utils/whatsapp-login.ts`:为 Baileys 注入 HTTP/SOCKS proxy agent连接失败时保留最后错误并提示检查网络或高级设置代理QR 渲染异常也会发出 error 事件。
- 更新 `src/lib/host-api.ts``src/components/channels/ChannelConfigModal.tsx`Host API unified 非 2xx 不再被吞掉,扫码启动失败时前端会恢复状态并显示错误。
- 补充 WhatsApp 网络/代理失败的 zh/en/ja/ru 本地化提示。
-`socks-proxy-agent` 加入 OpenClaw runtime bundle 依赖列表。
- 新增/更新测试:
- `tests/unit/whatsapp-proxy.test.ts`
- `tests/unit/host-api.test.ts`
- Verification passed:
- `pnpm run typecheck`
- `pnpm exec vitest run tests/unit/host-api.test.ts tests/unit/whatsapp-proxy.test.ts tests/unit/channel-routes.test.ts`
- `pnpm run build:vite`
## 2026-05-13 OpenClaw 内核升级
- 用户要求更新 OpenClaw 内核。
- 当前项目依赖为 `openclaw@2026.4.29`
- 查询 npm dist-tagsstable latest 为 `2026.5.7`beta 为 `2026.5.12-beta.4`;本次按稳定版 latest 处理。
- 已将根项目 `devDependencies.openclaw` 升级到 `2026.5.7`,并刷新 `pnpm-lock.yaml`
- 重新运行 `pnpm exec zx scripts/bundle-openclaw.mjs``build/openclaw/package.json``node build/openclaw/openclaw.mjs --version` 均确认内置版本为 `2026.5.7`
- 同步更新 `scripts/bundle-openclaw.mjs``electron/gateway/runtime-deps.ts` 中的新版生成代码匹配片段,覆盖 main-session restart recovery 和 stuck-session active abort 边界。
- 检查新版 bundle关键自定义边界仍在产物中包括 `OPENCLAW_DISABLE_AGENTS_SKILLS``OPENCLAW_DISABLE_MAIN_SESSION_RESTART_RECOVERY``YINIAN_OPENCLAW_STUCK_ACTIVE_ABORT_MS` 和桌面 webchat fast raw model path。
- 部分旧补丁片段在 2026.5.7 中已由上游结构变更/等价逻辑替代bundle 日志仍会提示旧片段不存在;已逐项核对关键行为没有缺失。
- Verification passed:
- `pnpm run typecheck`
- `node scripts/assert-electron-runtime-deps.mjs`
- `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`
- `pnpm run build:vite`
- `pnpm test` (106 files / 675 tests; existing MaxListeners warnings remain)
- `pnpm exec playwright test tests/e2e/yinian-delivery-smoke.spec.ts`
## 2026-06-04 应用中心清理后项目体检
- Started a focused post-cleanup audit after removing the two App Center built-in apps.
- Scope: App Center registry/routes, NianxxPlay/Product Center residues, Host API route list, packaging resources, README/i18n/tests, and current dirty worktree separation.
- Residual scan result: no production references to the removed apps remain; only negative test assertions mention `app-center-item-product-center` and `app-center-item-nianxx-play`.
- `build/apps/nianxx-play` has been removed; `build/apps` is currently empty.
- Current dev service is still running through Vite/Electron from `pnpm dev`.
- Removed stale `selectedItemId/selectItem` state from the App Center store and removed the empty README App Center screenshot heading.
- Verification passed:
- `pnpm exec vitest run tests/unit/app-center.test.tsx tests/unit/app-routes.test.ts`
- `pnpm exec tsc --noEmit --pretty false`
- `pnpm run build:vite`
- `git diff --check`
- `pnpm test` (111 files / 712 tests; existing MaxListeners warnings only)
## 2026-06-04 Git Push Preparation
- User requested pushing the current project to the git remote while avoiding secrets/tokens/API/env material and keeping customer quick-start usability.
- Remote target: `origin` -> `https://git.nianxx.cn/wangxuming/NianToB.git`; current branch: `main`.
- `.env.example` now contains placeholders only and explicitly tells users to keep real values in `.env.local`, CI secrets, local shell, or private deployment channels.
- Added `*.docx` to `.gitignore` so generated local report documents are not accidentally committed.
- Confirmed ignored:
- `.env.local`
- `build/yinian-internal/model-auth-profiles.json`
- `release/智念助手-0.1.0-mac-arm64.zip`
- generated `.docx` reports
- Secret scans:
- tracked file scan for common key/token patterns: no matches.
- untracked new source file scan for common key/token patterns: no matches.
- Final pre-stage verification passed:
- `git diff --check`
- `pnpm exec tsc --noEmit --pretty false`
- `pnpm test` (111 files / 712 tests; existing MaxListeners warnings only)
- Created commit `84128db` (`Refine desktop setup and remove bundled app center apps`) and pushed it to `origin/main`.
- Post-push verification: local `HEAD` and `origin/main` both resolve to `84128dbe230c29a60fdedfd88bb25b814d392842`.
## 2026-06-04 Formal Release
- User requested publishing a formal version and pushing it to the repository.
- Stopped the running dev Vite/Electron processes before packaging.
- Existing package version was `0.1.0`; local tags already occupy `v0.1.1` through `v0.1.23`, plus `v0.1.24-alpha.*`.
- Selected formal non-prerelease version `0.1.24` because exact tag `v0.1.24` is not present locally or remotely.
- Updated `package.json` to `0.1.24`.
- Important process note: `pnpm version 0.1.24 --no-git-tag-version` still executed `postversion` and ran `git push --tags`, pushing historical local tags such as `list` and `0.1.21-beta.1` to `origin`; it did not create or push `v0.1.24`.
- Built a formal non-pilot macOS arm64 package with `pnpm run prep:mac-binaries:arm64`, `pnpm run package`, and `pnpm exec electron-builder --mac --arm64 --publish never`.
- Release artifacts:
- `release/智念助手-0.1.24-mac-arm64.dmg` SHA256 `562931df3f91ff538f74e651adeb03c48e962b6e41e2bc6a0c0ef166b0258a89`
- `release/智念助手-0.1.24-mac-arm64.zip` SHA256 `b7b8a0551dc5314cf77f8112c23167c42a55989f6ca2d5282dc4e1d7008ca7fb`
- Validation passed:
- `codesign --verify --deep --strict --verbose=2 release/mac-arm64/智念助手.app`
- `hdiutil verify release/智念助手-0.1.24-mac-arm64.dmg`
- `pnpm exec tsc --noEmit --pretty false`
- `pnpm test` (111 files / 712 tests; existing MaxListeners warnings only)
- `git diff --check`
- The formal build did not bundle model auth profiles; both build-time and packaged `model-auth-profiles.json` report `"bundled": false`.
- Resource scan found no `.env*`, cleared App Center bundled apps, `NianxxPlay`, or `ProductCenter` resources in the packaged app.
- Apple notarization credentials are unset; `electron-builder` skipped notarization and Gatekeeper assessment reports `Unnotarized Developer ID`.
- Created release commit `98a5760` (`Release version 0.1.24`) and annotated tag `v0.1.24`.
- Pushed `main` and only the new `v0.1.24` tag to `origin`; remote `v0.1.24^{}` resolves to `98a5760`.