test(agents): stabilize status checks and record UI integration

This commit is contained in:
2026-09-14 21:43:43 +08:00
parent 5a974cf784
commit f92753329c
5 changed files with 64 additions and 5 deletions

View File

@@ -20,11 +20,22 @@ Accepted / implemented2026-09-11 集成。产品范围、三端分工、创
## Desktop Workspace2026-09-12 accepted / implemented
- Agents 使用账号级全高桌面工作区,配置与试用独立滚动;分栏可调整、展开及恢复,小窗口切换配置/试用面板。编辑配置分为指令、能力、知识、限制,正式对话和自动任务保留独立入口。
- Agents 使用账号级全高桌面工作区,配置与试用独立滚动;分栏可调整、展开及恢复,小窗口切换配置/试用面板。基础要求优先展示,能力、知识、限制等高级配置可展开,正式对话和自动任务保留独立入口。
- 编辑草稿、已保存配置与当前试用修订分别持有状态。明确保存及页内切换保留未发送内容、附件、历史和未确认请求;最新草稿经用户明确选择后开始新试用并保留未发送文字。旧请求重试继续使用原请求身份及修订,不能因保存而重新创建收费请求。隐藏但继续运行的对话不提前标记已读或覆盖最近访问位置。
- 费用上限位于限制分类并独立保存,仍是服务端即时政策。首版不包含自动保存或离线草稿同步;退出工作区仍提示未完成输入。
- 实现源 `dca6deab292028c9f3cfd097a8c52ba0d43b35a9`,见[源任务](../30-worklog/tasks/20260912-agent-draft-design-9d82c9b4.md)。最终 65 项相关测试、类型检查、scoped ESLint无错误、Vite 构建与 Windows Electron 验收通过;覆盖大小窗口和 Electron 125%/150% 内容缩放。云端使用 Host API fixture不等于真实收费链路或 macOS/OS DPI 验收。
## Guided First Helper2026-09-14 accepted / implemented
- 智能体交互面向非专业用户和 815 岁学生;老师引导后由学生独立创建、试用和改进第一个助手。这是已确认的体验目标,不增加教师/学生权限或课堂管理模型。
- 创建使用用途选择、填写要求、保存试用的短引导。用途示例可编辑,也可自定义;基础要求包含名字、用途、回答方式和补充说明,高级能力/知识/限制按需展开。
- `system_prompt` 仍是保存指令的唯一来源。回答方式只增删明确的自然语言指令行,其余自由文本原样保留。仅新建助手首次选择真实目录中的首个可用模型,用户可以修改;既有助手不自动换模型,不虚构推荐标记。
- 示例问题只填入输入框。“保存并重新试用”成功后使用保存返回的修订,保留输入文字或填回上一问题,不自动发送;旧试用可对比,文件仍按原会话下载。运行、排队、审批、附件或未确认操作阻止替换试用;单独保存继续保留当前会话。
- 执行确认展示实际动作和参数,并可展开完整详情;既有审批决策和操作身份保持。首次“自己使用”先确认可用状态与创建者付费,再调用既有发布操作并打开独立正式对话;分享/API/渠道及版本管理仍在后续入口提供。
- Renderer 继续通过 typed Host API 消费原有 create/save/publish 合同Main、Yuxi 和 Works Square 的职责与恢复、计费规则保持。小窗口与缩放沿用桌面分栏能力。
实现源 `6e6a8c92ddb66747a71af714809e2205292a0bf9`,见[源任务](../30-worklog/tasks/20260914-agent-ux-discussion-930b45dd.md)。相关回归、类型检查、lint、生产构建与 Electron fixture 验收已通过;全量测试仍有与本改动无关的既有 Pi runtime v6/v7 断言不一致。未进行真实收费模型或学生可用性研究,不据此宣称实际学习效果已验证。
## Personal WeChat Publication2026-09-13 accepted / implemented
- The native Channels page owns account creation, local QR rendering, login verification, direct use by the scanning account, enable/pause, route switch, disconnect, safe activity and failed-file retry. Agent publication provides a linked-account summary. Pairing codes, contact invitations, audience configuration and caller management are removed.

View File

@@ -6,7 +6,7 @@
- [官方模型能力与原生思考选项](ADR-2026-09-12-official-model-capabilities.md)2026-09-12 accepted / implementedone-api 官方事实、Works v2 授权投影、受管模型图片输入与 Main-owned reasoningChoice取代受管模型的静态推测与 Pi 枚举映射。
- [个人云智能体平台](ADR-2026-09-11-personal-cloud-agents.md)2026-09-11 accepted / implemented2026-09-12 补充桌面编辑工作区;三端分工、创建者付费、保存与试用版本分离、恢复/资源/独立预算及发布证据边界
- [个人云智能体平台](ADR-2026-09-11-personal-cloud-agents.md)2026-09-14 amended / implemented;三端分工、创建者付费及独立预算保留,桌面工作区增加面向非专业用户与 815 岁学生的创建引导、基础要求、明确保存后重新试用和首次自用确认。保存/试用版本与恢复身份分离,验证及发布边界见决策
| ID | Decision | Status | Date | Applies To | Detail |
|---|---|---|---|---|---|

View File

@@ -4,6 +4,8 @@ This file is the integrated default-branch snapshot. Feature tasks record progre
## Integrated Through
- 2026-09-14任务 `20260914-agent-ui-integration-4a838e7c` 将引导式智能体 UI 源 `6e6a8c92ddb66747a71af714809e2205292a0bf9` 无冲突合入本地 `main`,合并提交 `5a974cf78493b8dd92e176cc26fbe323a18e9570`。面向非专业用户与 815 岁学生的创建引导、基础要求、高级设置折叠、保存后重新试用、历史对比及首次自用确认已集成,见[已接受决策](../10-decisions/ADR-2026-09-11-personal-cloud-agents.md)。保留主分支连接时差修复,产品代码与已验证源一致;集成时补充两条异步状态测试等待。组合验证累计 89 项相关单测、类型检查、Vite 全目标构建、Electron 引导用例通过;全量测试沿用源记录中已确认的 Pi v6/v7 既有失败限制。原有三份未跟踪记录原样保留;已授权的源工作区清理因 Git 目录非空错误受阻,残余保留,分支和提交完整。未推送、打包或部署。详见[集成记录](tasks/20260914-agent-ui-integration-4a838e7c.md)。
- 2026-09-14任务 `20260914-merge-cloud-reconnect-8fe72c41` 经用户授权移交主目录登记,将源 `8a67e8bd47d814b533476a6e36421f7a5d983a27` 无冲突快进合入本地 `main`。云智能体 Main 凭证处理不再因签发端轻微快于客户端而拒绝正常的五分钟凭证,改为限制本地复用时长;服务端过期校验及既有刷新余量不变。产品树与已验证源一致,沿用 33 项相关测试、类型检查、scoped ESLint 和 Vite 全目标构建。该缺陷已复现,尚不能据此认定线上所有不可用提示均由此引起;详见[源任务](tasks/20260914-cloud-reconnect-5ad71e6c.md)。原有三份未跟踪文档保留;需要重新打包安装客户端才生效,未推送、打包、安装或部署。
- 2026-09-14任务 `20260914-merge-ppt-makelore-2e8ec5dc` 经用户授权移交主目录登记,将已独立审查的 `4f2caf7``9044f7d` 无冲突快进合入本地 `main`。新建云智能体默认 300 步,保留显式 40/自定义设置;微信会话优先展示原生 Run 状态及失败原因,再显示部分正文,涵盖关闭历史会话与仅排队状态。产品树与已验证源一致,沿用 42 项回归、类型检查、lint、Vite 构建及 Electron 验收,详见[源任务](tasks/20260914-makelore-ppt-failure-7c4a.md)。原有三份未跟踪文档保留;未推送、打包、安装或部署。需配套更新 Yuxi API/worker已有智能体调整限制后重新发布。

View File

@@ -0,0 +1,47 @@
# Task: Integrate guided cloud Agent UI into main
## Identity
- Task ID: 20260914-agent-ui-integration-4a838e7c
- Mode: Integration
- Branch: main
- Worktree: D:\Datas\OthersProjects\makelore
- Base commit: c2c415c6740adb6bdbd6502cc4b33c9323ff5c83
- Owner: codex
- Status: Ready for Integration
## Scope
- Merge completed guided Cloud Agents UI source `6e6a8c92ddb66747a71af714809e2205292a0bf9` into local `main`; reconcile accepted Agent UX decisions and current-state metadata. Complete the existing WeChat status tests' asynchronous waits exposed by combined-tree verification.
## Intent And Constraints
- User requested the merge and explicitly authorized releasing the prior completed main owner and adopting the three existing untracked task records unchanged. Bundled start succeeded in integration mode; ownership and Planning Gate passed.
- Preserve the newer Main connection clock-skew fix, source task record and the three adopted documents. No push, packaging or deployment is in scope; worktree cleanup requires separate consent.
- The accepted audience is nonprofessionals and ages 815, introduced by a teacher then using independently. This UI guidance does not introduce classroom roles or change cloud authority/billing.
- Peer task scopes were assessed; old incomplete records remain unknown coordination state but no concrete semantic dependency blocks this merge. Positioning placeholders and legacy module wording do not override the accepted Agent ADR/README.
## Outcome
- Source merged without conflicts as `5a974cf78493b8dd92e176cc26fbe323a18e9570`. Main connection clock-skew implementation/tests match `c2c415c`; merged UI, README and source task record match `6e6a8c9` exactly.
- Two additional WeChat status assertions waited only for a placeholder element, so the first combined run failed before history loaded. They now wait for the expected status content, following the source task's existing fix for the same asynchronous loading path. Product behavior and failure/error assertions are unchanged.
- Promoted the confirmed audience and guided first-helper behavior to the accepted Agent ADR/decision index; current-state records source and merge commits. All three adopted task records remain unchanged and uncommitted.
- No push, packaging, installation or deployment performed. User explicitly approved source checkout cleanup while preserving its branch/commits. After readiness, cleanliness and latest-source ancestry were rechecked, bundled `retire` failed with Git `Directory not empty`; remaining checkout/registry state is retained, with no manual deletion or forced registry release. Source branch still resolves to `6e6a8c9`; completed main merge is unaffected.
## Verification
- Source verification includes focused tests, typecheck, lint, Vite build and Electron UI acceptance. Its full suite has a verified pre-existing Pi runtime v6/v7 expectation failure; this merge will not change that unrelated test.
- Confirmed pnpm 10.33.4. Initial main typecheck found missing installed qrcode/types dependencies; `pnpm install --frozen-lockfile` restored already-declared dependencies without changing manifests or lockfile. Subsequent typecheck passed.
- Combined five-file run: 87 passed, 2 early-placeholder assertions failed. After fixing only those assertions, the affected 13-test file passed; the unchanged four files had 76 passes. All 89 relevant tests passed across these runs, including 33 Main connectivity tests. Scoped ESLint on the changed test passed.
- `pnpm run build:vite` passed all Renderer/Main/Preload/utility targets with existing mixed-import and size warnings. `pnpm exec playwright test tests/e2e/cloud-agents.spec.ts` passed (1 scenario, 5.3 seconds total) against the merged build with isolated Host fixtures.
- Merged source ancestry and unchanged source product files/Main fix verified. Inspected committed and working diffs from recorded base; task documentation drift and whitespace checks passed.
## Follow-ups
- Source worktree `D:\Datas\OthersProjects\.codex-worktrees\makelore\20260914-agent-ux-discussion-930b45dd`, branch `codex/20260914-agent-ux-discussion-930b45dd-agent-ux-discussion`: cleanup authorized and attempted with bundled retire; blocked by Git `Directory not empty`, residual directory retained. Branch and commits preserved. Further recovery must follow the skill's eligibility rules; do not emulate retirement.
- The unused integration preflight checkout at `D:\Datas\OthersProjects\.codex-worktrees\makelore\20260914-agent-ui-integration-4a838e7c` has no registered owner and remains untouched; not eligible for automatic retirement.
- Source follow-ups remain: separate Pi runtime test expectation alignment and student usability/real-cloud validation. No claims of measured learning improvement or full-suite green.
## Promotion Candidates
- Accepted guided Agent workspace behavior promoted to the personal-cloud-agents ADR/index and source/merge provenance recorded under current-state Integrated Through. User confirmation was already supplied by implementation acceptance and the merge request; no source-of-truth conflict was identified. No further canonical promotion pending.

View File

@@ -63,8 +63,7 @@ it('keeps partial assistant output visible while surfacing a closed run failure
type: 'unexpected_error', message: 'Recursion limit of 40 reached',
} }, messages: [{ id: 1, role: 'assistant', content: 'PPT 只写入了一部分。' }] } : base(operation, input));
render(<CloudChannelConversations slug={session.agent_slug} />);
const status = await screen.findByTestId('wechat-run-status');
expect(status).toHaveTextContent('任务状态:失败');
await waitFor(() => expect(screen.getByTestId('wechat-run-status')).toHaveTextContent('任务状态:失败'));
expect(screen.getByRole('alert', { name: '微信任务错误' })).toHaveTextContent('unexpected_error · Recursion limit of 40 reached');
expect(screen.getByText('PPT 只写入了一部分。')).toBeVisible();
});
@@ -74,7 +73,7 @@ it('shows a queued request status before the authoritative run is exposed', asyn
api.call.mockImplementation(async (operation, input) => operation === 'channelConversation'
? { ...history, run: null, queued_requests: [{ request_id: 'queued-request', thread_id: session.thread_id, run_id: null, status: 'running', version: '1' }] } : base(operation, input));
render(<CloudChannelConversations slug={session.agent_slug} />);
expect(await screen.findByTestId('wechat-run-status')).toHaveTextContent('任务状态:运行中');
await waitFor(() => expect(screen.getByTestId('wechat-run-status')).toHaveTextContent('任务状态:运行中'));
});
it('retries an uncertain stop with the identical operation ID and keeps other controls disabled', async () => {