fix(web): 收敛控制台列表主按钮、报警可读性与焦点环
按 UI 评审闭环 UI-02~UI-07(查询降权、对象/处理人可读化、筛选分层、数据源名映射、焦点外环);概览与登录壳按约定暂缓。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
c7a23837f4
commit
9dffeae667
25 files changed
+1057
-94
No files matched your search
@@ -0,0 +1,71 @@
|
||||
# Context Pack — ui-playwright-review fixes
|
||||
|
||||
## Task goal
|
||||
|
||||
按 UI 评审报告修复 UI-02~UI-07;**不改** UI-01(概览占位)、UI-08(登录壳)。
|
||||
|
||||
## Requirement source
|
||||
|
||||
- `docs/evidence/ui-review/2026-11-19-console-full/report.md`
|
||||
- 用户确认:`U1先不用改;UI-08先不改;其他的可以进行修复`
|
||||
|
||||
## Implementation source
|
||||
|
||||
本 context-pack;切片一次落地(前端 console 为主)。
|
||||
|
||||
## Involved modules
|
||||
|
||||
- `web/apps/console` 列表按钮、报警列表/详情、查询列表数据源名、EP 焦点桥接
|
||||
- `web/design/tokens.css`(可选只读)、`element-theme.css`
|
||||
- `web/apps/console/locales/*`
|
||||
|
||||
## Loaded rules / docs
|
||||
|
||||
- `.cursor/rules/element-admin-ui.mdc`
|
||||
- `docs/current/frontend-ui.md`
|
||||
- `standards://frontend/element-plus?version=1.0.2`
|
||||
- `standards://frontend/frontend-stack?version=2.1.0`
|
||||
- `standards://frontend/visual-ux?version=2.0.1`
|
||||
|
||||
## Allowed modification scope
|
||||
|
||||
- `web/apps/console/src/datasources/DatasourceList.vue`
|
||||
- `web/apps/console/src/queries/QueryList.vue`
|
||||
- `web/apps/console/src/mappings/MappingList.vue`
|
||||
- `web/apps/console/src/alarms/*`(format、List、Detail、相关单测)
|
||||
- `web/apps/console/src/shared/styles/element-theme.css`
|
||||
- `web/apps/console/locales/{zh-CN,zh-TW,en,th}/common.json`
|
||||
- 必要的 unit / e2e 适配
|
||||
- 任务产物与证据报告备注
|
||||
|
||||
## Forbidden modification scope
|
||||
|
||||
- 概览/Home 业务内容(UI-01)
|
||||
- 登录页品牌壳(UI-08)
|
||||
- 后端 API 契约变更(除非前端无法解析 identity;本轮仅前端解析)
|
||||
- 密钥、`.env.local`
|
||||
|
||||
## Current approved slice
|
||||
|
||||
`S-fix-ui-02-07`:一次修复 UI-02~UI-07;`gateClass: standard`;`risk_score: 2`
|
||||
|
||||
## Validation commands
|
||||
|
||||
```powershell
|
||||
cd web
|
||||
pnpm --filter @watchman/console test:unit
|
||||
pnpm --filter @watchman/console typecheck
|
||||
```
|
||||
|
||||
可选:相关 e2e alarms/queries/datasources。
|
||||
|
||||
## Assumptions
|
||||
|
||||
- 「新建」保留 primary;「查询」降为默认按钮(报警列表无新建,查询保持 primary)。
|
||||
- identity 形如 `identity:v1:{"serial":"..."}`;解析失败则回退原文。
|
||||
- 处理人无目录服务:UUID 截断展示 + title 全文。
|
||||
|
||||
## Stop conditions
|
||||
|
||||
- 需改后端字段或权限模型
|
||||
- 用户推翻「查询降权 / 新建保留 primary」选择
|
||||
@@ -0,0 +1,43 @@
|
||||
# Task Intake Result
|
||||
|
||||
## Task Type
|
||||
|
||||
review(工业管理后台 UI 设计评审;只读,默认不改代码)
|
||||
|
||||
## Current Understanding
|
||||
|
||||
- 目标:启动本地服务 → Playwright + 截图取证 → 对 Watchman 控制台 UI 做设计评审 → 输出优化建议。
|
||||
- 页面分类:`admin`(工业内部 B 端管理后台);大屏/HMI 本轮默认 `NOT_RUN`(仓库尚无对应交付面)。
|
||||
- 范围假设:已交付的控制台壳与业务页(登录、数据源、查询、映射/规则、报警中心等可访问路由),合成数据优先。
|
||||
- 已有相关证据:`docs/evidence/ui-review/2026-11-19-watchman-admin/`(仅数据源列表;曾因登录阻塞改用合成 `auth/me`)。本轮按用户要求先起服务再评,尽量覆盖更广页面。
|
||||
- 冲突注意:当前 `.task/active.json` 仍指向 `2026-11-19/ui-hexin-align`(phase: `review-complete-awaiting-final-approval`)。本任务目录已建,但未切换 active,待用户确认。
|
||||
|
||||
## Gate Policy
|
||||
|
||||
- config/default: `balanced`
|
||||
- allowTaskOverride: `true`
|
||||
- recommended: `autonomous`(只读评审 + 启动本地 dev 服务;无代码切片、无边界改写;建议少中途停顿)
|
||||
- selected: `autonomous`(用户 2026-11-19 确认)
|
||||
- reason or override reason: 用户明确选择 autonomous;只读评审
|
||||
- effective: `autonomous`
|
||||
- finalApprovalRequired: `true`(评审报告交付后需最终确认;默认不自动改 UI)
|
||||
|
||||
## Blocking Questions
|
||||
|
||||
1. 本任务 `gatePolicy.selected` 选 `strict` / `balanced` / `autonomous` 哪一个?
|
||||
2. 是否将 `.task/active.json` 从 `ui-hexin-align`(待最终批准)切换到本任务 `ui-playwright-review`?
|
||||
3. 登录方式:本机 Casdoor 真实账号(请确认已配置且可用),还是 `VITE_AUTH_MODE=fixture` / 合成会话(与上轮类似,不绕权)?
|
||||
|
||||
## Non-blocking Assumptions
|
||||
|
||||
- 不写业务数据、不触真实 MES/企微、不绕过登录与权限。
|
||||
- 启动方式按 `docs/runbook.md`:API `127.0.0.1:8000`,Console `127.0.0.1:5173`。
|
||||
- 产出:截图 + 评审报告 + 优化建议;默认不进入 coding。
|
||||
|
||||
## Recommended Next Step
|
||||
|
||||
用户确认门禁与登录方式后 → 切换/绑定 active task → 执行 `industrial-ui-review`(启动服务 → Playwright 截图 → 按 admin 参考出报告)。
|
||||
|
||||
## Suggested Prompt For Next Step
|
||||
|
||||
确认:`gatePolicy.selected=<...>`;`active` 切换为 `ui-playwright-review`;登录用 `<casdoor|fixture>`。然后启动服务并评审。
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"taskId": "2026-11-19/ui-playwright-review",
|
||||
"type": "review",
|
||||
"phase": "closed",
|
||||
"allowedToCode": false,
|
||||
"currentSlice": "S-fix-ui-02-07",
|
||||
"fixed": ["UI-02", "UI-03", "UI-04", "UI-05", "UI-06", "UI-07"],
|
||||
"deferred": ["UI-01", "UI-08"],
|
||||
"recheck": "docs/evidence/ui-review/2026-11-19-console-recheck/report.md",
|
||||
"validation": {
|
||||
"unit": "132 passed",
|
||||
"typecheck": "passed",
|
||||
"uiRecheck": "UI-02..07 CLOSED"
|
||||
},
|
||||
"gatePolicy": {
|
||||
"recommended": "autonomous",
|
||||
"selected": "autonomous",
|
||||
"effective": "autonomous",
|
||||
"finalApprovalRequired": true,
|
||||
"allowTaskOverride": true
|
||||
},
|
||||
"closedAt": "2026-11-19T11:05:00Z",
|
||||
"closeReason": "user requested commit, push, and close task"
|
||||
}
|
||||
+8
-14
@@ -1,17 +1,11 @@
|
||||
{
|
||||
"taskId": "2026-11-19/ui-hexin-align",
|
||||
"type": "refactor",
|
||||
"phase": "review-complete-awaiting-final-approval",
|
||||
"taskId": null,
|
||||
"type": null,
|
||||
"phase": "idle",
|
||||
"allowedToCode": false,
|
||||
"currentSlice": "S9",
|
||||
"lastGate": "slices-S0-S9-done-awaiting-final",
|
||||
"nextCommand": "final-approval",
|
||||
"gatePolicy": {
|
||||
"recommended": "strict",
|
||||
"selected": "autonomous",
|
||||
"effective": "autonomous",
|
||||
"finalApprovalRequired": true,
|
||||
"allowTaskOverride": true
|
||||
},
|
||||
"updatedAt": "2026-11-19T08:06:00Z"
|
||||
"currentSlice": null,
|
||||
"lastGate": "ui-playwright-review-closed",
|
||||
"nextCommand": null,
|
||||
"closedTaskId": "2026-11-19/ui-playwright-review",
|
||||
"updatedAt": "2026-11-19T11:05:00Z"
|
||||
}
|
||||
Reference in new issue
Block a user