Commit Graph

118 Commits

Author SHA1 Message Date
sinohqb
913dc9ae86 perf: address remaining heuristic issues from code review
All checks were successful
CI / test (push) Successful in 3m18s
- decision_logs.py: add LIMIT 100 to dedup query to avoid loading all records
- ExecutionProcess.tsx: document N+1 API pattern and explain why acceptable
- scheduler.py: document why scan_once runs synchronously (thread pool would break fire-and-forget)

All 880 tests pass.
2026-08-24 02:01:04 +08:00
sinohqb
7db75be707 fix(ui): 评估列表默认分页改为 20,符合 ADR-0005
All checks were successful
CI / test (push) Successful in 3m27s
- 将 pageSize 默认值从 10 改为 20
- 遵循 ADR-0005 "超过 20 行才分页(pageSize 20)" 规范
2026-08-23 13:32:00 +08:00
sinohqb
5f116700d7 fix(ui): move eval delete to drawer header to stop row click opening detail
All checks were successful
CI / test (push) Successful in 3m23s
2026-08-21 17:01:39 +08:00
sinohqb
8021eab65e feat(ui): live running-session cards in intelligent-eval execution view 2026-08-21 16:13:27 +08:00
sinohqb
2d2c5a2904 feat(intelligent-eval): logical delete for terminal evals
All checks were successful
CI / test (push) Successful in 3m24s
Add `deleted` terminal status: completed/cancelled/failed → deleted via
DELETE /api/intelligent-evals/{id} (idempotent, 409 for non-terminal).
Deleted evals are hidden from list, detail, stats, and all sub-resource
endpoints (sessions/report/decision-logs/config-snapshots); child tables
are untouched (audit-safe). Frontend shows a Popconfirm-guarded delete
button for terminal evals only.
2026-08-21 14:34:04 +08:00
sinohqb
d77a363f58 fix(ui): align EvalReport tab padding with EvalOverview
All checks were successful
CI / test (push) Successful in 3m9s
评估报告 tab 外层 padding 从 '16px 16px 24px' 改为 '0 16px 24px',
与概览页外层 wrapper 一致,消除 Drawer 内 tab 切换时与导航栏之间的视觉错位。
2026-08-21 04:22:03 +08:00
sinohqb
d87aad5aed refactor(ui): single-source intelligent-eval label maps in status.ts
All checks were successful
CI / test (push) Successful in 3m13s
架构审查候选⑤:消除标签双轨,状态/决策类型映射单一出口。

- status.ts 新增 DECISION_TYPE_META(12 类型与后端 decision_type 字面量
  对齐)+ decisionTypeOf() 兜底:后端新增类型时前端不再静默显示裸字符串,
  未识别类型显式标注"未识别·xxx"
- DecisionProcess / ExecutionProcess 删除各自手写的 DECISION_TYPE_LABELS
  (后者是审查报告之外的第三处双轨),统一走 decisionTypeOf
- IntelligentEvals 的 STAT_CHIPS 标签从 EVAL_STATUS 派生,不再平行维护

tsc --noEmit 通过,前端 20 tests 全过,标签文本零变化。
2026-08-21 04:00:32 +08:00
sinohqb
651d068744 chore: update package-lock.json version to 1.2.0
All checks were successful
CI / test (push) Successful in 3m20s
2026-08-20 20:25:14 +08:00
sinohqb
5cb38befc0 chore: bump version to 1.2.0 for UI optimization release 2026-08-20 20:16:57 +08:00
sinohqb
09a808c0c5 feat(ui): restructure config snapshot detail view to match overview layout 2026-08-20 20:02:17 +08:00
sinohqb
68bf1876af feat(ui): position current stage badge on node circle 2026-08-20 19:53:32 +08:00
sinohqb
9bf741fbee feat(ui): use tag badge for current stage and show full datetime in lifecycle 2026-08-20 19:46:42 +08:00
sinohqb
ff734c72e5 feat(ui): add timestamps to lifecycle timeline and replace time distribution cards with table 2026-08-20 19:41:11 +08:00
sinohqb
d61657eedb fix(ui): display 5-point scale scores correctly in dimension cards 2026-08-20 19:34:18 +08:00
sinohqb
fb68f9ebce feat(ui): add grade labels and icons to dimension scores for better intuitiveness 2026-08-20 19:29:30 +08:00
sinohqb
de80e85658 feat(ui): replace Bar chart with custom progress cards for dimension scores 2026-08-20 19:22:42 +08:00
sinohqb
81741a67e7 feat(ui): replace Steps and Column chart with custom timeline and cards in ExecutionProcess 2026-08-20 19:19:09 +08:00
sinohqb
61d8b8b4b8 feat(ui): single-column overview layout with end-of-content marker
- Overview: full-width stacked cards (basic info as two aligned rows,
  plan, user input with seeds in fixed-height right column, sessions)
- Basic info labels fixed-width right-aligned for vertical alignment
- Add "已显示全部内容" end marker and increase drawer tab bottom
  padding (16px → 24px) so content no longer looks cut off
2026-08-20 18:59:50 +08:00
sinohqb
d626dd8c3f feat(ui): restructure overview tab to 3-row layout
- Row 1: basic info (span=8) + plan (span=16) with virtual users in
  2-column grid and time distribution as a table
- Row 2: user input in one row (goal/intent/role/seeds), seeds area
  enlarged with no height cap for full JSON display
- Row 3: session progress full-width with progress bar in header
2026-08-20 18:27:01 +08:00
sinohqb
63e96c2bf2 feat(ui): widen drawer and restructure overview tab layout
- Drawer width: 1000px → 1200px for more content space
- Overview tab: move user input to full-width bottom section
- Seeds JSON area: maxHeight 160px → 300px with better padding
- Unify font sizes: 13px body, 12px labels/tags throughout
- Fix progress calculation to use estimated_sessions consistently
2026-08-20 18:08:03 +08:00
sinohqb
af8c7d6810 feat(ui): add tooltip to session progress column
Explain the progress calculation (completed/estimated sessions) when
hovering over the progress bar in the evaluation list.
2026-08-20 17:55:42 +08:00
sinohqb
60981b634d feat(ui): optimize intelligent eval drawer UI
- Show estimated session progress in list (completed/estimated with running count)
- Improve user input layout with scrollable sections for long text
- Remove 50-item limit on activity feed, show all events
- Enhance lifecycle steps and time distribution chart styling
- Add pagination to decision log table (20/50/100 per page)
- Unify font sizes across drawer tabs (12/13/14px scale)
2026-08-20 17:44:05 +08:00
sinohqb
eb4944a8bd feat(intelligent-eval): terminal-state discipline watchdogs (ADR-0011)
常见故障自愈有上限,超限收敛终态且可见:任务 attempts 上限、会话过期、
planning 双闸、executing 超窗兜底、触发失败计数判死、孤儿 agent 双管、
fire-and-forget 触发;open_session 预算硬闸门、settle 按终态区分、报告
scores 归一化;cron 池遗留面全删。
2026-08-20 14:34:17 +08:00
sinohqb
8959e7ac42 fix(intelligent-eval): respect time-window slot distribution + flat scores
All checks were successful
CI / test (push) Successful in 3m57s
1) 时段分布失效:方案③'立即完成'触发让 worker 一次性创建所有计划会话,
   1h 窗口在几分钟内跑完,time_distribution 时段分布失效。
   - 触发指令明确'仅执行当前到期时段内欠账的会话,绝不创建未来时段会话'
   - worker skill 决策逻辑强化:严格按 current_offset 定位当前时段、只建该时段
     配额内的会话;完成当前时段后标记任务完成,由平台后续时段重新入队触发
2) 综合评分为空:analyst 产出扁平 scores {维度:分},前端 EvalReport 只认
   嵌套 {overall, dimensions} → overall 空。
   - EvalReport 兼容两种结构:维度取 dimensions(嵌套)或整个 scores(扁平),
     综合分取 overall 或维度平均
898 passed, tsc 0, vitest 16
2026-08-18 13:43:14 +08:00
sinohqb
4b66c94969 fix(intelligent-eval): align stat chips so all == sum of states
All checks were successful
CI / test (push) Successful in 3m58s
评估列表:STAT_CHIPS 补 cancelled(已取消 4 条),使 全部18 = 各状态和;
页头 title '智能评估' 统一为 '评估列表'(与菜单一致)。
任务队列:统计条去掉派生的 unresolved(待处理)chip——它与 pending/assigned
重叠重复计数,保留真实四态后 全部8 = 待认领0+执行中1+已完成7+失败0。
tsc 0 错误 vitest 16 passed
2026-08-18 11:03:26 +08:00
sinohqb
2fc3671140 feat(intelligent-eval): eval list default page size 10
All checks were successful
CI / test (push) Successful in 3m56s
评估列表默认每页显示 10 条(原 20),pageSizeOptions 已含 10
2026-08-18 10:53:34 +08:00
sinohqb
60c545ab78 fix(intelligent-eval): task queue all-count + unresolved filter
All checks were successful
CI / test (push) Successful in 4m0s
任务队列全部任务计数把派生的 unresolved 字段也求和了(stats 含
pending/assigned/completed/failed/unresolved),导致显示 9 而实际 8 条。
- 全部任务 = 四态之和(排除 unresolved),与后端 stats 对齐
- 改为一次拉取全部 + 前端过滤(unresolved 是 pending+assigned 并集,
  后端 status 单选无法表达);筛选/分页为前端状态,筛选变化重置到第 1 页
tsc 0 错误 vitest 16 passed
2026-08-18 10:48:13 +08:00
sinohqb
57951f7940 fix(intelligent-eval): task queue pagination + column widths align with eval list
All checks were successful
CI / test (push) Successful in 3m58s
任务队列页对齐评估列表:
- 分页:始终显示(pageSize 10 + showSizeChanger + showTotal),此前仅在
  >10 条时显示导致 t480(8 条)无分页器
- 列宽重新分配:评估列 230→300(长名称不截断)、原因列固定 240(ellipsis)、
  入队/完成时间 170、队列状态 100、优先级 80
- 字体格式对齐评估列表:去掉 size="middle" 改用默认(与评估列表一致)
tsc 0 错误 vitest 16 passed
2026-08-18 10:35:51 +08:00
sinohqb
47804f2df3 refactor(ui): extract SectionHeader + drop deprecated CronPoolMonitor (audit P2)
All checks were successful
CI / test (push) Successful in 3m57s
UI/UX 盘点 P2 + 清理:
- 新增 SectionHeader 共享组件,替换 DecisionProcess/ConfigSnapshots(主列表+快照
  对比)/EvalReport 自管 header 的重复(返回+标题+右侧操作区)
- 删除已 DEPRECATED 的 CronPoolMonitor 页面及其测试(导航早已移除,监控职责
  已由 TaskQueueMonitor 承担)
tsc 0 错误 vitest 16 passed(CronPoolMonitor 3 测试随之删除)
2026-08-17 23:51:40 +08:00
sinohqb
fa5e3b8d5d refactor(ui): consolidate state maps + colors to tokens (audit P1)
UI/UX 盘点 P1 一致性修复:
- 收敛重复状态映射:ExplorationSection 复用 SESSION_STATUS、TaskQueueMonitor
  复用 EVAL_STATUS(消除 blue/green 与 processing/success 颜色漂移)、
  Campaigns 复用 SEVERITY_META(均来自 intelligent_eval/status.ts)
- 硬编码颜色走 token:Reports 通过率用 passRateColor、通过/失败/delta 用
  statusColors;IntelligentEvals/TaskQueueMonitor/EvalReport/PeriodComparison
  的 #52c41a/#ff4d4f 用 statusColors.completed/failed;RunList/RuleOverview
  的 #faad14 用 colors.warning;Home 的 #1677ff 用 colors.primary
tsc 0 错误 vitest 19 passed
2026-08-17 23:42:13 +08:00
sinohqb
3626ab288b fix(intelligent-eval): P0 UI/UX refresh defects (audit)
UI/UX 全面盘点(.scratch/ui-ux-audit.md)P0 功能缺陷修复:
- DecisionProcess/ConfigSnapshots:useState(()=>load()) 一次性加载改为
  useEffect 依赖 evalId(切评估重拉)+ 头部补 ReloadOutlined 刷新按钮
- useRunSession:自写 setInterval(3000) 轮询改 usePolling(pauseWhenHidden
  默认开启:后台标签页暂停、回前台立即刷新);selectedIdRef 守卫保留防串;
  删除 pollRef/clearPolling
- useFiles:接入 useOnTabActive('/files'),keep-alive 跳回自动刷新
tsc 0 错误 vitest 19 passed
2026-08-17 22:59:23 +08:00
sinohqb
00ad929d68 feat(intelligent-eval): v4.2 UI — stat bar + single-line table + unified detail drawer
All checks were successful
CI / test (push) Successful in 3m58s
评估列表页(v4.2):
- 顶部状态统计条(stat-chip 点击筛选,后端列表接口新增 stats 状态分布 +
  status 筛选参数)
- 单行表格(名称/评测对象 ellipsis 省略)+ 会话进度迷你进度条 +
  最后一列醒目查看按钮 + 整行可点击
- 详情/报告合一单层抽屉(1000px,Tabs:概览/决策过程/配置历史/报告),
  审批/取消在抽屉头部;移除独立详情页 /intelligent-evals/detail 与
  intelligentEvalNav store

任务队列页:
- 与列表页统一 stat-chip 统计条 + 单行表格(评估状态小标、失败原因 tooltip)

清理:删除 IntelligentEvalDetail.tsx / intelligentEvalNav.ts;App.tsx 移除
detail 路由。任务队列保持独立菜单页。tsc 0 错误 vitest 19 passed 895 passed
2026-08-17 20:03:55 +08:00
sinohqb
a69fa8a797 refactor(intelligent-eval): split list page into dedicated pages
All checks were successful
CI / test (push) Successful in 4m7s
评估列表页此前用 Drawer 嵌套承载详情/报告/任务队列/新建,功能页面过多。
按 keep-alive 多页模式拆为独立页面(静态路由 + intelligentEvalNav store 传递选中):
- 评估列表 (/intelligent-evals):只留列表 + 新建;详情/报告/任务队列改为导航
- 任务队列 (/intelligent-evals/tasks):TaskQueueMonitor 独立页,二级菜单项
- 评估详情 (/intelligent-evals/detail):新独立页,页内 Tabs 承载概览/决策过程/
  配置历史/报告(completed 才显示报告 tab),取代 Drawer 嵌套;审批/打回/取消
  提到页面头部统一管理
- EvalDetail 拆为纯展示的 EvalOverview;DecisionProcess/ConfigSnapshots/EvalReport
  的 onBack 改可选(tab 环境不显示返回按钮)
- index.css 加 intelligent-detail-tabs 高度链(绕开 Ant CSS-in-JS 高度覆盖)
tsc 0 错误, vitest 19 passed
2026-08-17 16:39:53 +08:00
sinohqb
2dd023fdd9 docs(intelligent-eval): align domain language with trigger-driven execution (ADR-0009)
All checks were successful
CI / test (push) Successful in 4m2s
方案③落地后,智能评估执行机制从'常驻 cron 每分钟自唤醒'改为'平台每 60s
扫描入队 + 按需触发无状态 headless agent'(触发式执行)。对齐领域语言:
- CONTEXT.md:Cron 池/工作单元(Worker)标 deprecated;新增触发式执行词条;
  修正时间窗口(cron 自唤醒→平台扫描时段到期)、任务队列(消费端)、决策日志
- ADR-0009 新增:记录触发式执行取代 cron 池的决策(原因:cron 需外部 channel,
  OpenClaw webchat 非 channel 账号无法 delivery);ADR-0007 标 superseded
- 代码标 deprecated:cron_pool / fault_tolerance / openclaw_cron_pool 路由 /
  CronPoolMonitor 页(导航入口已从 App.tsx 移除,监控由 TaskQueueMonitor 承担)
895 passed, vitest 19 passed
2026-08-17 16:16:12 +08:00
sinohqb
cc2ac8da89 feat(intelligent-eval): paginate the eval list
All checks were successful
CI / test (push) Successful in 4m5s
GET /api/intelligent-evals 支持 page/page_size(默认不传仍返回全部,向后兼容):
repository 加 count/list_page,lifecycle 加 list_evals_page,router 返回 total。
前端服务端分页:useIntelligentEvalRead 接 page/pageSize,list 存 total,
IntelligentEvals 表格 showSizeChanger + 页码切换重新加载;5s 轮询保持当前页。
测试:+3 后端分页 + hook 页码透传/总数断言,895 passed,vitest 19 passed
2026-08-17 14:09:17 +08:00
sinohqb
b4f9c887f4 feat(intelligent-eval): task queue monitor (方案③可视化)
All checks were successful
CI / test (push) Successful in 4m1s
方案③的定时触发(scan loop 每 60s 入队 + 触发 worker)此前只有 Worker
消费端 API,无可查看的列表。新增:
- GET /api/intelligent-evals/tasks:任务明细(含评估名/状态)+ 状态分布统计
  (注册在 /{eval_id} 之前避免被捕获为 eval_id="tasks")
- 前端 TaskQueueMonitor 组件 + 智能评估页任务队列入口:5s 轮询
  (usePolling),状态卡 + 状态筛选 + 明细表
测试:+3(列表/筛选/不被 {eval_id} 遮蔽),892 passed,tsc 通过
2026-08-17 13:57:00 +08:00
sinohqb
6309b6abca fix(frontend): report overall NaN + header card styling
All checks were successful
CI / test (push) Successful in 4m1s
- NaN root cause: report.scores is nested { overall, dimensions: {...} };
  the old code treated every value as a number, so Number({object}) → NaN.
  Now: dimScores from scores.dimensions, overall prefers scores.overall.
- Header summary cards restyled: icon + colored big number + responsive
  (xs=12 md=6), colored score (>0.8 green / 0.6-0.8 amber / else red).
2026-08-17 02:01:45 +08:00
sinohqb
0c1e4578c9 refactor(frontend): unify polling via usePolling + visibility pause (S6)
All checks were successful
CI / test (push) Successful in 3m57s
- usePolling gains a pauseWhenHidden option (default true): the timer
  pauses while the document is hidden (background tab / minimised) and
  resumes with an immediate reload on returning to visible. Callers keep
  owning their initial fetch, so no duplicate first request.
- CronPoolMonitor now delegates its 5s poll to the shared usePolling hook
  (initial load stays in its own useEffect); removes the bespoke
  setInterval + manual visibility gap.
- CronPoolMonitor.test: visibility guard now passes (3/3), removing the
  previous it.fails. Frontend suite: 18/18; tsc clean; backend 878.

Resolves scan §6.3.
2026-08-14 15:57:07 +08:00
sinohqb
ee9cc3305e fix(release): commit package-lock.json version sync (1.1.1)
Some checks failed
CI / test (push) Failing after 44m29s
bump commit 444e9d7 missed package-lock.json; CI version-consistency
check (sync_version.py --check) failed with OUT_OF_SYNC. This commit
brings the lockfile in line so CI/CD can pass.
2026-08-13 14:49:34 +08:00
sinohqb
444e9d74e8 chore(release): bump version to 1.1.1
Some checks failed
CI / test (push) Failing after 1m13s
2026-08-13 14:25:38 +08:00
sinohqb
b5bcd13fa0 test(intelligent-eval): add #6 frontend + router contract + immutability + alert-autoscale link tests
Some checks failed
CI / test (push) Failing after 4m34s
T2 frontend CronPoolMonitor: polls every 5s, unmount clears interval,
   plus it.fails guard for missing visibilitychange listener (S6).
T3 router ORM contract: heartbeat updates fields + 404, decision-logs
   POST persists + 404, GET lists inserted (guards S2 — must continue to
   pass after router handlers move into a service in P3).
T8 decision-log immutability: append-only on context change passes;
   dedupe of identical (decision_type, context) is xfail (real gap).
T7 alert→auto-scale: task_backlog alert recorded on first call (passes);
   check_alerts never invokes auto_scale is xfail (real gap, §6.4).

All real gaps are logged in .scratch/v111-architecture-scan.md §6.
2026-08-13 04:03:17 +08:00
sinohqb
fed52f3920 fix(deploy): resolve cron pool initialization issues
Some checks failed
CI / test (push) Failing after 32s
- Add Cron Pool Monitor entry to sidebar menu
- Install Docker CE CLI from Aliyun mirror for container exec
- Mount Docker socket for managing openclaw-eval container
- Fix OpenClaw CLI commands (cron add/rm/list instead of automations)
- Add gateway token auth for CLI access
2026-08-12 13:40:18 +08:00
sinohqb
617cc3909d chore: clean up release notes and update lockfile
- Remove old release-notes-v1.1.md (renamed to v1.1-legacy.md)
- Update package-lock.json after version bump to 1.1.0
2026-08-12 11:12:29 +08:00
sinohqb
15699e0dd0 chore(release): bump version to 1.1.0
Add intelligent evaluation cron pool architecture:
- Cron pool management (5-20 workers)
- Task queue with priority-based scheduling
- Worker skill with autonomous decision logic
- Config snapshot management and comparison
- Decision process tracking and visualization
- Monitoring and alerting system
- Fault tolerance and recovery mechanisms
- Frontend UI for config history, decision process, and cron pool monitoring

All 853 tests passing.
2026-08-12 11:09:38 +08:00
sinohqb
244feae505 feat(intelligent-eval): add cron pool monitoring UI (ticket 10)
- Add openclawCronPoolApi with all cron pool API calls
- Add CronPoolMonitor page with pool status, metrics, and alerts
- Implement real-time refresh (5 second polling)
- Implement manual scaling with target size input
- Add alert history table with resolve functionality
- Add route /cron-pool for cron pool monitoring page
- Pass TypeScript type checking

All 853 tests passing.
2026-08-12 11:05:51 +08:00
sinohqb
ee639afb0d feat(intelligent-eval): add decision process UI (ticket 09)
- Add list_decision_logs API endpoint
- Add DecisionProcess component with timeline, list, filter, and export
- Add decision log API calls to api.ts
- Add "决策过程" button in EvalDetail to access decision history
- Implement decision log export to JSON
- Pass TypeScript type checking

All 853 tests passing.
2026-08-12 10:59:51 +08:00
sinohqb
4b8afa892b feat(intelligent-eval): add config snapshots UI (ticket 08)
- Add ConfigSnapshots component with list, detail, compare, and export features
- Add config snapshot API calls to api.ts
- Add "配置历史" button in EvalDetail to access config history
- Implement snapshot comparison with diff view
- Implement snapshot export to JSON
- Pass TypeScript type checking

All 853 tests passing.
2026-08-12 10:50:11 +08:00
sinohqb
941df4c8c7 release: normalize project version to v1.0.0 2026-08-11 14:07:05 +08:00
sinohqb
1782b245bf refactor(architecture): deepen campaign runtime modules 2026-08-11 13:18:48 +08:00
sinohqb
864ae2b7fe fix(review): address release correctness findings 2026-08-09 03:20:40 +08:00