Commit Graph

25 Commits

Author SHA1 Message Date
sinohqb
f458897ab5 refactor(read): 前端泛化 ReadSlot 资源接缝(Phase 4.18-21)
将 src/read 从单一消费者扩展为通用资源接缝;drawer 标签页与
useCampaignReport / useFiles 统一消费;导出仪式下沉至工具函数。

- 新增 readResource.ts:ReadSlot<T> 相位机(idle/loading/
  refreshing/ready/error)、requestId 竞态守卫、静默刷新、
  可注入 adapter;SelectedReadSlot<T> 支持 list→detail 的
  stale-response rejection。配套 characterization 测试。
- evalActivity.ts / useIntelligentEvalRead.ts 退化为 readResource
  的特化;既有测试保持通过。
- DecisionProcess / ConfigSnapshots / TaskQueueMonitor 删除手写
  fetch 样板(useState + try/catch + useEffect 三件套),改走
  资源接缝;ExecutionProcess 的 5 个 fetch 槽同步收敛。
- 决策日志新鲜度归一:三种策略(父级 5s 详情轮询 +
  ExecutionProcess 独立 5s 轮询 + DecisionProcess 挂载取一次)
  收敛为父级 evalActivity 单一供给,子组件消费同一份数据。
- useCampaignReport 删除私有 ReadPhase / ReadSlot 定义,改
  import 自 readResource。
- ACTIVE_STATUSES 合并至 read/intelligentEval.ts 单一出口。
- 新增 utils/download.ts:downloadBlob / downloadJson 取代 api.ts
  与 useFiles 中三处重复的 Blob 导出仪式(含 DOM 副作用迁出
  接口定义出口)。
2026-08-24 05:51:53 +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
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
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
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
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
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
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
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
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
c896ab3f71 refactor(architecture): deepen evaluation lifecycle and read model 2026-08-07 03:11:37 +08:00
sinohqb
22cc437e2d feat(intelligent-eval): adjust drawer top-bar layout
详情页移除返回列表按钮(抽屉自带关闭),操作按钮右对齐;
报告页保留返回详情,导出 Markdown 按钮右对齐。
2026-08-06 00:37:02 +08:00
sinohqb
1d2c37277c feat(intelligent-eval): open detail/report in right-side drawer
列表常驻,详情与报告改为右侧抽屉弹出,减少页面层级嵌套。
2026-08-06 00:29:52 +08:00
sinohqb
935f0a1f57 refactor(ui): open intelligent eval via action-column buttons
Replace the name link and row-click with explicit detail/report
buttons, matching the static-eval table pages. Report button only
shows for completed evals; list pagination now follows the 20-row
threshold.
2026-08-05 21:00:19 +08:00
sinohqb
d4c254e121 refactor(ui): baseline FormDrawer component and IntelligentEvals dogfood (ui-consistency ticket 01)
Extract the standard form drawer (width 640, footer actions, destroyOnClose)
as FormDrawer; reuse existing usePolling hook. IntelligentEvals becomes the
first consumer — create drawer and both 5s pollings switched with zero
behaviour change. Includes ui-consistency spec, tickets, and ADR-0005.
2026-08-05 15:34:31 +08:00
sinohqb
6cc2efafb6 feat(frontend): detail auto-refresh, session list, pinned AI-assistant tab
Some checks failed
CI / test (push) Failing after 40s
- Detail page silently polls every 5s while planning/executing/pending_approval
- Detail page shows per-session progress (persona/status/goal/turns), polled while executing
- /openclaw tab pinned by default like the dashboard (tabStore now .tsx)
2026-08-05 14:01:26 +08:00
sinohqb
cbee749da2 feat(intelligent-eval): frontend list/detail/report pages (tickets 05-07)
Some checks failed
CI / test (push) Failing after 1m31s
List page with create drawer, detail panel with plan approval/rejection,
and structured report view with severity-sorted findings and session
chat drill-down. Views switch inside the /intelligent-evals keep-alive tab.
2026-08-05 03:49:13 +08:00
sinohqb
da6ccc265d feat(frontend): restructure admin menu into two-level groups and add intelligent-eval entry
Some checks failed
CI / test (push) Failing after 50s
Reorganize the sidebar into top-level items plus four groups (静态评估 / 智能评估 /
配置中心 / 系统), add the /intelligent-evals route with a placeholder page, and tune
the expanded-submenu background so nested groups sit harmoniously on the dark sider.
2026-08-05 03:27:48 +08:00