Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b80988ccf7 | ||
|
|
51597ad9fc | ||
|
|
8b8d2beefe | ||
|
|
3ec395046b | ||
|
|
5dc299c478 | ||
|
|
7c29f72ff7 | ||
|
|
da1806f745 | ||
|
|
ec7eab89fb | ||
|
|
282252a5fb | ||
|
|
dfbc14c081 | ||
|
|
4aaebcb65a | ||
|
|
5cb8b6ac83 | ||
|
|
0bc1f64edc | ||
|
|
d3bdff81e5 | ||
|
|
6f9f820f85 | ||
|
|
9552f1eb95 | ||
|
|
a41c6cf928 | ||
|
|
e565f67b46 | ||
|
|
cd66d63f4f | ||
|
|
a99f84b25e | ||
|
|
2cf526e176 | ||
|
|
24b655cae1 | ||
|
|
e5e628de4a | ||
|
|
27334fef81 | ||
|
|
058a88bdb7 | ||
|
|
b991899a5d | ||
|
|
13e0d42472 | ||
|
|
eee4e6bde9 | ||
|
|
5ed8444d5d | ||
|
|
736b582bc1 | ||
|
|
f0a0131aac | ||
|
|
131b6dbbb3 | ||
|
|
f861a3d386 | ||
|
|
be382a117d | ||
|
|
ef40f339cd | ||
|
|
e9b77186dc | ||
|
|
6c708224d2 | ||
|
|
f437df2a83 | ||
|
|
96227eed2e | ||
|
|
656f43e2ff | ||
|
|
9c508333bb | ||
|
|
2f58f07a5a | ||
|
|
d667fa6c57 | ||
|
|
b84afbfa8a | ||
|
|
0933766dcf | ||
|
|
bf14b20a38 | ||
|
|
7bdaaeb2ec | ||
|
|
7da623d055 | ||
|
|
12895e9868 | ||
|
|
9c03cd5900 |
No files matched your search
@@ -18,3 +18,5 @@ __pycache__/
|
||||
coverage.xml
|
||||
/.worktrees/
|
||||
/.superpowers/
|
||||
node_modules/
|
||||
/integration/dsh/issue-bootstrap.json
|
||||
@@ -4,11 +4,11 @@
|
||||
|
||||
面向 **Windows + DxDesigner / Expedition Enterprise 7.9.5** 的器件批量替换工具。一个工程对应一个任务,可以只替换同料号下的部分位号;支持直接编辑和 Excel BOM 导入,同批工程按顺序执行。
|
||||
|
||||
**最新版本:V1.1.4 Beta 3(预发布)** · [下载便携包](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/releases/download/v1.1.4-beta.3/DxPartReplace-1.1.4-beta.3.zip) · [版本说明与附件](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/releases/tag/v1.1.4-beta.3) · [完整使用说明](docs/user/v1.1.0-project-tasks.md)
|
||||
**最新版本:V1.1.4 Beta 4(预发布)** · [下载便携包](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/releases/download/v1.1.4-beta.4/DxPartReplace-1.1.4-beta.4.zip) · [版本说明与附件](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/releases/tag/v1.1.4-beta.4) · [完整使用说明](docs/user/v1.1.0-project-tasks.md)
|
||||
|
||||
所有发布均标记为 **Beta 预发布**。V1.1.4 Beta 1 因 BOM 导入缺少 `win32timezone` 已撤回,请使用 Beta 3;旧 Git 标签保留供回溯。升级前备份 `data`,完整更新 EXE 与 `_internal`,不要只替换 EXE。
|
||||
所有发布均标记为 **Beta 预发布**。V1.1.4 Beta 1 因 BOM 导入缺少 `win32timezone` 已撤回,请使用 Beta 4;旧 Git 标签保留供回溯。升级前备份 `data`,完整更新 EXE 与 `_internal`,不要只替换 EXE。
|
||||
|
||||
Beta 3 面向工单 #1/#3 复测:修复内部长路径访问,将后台资源移交独立批次监督进程,补齐安全重建、释放诊断与可选关闭归档。[本版变更和复测说明](docs/releases/v1.1.4-beta.3.md)。
|
||||
Beta 4 面向停止与资源收尾复测:普通暂停等待当前项保存核验,写入中无进度不再自动杀进程;新增明确确认的强制结束,保留中断证据与恢复入口。[本版变更和复测说明](docs/releases/v1.1.4-beta.4.md)。
|
||||
|
||||
本版提供[目标封装选择](docs/user/target-cell-selection.md):目标封装可留空,此时工具不主动覆写封装,可后续与中心库同步;需要指定时,在料号规则中读取并选择合法封装。BOM 保持原 11 列。
|
||||
|
||||
@@ -20,7 +20,7 @@ Beta 3 面向工单 #1/#3 复测:修复内部长路径访问,将后台资
|
||||
|
||||
### 第 1 步:解压并打开应用
|
||||
|
||||
[下载 V1.1.4 Beta 3 便携包](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/releases/download/v1.1.4-beta.3/DxPartReplace-1.1.4-beta.3.zip),**完整解压**,双击 `DxPartReplace.exe`。保留它与 `_internal` 的相对位置,无需安装 Python;本机需要可用的 DxDesigner、许可证和中央库。
|
||||
[下载 V1.1.4 Beta 4 便携包](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/releases/download/v1.1.4-beta.4/DxPartReplace-1.1.4-beta.4.zip),**完整解压**,双击 `DxPartReplace.exe`。保留它与 `_internal` 的相对位置,无需安装 Python;本机需要可用的 DxDesigner、许可证和中央库。
|
||||
|
||||
打开后看到下图主窗口。首次使用请准备完整的工程副本,执行前保存并关闭待处理工程。
|
||||
|
||||
@@ -133,6 +133,8 @@ Beta 3 面向工单 #1/#3 复测:修复内部长路径访问,将后台资
|
||||
|
||||
运行期间可以在主桌面查看其他文件,请勿打开或修改本次正在处理的同一工程。需要暂停时,点击 **完成当前项后暂停**,等待当前步骤安全收尾。
|
||||
|
||||
Beta 4 在保存或核验尚未确认时保留应用等待,可先 **导出诊断包**。只有明确接受中断后需要核验时,才选择 **强制结束…**;之后先核验恢复,不能直接重复替换。详见[停止、强制结束与恢复](docs/user/safe-stop-and-recovery.md)。
|
||||
|
||||
**完成标志:** 任务显示已完成,底部提示本批执行结束。还要打开结果核对,不能只看进度条。
|
||||
|
||||
### 第 12 步:查看实际修改结果与日志
|
||||
@@ -196,7 +198,7 @@ DxPartReplace/
|
||||
|
||||
## 验证范围与已知限制
|
||||
|
||||
V1.1.4 Beta 3 新增批次后台资源管理:一次 BOM 导入或顺序执行共用一个私有桌面,CAD 按需启动并在同批工程间复用,批次结束统一退出。若提示 **资源释放待处理**,已保存核验的结果保留,请点击 **重新清理资源**;该操作只清理后台资源,不会再次替换。旧的工程保护锁仍按“核验并恢复”处理。设计、异常边界与实机结果见[批次运行时验收记录](docs/testing/2026-10-21-batch-private-runtime.md)。
|
||||
V1.1.4 Beta 4 沿用批次后台资源管理:一次 BOM 导入或顺序执行共用一个私有桌面,CAD 按需启动并在同批工程间复用,批次结束统一退出。若提示 **资源释放待处理**,已保存核验的结果保留,请点击 **重新清理资源**;该操作只清理后台资源,不会再次替换。旧的工程保护锁仍按“核验并恢复”处理。设计、异常边界与实机结果见[批次运行时验收记录](docs/testing/2026-10-21-batch-private-runtime.md)。
|
||||
|
||||
资源释放会追加日志:在 **替换结果 / 日志 → 完整日志** 查看本批开始释放、释放成功/失败及重新清理的结果。独立文件位于 `data/batch-resources/<批次ID>/resource-release.log`,记录批次、桌面、CAD PID、退出码、释放耗时、句柄关闭和桌面消失的分别确认,以及失败原因;同时保留 `session.json` 的原始释放证明。重启后重新检查也会追加记录,不覆盖原失败日志。
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
# V1.1.4 Beta 4 构建与发布验证
|
||||
|
||||
2026-10-26,用户授权发布下一版 Beta。版本 `1.1.4-beta.4`,Python 元数据 `1.1.4b4`,Windows 文件版本 `1.1.4.4`,预发布标志开启。业务修改基于 `9c03cd5`;本轮产品代码只调整版本标识。
|
||||
|
||||
## 构建门禁
|
||||
|
||||
- `packaging/Build-DxPartReplace.ps1`:退出码 0,源码门禁 **923 passed,232.69 秒**,一条既有 pywinauto STA 警告。
|
||||
- 打包配置及外部验收脚本检查:**17 passed,11.08 秒**。
|
||||
- 构建产物在完整冻结 EXE 主进程中启动独立监督进程、读取真实进程创建时间并确认自有进程/Job/桌面释放,再完成 GUI 启动与正常关闭检查。
|
||||
- 冻结的 92 个 `dx_productivity` 模块及应用入口逐项对照源码,递归标准化 code filename 后 code object 一致。包含新的 `stop_control` 模块;两份 VBS 在包装阶段另做哈希比对。
|
||||
- EXE SHA256:`ee64d983f6f0457bac2bb16225ee8a8044753b5bf7779e498549c61d8ed4d13b`。
|
||||
|
||||
构建日志:`build/release-1.1.4-beta.4-build.log`。源码比对:`build/release-1.1.4-beta.4/frozen-source-check.json`。实现阶段扩大测试 1147 项通过的范围见[安全停止验收](../testing/2026-10-26-safe-stop-acceptance.md),不与本轮构建门禁数量混算。
|
||||
|
||||
## 冻结监督进程实机验证
|
||||
|
||||
本轮用源码控制器驱动上述正式 EXE 的 `--batch-worker`,执行 BOM 导入与真实 CAD 队列;批内 helper 和 VBS 使用冻结产物。复制两个全新工程,不重放之前完成的替换。
|
||||
|
||||
在第一个工程的生产 `save_requested` 日志出现时只请求普通停止,结果为第一任务 completed、第二任务 pending、队列 paused。新 CAD 实例独立读回确认:第一工程 57 器件、103 引脚连接正确,56 个非目标器件保持;第二工程 57 器件完整属性/连接图与执行前一致。
|
||||
|
||||
执行批次 `orderly_shutdown=true`、`clean=true`、`forced_termination=false`,CAD 与 Quit helper 退出码均为 0,资源状态 released。源工程目录哈希和中央库 `.lmc` 哈希不变。
|
||||
|
||||
证据:`build/release-1.1.4-beta.4/frozen-save-stop.json` 与 `build/safe-stop-live-9894f95db1/`。后者由通用 source 探针生成,保留了其原始 scope 文本;本轮实际冻结进程路由、调用请求和 EXE 哈希以 companion `frozen-save-stop.json` 为准。前后独立读取使用源码读取器,不将其说成全部入口均冻结,也不将该测试说成完整 GUI 交互停止。
|
||||
|
||||
## 包装与公开附件
|
||||
|
||||
便携包只从 EXE、完整 `_internal`、仓库教程及文档生成,附空白 11 列 BOM 模板和历史窗口 GIF;不带 `data`、任务数据库、用户工程、工单附件或现场日志。
|
||||
|
||||
包装脚本要求本轮冻结停止验证的 EXE 哈希与被打包文件一致,检查 ZIP CRC、解压路径、所有程序文件 SHA256,并在清除源码 Python 环境变量后执行解压出来的完整 EXE smoke。ZIP 大小、SHA256、程序文件清单与解压验证结果由公开 `release-manifest-1.1.4-beta.4.json` 记录。
|
||||
|
||||
附件:`DxPartReplace-1.1.4-beta.4.zip`、`SHA256SUMS-1.1.4-beta.4.txt`、`release-manifest-1.1.4-beta.4.json`、`BOM-template.xlsx`、`window-tutorial-1.1.4-beta.4.gif`。GIF 沿用 1.1.2 基础教程,新停止功能以包内说明和界面为准。
|
||||
|
||||
发布流程为先创建草稿,上传后逐项回下载核对大小和 SHA256,全部一致才公开为 Beta 预发布。远端响应与附件校验证据保存在 `build/release-1.1.4-beta.4/`;认证信息不写入文件或日志。本轮没有授权给工单发消息,因此不发布工单评论、不关闭工单,也不修改旧版本附件。
|
||||
|
||||
## 现场边界
|
||||
|
||||
仍未完成原工单 102 个工程的全量现场复测,也没有完整冻结 GUI 的真实保存中强杀或掉电无损验收。工单现场桌面残留持有者尚未查明。本版本提供已验证的停止与收尾改进,不能据此宣布现场事故根因已经根治。
|
||||
@@ -0,0 +1,41 @@
|
||||
# DxPartReplace V1.1.4 Beta 4
|
||||
|
||||
2026-10-26,**Beta 预发布/安全停止与应用收尾复测版**。关联工单 [#1](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/issues/1)、[#3](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/issues/3)。
|
||||
|
||||
## 下载与升级
|
||||
|
||||
完整解压 `DxPartReplace-1.1.4-beta.4.zip`,运行 `DxPartReplace.exe`。无需安装 Python;保留 EXE 和 `_internal` 的相对位置,本机需要可用的 DxDesigner、许可证及中央库。
|
||||
|
||||
请在新目录解压,使用工程副本复测。沿用旧任务前,先安全退出旧程序并备份完整 `data`;不要同时用两个版本打开同一数据目录。不要删除原有保护记录来绕过核验。
|
||||
|
||||
便携包包含中文教程、空白 11 列 BOM 模板、历史窗口操作 GIF、停止与恢复说明及文件校验清单。GIF 沿用 1.1.2 基础操作,新版停止与强制结束功能以实际界面及[停止说明](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/src/tag/v1.1.4-beta.4/docs/user/safe-stop-and-recovery.md)为准。
|
||||
|
||||
## 本版修改
|
||||
|
||||
- 普通“完成当前项后暂停”只停止后续调度,当前替换项完成必要校验、保存、回读和关闭后再停止;关闭窗口也等待收尾。
|
||||
- 有写入可能的阶段长时间没有进度时保留应用等待,不再仅凭超时自动杀进程;纯只读采集仍采用有界取消。
|
||||
- 新增独立的“强制结束…”确认。先可靠保存中断保护和批次证据,再终止本程序拥有的进程;保护写入失败时拒绝本次强制结束并显示原因。
|
||||
- 当前修改或保存结果不确定、应用拒绝退出时保留现场,禁止盲目保存、丢弃和重放。等待期间可导出诊断包。
|
||||
- 保存请求、保存调用返回、保存回读和工程关闭分别记录,避免保存后关闭失败被误记为未保存。
|
||||
- 修复收尾记录写入失败跳过正常 Quit 的路径;CAD 主进程正常退出后,给自有辅助进程短暂自然退出机会,再决定是否需要强制清理。
|
||||
- 正常退出、强制终止和物理资源释放分别报告。资源消失不再掩盖应用退出异常,已经核验的业务结果继续保留。
|
||||
- 控制通信异常不会直接授权终止正在运行的交互批次;强制结束及进程退出诊断记录保持一致。
|
||||
|
||||
## 复测建议
|
||||
|
||||
1. 新建两个工程副本的少量位号任务,导入 BOM 并保存计划。
|
||||
2. 在第一项执行或保存时点击普通暂停,核对当前项完成保存回读,下一项保持未执行;重新打开工程核对料号和连接。
|
||||
3. 对长时间等待先导出诊断。仅在接受当前结果需要核验时确认“强制结束…”;重开后先“核验并恢复”,不要直接重复替换。
|
||||
4. 如仍有异常,保留版本、触发步骤、诊断 ZIP 和失败工程名称。资源待处理时的清理不会重新执行替换。
|
||||
|
||||
为避免强制请求与任务切换同时发生而漏记目标,本版强制结束会保守保护本批可能涉及的任务。先前已完成任务也可能需要复核,但其保存结果和执行证据不被覆盖或重放。
|
||||
|
||||
## 验证范围与已知边界
|
||||
|
||||
实现阶段扩展回归 **1147 项通过**。源码监督入口在两份新工程副本上验证了保存期间请求普通停止:第一工程 completed,第二工程 pending;新 CAD 独立读回确认第一工程 57 器件、103 引脚连接正确、56 个非目标器件不变,第二工程完整图未变化。源工程及中央库 `.lmc` 哈希不变,执行批次正常退出且没有强制清理。
|
||||
|
||||
本轮发布门禁 923 项通过,打包与验收脚本检查 17 项通过。正式 EXE 的冻结监督进程再次完成真实 CAD 保存期间普通停止及新实例独立读回;当前项完成、下一项未执行,正常退出且无强制终止。该实机入口由源码控制器驱动,不等同于完整 GUI 交互验收。
|
||||
|
||||
发布构建、解压后完整 EXE 启动、冻结监督进程及资源释放检查另见[Beta 4 构建记录](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/src/tag/v1.1.4-beta.4/docs/releases/v1.1.4-beta.4-build.md)和附件 manifest。源码/受控辅助进程故障测试不等同于完整冻结 GUI 下的真实 CAD 强制中断或掉电无损验证。
|
||||
|
||||
**现场资源残留根因仍未全部闭环。** 原工单全量 102 个工程及特定系统组合仍需现场复测,本版不宣称所有环境已根治,不自动关闭关联工单。完整范围见[实施验收](https://git.simgreek.com/simgreek/dxdesigner-part-replacement/src/tag/v1.1.4-beta.4/docs/testing/2026-10-26-safe-stop-acceptance.md)。
|
||||
@@ -0,0 +1,50 @@
|
||||
# 2026-10-30 优化分支第二轮审查
|
||||
|
||||
本轮在 `.worktrees/project-optimization` 的 `codex/project-optimization` 分支执行。主工作区继续使用 DSH 分支,两个工作目录分别维护各自提交。
|
||||
|
||||
## 已复现并修复的问题
|
||||
|
||||
| 问题 | 触发条件和原因 | 修复 |
|
||||
| --- | --- | --- |
|
||||
| P1:历史资源记录使界面卡顿 | `_update_gates()` 同步调用资源扫描,搜索、选择规则和执行状态更新都会读取全部历史 JSON。500 条已释放记录的一次扫描约需 1.57–1.65 秒 | 新增 `ui/resource_status.py`,后台读取并保留状态快照;初始化、操作收尾和定时复查更新快照,按钮刷新直接读取快照 |
|
||||
| P1:异常退出丢失 BOM 逐行诊断 | `_finish_response()` 在资源复核通过后发现 CAD 退出异常,创建新的 `application_shutdown_failed` 错误,却没有携带原业务错误和 BOM 报告 | 在 `supervisor_result.py` 统一构造退出错误,保留原错误、清理错误和逐行报告;移除报告中的可执行预览 |
|
||||
| P2:规则窗口销毁后访问已释放控件 | 封装读取仍在运行时销毁规则窗口,成功和失败回调均只判断逻辑关闭标记,未判断 Qt 对象是否有效 | 回调先检查 `isValid(self)`,丢弃销毁后的结果;两条路径均有实际 Qt 生命周期回归 |
|
||||
| P2:已完成批次仍显示可执行按钮 | 按钮只判断批次存在;处理函数重新筛选任务后发现没有剩余任务,直接返回 | 抽取 `pending_batch_tasks()`,按钮门控、执行和确认范围共用待执行任务列表 |
|
||||
|
||||
资源快照采用保守处理:首次读取未完成或读取失败时阻断执行;操作结束触发的刷新会合并,操作前的旧快照不能解除门禁。周期检查不会取消慢读取。窗口关闭会停止周期检查并丢弃迟到结果。服务层原有执行前资源检查继续作为最终校验。
|
||||
|
||||
## 测量范围
|
||||
|
||||
使用独立临时目录创建合法的已释放资源记录,无 CAD 进程和工程写入。原同步扫描测得:
|
||||
|
||||
- 0 条:三次分别为 2.68、1.83、1.41 毫秒。
|
||||
- 100 条:293.55、277.36、313.80 毫秒。
|
||||
- 500 条:1650.06、1626.25、1569.35 毫秒。
|
||||
|
||||
接入后台快照后,在真实 `TrialTaskCenterWindow`、`TaskCenterService` 和 `TaskStore` 的空任务窗口中,500 条历史记录下连续调用按钮门控 100 次,总计 6.63 毫秒,期间文件扫描次数为 0。另有已选中任务的 Qt 回归验证后台慢读取期间仍能搜索和响应事件。该结果证明 GUI 热路径移除了扫描,不表示磁盘扫描本身变快,也不代表实际 CAD 替换速度。
|
||||
|
||||
## 前次结论修正
|
||||
|
||||
前次把停止事件轮询从 0.1 秒改成 0.01 秒,并将一次时序测试失败解释为阻塞根因,证据不足。`Event.wait()` 会在事件设置后立即唤醒;初次保护失败后的进度文件写入可能延后重试,固定等待 0.25 秒不能证明保护重试没有发生。
|
||||
|
||||
本轮恢复 0.1 秒等待,回归测试等待明确的强制结束拒绝状态,再检查线程仍存活和保护写入确已重试。不会把这项时序调整计作资源泄漏修复。
|
||||
|
||||
## 测试入口修正
|
||||
|
||||
全仓收集发现 `tests/ui/test_execution_feedback.py` 与 `tests/v1_1/test_execution_feedback.py` 的模块名冲突。UI 文件更名为 `test_ui_execution_feedback.py` 并更新文档引用。
|
||||
|
||||
默认 `python -m pytest -q` 仅覆盖 `tests/v1_1`,不能称为整个仓库测试。全仓历史测试曾启动,随后为实施新确认的 GUI 阻塞修复而主动停止,未将该次运行记作完整通过。当前验证覆盖新版测试、UI 和项目发布要求的安全子集。
|
||||
|
||||
本轮未进行真实 DxDesigner 工程替换或冻结包验收;现场桌面引用残留仍需实际故障机器的进程与句柄证据。
|
||||
|
||||
## 最终验证
|
||||
|
||||
```powershell
|
||||
python -m pytest -q tests/v1_1 tests/ui tests/part_replace/test_verification.py tests/trial_task_center/test_execution_safety.py tests/trial_task_center/test_application.py --durations=5
|
||||
```
|
||||
|
||||
结果:960 passed,1 项既有 pywinauto STA 警告,462.49 秒。此命令覆盖新版测试、UI 和发布安全子集。
|
||||
|
||||
安全停止的真实子进程测试曾在收到首条阶段进度前触发 0.6 秒启动超时,未进入其要验证的保存/强制结束路径。测试现将启动预算与阶段无进度时限区分,并断言目标阶段确实被接收;保存和只读阶段的原 0.3 秒时限继续有效。生产监控超时参数未修改。
|
||||
|
||||
`python -m compileall -q src` 和 `git diff --check` 均通过。
|
||||
@@ -0,0 +1,73 @@
|
||||
{
|
||||
"browser": "156.0.8078.73",
|
||||
"checks": [
|
||||
{
|
||||
"test": "browser-layout-ready",
|
||||
"ok": true,
|
||||
"width": 1440,
|
||||
"height": 900
|
||||
},
|
||||
{
|
||||
"test": "browser-layout-running",
|
||||
"ok": true,
|
||||
"width": 1440,
|
||||
"height": 900
|
||||
},
|
||||
{
|
||||
"test": "browser-layout-recovery",
|
||||
"ok": true,
|
||||
"width": 1440,
|
||||
"height": 900
|
||||
},
|
||||
{
|
||||
"test": "browser-layout-assistant",
|
||||
"ok": true,
|
||||
"width": 1440,
|
||||
"height": 900
|
||||
},
|
||||
{
|
||||
"test": "browser-review-visible",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "escape-cancels-without-execution",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "browser-batch-guard",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "browser-confirm-starts-preparation",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "browser-pause-keeps-running",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "browser-verification-before-pause",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "browser-pause-after-verification",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "browser-solid-material-fallback",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "browser-compact-layout",
|
||||
"ok": true,
|
||||
"width": 980,
|
||||
"height": 700
|
||||
},
|
||||
{
|
||||
"test": "browser-compact-review",
|
||||
"ok": true
|
||||
}
|
||||
],
|
||||
"pageErrors": [],
|
||||
"screenshots": "Chrome headless, screenshot waits for compositor; 1440x900 and 980x700."
|
||||
}
|
||||
|
After Width: | Height: | Size: 128 KiB |
|
After Width: | Height: | Size: 108 KiB |
@@ -0,0 +1,39 @@
|
||||
# 细节打磨:文字、交互和表格
|
||||
|
||||
用户要求三方面一起打磨,保留已认可的布局与原生磨砂。
|
||||
|
||||
## 文字、间距与状态
|
||||
|
||||
- 工程标题过长时省略显示,完整名称保留在提示中;不会把小窗口撑宽。
|
||||
- 工程状态保持单行并右对齐,避免“待配置”等短词中途折行;长状态有完整提示。
|
||||
- 按钮图标统一 16px;输入框、按钮、菜单和表格补充焦点、按下、选中与禁用反馈。
|
||||
- 表头与单元格提示说明只读字段、完整内容、UID 和工程身份。
|
||||
|
||||
## 搜索与批量编辑
|
||||
|
||||
- 搜索显示“匹配 X / 总数”,无匹配时显示清楚的空状态;清空后恢复全部行。
|
||||
- 没有查询或结果时,下一条操作不再可用;表格空状态不截获鼠标事件。
|
||||
- 批量填写显示选中行数,未选行或未填新料号时禁用。行选中用于编辑,替换勾选用于计划,两者在提示中区分。
|
||||
|
||||
## 保存与键盘
|
||||
|
||||
- 计划旁显示已保存 / 未保存;没有修改时禁用重复保存。本批 BOM 预览仍保留本批保存范围。
|
||||
- 支持 `Ctrl+F` 定位搜索、`F3` 下一条、`Ctrl+S` 保存。快捷键受当前编辑状态和原有权限门禁约束。
|
||||
- 实际验证并修正了单元格未提交时的保存问题:快捷键先提交当前编辑器,再获取保存快照;鼠标保存也能读取当前输入值。
|
||||
- 编辑中的临时输入参与未保存检测与执行门禁,但不提前改变模型;`Esc` 或放弃操作关闭编辑器并保留原值。
|
||||
|
||||
## 验证
|
||||
|
||||
相关 UI、状态与 BOM 回归 **131 项通过**;最终文字尺寸/对齐调整后,材质、布局与细节的针对性检查 **24 项通过**。新增细节用例覆盖真实单元格编辑、鼠标保存、键盘保存、取消、放弃、只读状态、匹配反馈、批量填写和长标题。
|
||||
|
||||
独立静态审查确认先前的 Ctrl+S 问题已修正,未发现新的重要编辑器生命周期或保存门禁问题。
|
||||
|
||||
原生验收继续使用临时示例数据与独立活动背板,没有启动 CAD。左右磨砂随背板变化,表格保持不透明;小窗口与实色回退通过。详见 [polish-acceptance.json](polish-acceptance.json)。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
源代码已更新,便携 EXE 未重新构建;本机原生验收环境仍为 Windows 11 build 26200、125% 缩放。
|
||||
@@ -0,0 +1,68 @@
|
||||
# R5:GitHub 毛玻璃实现调研与原生实测
|
||||
|
||||
日期:2026-10-30。分支:`codex/ui-update`。
|
||||
|
||||
结论:当前 PySide6 工具应优先验证 **Windows 原生 Acrylic**,将真实窗口背后的内容交给系统合成器模糊。需要 Apple 式边缘折射时,另用 SVG/着色器处理应用内的浮层,不能把半透明白色、模糊、Mica 和折射统称为同一种效果。
|
||||
|
||||
此前 R4 页面确实使用了浏览器背景模糊,但背景接近纯色、叠加白色过厚,缺少可观察的透射细节;它也没有启用正式 Qt 窗口的系统背景模糊。不能用那张图证明原生毛玻璃已经完成。
|
||||
|
||||
## 实际参考的 8 个项目
|
||||
|
||||
通过 GitHub 仓库 API 读取 README、仓库树和关键源码。搜索 API 遇到速率限制,raw 域名连接失败后,改用仓库内容/Blob API,成功读取了下列材料。本文没有把检索失败的项目计入参考数量。
|
||||
|
||||
| 项目 | 已核对的实现 / 文档 | 可借鉴内容 | 与本项目的关系 |
|
||||
| --- | --- | --- | --- |
|
||||
| [PyQt-Frameless-Window](https://github.com/zhiyiYo/PyQt-Frameless-Window) | [`setAcrylicEffect`](https://github.com/zhiyiYo/PyQt-Frameless-Window/blob/master/qframelesswindow/windows/window_effect.py#L53) 调用 `SetWindowCompositionAttribute`,AccentState 使用 Acrylic。README 提供 PySide6 分支。 | 真正的窗口背景模糊;窗口边框、命中与拖动处理。 | 最接近现有 Python / Qt 栈。GPLv3;本轮没有复制该库代码或引入依赖。 |
|
||||
| [PythonBlurBehind](https://github.com/Peticali/PythonBlurBehind) | [`blur()`](https://github.com/Peticali/PythonBlurBehind/blob/main/blurWindow/blurWindow.py#L115) 明确区分 BlurBehind 与 Acrylic,并对 HWND 应用效果。 | 小范围 ctypes 与系统合成边界,适合先做原生验证。 | MIT。原生小样采用同类 Windows API 机制,以独立探针验证,不调用 CAD。 |
|
||||
| [WinUI Gallery](https://github.com/microsoft/WinUI-Gallery) | [`AcrylicPage.xaml`](https://github.com/microsoft/WinUI-Gallery/blob/main/WinUIGallery/Samples/Acrylic/AcrylicPage.xaml#L41) 区分应用内 Acrylic 与系统背景;[`DesktopAcrylicController`](https://github.com/microsoft/WinUI-Gallery/blob/main/WinUIGallery/Samples/SystemBackdrops/SystemBackdropsDesktopacryliccontroller.txt) 检查支持并管理资源生命周期。 | 染色、亮度、回退、应用内 / 窗口背后的不同采样来源。 | MIT。用于材质规范参考,不需要把 Qt 重写成 WinUI。 |
|
||||
| [PyQt-Fluent-Widgets](https://github.com/zhiyiYo/PyQt-Fluent-Widgets) | [`AcrylicBrush`](https://github.com/zhiyiYo/PyQt-Fluent-Widgets/blob/master/qfluentwidgets/components/widgets/acrylic_label.py#L163) 使用背景采集、Gaussian blur、tint、luminosity 和 noise;部分 Acrylic 是截图处理。 | 材质由模糊、染色、亮度与纹理多层组合;不能只画一层白色。 | GPLv3 / 商业许可。必须区分其图像材质和实时原生 Acrylic;不能看到 Acrylic 类名就认为全是系统合成。 |
|
||||
| [window-vibrancy](https://github.com/tauri-apps/window-vibrancy) | [`apply_acrylic`](https://github.com/tauri-apps/window-vibrancy/blob/dev/src/windows.rs#L62) 在合适版本使用 `DWMWA_SYSTEMBACKDROP_TYPE / DWMSBT_TRANSIENTWINDOW`,否则走 Accent;Mica 有单独接口。 | Windows 版本判断、不同 API 路径及清理机制。 | Apache-2.0。Rust/Tauri 不能直接装进 PySide6,但系统 API 的技术路线值得对照。 |
|
||||
| [QWindowKit](https://github.com/stdware/qwindowkit) | README 列出 `acrylic-material`、`dwm-blur`、`mica`,并讲明 Qt 私有 API、原生子窗口、Snap 与命中处理;不同平台的 glass 属性不同。 | 窗口外壳需要与材质一起设计,不能破坏拖动、缩放、系统菜单与 Snap。 | Apache-2.0;本轮核对其 README。C++ 工程与 Python 绑定成本需单独评估,不自动引入。旧 FramelessHelper 已指向该项目。 |
|
||||
| [liquid-glass-react](https://github.com/rdev/liquid-glass-react) | [`src/index.tsx`](https://github.com/rdev/liquid-glass-react/blob/master/src/index.tsx#L35) 包含位移贴图、三通道位移和颜色合并;背景模糊是另一层。 | 边缘折射、可调磨砂、轻微色散,不只是圆角和阴影。 | MIT。可参考视觉与滤镜;它作用于网页内容,不是 Windows 桌面背景。README 说明 Safari/Firefox 位移支持有局限。 |
|
||||
| [shuding/liquid-glass](https://github.com/shuding/liquid-glass) | [`liquid-glass.js`](https://github.com/shuding/liquid-glass/blob/main/liquid-glass.js#L69) 使用 `backdrop-filter:url(...)` 与 `feDisplacementMap`;按几何函数生成位移贴图。 | 用真实背板内容测试边缘弯折;位移贴图的 R/G 控制横向与纵向采样。 | MIT。本轮验证页使用自行生成的位移贴图,没有复制项目源码。 |
|
||||
|
||||
源码核对记录及文件 Blob SHA 见 [github-material-sources.json](github-material-sources.json)。许可信息来自读取时的仓库元数据/README;本轮未安装上述库。
|
||||
|
||||
## 如何区分几种效果
|
||||
|
||||
| 效果 | 背后内容是什么 | 观察方式 |
|
||||
| --- | --- | --- |
|
||||
| 普通透明 | 原始内容直接 alpha 混合 | 背后的字和细线仍清晰,容易穿过前景文字。 |
|
||||
| 网页背景磨砂 | 同一页面中、元素背后的图像 | 动背板或滚动内容,模糊颜色随之变化;不能看到浏览器外的窗口。 |
|
||||
| 原生 Acrylic | Windows 合成器提供的窗口后方内容,具体行为受系统与窗口状态影响 | 用独立的真实背景窗口换色/移动,前景材质跟随变化。 |
|
||||
| Mica | 通常从桌面壁纸等来源形成的窗口底材 | 不应期待它像透明玻璃一样实时折射所有背后窗口。 |
|
||||
| Liquid Glass 视觉模拟 | 对采样图像做边缘位移,叠加磨砂、高光等 | 背后的直线在边缘弯折;强度过高会影响工程数据识读。 |
|
||||
|
||||
## 本机原生实测
|
||||
|
||||
本机 Windows 11 build 26200。可复现探针:[native-acrylic-probe.py](native-acrylic-probe.py)。它只创建自有测试窗口,前景不绘制背景截图,使用系统 API 配置效果后,捕获这些窗口组成的测试区域;截图前检查区域中的窗口归属,发现遮挡即取消保存。
|
||||
|
||||
**左侧是普通透明,右侧启用 Accent Acrylic。** 两个前景窗口背后的测试图案一致。原生 Acrylic 明显滤除了竖线和背景字;更换背板颜色后,透入的颜色随之改变。
|
||||
|
||||

|
||||
|
||||
[查看背板变化动图](native-acrylic-live.gif) · [第二种背板截图](native-acrylic-b.png)
|
||||
|
||||
验证结果:`SetWindowCompositionAttribute` 返回成功;截图中右侧背景水平边缘能量约为左侧的 1/6.35,换色后右侧像素也发生变化。这是对测试图案的图像差异检查,不是通用材质质量评分。
|
||||
|
||||
**还发现了一条未跑通的路径:** 清除 Accent 后,单独设置 `DWMWA_SYSTEMBACKDROP_TYPE=3` 返回 HRESULT 0,但该 Qt 小样的实际输出是灰色实底。见 [DWM 路径截图](native-dwm-acrylic.png)。因此不能仅凭 API 返回成功宣称真实玻璃已启用,需要继续验证 Qt 窗口表面、DWM 扩展区域与系统设置。
|
||||
|
||||
原生调用日志见 [native-acrylic-verification.json](native-acrylic-verification.json);像素与动态背板验证见 [material-verification.json](material-verification.json)。没有启动 CAD、读写工程或改变系统全局透明度设置。
|
||||
|
||||
## 可交互材质验证台
|
||||
|
||||
[打开 material-lab.html](material-lab.html)。三列使用相同背板,依次展示:只有透明、背景磨砂、低磨砂与边缘折射。
|
||||
|
||||
可以拖动背景位置、调整磨砂强度、关闭/打开模糊与折射。背板由网页图形与文本实时组成;没有用预先模糊的背景图冒充采样。该页是浏览器机制验证,原生实测在上面的独立探针中。
|
||||
|
||||

|
||||
|
||||
Chrome 实测确认:磨砂滤镜为 `blur(18px) saturate(1.25)`,关闭后为 `none`;SVG 位移引用有效;改变背板位置会改变三列可见像素。效果开关在透明对照列的影响很小,而磨砂/折射列发生明显变化。1000px 页面宽度无横向溢出,浏览器无页面脚本错误。滤镜像素变化证明效果参与渲染,不代表它等同于 Apple 原生材质或所有浏览器效果一致。
|
||||
|
||||
## 对现有工程工具的建议
|
||||
|
||||
建议保留现有 PySide6 业务层和 SVG 图标,将外壳的侧栏、顶栏和短暂浮层接入已实测有视觉效果的原生模糊路径。料号表格使用独立清晰内容面。不要给整窗口设置低 opacity,也不要把普通白色底加阴影当作 Acrylic。
|
||||
|
||||
Apple 式折射适合少量浮层与分段控件;大面积表格不使用明显几何位移。若要在原生 Qt 中加入折射,需要 Qt Quick ShaderEffect / 可控的合成层等进一步验证;浏览器 SVG 位移不能原样翻译成 QWidget 的 QSS。
|
||||
|
||||
后续正式接入仍需验证:Qt/PySide6 版本、DWM 系统回退、透明度/高对比设置、激活状态、窗口拖动与 Snap、高 DPI、多显示器、远程桌面、打包以及现有 DSH WebEngine 子窗口的兼容性。本轮完成的是调研、机制对比和原生小样,未更改正式 UI 或执行状态机。
|
||||
|
After Width: | Height: | Size: 34 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1120" height="524" viewBox="0 0 1120 524"><rect width="1120" height="524" fill="white"/><text x="24" y="34" font-family="Segoe UI,Arial" font-size="18" fill="#34465f">DxPartReplace / SVG icon set</text><text x="24" y="54" font-family="Segoe UI,Arial" font-size="11" fill="#8b98a9">32 original symbols / 20 x 20 grid / 1.6 stroke / currentColor</text><rect x="24" y="78" width="112" height="90" rx="10" fill="#f7f9fc" stroke="#e7ecf3"/><svg x="66" y="94" width="28" height="28" viewBox="0 0 20 20"><g fill="none" stroke="#4b5e78" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M10 16V4M5.5 8.5 10 4l4.5 4.5"/></g></svg><text x="80" y="147" text-anchor="middle" font-family="Segoe UI,Arial" font-size="11" fill="#7c8da3">arrow-up</text><rect x="160" y="78" width="112" height="90" rx="10" fill="#f7f9fc" stroke="#e7ecf3"/><svg x="202" y="94" width="28" height="28" viewBox="0 0 20 20"><g fill="none" stroke="#4b5e78" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M5 3.5h10a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H9l-4.5 3v-3a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2Z"/><path d="M6.5 7.5h7m-7 3h4"/></g></svg><text x="216" y="147" text-anchor="middle" font-family="Segoe UI,Arial" font-size="11" fill="#7c8da3">chat</text><rect x="296" y="78" width="112" height="90" rx="10" fill="#f7f9fc" stroke="#e7ecf3"/><svg x="338" y="94" width="28" height="28" viewBox="0 0 20 20"><g fill="none" stroke="#4b5e78" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.25"/><path d="m6.5 10 2.5 2.5 4.5-5"/></g></svg><text x="352" y="147" text-anchor="middle" font-family="Segoe UI,Arial" font-size="11" fill="#7c8da3">check-circle</text><rect x="432" y="78" width="112" height="90" rx="10" fill="#f7f9fc" stroke="#e7ecf3"/><svg x="474" y="94" width="28" height="28" viewBox="0 0 20 20"><g fill="none" stroke="#4b5e78" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="m4.5 10 3.5 3.5 7.5-8"/></g></svg><text x="488" y="147" text-anchor="middle" font-family="Segoe UI,Arial" font-size="11" fill="#7c8da3">check</text><rect x="568" y="78" width="112" height="90" rx="10" fill="#f7f9fc" stroke="#e7ecf3"/><svg x="610" y="94" width="28" height="28" viewBox="0 0 20 20"><g fill="none" stroke="#4b5e78" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="m8 5 5 5-5 5"/></g></svg><text x="624" y="147" text-anchor="middle" font-family="Segoe UI,Arial" font-size="11" fill="#7c8da3">chevron</text><rect x="704" y="78" width="112" height="90" rx="10" fill="#f7f9fc" stroke="#e7ecf3"/><svg x="746" y="94" width="28" height="28" viewBox="0 0 20 20"><g fill="none" stroke="#4b5e78" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="5" width="10" height="10" rx="2"/><path d="M8 2v3m4-3v3m-4 10v3m4-3v3M2 8h3m-3 4h3m10-4h3m-3 4h3M8 8h4v4H8Z"/></g></svg><text x="760" y="147" text-anchor="middle" font-family="Segoe UI,Arial" font-size="11" fill="#7c8da3">circuit</text><rect x="840" y="78" width="112" height="90" rx="10" fill="#f7f9fc" stroke="#e7ecf3"/><svg x="882" y="94" width="28" height="28" viewBox="0 0 20 20"><g fill="none" stroke="#4b5e78" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.25"/><path d="M10 5.5v5l3 1.5"/></g></svg><text x="896" y="147" text-anchor="middle" font-family="Segoe UI,Arial" font-size="11" fill="#7c8da3">clock</text><rect x="976" y="78" width="112" height="90" rx="10" fill="#f7f9fc" stroke="#e7ecf3"/><svg x="1018" y="94" width="28" height="28" viewBox="0 0 20 20"><g fill="none" stroke="#4b5e78" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="m5 5 10 10M15 5 5 15"/></g></svg><text x="1032" y="147" text-anchor="middle" font-family="Segoe UI,Arial" font-size="11" fill="#7c8da3">close</text><rect x="24" y="184" width="112" height="90" rx="10" fill="#f7f9fc" stroke="#e7ecf3"/><svg x="66" y="200" width="28" height="28" viewBox="0 0 20 20"><g fill="none" stroke="#4b5e78" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="2.5" y="3.5" width="15" height="13" rx="2"/><path d="M7.5 3.5v13m5-13v13"/></g></svg><text x="80" y="253" text-anchor="middle" font-family="Segoe UI,Arial" font-size="11" fill="#7c8da3">columns</text><rect x="160" y="184" width="112" height="90" rx="10" fill="#f7f9fc" stroke="#e7ecf3"/><svg x="202" y="200" width="28" height="28" viewBox="0 0 20 20"><g fill="none" stroke="#4b5e78" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="7" y="7" width="10" height="10" rx="2"/><path d="M12.5 4V3H3v9.5h1"/></g></svg><text x="216" y="253" text-anchor="middle" font-family="Segoe UI,Arial" font-size="11" fill="#7c8da3">copy</text><rect x="296" y="184" width="112" height="90" rx="10" fill="#f7f9fc" stroke="#e7ecf3"/><svg x="338" y="200" width="28" height="28" viewBox="0 0 20 20"><g fill="none" stroke="#4b5e78" stroke-width="1.6" stroke-Line truncated
|
||||
|
After Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,5 @@
|
||||
# SVG icons
|
||||
|
||||
Original 20 × 20 SVG icons for the DxPartReplace UI concept. Consistent 1.6 unit strokes, rounded caps and joins; color inherits `currentColor`. These are original drawings, not Apple SF Symbols.
|
||||
|
||||
The preview embeds the same shapes as an SVG symbol sprite; the individual files can be used by Qt SVG rendering when the production interface is implemented.
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M10 16V4M5.5 8.5 10 4l4.5 4.5"/></g></svg>
|
||||
|
After Width: | Height: | Size: 215 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M5 3.5h10a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H9l-4.5 3v-3a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2Z"/><path d="M6.5 7.5h7m-7 3h4"/></g></svg>
|
||||
|
After Width: | Height: | Size: 298 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.25"/><path d="m6.5 10 2.5 2.5 4.5-5"/></g></svg>
|
||||
|
After Width: | Height: | Size: 241 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="m4.5 10 3.5 3.5 7.5-8"/></g></svg>
|
||||
|
After Width: | Height: | Size: 207 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="m8 5 5 5-5 5"/></g></svg>
|
||||
|
After Width: | Height: | Size: 198 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="5" y="5" width="10" height="10" rx="2"/><path d="M8 2v3m4-3v3m-4 10v3m4-3v3M2 8h3m-3 4h3m10-4h3m-3 4h3M8 8h4v4H8Z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 299 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.25"/><path d="M10 5.5v5l3 1.5"/></g></svg>
|
||||
|
After Width: | Height: | Size: 235 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="m5 5 10 10M15 5 5 15"/></g></svg>
|
||||
|
After Width: | Height: | Size: 206 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="2.5" y="3.5" width="15" height="13" rx="2"/><path d="M7.5 3.5v13m5-13v13"/></g></svg>
|
||||
|
After Width: | Height: | Size: 258 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="7" y="7" width="10" height="10" rx="2"/><path d="M12.5 4V3H3v9.5h1"/></g></svg>
|
||||
|
After Width: | Height: | Size: 252 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M10 2.5v10m-3.5-3.5 3.5 3.5 3.5-3.5M3.5 13v4h13v-4"/></g></svg>
|
||||
|
After Width: | Height: | Size: 236 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 6a2 2 0 0 1 2-2h4l2 2h5a2 2 0 0 1 2 2v6.5a2 2 0 0 1-2 2h-11a2 2 0 0 1-2-2Z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 265 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="5" height="5" rx="1"/><rect x="12" y="3" width="5" height="5" rx="1"/><rect x="3" y="12" width="5" height="5" rx="1"/><rect x="12" y="12" width="5" height="5" rx="1"/></g></svg>
|
||||
|
After Width: | Height: | Size: 366 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.25"/><path d="M10 9v5m0-8h.01"/></g></svg>
|
||||
|
After Width: | Height: | Size: 235 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M6 2.5h6l4 4v11H4v-15h2Zm6 0v4h4M7 10h6m-6 3.5h6"/></g></svg>
|
||||
|
After Width: | Height: | Size: 234 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="4" cy="10" r=".9" fill="currentColor" stroke="none"/><circle cx="10" cy="10" r=".9" fill="currentColor" stroke="none"/><circle cx="16" cy="10" r=".9" fill="currentColor" stroke="none"/></g></svg>
|
||||
|
After Width: | Height: | Size: 371 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M7 4v12m6-12v12" stroke-width="2.5"/></g></svg>
|
||||
|
After Width: | Height: | Size: 220 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="m7 3.5 9 6.5-9 6.5Z" fill="currentColor" stroke="none"/></g></svg>
|
||||
|
After Width: | Height: | Size: 239 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M10 4v12M4 10h12"/></g></svg>
|
||||
|
After Width: | Height: | Size: 202 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="2.5" width="12" height="15" rx="2"/><path d="M7 6h6M7 10h3m0 0v4m0-4h3m-6 4h6"/></g></svg>
|
||||
|
After Width: | Height: | Size: 269 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M16.5 7A7 7 0 1 0 17 12M16.5 3v4h-4"/></g></svg>
|
||||
|
After Width: | Height: | Size: 221 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M7 5h10M7 10h10M7 15h10"/><circle cx="3.5" cy="5" r=".6"/><circle cx="3.5" cy="10" r=".6"/><circle cx="3.5" cy="15" r=".6"/></g></svg>
|
||||
|
After Width: | Height: | Size: 307 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3h12l2 2v12H3ZM6 3v5h7V3M6 17v-5h8v5"/></g></svg>
|
||||
|
After Width: | Height: | Size: 225 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M7 3H3v4m10-4h4v4M3 13v4h4m10-4v4h-4M6 10h8m-6-3v6m4-6v6"/></g></svg>
|
||||
|
After Width: | Height: | Size: 242 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="8.5" cy="8.5" r="5.5"/><path d="m12.5 12.5 4.5 4.5"/></g></svg>
|
||||
|
After Width: | Height: | Size: 239 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="2.5" y="3.5" width="15" height="13" rx="2"/><path d="M7 3.5v13M4.5 7h.1m-.1 3h.1"/></g></svg>
|
||||
|
After Width: | Height: | Size: 266 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M3 5h3m4 0h7M3 10h8m4 0h2M3 15h2m4 0h8"/><circle cx="8" cy="5" r="2"/><circle cx="13" cy="10" r="2"/><circle cx="7" cy="15" r="2"/></g></svg>
|
||||
|
After Width: | Height: | Size: 314 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M6 4v12m-3-3 3 3 3-3M13 5h4m-4 5h3m-3 5h2"/></g></svg>
|
||||
|
After Width: | Height: | Size: 227 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="2.5" y="3.5" width="15" height="13" rx="2"/><path d="M2.5 8h15M8 8v8.5m4-8.5v8.5"/></g></svg>
|
||||
|
After Width: | Height: | Size: 266 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M3.5 5.5h13M7 5V3h6v2M5 5.5l.8 11h8.4l.8-11M8 8.5v5m4-5v5"/></g></svg>
|
||||
|
After Width: | Height: | Size: 243 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M10 12.5v-10M6.5 6 10 2.5 13.5 6M3.5 13v4h13v-4"/></g></svg>
|
||||
|
After Width: | Height: | Size: 233 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="m10 2.5 8 14H2Zm0 5v4.5m0 2.5h.01"/></g></svg>
|
||||
|
After Width: | Height: | Size: 219 B |
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"cad_started": false,
|
||||
"sample_data_only": true,
|
||||
"ownership_checked": true,
|
||||
"os_build": 26200,
|
||||
"native_enabled": true,
|
||||
"sidebar_backdrop_difference": 21.323206901227035,
|
||||
"opaque_table_backdrop_difference": 0.0,
|
||||
"solid_sidebar_mean": [
|
||||
233.0,
|
||||
238.0,
|
||||
244.0
|
||||
],
|
||||
"solid_fallback": true,
|
||||
"compact_size": [
|
||||
980,
|
||||
700
|
||||
],
|
||||
"compact_table_height": 131,
|
||||
"options_exposed": true
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
# 第二种背景磨砂:正式 PySide6 接入
|
||||
|
||||
> 交互与表格反馈已继续完成 [最新细节打磨](detail-polish.md),最终样例见该记录。
|
||||
|
||||
> 正式界面现已继续完成 [按钮、布局与右侧磨砂补全](layout-refinement.md),当前截图与验收数值以该记录为准。
|
||||
|
||||
2026-10-30。工作分支 `codex/ui-update`。用户明确批准材质对比页中的第二种“背景磨砂”,本次已将它接入正式 `TrialTaskCenterWindow`。
|
||||
|
||||
## 已实现
|
||||
|
||||
- 通过 ctypes 对窗口自身启用 Windows Acrylic;使用事先在本机验证可见效果的 `SetWindowCompositionAttribute` 路径。没有把浏览器 CSS 当作原生窗口背景模糊,也没有用背景截图充当材质。
|
||||
- 保留系统窗口框架,顶栏与任务侧栏响应真实窗口后的内容。没有使用全窗口 opacity。
|
||||
- 高对比度、系统透明度关闭、远程会话、非 Windows / 离屏、不支持的版本、接口失败与用户选择减少透明度时回退实色。可见窗口定期复查系统策略;只影响本窗口,不写系统设置。
|
||||
- alpha 窗口在回退时显式绘制实色底,避免原生窗口在禁用合成后露出黑色区域。
|
||||
- 32 个原创新 SVG 文件纳入正式应用 assets,沿用原有 package-data 规则。导航、执行、保存、导入导出、诊断和任务操作接入图标,并保留操作文字 / 提示。
|
||||
- 工程名称和路径置于表格上方;原有 Value 与关闭归档选项放入可展开区域;缩窄布局后保留位号表和操作空间。
|
||||
|
||||
现有执行状态机、CAD 服务与 DSH 后端未作为本次材质修改的一部分重写。工作区中已有的其他 DSH 生命周期修改被保留,本次没有替它们提交或发布。
|
||||
|
||||
## 测试
|
||||
|
||||
相关命令:
|
||||
|
||||
```powershell
|
||||
python -m pytest tests/ui tests/v1_1/test_ui_workspace.py tests/v1_1/test_ui_remediation.py tests/v1_1/test_safe_stop_ui.py tests/v1_1/test_target_table.py tests/v1_1/test_ui_operation_lifecycle.py tests/v1_1/test_task_navigation.py -q --basetemp=build/pytest-acrylic-final
|
||||
```
|
||||
|
||||
结果:**103 passed**。覆盖材质策略 / 回退、偏好持久化、句柄变化、SVG 控件、现有 UI 流程、窄窗口、草稿、过滤/排序与安全暂停等相关行为。
|
||||
|
||||
独立静态代码审查未发现本次范围中的重要生产问题;指出的 Windows 专属策略测试缺少平台跳过标记已修正。
|
||||
|
||||
实机验收命令:
|
||||
|
||||
```powershell
|
||||
python tools/accept_acrylic_ui.py --output build/acrylic-acceptance
|
||||
```
|
||||
|
||||
验收使用临时示例工程、库存和已保存计划,没有启动 CAD。实际窗口置于自有实时背板上,截图区域在保存前检查窗口归属。验证环境为 Windows 11 build 26200,125% 缩放。
|
||||
|
||||
| 项目 | 实测 |
|
||||
| --- | --- |
|
||||
| 原生 Acrylic | 已启用,截图可见背景模糊 |
|
||||
| 背板换色时侧栏变化 | 平均像素差约 21.32 |
|
||||
| 同时表格区域变化 | 平均像素差 0.0,保持实色 |
|
||||
| 减少透明度后的侧栏 | 实色 RGB 均值 233 / 238 / 244,无黑色底 |
|
||||
| 980×700 | 窗口尺寸保持,位号表 viewport 高度 131 逻辑像素 |
|
||||
| Value / 归档选项 | 可从标题旁入口展开 |
|
||||
|
||||
数值是固定示例区域的图像比较,不是通用性能或视觉质量评分。日志见 [implementation-acceptance.json](implementation-acceptance.json)。
|
||||
|
||||
## 实际窗口截图
|
||||
|
||||
以下是正式 Qt 窗口的系统合成截图,已使用示例工程数据,不是 HTML 预览。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 交付边界
|
||||
|
||||
已更新源代码与打包资产,尚未重新构建便携 EXE。旧版便携包不会自动更新外观。本轮未做真实 CAD 写入,也未完成 Windows 10、多显示器、不同显卡驱动、所有缩放比例与发布包的跨环境验证。
|
||||
|
||||
窗口使用 Windows 合成接口;不同系统设置与远程环境下可能回退为实色。当前 DSH 内嵌前端继续使用其自身界面,只统一外层导航,不宣称已重写官方 Harness 的页面。
|
||||
|
After Width: | Height: | Size: 328 KiB |
|
After Width: | Height: | Size: 381 KiB |
|
After Width: | Height: | Size: 379 KiB |
|
After Width: | Height: | Size: 125 KiB |
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"cad_started": false,
|
||||
"sample_data_only": true,
|
||||
"ownership_checked": true,
|
||||
"os_build": 26200,
|
||||
"native_enabled": true,
|
||||
"sidebar_backdrop_difference": 21.82688605017125,
|
||||
"opaque_table_backdrop_difference": 0.0,
|
||||
"right_header_backdrop_difference": 7.638507661558961,
|
||||
"right_execution_backdrop_difference": 12.32960451977401,
|
||||
"solid_sidebar_mean": [
|
||||
233.0,
|
||||
238.0,
|
||||
244.0
|
||||
],
|
||||
"solid_fallback": true,
|
||||
"compact_size": [
|
||||
980,
|
||||
700
|
||||
],
|
||||
"compact_table_height": 194,
|
||||
"options_exposed": true
|
||||
}
|
||||
|
After Width: | Height: | Size: 660 KiB |
|
After Width: | Height: | Size: 809 KiB |
|
After Width: | Height: | Size: 803 KiB |
@@ -0,0 +1,35 @@
|
||||
# 正式界面:按钮、布局与右侧磨砂补全
|
||||
|
||||
> 交互与表格反馈已继续完成 [最新细节打磨](detail-polish.md),最终样例见该记录。
|
||||
|
||||
用户反馈上一轮只落地外壳和图标,按钮布局仍旧、右侧磨砂被白底遮挡。本轮修改正式 PySide6 组件,保留已有服务与执行门禁。
|
||||
|
||||
## 已改变的布局
|
||||
|
||||
- 任务侧栏顶部直接新建;编辑、恢复、顺序调整和删除进入任务管理菜单,显示排序单独提供菜单。任务项用 delegate 分层显示名称、状态、图标与顺序,不添加逐行 QWidget。完整名称和路径继续保留在数据与提示中。
|
||||
- 搜索、BOM 模板、BOM 导入和位号采集合并到一条工具栏。搜索支持输入过滤、清空和下一条;低频位号 Excel 工具与搜索命令进入更多菜单。
|
||||
- 保存计划移至表格底部,和逐行编辑、批量填写形成连续操作区。
|
||||
- 执行区只显示当前状态的直接动作。普通执行、恢复、重试、开始新一轮与安全暂停按已有状态门禁显示。诊断、资源清理、轮次证据、布局和强制结束进入更多操作菜单;强制结束保留原确认流程。
|
||||
- 工程状态与设置位于标题行,工程重新读取收进菜单,路径保留复制入口。
|
||||
|
||||
## 右侧材质
|
||||
|
||||
移除工作区与标签页的大面积不透明白底。右侧工程标题、搜索工具栏、编辑工具区和执行面板现在共同透出 Windows 原生 Acrylic。表格 viewport 继续保持实色,交互菜单与错误/恢复提示仍须清晰可读。
|
||||
|
||||
底层使用上一轮已验证的 Windows 合成实现,不通过整窗口 opacity 制造效果;减少透明度仍切回实色。
|
||||
|
||||
## 命令安全与验证
|
||||
|
||||
菜单通过现有按钮对象执行,菜单展示时同步文字、图标、启用与显式可见状态;触发时再次检查源按钮当前状态。隐藏按钮保留在原面板的隐藏存储容器内,继续受原业务门禁控制。没有复制执行逻辑,也没有让过期菜单状态绕过禁用操作。
|
||||
|
||||
新增 `test_workspace_redesign.py` 覆盖菜单触发与禁用、任务管理菜单、工具栏与保存位置、执行维护菜单、小窗口操作可见性。相关回归合计 **108 项通过**。独立静态审查未发现重要的命令路由、状态或可见性问题。
|
||||
|
||||
原生验收新增了右侧两个采样区:工程路径/标题区域和执行区。改变自有背板时,左右外壳都必须变化;表格区域仍须不变。Windows 11 build 26200、125% 缩放下通过,980×700 表格 viewport 约 194 逻辑像素。
|
||||
|
||||
本次验收使用临时示例数据,没有启动 CAD。详细数值见 [layout-acceptance.json](layout-acceptance.json)。旧窗口会通过正常关闭流程重开;未保存或运行中的关闭保护不会被自动绕过。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
源代码界面已更新,便携 EXE 尚未重新构建。Windows 10、不同驱动、远程桌面及打包后的效果仍需对应环境验证。
|
||||
|
After Width: | Height: | Size: 105 KiB |
|
After Width: | Height: | Size: 547 KiB |
|
After Width: | Height: | Size: 478 KiB |
@@ -0,0 +1,23 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>毛玻璃机制对比 · DxPartReplace</title>
|
||||
<style>
|
||||
*{box-sizing:border-box}body{margin:0;background:#f4f5f7;color:#2c3542;font:13px "Segoe UI","Microsoft YaHei UI",sans-serif}header{padding:30px 38px 22px;border-bottom:1px solid #e0e4ea;background:white;display:flex;align-items:center;gap:25px}h1{font-size:23px;font-weight:600;letter-spacing:-.5px;margin:0 0 8px}header p{color:#7b8594;margin:0;font-size:12px}.tag{margin-left:auto;border:1px solid #dfe6ee;padding:6px 10px;border-radius:6px;font-size:11px;color:#8190a3}.controls{display:flex;align-items:center;gap:22px;margin:24px 38px 20px;padding:16px 20px;background:white;border:1px solid #e1e6ee;border-radius:12px}.controls label{display:flex;align-items:center;gap:10px;font-size:12px;color:#748297}input{accent-color:#526c8d}button{background:#fff;border:1px solid #dce3ec;border-radius:7px;padding:7px 12px;font:inherit;font-size:12px;color:#647b99;cursor:pointer}.controls button{margin-left:auto}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;padding:0 38px}.card{min-width:0;background:#fff;border:1px solid #e0e5ec;border-radius:15px;overflow:hidden}.cardhead{padding:17px 18px 15px}.cardhead h2{font-size:14px;font-weight:600;margin:0 0 6px}.cardhead p{color:#8795a7;font-size:11px;margin:0;line-height:1.6}.scene{position:relative;height:420px;background:#e1e6ed;overflow:hidden;border-top:1px solid #e6eaf0;border-bottom:1px solid #e6eaf0}.backdrop{position:absolute;inset:-120px;transform:translateX(var(--shift,0px));background:repeating-linear-gradient(90deg,transparent 0 22px,#ffffff99 23px 24px),linear-gradient(120deg,#5984b6,#a7c9c6 48%,#d3a6a0);display:flex;flex-direction:column;padding:130px 135px;gap:14px;color:#284967;font:15px Consolas,monospace;white-space:nowrap}.backdrop strong{font:600 44px "Segoe UI",sans-serif;letter-spacing:-2px;margin:0 0 20px}.backdrop span{color:white;text-shadow:0 1px 1px #1e395733}.glass{position:absolute;left:28px;right:28px;top:56px;bottom:47px;background:rgba(255,255,255,.12);border:1px solid #ffffffc4;border-radius:22px;box-shadow:inset 0 1px 0 #ffffffdb,0 14px 35px #29445f19;padding:23px 20px;color:#213e5a}.glass h3{font-size:17px;margin:0 0 6px;font-weight:600}.glass p{font-size:11px;margin:0;color:#3b5d7e}.sample{margin-top:85px}.sample>div{background:#ffffff44;border:1px solid #ffffff86;border-radius:8px;padding:10px 11px;margin-top:8px;display:flex;justify-content:space-between;font-size:11px}.sample b{font-weight:500}.sample small{color:#526f8d}.frost .glass{backdrop-filter:blur(var(--blur,18px)) saturate(125%);background:#ffffff30}.liquid .glass{backdrop-filter:url(#lens) blur(1px) saturate(125%);background:#ffffff18;box-shadow:inset 2px 2px 1px #ffffffc7,inset -2px -2px 1px #ffffff65,0 14px 35px #29445f19}.liquid .glass:after{content:"";position:absolute;inset:0;pointer-events:none;border-radius:inherit;background:linear-gradient(130deg,#ffffff5c,transparent 22% 75%,#ffffff24);border:1px solid #ffffff60}.notes{padding:16px 18px 19px;color:#7d8ca1;font-size:11px;line-height:1.8;height:112px}.notes b{color:#4c6689;font-weight:500}.legend{margin:22px 38px 0;display:flex;gap:22px;font-size:11px;color:#8b98aa}.legend b{font-weight:500;color:#677f9e}.native{margin:22px 38px 30px;background:#fff;border:1px solid #dfe6f0;border-radius:13px;padding:20px 22px;display:flex;align-items:center;gap:18px}.native h2{font-size:14px;margin:0 0 8px;font-weight:500}.native p{font-size:11px;color:#8c9aaf;margin:0;line-height:1.8}.native a{margin-left:auto;text-decoration:none;font-size:12px;color:#607eaa;white-space:nowrap;border:1px solid #dfe7f2;padding:10px 14px;border-radius:8px}.foot{margin:0 38px 28px;color:#9aa6b6;font-size:10px;line-height:1.8}.off .glass{backdrop-filter:none!important}.off .frost .glass{background:#fff6}.off .liquid .glass{background:#fff3}@media(max-width:1050px){header,.controls{margin-left:0;margin-right:0}.cards{padding:0 18px;gap:12px}.glass{left:17px;right:17px;padding:20px 15px}.controls{margin:18px}.controls label{font-size:11px}.native{margin:20px 18px}.scene{height:400px}.backdrop{padding-left:125px}.controls{flex-wrap:wrap}.notes{height:145px}}
|
||||
</style>
|
||||
<svg width="0" height="0" style="position:absolute" aria-hidden="true"><defs><filter id="lens" filterUnits="objectBoundingBox" x="0" y="0" width="1" height="1" color-interpolation-filters="sRGB"><feImage id="lensMap" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="map"/><feDisplacementMap in="SourceGraphic" in2="map" scale="58" xChannelSelector="R" yChannelSelector="G"/></filter></defs></svg>
|
||||
<header><div><h1>毛玻璃,要让背后的内容真正发生变化。</h1><p>同一份活动背板,比较透明、背景模糊与边缘折射。前景文字始终保持清楚。</p></div><span class="tag">材质验证台 · 浏览器模拟</span></header>
|
||||
<section class="controls"><label>背后内容位置 <input id="shift" type="range" min="-75" max="75" value="0" oninput="moveBackdrop(this.value)"></label><label>磨砂强度 <input id="blur" type="range" min="0" max="32" value="18" oninput="setBlur(this.value)"><span id="blurValue">18px</span></label><button id="effectSwitch" aria-pressed="true" onclick="toggleEffects()">关闭模糊 / 折射</button></section>
|
||||
<section class="cards"><article class="card clear"><div class="cardhead"><h2>01 · 只有透明</h2><p>Alpha 混合;没有模糊,也没有折射。</p></div><div class="scene"><div class="backdrop"></div><div class="glass"><h3>工程任务</h3><p>只透明会让背景线条穿过控件。</p><div class="sample"><div><b>Audio_D2128</b><small>待执行</small></div><div><b>RV05</b><small>1 个替换位号</small></div></div></div></div><div class="notes"><b>观察:</b>背景文字、竖线保持锐利。<br>这是不能替代毛玻璃的透明面板。</div></article>
|
||||
<article class="card frost"><div class="cardhead"><h2>02 · 背景磨砂</h2><p>Backdrop blur + 饱和度 + 轻染色。</p></div><div class="scene"><div class="backdrop"></div><div class="glass"><h3>工程任务</h3><p>颜色透入,细节经过真实模糊。</p><div class="sample"><div><b>Audio_D2128</b><small>待执行</small></div><div><b>RV05</b><small>1 个替换位号</small></div></div></div></div><div class="notes"><b>参考:</b>WinUI Gallery、PythonBlurBehind、PyQt-Frameless-Window。<br>本列是浏览器内背景模糊;原生系统实测见下方。</div></article>
|
||||
<article class="card liquid"><div class="cardhead"><h2>03 · 低磨砂 + 边缘折射</h2><p>SVG 位移贴图采样背后内容,弯曲边缘。</p></div><div class="scene"><div class="backdrop"></div><div class="glass"><h3>工程任务</h3><p>观察边界处的竖线与文字弯曲。</p><div class="sample"><div><b>Audio_D2128</b><small>待执行</small></div><div><b>RV05</b><small>1 个替换位号</small></div></div></div></div><div class="notes"><b>参考:</b>rdev/liquid-glass-react、shuding/liquid-glass。<br>本列原创位移贴图;适合浮层,不建议铺满工程表格。</div></article></section>
|
||||
<div class="legend"><span><b>可验证:</b>拖动背板,看透射与折射随内容移动。</span><span><b>可对比:</b>关闭效果,背景细节立即恢复。</span><span><b>边界:</b>网页效果不等于 Windows 原生背景模糊。</span></div>
|
||||
<section class="native"><div><h2>已验证 Windows 原生 Acrylic / PySide6</h2><p>直接调用 SetWindowCompositionAttribute。左侧为普通透明,右侧为原生模糊,背板来自独立的实时窗口。<br>DWM 背景类型的调用成功不代表实际有模糊,需查看实测报告。</p></div><a href="native-acrylic-a.png">查看原生对照实拍</a><a href="github-material-research.md">8 个 GitHub 项目的实现对比</a></section>
|
||||
<p class="foot">所有背景图形由页面生成,无图片截图纹理;没有远程媒体或 CDN。SVG 滤镜依赖浏览器支持,浏览器不支持时应回退到普通磨砂。本页不操作 CAD 或任务数据。</p>
|
||||
<script>
|
||||
document.querySelectorAll('.backdrop').forEach(el=>el.innerHTML='<strong>BACKDROP<br>LIVE</strong>'+Array.from({length:7},()=>'<span>RV05 4100-CA0000-T7 100nF</span>').join(''));
|
||||
const mapCanvas=document.createElement('canvas');mapCanvas.width=384;mapCanvas.height=384;const ctx=mapCanvas.getContext('2d'),pixels=ctx.createImageData(384,384);
|
||||
for(let y=0;y<384;y++)for(let x=0;x<384;x++){let nx=x/383,ny=y/383;let edge=Math.min(nx,1-nx,ny,1-ny);let falloff=Math.max(0,1-edge/.17);falloff=falloff*falloff;let dx=nx<.5?-1:1,dy=ny<.5?-1:1;let horizontal=Math.abs(nx-.5)*2,vertical=Math.abs(ny-.5)*2;let i=(y*384+x)*4;pixels.data[i]=128+dx*falloff*horizontal*105;pixels.data[i+1]=128+dy*falloff*vertical*105;pixels.data[i+2]=128;pixels.data[i+3]=255}
|
||||
ctx.putImageData(pixels,0,0);document.getElementById('lensMap').setAttribute('href',mapCanvas.toDataURL());
|
||||
function moveBackdrop(value){document.documentElement.style.setProperty('--shift',value+'px')}
|
||||
function setBlur(value){document.documentElement.style.setProperty('--blur',value+'px');document.getElementById('blurValue').textContent=value+'px'}
|
||||
function toggleEffects(){const off=document.body.classList.toggle('off');document.getElementById('effectSwitch').setAttribute('aria-pressed',String(!off));document.getElementById('effectSwitch').textContent=off?'启用模糊 / 折射':'关闭模糊 / 折射'}
|
||||
</script></html>
|
||||
|
After Width: | Height: | Size: 466 KiB |
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"browser": "156.0.8078.73",
|
||||
"backdrop_support": true,
|
||||
"svg_displacement_support": true,
|
||||
"frost_filter": "blur(18px) saturate(1.25)",
|
||||
"effects_off": "none",
|
||||
"background_transform": "matrix(1, 0, 0, 1, 65, 0)",
|
||||
"compact_no_horizontal_overflow": true,
|
||||
"page_errors": [],
|
||||
"pixel_comparisons": [
|
||||
{
|
||||
"card": 0,
|
||||
"effects_on_vs_off_mean_difference": 0.8051708148482342,
|
||||
"backdrop_moved_difference": 11.28541744993358
|
||||
},
|
||||
{
|
||||
"card": 1,
|
||||
"effects_on_vs_off_mean_difference": 14.270726560144709,
|
||||
"backdrop_moved_difference": 4.7047532911265195
|
||||
},
|
||||
{
|
||||
"card": 2,
|
||||
"effects_on_vs_off_mean_difference": 10.785156778705165,
|
||||
"backdrop_moved_difference": 8.87468481339449
|
||||
}
|
||||
],
|
||||
"native": {
|
||||
"sharp_horizontal_edge_energy": 4.490932590169232,
|
||||
"acrylic_horizontal_edge_energy": 0.7067472915091962,
|
||||
"edge_suppression_ratio": 6.354368306922327,
|
||||
"live_backdrop_color_difference": 7.227865290602934,
|
||||
"os_build": 26200,
|
||||
"swca_returned_success": true,
|
||||
"dwm_hresult": 0,
|
||||
"dwm_observation": "Solid output in this isolated Qt setup after clearing SWCA; HRESULT 0 alone is not evidence of backdrop blur."
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 466 KiB |
|
After Width: | Height: | Size: 470 KiB |
|
After Width: | Height: | Size: 474 KiB |
@@ -0,0 +1,124 @@
|
||||
"""Disposable native Windows material probe, not a CAD or production UI change.
|
||||
|
||||
Run with Python + PySide6 + Pillow on Windows. Opens only owned test windows,
|
||||
captures their shared rectangle, then closes them. No user content is sampled.
|
||||
"""
|
||||
import ctypes
|
||||
from ctypes import wintypes
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
os.environ.pop('QT_QPA_PLATFORM',None)
|
||||
from PySide6.QtCore import Qt,QTimer,QRectF
|
||||
from PySide6.QtGui import QColor,QFont,QPainter,QLinearGradient,QPen
|
||||
from PySide6.QtWidgets import QApplication,QWidget,QVBoxLayout,QLabel
|
||||
from PIL import ImageGrab
|
||||
|
||||
root=Path(__file__).resolve().parent
|
||||
user=ctypes.WinDLL('user32',use_last_error=True)
|
||||
dwm=ctypes.WinDLL('dwmapi',use_last_error=True)
|
||||
user.SetWindowCompositionAttribute.argtypes=[wintypes.HWND,ctypes.c_void_p]
|
||||
user.SetWindowCompositionAttribute.restype=wintypes.BOOL
|
||||
class Point(ctypes.Structure):
|
||||
_fields_=[('x',ctypes.c_long),('y',ctypes.c_long)]
|
||||
user.WindowFromPoint.argtypes=[Point]
|
||||
user.WindowFromPoint.restype=wintypes.HWND
|
||||
user.GetWindowThreadProcessId.argtypes=[wintypes.HWND,ctypes.POINTER(wintypes.DWORD)]
|
||||
dwm.DwmSetWindowAttribute.argtypes=[wintypes.HWND,wintypes.DWORD,ctypes.c_void_p,wintypes.DWORD]
|
||||
dwm.DwmSetWindowAttribute.restype=ctypes.c_long
|
||||
class Accent(ctypes.Structure):
|
||||
_fields_=[('state',ctypes.c_int),('flags',ctypes.c_int),('color',ctypes.c_uint32),('animation',ctypes.c_int)]
|
||||
class Composition(ctypes.Structure):
|
||||
_fields_=[('attribute',ctypes.c_int),('data',ctypes.c_void_p),('size',ctypes.c_size_t)]
|
||||
def accent(hwnd,state):
|
||||
policy=Accent(state,0,0x20F4F4F4,0)
|
||||
data=Composition(19,ctypes.cast(ctypes.pointer(policy),ctypes.c_void_p),ctypes.sizeof(policy))
|
||||
return bool(user.SetWindowCompositionAttribute(hwnd,ctypes.byref(data)))
|
||||
def backdrop(hwnd,kind):
|
||||
value=ctypes.c_int(kind)
|
||||
return int(dwm.DwmSetWindowAttribute(hwnd,38,ctypes.byref(value),ctypes.sizeof(value)))
|
||||
|
||||
app=QApplication([])
|
||||
app.setFont(QFont('Segoe UI',11))
|
||||
screen=app.primaryScreen().availableGeometry()
|
||||
width=min(1200,screen.width()-60);height=min(760,screen.height()-60)
|
||||
origin=(screen.x()+(screen.width()-width)//2,screen.y()+(screen.height()-height)//2)
|
||||
class Background(QWidget):
|
||||
phase=0
|
||||
def paintEvent(self,event):
|
||||
p=QPainter(self);p.setRenderHint(QPainter.RenderHint.Antialiasing)
|
||||
p.fillRect(self.rect(),QColor('#e8edf2'))
|
||||
for col in range(2):
|
||||
area=QRectF(30+col*(width/2),110,width/2-60,height-155)
|
||||
g=QLinearGradient(area.topLeft(),area.bottomRight())
|
||||
g.setColorAt(0,QColor('#4c79b6') if self.phase==0 else QColor('#cf8663'))
|
||||
g.setColorAt(.47,QColor('#aecac9'));g.setColorAt(1,QColor('#d6a39e') if self.phase==0 else QColor('#6a88b1'))
|
||||
p.fillRect(area,g)
|
||||
p.setPen(QPen(QColor('#ffffffb0'),2))
|
||||
for x in range(int(area.left()),int(area.right()),24):p.drawLine(x,int(area.top()),x,int(area.bottom()))
|
||||
p.setPen(QColor('#253d57'));p.setFont(QFont('Segoe UI',35,QFont.Weight.Bold))
|
||||
p.drawText(area.adjusted(22,90,-10,0),'BACKDROP\nLIVE '+str(self.phase+1))
|
||||
p.setPen(QColor('#fff'));p.setFont(QFont('Consolas',13))
|
||||
for row in range(6):p.drawText(int(area.left()+22),int(area.top()+260+row*30),'RV05 4100-CA0000-T7 100nF')
|
||||
p.setPen(QColor('#34475f'));p.setFont(QFont('Segoe UI',18,QFont.Weight.DemiBold))
|
||||
p.drawText(30,38,'Native Windows / PySide6 material probe')
|
||||
p.setFont(QFont('Segoe UI',10));p.setPen(QColor('#6c7f96'))
|
||||
p.drawText(30,66,'Identical owned background on both sides. No screenshot texture is painted into either foreground window.')
|
||||
p.drawText(30,height-17,'Captured from actual Windows composition; no CAD, no user project, no foreign window in the capture rectangle.')
|
||||
|
||||
class Pane(QWidget):
|
||||
def __init__(self,title,subtitle):
|
||||
super().__init__(None,Qt.WindowType.FramelessWindowHint|Qt.WindowType.Tool|Qt.WindowType.WindowStaysOnTopHint)
|
||||
self.setAttribute(Qt.WidgetAttribute.WA_TranslucentBackground)
|
||||
layout=QVBoxLayout(self);layout.setContentsMargins(24,25,24,24)
|
||||
titleLabel=QLabel(title);titleLabel.setStyleSheet('background:transparent;color:#213952;font-size:18px;font-weight:600')
|
||||
hint=QLabel(subtitle);hint.setStyleSheet('background:transparent;color:#46617f;font-size:11px');hint.setWordWrap(True)
|
||||
layout.addWidget(titleLabel);layout.addWidget(hint);layout.addStretch()
|
||||
for text in ['Audio_D2128','Selected: RV05','Plan saved / No CAD write']:
|
||||
label=QLabel(text);label.setStyleSheet('background:rgba(255,255,255,110);color:#314d6c;border:1px solid rgba(255,255,255,170);border-radius:7px;padding:10px;font-size:12px');layout.addWidget(label)
|
||||
def paintEvent(self,event):
|
||||
p=QPainter(self);p.fillRect(self.rect(),QColor(255,255,255,45));p.setPen(QPen(QColor(255,255,255,170),1));p.drawRect(self.rect().adjusted(0,0,-1,-1))
|
||||
|
||||
bg=Background(None,Qt.WindowType.FramelessWindowHint|Qt.WindowType.Tool|Qt.WindowType.WindowStaysOnTopHint)
|
||||
bg.setGeometry(origin[0],origin[1],width,height)
|
||||
left=Pane('Transparency only','OS blur disabled. Background lines and letters remain sharp.')
|
||||
right=Pane('Windows Acrylic','ACCENT_ENABLE_ACRYLICBLURBEHIND. Background is composed by Windows.')
|
||||
paneW=int(width/2-112);paneH=height-250
|
||||
left.setGeometry(origin[0]+56,origin[1]+143,paneW,paneH)
|
||||
right.setGeometry(origin[0]+int(width/2)+56,origin[1]+143,paneW,paneH)
|
||||
report={'os_build':sys.getwindowsversion().build,'capture_method':'PIL ImageGrab of owned background window rectangle, not QWidget.grab','uses_baked_backdrop':False,'ownership_grid_checked':True,'artifacts':[]}
|
||||
bg.show();left.show();right.show();right.raise_();right.activateWindow()
|
||||
def capture(name):
|
||||
dpr=app.primaryScreen().devicePixelRatio()
|
||||
bbox=tuple(round(v*dpr) for v in [origin[0],origin[1],origin[0]+width,origin[1]+height])
|
||||
for y in range(bbox[1]+3,bbox[3]-3,24):
|
||||
for x in range(bbox[0]+3,bbox[2]-3,24):
|
||||
hwnd=user.WindowFromPoint(Point(x,y));pid=wintypes.DWORD()
|
||||
user.GetWindowThreadProcessId(hwnd,ctypes.byref(pid))
|
||||
if pid.value!=os.getpid():
|
||||
left.close();right.close();bg.close();app.quit()
|
||||
raise RuntimeError('Owned test rectangle is occluded; no capture saved')
|
||||
im=ImageGrab.grab(bbox=bbox,all_screens=True)
|
||||
im.save(root/name);report['artifacts'].append({'file':name,'dimensions':im.size,'phase':bg.phase})
|
||||
def first():
|
||||
report['accent_api_return']=accent(int(right.winId()),4)
|
||||
report['left_native_handle']=int(left.winId());report['right_native_handle']=int(right.winId())
|
||||
QTimer.singleShot(1800,second)
|
||||
def second():
|
||||
capture('native-acrylic-a.png');bg.phase=1;bg.update();QTimer.singleShot(1400,third)
|
||||
def third():
|
||||
capture('native-acrylic-b.png')
|
||||
report['clear_accent_before_dwm']=accent(int(right.winId()),0)
|
||||
report['dwm_transient_hresult']=backdrop(int(right.winId()),3)
|
||||
QTimer.singleShot(1400,fourth)
|
||||
def fourth():
|
||||
capture('native-dwm-acrylic.png')
|
||||
(root/'native-acrylic-verification.json').write_text(json.dumps(report,ensure_ascii=False,indent=2)+'\n',encoding='utf-8')
|
||||
left.close();right.close();bg.close();app.quit()
|
||||
QTimer.singleShot(800,first)
|
||||
QTimer.singleShot(15000,app.quit)
|
||||
app.exec()
|
||||
assert 'dwm_transient_hresult'in report,'Probe did not complete'
|
||||
print(json.dumps(report,ensure_ascii=True))
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"os_build": 26200,
|
||||
"capture_method": "PIL ImageGrab of owned background window rectangle, not QWidget.grab",
|
||||
"uses_baked_backdrop": false,
|
||||
"ownership_grid_checked": true,
|
||||
"artifacts": [
|
||||
{
|
||||
"file": "native-acrylic-a.png",
|
||||
"dimensions": [
|
||||
1500,
|
||||
944
|
||||
],
|
||||
"phase": 0
|
||||
},
|
||||
{
|
||||
"file": "native-acrylic-b.png",
|
||||
"dimensions": [
|
||||
1500,
|
||||
944
|
||||
],
|
||||
"phase": 1
|
||||
},
|
||||
{
|
||||
"file": "native-dwm-acrylic.png",
|
||||
"dimensions": [
|
||||
1500,
|
||||
944
|
||||
],
|
||||
"phase": 1
|
||||
}
|
||||
],
|
||||
"accent_api_return": true,
|
||||
"left_native_handle": 21301414,
|
||||
"right_native_handle": 36241716,
|
||||
"clear_accent_before_dwm": true,
|
||||
"dwm_transient_hresult": 0
|
||||
}
|
||||
|
After Width: | Height: | Size: 166 KiB |
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"cad_started": false,
|
||||
"sample_data_only": true,
|
||||
"ownership_checked": true,
|
||||
"os_build": 26200,
|
||||
"native_enabled": true,
|
||||
"sidebar_backdrop_difference": 21.82010089789873,
|
||||
"opaque_table_backdrop_difference": 0.0,
|
||||
"right_header_backdrop_difference": 9.334799022873641,
|
||||
"right_execution_backdrop_difference": 12.328983050847457,
|
||||
"visible_search_feedback": true,
|
||||
"empty_search_feedback": true,
|
||||
"solid_sidebar_mean": [
|
||||
233.0,
|
||||
238.0,
|
||||
244.0
|
||||
],
|
||||
"solid_fallback": true,
|
||||
"compact_size": [
|
||||
980,
|
||||
700
|
||||
],
|
||||
"compact_table_height": 197,
|
||||
"options_exposed": true
|
||||
}
|
||||
|
After Width: | Height: | Size: 661 KiB |
|
After Width: | Height: | Size: 788 KiB |
|
After Width: | Height: | Size: 805 KiB |
|
After Width: | Height: | Size: 791 KiB |
@@ -0,0 +1,29 @@
|
||||
# PR #10 第二轮审查修复(2026-10-31)
|
||||
|
||||
对应[评论 #117](https://git.simgreek.com/Skyworth_Digital_Hardware/dxdesigner-part-replacement/pulls/10#issuecomment-117),基于已同步 main 的 `6f9f820`,仍在独立检出中验证,不包含主工作区未提交的 DSH 生命周期文件。
|
||||
|
||||
## P1:原执行轮次的停止意图
|
||||
|
||||
审查复现成立:用户在最后一步请求安全暂停或强制结束,而末项返回 `batch_failed` 时,队列可能已耗尽,`paused=False`。原实现先清除 `_batch_stop`,诊断开始时新建 `StopControl`,导致自动重试的 `not_stopped` 门禁失去原始停止请求。
|
||||
|
||||
现在窗口在运行收尾时保留原执行轮次的 `StopControl`(包括 `force_event`),排入诊断队列时将该对象与原 `run_id` 一起捕获。`DshAutomation` 直接复用该对象;等待诊断启动及模型回复期间的停止请求也能被同一对象观察。单任务结果、批次结果及 worker 异常回调统一经过这一传递。诊断、证据和待提交工单仍可保存,但停止后的轮次不会准备或执行失败项重试,也不会消耗重试额度。
|
||||
|
||||
新的显式确认执行通过 `_begin_run` 创建新轮次与新控制对象;不会清除或重置旧轮次的停止请求。回归验证了暂停后用户重新准备并确认执行的路径,正常重试仍可用。
|
||||
|
||||
## P2:运行时输出的 UTF-8 分块
|
||||
|
||||
审查复现成立:QProcess 输出块边界可落在中文字符的 UTF-8 字节中间,按块 `decode(..., 'replace')` 会把合法中文改成替换字符,而 JSON 仍能解析。
|
||||
|
||||
stdout 和 stderr 现分别使用持续的增量 UTF-8 解码器;stdout 完成解码后再按行解析原协议。每次启动(含重试启动)均清空协议行缓冲和两个解码器,旧进程的半行或未完成字符不会混入新进程。无改变协议前缀、任务参数、Origin 校验或动作门禁。
|
||||
|
||||
## 回归证据
|
||||
|
||||
新增 `tests/ui/test_pr10_review_edges.py` 共 15 项:
|
||||
|
||||
- 单任务/批次 × 未暂停、暂停、强制结束、暂停后重新授权。使用真实 `TaskCenterService`、执行队列、持久化、`DshAutomation` 和 `IncidentRunner`,只替换外部 CAD、模型、工单传输与线程派发。明确断言末项结果 `paused=False`,停止后执行器仅调用一次,正常对照允许两次;重新授权路径仍可执行并重试。
|
||||
- worker 异常收尾覆盖未暂停、暂停和强制结束三种情况,验证诊断收到同一个原控制对象、原 run ID 和授权上下文。
|
||||
- CREATE_REQUEST 在每个字节位置拆成两块,涵盖中文、目录、自定义 Value、μ 与 emoji;多行 DIAGNOSIS 每字节分块;stderr 中文分块;通过真实 `start()` 路径验证重启清空旧半行和 UTF-8 状态。
|
||||
|
||||
修改前复现暂停/强制结束的 4 个错误重试,以及两个 Unicode 损坏用例;正常对照通过。修改后新增 15 项通过,独立复核同样通过 15 项。`tests/ui tests/dsh` 加安全停止相关回归共 156 项通过。完整 `tests/v1_1 tests/ui tests/dsh tests/packaging` 回归 **1101 项通过**,无忽略/跳过项,1 条已有 pywinauto COM 模式警告,结果见本目录的 `pr10-review-117-tests.json`。
|
||||
|
||||
本轮未启动 CAD、真实模型、浏览器运行时或远端工单传输;未重建 EXE。真实源码协议方法通过信号接收器及 QProcess 字节流替身调用。
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"command": "python -m pytest -q tests/v1_1 tests/ui tests/dsh tests/packaging --junitxml=build/pr10-review-117-tests.xml",
|
||||
"tests": 1101,
|
||||
"failures": 0,
|
||||
"errors": 0,
|
||||
"skipped": 0,
|
||||
"seconds": 333.04,
|
||||
"review_comment": 117,
|
||||
"main_base": "2cf526e1769f354cd7e57861c4b0df9f165565dd",
|
||||
"isolated_checkout": true,
|
||||
"test_exclusions": [],
|
||||
"warnings": [
|
||||
"pywinauto: Revert to STA COM threading mode"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
# PR #10 评论 #127 修复(2026-10-31)
|
||||
|
||||
对应[评论 #127](https://git.simgreek.com/Skyworth_Digital_Hardware/dxdesigner-part-replacement/pulls/10#issuecomment-127)提出的两项 P3。基于 `0bc1f64` 的独立检出修改,不包含主工作区未提交文件。
|
||||
|
||||
## 畸形协议行不再丢弃后续消息
|
||||
|
||||
原 `_stdout()` 已取出一批完整行,但其中一行 `json.loads` 异常会提前退出 Qt 槽,导致同批后续行丢失。现逐行解析并隔离 JSON、对象类型和 READY 地址字段的输入错误;坏行跳过后继续处理同批合法消息。增量 UTF-8 解码与原 task_id/revision、本机 URL 检查继续生效。
|
||||
|
||||
诊断信息仅追加固定协议前缀与异常类型,并沿用 12000 字符上限;不保存坏行原文或解析异常中的载荷,避免把用户数据或凭据带入错误日志。未知普通输出仍忽略。
|
||||
|
||||
## 模型元数据原子发布
|
||||
|
||||
`provider.json` 改为先写同目录唯一临时文件,写完整后 flush/fsync,再通过 `os.replace` 发布。受控的半途写入、刷盘和替换失败均保留旧的完整 JSON,并清理临时文件。元数据仍不包含 API 密钥,DPAPI 密钥存储与加载接口保持原状。
|
||||
|
||||
此处保证元数据单文件的原子发布,不把密钥与元数据两个文件表述为一个跨文件事务。
|
||||
|
||||
## 验证
|
||||
|
||||
- 修复前新增故障用例 25 项失败,复现协议 JSON/类型异常、同批消息丢失及元数据未使用原子发布。
|
||||
- 本轮新增 27 项回归:五类协议消息 × 非法 JSON/null/list/string、READY 字段错误、坏行后的正常本机握手,以及配置写入/刷盘/替换故障。
|
||||
- 与上一轮停止意图、UTF-8 和已有配置回归合计 43 项通过;独立复核同样通过 43 项,无阻塞或重要问题。
|
||||
- 完整 `tests/v1_1 tests/ui tests/dsh tests/packaging` 回归 **1128 项通过**,无忽略/跳过项,1 条已有 pywinauto COM 模式警告;结果见 `pr10-review-127-tests.json`。未使用真实用户模型配置、未启动 CAD、真实模型或远端工单传输,未重建 EXE。
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"command": "python -m pytest -q tests/v1_1 tests/ui tests/dsh tests/packaging --junitxml=build/pr10-review-127-tests.xml",
|
||||
"tests": 1128,
|
||||
"failures": 0,
|
||||
"errors": 0,
|
||||
"skipped": 0,
|
||||
"seconds": 534.309,
|
||||
"review_comment": 127,
|
||||
"main_base": "2cf526e1769f354cd7e57861c4b0df9f165565dd",
|
||||
"isolated_checkout": true,
|
||||
"test_exclusions": [],
|
||||
"warnings": [
|
||||
"pywinauto: Revert to STA COM threading mode"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
# PR #10 评论 #134 修复(2026-10-31)
|
||||
|
||||
对应[评论 #134](https://git.simgreek.com/Skyworth_Digital_Hardware/dxdesigner-part-replacement/pulls/10#issuecomment-134)的 P2。基于 `dfbc14c` 的独立检出处理,未修改主工作区未提交内容。
|
||||
|
||||
## 配置对的一致性提交
|
||||
|
||||
原实现先覆盖固定 `provider-key.dpapi`,再发布 `provider.json`。即使 JSON 保持完整,第二步失败仍会加载旧 URL/模型与新密钥。使用不同的两个虚构服务器地址和密钥、真实 Windows DPAPI,故障注入已复现此混合;正常切换对照通过。
|
||||
|
||||
现采用版本化不可变密钥和最终原子发布指针:
|
||||
|
||||
1. 每次保存用独占创建的新 `provider-key-<uuid>.dpapi`,写入 DPAPI 密文并 flush/fsync,不覆盖已发布密钥。
|
||||
2. 在唯一临时 JSON 中写入 `schema_version=2`、对应 `key_file`、URL 和模型,flush/fsync。
|
||||
3. 最后 `os.replace` 发布 `provider.json`,这是唯一提交点。此前失败时清理未发布密钥和临时 JSON,保留完整旧配置。
|
||||
4. 已成功发布的旧密钥不自动删除,以支持读取者先读到旧 metadata、再遇到另一进程发布新版本的场景。中断可能留下的无引用密钥不参与加载。
|
||||
|
||||
加载新格式时只使用该 JSON 指定的版本密钥;引用只接受固定文件名格式,禁止路径跳转。缺失、损坏或解密失败时拒绝加载,不退回旧密钥。无版本号的旧 JSON 仍使用固定 `provider-key.dpapi`;旧配置下次保存才升级。新格式需要更新后的客户端读取。
|
||||
|
||||
桌面验收工具此前固定复制两个文件,现通过 `load_provider` 读取完整快照,再 `save_provider` 写入隔离目录,兼容旧格式及版本密钥。此过程只在内存中解密,不将明文密钥写入元数据、日志或环境文件。
|
||||
|
||||
## 验证
|
||||
|
||||
- 原实现的故障/并发读取回归 **8 failed / 2 passed**,明确复现跨提供方密钥混合。
|
||||
- provider 与 native runtime 专项 **25 passed**,独立审查同样 **25 passed**,未发现阻塞或重要问题。
|
||||
- 覆盖新旧格式 × JSON 写入/metadata 刷盘/最终替换失败;同时改变 URL 与密钥,断言保存过程中及失败后都是旧配置;正常切换、旧快照并发读取、新版本缺失禁止回退、非法引用、首次发布失败清理、验收工具复制均有回归。
|
||||
- 完整 `tests/v1_1 tests/ui tests/dsh tests/packaging` 回归 **1146 项通过**,无忽略/跳过项,1 条已有 pywinauto COM 模式警告;结果见 `pr10-review-134-tests.json`。本轮只使用临时目录与虚构密钥,未修改本机实际 provider 配置,没有模型网络请求或 CAD 操作,未重新构建 EXE。
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"command": "python -m pytest -q tests/v1_1 tests/ui tests/dsh tests/packaging --junitxml=build/pr10-review-134-tests.xml",
|
||||
"tests": 1146,
|
||||
"failures": 0,
|
||||
"errors": 0,
|
||||
"skipped": 0,
|
||||
"seconds": 358.081,
|
||||
"review_comment": 134,
|
||||
"main_base": "2cf526e1769f354cd7e57861c4b0df9f165565dd",
|
||||
"isolated_checkout": true,
|
||||
"test_exclusions": [],
|
||||
"warnings": [
|
||||
"pywinauto: Revert to STA COM threading mode"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"cad_started": false,
|
||||
"sample_data_only": true,
|
||||
"ownership_checked": true,
|
||||
"os_build": 26200,
|
||||
"native_enabled": true,
|
||||
"sidebar_backdrop_difference": 21.82010089789873,
|
||||
"opaque_table_backdrop_difference": 0.0,
|
||||
"right_header_backdrop_difference": 9.299740913465097,
|
||||
"right_execution_backdrop_difference": 12.328983050847457,
|
||||
"visible_search_feedback": true,
|
||||
"empty_search_feedback": true,
|
||||
"solid_sidebar_mean": [
|
||||
233.0,
|
||||
238.0,
|
||||
244.0
|
||||
],
|
||||
"solid_fallback": true,
|
||||
"compact_size": [
|
||||
980,
|
||||
700
|
||||
],
|
||||
"compact_table_height": 197,
|
||||
"force_stop_direct": true,
|
||||
"force_stop_available_while_pausing": true,
|
||||
"options_exposed": true
|
||||
}
|
||||
|
After Width: | Height: | Size: 659 KiB |
@@ -0,0 +1,33 @@
|
||||
# PR #10 审查修复(2026-10-31)
|
||||
|
||||
对应 [审查评论 #110](https://git.simgreek.com/Skyworth_Digital_Hardware/dxdesigner-part-replacement/pulls/10#issuecomment-110)。本次在独立检出中处理,主工作区未提交的 DSH 生命周期文件未带入提交或测试环境。
|
||||
|
||||
## 范围和基线
|
||||
|
||||
原 PR 标题/说明只覆盖 UI,但相对 main 的差异实际还包含 DSH 助手核心、Harness 集成、异常诊断、受控重试、工单上报及对应打包配置。现采用评论允许的“完整声明范围”方案:更新 PR 标题和说明,列出子系统、安全边界、安装依赖、验收命令和部署限制。PR #11 基于本分支继续扩展监管闭环;其新增能力与审查问题不作为本次完成项。
|
||||
|
||||
最新 main `2cf526e` 已通过合并提交 `a41c6cf` 进入本分支。这样无需改写已发布历史及下游 PR 的基线。唯一冲突位于 `main_window.py` 的执行门禁:保留 main 的 `ResourceStatus` 异步检查、未知资源状态阻断及清理按钮条件,同时保留 UI 的活动单元格 dirty 检查。`batch_runtime.py`、`supervisor_evidence.py` 和 `ui/resource_status.py` 与该 main 一致,主线的身份、快照、active_task 落盘和诊断保留修复没有被覆盖。
|
||||
|
||||
## 逐项处理
|
||||
|
||||
| 审查项 | 处理 |
|
||||
| --- | --- |
|
||||
| P1 范围声明不完整 | 完整声明 DSH 核心与 Acrylic UI 的实际范围和边界 |
|
||||
| P1 落后 main 且冲突 | 合入 main,联合保留资源状态与单元格门禁,在独立检出重跑回归 |
|
||||
| P2 强制结束入口隐藏 | 执行期间直接显示在主按钮行;安全暂停请求后仍可使用;确认和核验保护不变 |
|
||||
| P3 原生材质接口依赖 | 在用户文档中明确未文档化 accent API、Win11 DWM 实验结果、支持矩阵及未覆盖环境 |
|
||||
| P3 回退色硬编码 | `theme.py` 与 QSS 共用默认色;系统高对比度下停用自定义样式并使用系统调色板,退出后恢复原样式 |
|
||||
| P3 两秒策略轮询 | 降至 30 秒;显示、激活与系统调色板事件仍触发检查,隐藏窗口不轮询策略 |
|
||||
| P3 菜单注册时清除 hidden | 保留注册前明确设置的隐藏状态,首次同步前动作也不可见,触发时继续核对状态 |
|
||||
|
||||
独立复核另发现高对比度通用 QSS 被 `#taskSearch` 等规则覆盖,导致浅底浅字;已改为高对比度期间撤下整套样式,补测聚焦搜索框、工程标题及任务文字的实际颜色。完整测试还发现窗口销毁后排队的材质回调访问已删除 HWND;已绑定 `QTimer.singleShot` 的 QObject context,并增加 `isValid` 检查和销毁回归。
|
||||
|
||||
## 验证范围
|
||||
|
||||
- 审查点名的 `test_safe_user_stop.py`、`test_batch_runtime.py`、`test_missing_uid_inventory.py`、`test_supervisor_evidence.py`:80 项通过。
|
||||
- 材质、菜单、强制结束与安全暂停专项:26 项通过。
|
||||
- 完整合并后回归:`python -m pytest -q tests/v1_1 tests/ui tests/dsh tests/packaging --junitxml=build/pr10-review-tests.xml`,**1086 passed**,无忽略项,1 条已有 pywinauto COM 模式警告;见[结果摘要](pr10-review-tests.json)。
|
||||
- 原生验收:`python tools/accept_acrylic_ui.py --output build/pr10-review-controls-final`。临时示例数据,无 CAD/真实模型/远端工单调用。通过原生 Acrylic、实色表格、透明度回退、搜索、980×700 与执行/暂停控制入口验证;见 [JSON](pr10-review-acceptance.json)。执行按钮截图只预览 UI 状态,未派发执行 worker。
|
||||
- 本轮未重新构建 EXE,也未重新做真实模型、真实工单或 CAD 写入验收;DSH 真实集成的历史证据位于 `docs/testing/2026-10-30-dsh-*.md`。
|
||||
|
||||

|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"command": "python -m pytest -q tests/v1_1 tests/ui tests/dsh tests/packaging --junitxml=build/pr10-review-tests.xml",
|
||||
"tests": 1086,
|
||||
"failures": 0,
|
||||
"errors": 0,
|
||||
"skipped": 0,
|
||||
"seconds": 193.561,
|
||||
"main_base": "2cf526e1769f354cd7e57861c4b0df9f165565dd",
|
||||
"isolated_checkout": true,
|
||||
"test_exclusions": [],
|
||||
"warnings": [
|
||||
"pywinauto: Revert to STA COM threading mode"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
[
|
||||
{
|
||||
"test": "1440x900-ready",
|
||||
"ok": true,
|
||||
"width": 1440,
|
||||
"height": 900,
|
||||
"primary": "核对执行范围",
|
||||
"primaryIcon": "#icon-play"
|
||||
},
|
||||
{
|
||||
"test": "1440x900-running",
|
||||
"ok": true,
|
||||
"width": 1440,
|
||||
"height": 900,
|
||||
"primary": "完成当前项后暂停",
|
||||
"primaryIcon": "#icon-pause"
|
||||
},
|
||||
{
|
||||
"test": "1440x900-recovery",
|
||||
"ok": true,
|
||||
"width": 1440,
|
||||
"height": 900,
|
||||
"primary": "核验并恢复",
|
||||
"primaryIcon": "#icon-refresh"
|
||||
},
|
||||
{
|
||||
"test": "1440x900-assistant",
|
||||
"ok": true,
|
||||
"width": 1440,
|
||||
"height": 900,
|
||||
"primary": "核验并恢复",
|
||||
"primaryIcon": "#icon-refresh"
|
||||
},
|
||||
{
|
||||
"test": "svg-references",
|
||||
"ok": true,
|
||||
"symbols": 32
|
||||
},
|
||||
{
|
||||
"test": "row-inspector",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "execution-review-before-write",
|
||||
"ok": true,
|
||||
"scope": "current"
|
||||
},
|
||||
{
|
||||
"test": "review-cancel-keeps-ready",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "batch-not-ready-blocked",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "dirty-plan-blocks-execution",
|
||||
"ok": true,
|
||||
"selected": 2
|
||||
},
|
||||
{
|
||||
"test": "dirty-plan-cannot-open-review",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "filtered-review-retains-hidden-selection",
|
||||
"ok": true,
|
||||
"visibleRows": 1,
|
||||
"reviewCount": 2
|
||||
},
|
||||
{
|
||||
"test": "confirm-starts-preparation",
|
||||
"ok": true,
|
||||
"phase": "准备环境"
|
||||
},
|
||||
{
|
||||
"test": "pause-does-not-interrupt-write",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "pause-waits-for-save",
|
||||
"ok": true,
|
||||
"phase": "保存工程"
|
||||
},
|
||||
{
|
||||
"test": "save-is-not-verified-success",
|
||||
"ok": true,
|
||||
"phase": "重新打开并回读核验"
|
||||
},
|
||||
{
|
||||
"test": "pause-after-verification",
|
||||
"ok": true,
|
||||
"refs": [
|
||||
"RV05",
|
||||
"RV11"
|
||||
]
|
||||
},
|
||||
{
|
||||
"test": "changed-plan-invalidates-confirmation",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "assistant-retains-recovery-lock",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "recovery-requires-explicit-review",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "recovery-goes-to-verification",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "completion-follows-verification",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "reduce-transparency",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "980x700-layout",
|
||||
"ok": true,
|
||||
"width": 980,
|
||||
"height": 700
|
||||
},
|
||||
{
|
||||
"test": "980x700-review-layout",
|
||||
"ok": true
|
||||
},
|
||||
{
|
||||
"test": "zero-items-blocked",
|
||||
"ok": true
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,121 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>DxPartReplace · R4 界面预览</title><style>
|
||||
:root{--paper:#fff;--side:#f2f3f5;--surface:#fff;--ink:#202124;--muted:#727680;--line:#e4e6ea;--accent:#007aff;--soft:#eaf3ff;--green:#23834b;--greenbg:#edf8f0;--amber:#976411;--amberbg:#fff6e5;--red:#c33c35;--redbg:#fff0ee}
|
||||
*{box-sizing:border-box}body{margin:0;color:var(--ink);background:var(--paper);font:13px -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei UI",sans-serif;-webkit-font-smoothing:antialiased}button,input{font:inherit}button{color:inherit;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;border:1px solid #dbdde2;border-radius:7px;padding:7px 11px;background:#fff;min-height:31px;box-shadow:0 1px 1px #18233505}button:hover{background:#f3f5f8}button:active{background:#e9edf2}button:disabled{color:#a1a5ad;background:#f6f7f9;border-color:#e9eaed;cursor:default;box-shadow:none}button.primary{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 1px 2px #007aff20}button.primary:hover{background:#006ee6}button.quiet{background:transparent;border-color:transparent;box-shadow:none;color:#626874}button.quiet:hover{background:#e8ebf0;color:#252a32}button.icon-only{width:31px;padding:6px;flex-shrink:0}button:focus-visible,input:focus-visible{outline:3px solid #007aff55;outline-offset:2px}input{color:inherit;background:#fff;border:1px solid #dfe2e7;border-radius:7px;min-width:0;padding:8px 11px}input::placeholder{color:#989da6}.icon{width:18px;height:18px;flex-shrink:0;display:inline-block;vertical-align:middle;color:inherit}small,.muted{color:var(--muted)}.mono{font-family:"SFMono-Regular",Consolas,monospace;font-size:12px;letter-spacing:-.2px}.spacer{flex:1}.panelhidden{display:none!important}.review{height:30px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;background:#eceef1;border-bottom:1px solid #dfe2e7;font-size:11px;color:#777e89}.review strong{font-weight:400}.review nav{display:flex;gap:3px}.review button{border:0;box-shadow:none;background:transparent;font-size:11px;min-height:22px;padding:2px 9px;border-radius:5px}.review button.active{background:white;box-shadow:0 1px 3px #00000010;color:#373e4a}.app{height:calc(100vh - 30px);display:flex;flex-direction:column;min-height:0}
|
||||
.topbar{height:66px;display:flex;align-items:center;background:linear-gradient(#fafbfc,#f6f7f9);border-bottom:1px solid var(--line);flex-shrink:0}.brandarea{width:250px;display:flex;align-items:center;gap:10px;padding:0 19px;flex-shrink:0}.appmark{width:31px;height:31px;border-radius:9px;background:linear-gradient(145deg,#3d9fff,#0074ef);color:#fff;box-shadow:inset 0 1px 0 #ffffff77,0 1px 3px #2075c82b;display:grid;place-items:center}.appmark .icon{width:24px;height:24px}.brand{display:block;font-size:14px;font-weight:600;letter-spacing:-.4px}.brandarea small{display:block;font-size:11px;margin-top:3px;color:#8b909a}.toptools{flex:1;display:flex;align-items:center;padding:0 21px;gap:20px}.toptools>.icon-only{color:#80858f}.topnav{display:flex;padding:3px;background:#e9ebef;border:1px solid #e0e3e8;border-radius:9px;gap:2px}.topnav button{background:transparent;border:0;box-shadow:none;padding:5px 19px;border-radius:6px;min-height:29px;color:#747a85;font-size:12px;gap:7px}.topnav button .icon{width:16px;height:16px}.topnav button.active{color:#252a33;background:white;box-shadow:0 1px 4px #202a4019}.topstatus{display:flex;align-items:center;gap:6px;font-size:11px;color:#868d97}.topstatus .icon{width:14px;height:14px;color:#57936c}.toptools .quiet{font-size:12px}.body{display:flex;flex:1;min-height:0}
|
||||
.sidebar{width:250px;flex-shrink:0;display:flex;flex-direction:column;background:linear-gradient(160deg,#f2f3f6,#eff1f4);border-right:1px solid #e1e4ea;padding:21px 13px 13px;gap:19px}.sidehead{display:flex;align-items:center;justify-content:space-between;padding:0 8px}.sidehead>b{font-size:12px;font-weight:600;letter-spacing:.2px;color:#59606b}.sidehead button{min-height:26px;width:26px;height:26px;color:#757f8e}.searchfield{display:flex;align-items:center;gap:7px;border:1px solid #dfe2e8;background:#fff9;border-radius:7px;padding:0 9px;box-shadow:0 1px 2px #00000002}.searchfield>.icon{color:#9299a5;width:15px;height:15px}.searchfield input{width:100%;border:0;background:transparent;padding:8px 0;font-size:12px;outline-offset:0}.searchfield:focus-within{outline:3px solid #007aff33;border-color:#80bafa}.searchfield input:focus-visible{outline:0}.batchtitle{font-size:11px;font-weight:500;color:#76818e;display:flex;align-items:center;justify-content:space-between;padding:0 8px;margin-bottom:10px}.batchtitle button{min-height:20px;padding:2px;border:0;box-shadow:none;background:transparent;color:#8b929d}.batchtitle .icon{width:14px;height:14px}.task{width:100%;border:1px solid transparent;background:transparent;box-shadow:none;text-align:left;justify-content:flex-start;align-items:center;gap:11px;padding:12px 10px;margin-bottom:6px;border-radius:8px;min-height:66px}.task>.icon{width:20px;height:20px;color:#8791a1}.task.active{background:#e2edfc;border-color:#d5e5fa}.task.active>.icon{color:#007aff}.task>b,.task b{display:block;font-size:13px;font-weight:500;letter-spacing:-.1px;margin-bottom:7px;overflow-wrap:anywhere}.task small{font-size:11px;display:flex;align-items:center;gap:5px;color:#89919d}.task.active b{color:#195da9}.task.active small{color:#5b7da5}.task .order{margin-left:auto;align-self:flex-start;font-size:11px;color:#9ba3ae;padding-top:1px}.dot{width:5px;height:5px;display:inline-block;border-radius:50%;background:#9ea5af;flex-shrink:0}.dot.green{background:#3d9b60}.sidebottom{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #e0e4eb;padding-top:10px;font-size:11px}.sidebottom button{font-size:11px;padding:6px 7px;gap:6px}.sidebottom .icon{width:15px;height:15px}.batchaction{margin-top:auto;padding-top:18px}.batchaction p{margin:0 6px 10px;font-size:11px;color:#9a9fa9}.batchaction button{width:100%;font-size:11px;background:#fafbfc;border-color:#dfe3e9;color:#6d7888;box-shadow:0 1px 2px #00000004}.batchaction .icon{width:15px;height:15px}
|
||||
.main{flex:1;min-width:0;display:flex;flex-direction:column;padding:26px 30px 0;background:#fff;position:relative}.breadcrumb{display:flex;align-items:center;gap:6px;font-size:11px;color:#7d8794;margin-bottom:19px}.breadcrumb>.icon{width:13px;height:13px}.breadcrumb span:last-child{color:#79818e}.projectheader{display:flex;align-items:center;gap:14px}.projectart{height:46px;width:46px;display:grid;place-items:center;border:1px solid #dce7f5;border-radius:11px;background:linear-gradient(#f4f8ff,#eef4ff);color:#508ad0;flex-shrink:0}.projectart .icon{width:29px;height:29px}.projectidentity{min-width:0;flex:1}.heading{display:flex;align-items:center;gap:11px}.heading h1{margin:0;font-size:24px;letter-spacing:-.6px;font-weight:600;color:#222731}.badge{display:inline-flex;align-items:center;gap:4px;padding:3px 7px;background:#eef5ff;color:#4681c1;border-radius:5px;font-size:11px;font-weight:500}.badge.warning{color:var(--amber);background:var(--amberbg)}.badge.error{color:var(--red);background:var(--redbg)}.badge .icon{width:12px;height:12px}.path{display:flex;align-items:center;gap:7px;color:#7f8997;margin-top:6px;min-width:0}.path>.mono{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;min-width:0}.path button{width:20px;min-height:20px;height:20px;padding:2px;color:#929aa7}.path button .icon{width:13px;height:13px}.projectmenu{position:relative;align-self:center}.projectmenu>.quiet{color:#89919e}#projectMenu{position:absolute;right:0;top:34px;z-index:8;background:#fffffff5;backdrop-filter:blur(18px);border:1px solid #dce0e6;padding:5px;border-radius:9px;box-shadow:0 8px 30px #1e2c4322;min-width:175px}#projectMenu button{display:flex;justify-content:flex-start;width:100%;background:transparent;border:0;box-shadow:none;font-size:12px;color:#515d6d}#projectMenu button:hover{background:#eaf3ff}
|
||||
.scopebar{display:flex;align-items:center;gap:22px;margin-top:24px;padding:12px 0;border-top:1px solid #f0f1f4;border-bottom:1px solid #f0f1f4;color:#646d79;font-size:11px}.scopebar>span{display:flex;gap:6px;align-items:center}.scopebar .key{color:#76808c}.scopebar b{font-weight:600;font-variant-numeric:tabular-nums;color:#303a48}.scopebar .policy{margin-left:auto;font-size:11px;color:#8d95a0;gap:7px}.scopebar .policy>.icon{width:14px;height:14px}.scopebar button{color:#7c899a;padding:2px;min-height:22px;height:22px}.scopebar button .icon{width:15px;height:15px}.tabs{display:flex;align-items:center;gap:25px;margin-top:11px;border-bottom:1px solid #e9ecf1}.tabs button{border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;box-shadow:none;padding:13px 0 12px;gap:7px;font-size:12px;color:#747f8e}.tabs button .icon{width:15px;height:15px}.tabs button.active{color:#1474df;border-bottom-color:#007aff;font-weight:500}.tabs small{padding:1px 5px;border-radius:4px;background:#f1f3f6;font-size:10px;color:#8993a2}.tabs button.active small{background:#eaf3ff;color:#3b83d6}.save-state{font-size:11px;display:flex;align-items:center;gap:5px;color:#8c98a3}.save-state>.icon{width:13px;height:13px;color:#79a18b}
|
||||
.workspace{display:flex;flex:1;min-height:0;flex-direction:column}.toolbar{display:flex;align-items:center;gap:8px;padding:19px 0 15px}.toolbar>.searchfield{width:260px;background:#f8f9fb;border-color:#eef0f4;box-shadow:none}.toolbar button{font-size:11px;gap:6px}.toolbar button .icon{width:16px;height:16px}.toolbar .subtle{background:transparent;border-color:transparent;color:#8c96a4;box-shadow:none}.toolbar .icon-only{color:#8c96a4}.tooldivider{height:19px;width:1px;background:#e5e9ef;margin:0 4px}.hint{display:flex;align-items:center;gap:8px;margin-bottom:12px;color:#74808f;font-size:11px}.hint strong{font-weight:400;color:#636e7c}.hint>.icon{width:13px;height:13px;color:#a1a9b4}.hint .selection-count{color:#5b8bc6}.tablewrap{flex:1;min-height:150px;border:1px solid #e5e9f0;border-radius:9px;overflow:auto;background:white}table{width:100%;border-collapse:separate;border-spacing:0;white-space:nowrap;font-size:12px}th{text-align:left;font-size:11px;color:#778392;font-weight:400;background:#f9fafc;height:36px;position:sticky;top:0;z-index:1;border-bottom:1px solid #e9edf2}td{height:40px;border-bottom:1px solid #f0f2f6;color:#616d7e}th,td{padding:0 11px}th:first-child,td:first-child{padding-left:18px;width:44px}tr.chosen td{background:#f0f6ff}td.new{color:#2677cf}.ref{font-weight:500;color:#35465c}.tag{color:#9aa2ae;font-size:11px}.row-detail{width:25px;min-height:25px;height:25px;padding:3px;color:#a5b0be;background:transparent;border:0;box-shadow:none}.row-detail:hover{background:#e3edfa;color:#3385dd}.row-detail .icon{width:15px;height:15px}.tablewrap td:last-child,.tablewrap th:last-child{width:35px;padding-left:0;padding-right:9px}.checkcell{width:50px}input[type=checkbox]{appearance:none;display:inline-block;vertical-align:middle;margin:0;width:13px;height:13px;border:1px solid #cfd7e2;border-radius:3px;padding:0;background:white;cursor:pointer;box-shadow:0 1px 1px #00000003}input[type=checkbox]:checked{background-color:var(--accent);border-color:var(--accent);background-position:center;background-repeat:no-repeat;background-size:11px}input[type=checkbox]:disabled{opacity:.45;cursor:default}.tablefoot{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#7d8997;padding:11px 1px 16px}.tablefoot button{font-size:11px;gap:5px;min-height:22px;padding:0 3px;border:0;box-shadow:none;color:#939eac}.tablefoot .icon{width:13px;height:13px}.runarea{display:flex;gap:10px;align-items:center;padding:18px 0 20px;border-top:1px solid #e9edf3;min-height:87px;flex-shrink:0}.runarea>.runicon{height:32px;width:32px;border:1px solid #e2ede7;background:#f5faf7;color:#60a17a;border-radius:50%;display:grid;place-items:center;flex-shrink:0}.runicon .icon{width:18px;height:18px}.runinfo{flex:1;min-width:0}.runinfo b{display:block;font-size:12px;font-weight:500;color:#535e6d;margin-bottom:5px}.runinfo small{font-size:11px;color:#7d8896}.runarea button{font-size:11px;min-height:33px}.runarea button .icon{width:15px;height:15px}.runarea .quiet{color:#9ba4b1;padding:7px}.runarea .primary{padding-left:15px;padding-right:15px}.notice{display:flex;gap:9px;padding:12px 14px;background:#fff8ec;border:1px solid #f0dfbf;border-radius:7px;color:#987234;font-size:11px;line-height:1.8;margin-top:13px}.notice>.icon{width:17px;height:17px;margin-top:1px}.progress{display:none!important}.empty{text-align:center;padding:35px;font-size:12px;color:#7d8795}.ruleshint{font-size:11px;color:#929ca9;padding-bottom:17px;line-height:1.8}.resultview{padding:23px 0;line-height:1.9;font-size:12px;color:#929ca9}.resultview b{color:#566578;font-weight:500}
|
||||
.assistantmain{padding:0;display:flex;flex-direction:row}.chat{flex:1;min-width:0;max-width:950px;margin:0 auto;padding:29px 34px 18px;display:flex;flex-direction:column}.chathead{display:flex;align-items:center;gap:10px;border-bottom:1px solid #edf0f4;padding-bottom:19px;margin-bottom:22px}.chathead>.icon{width:20px;height:20px;color:#6c96c8}.chathead strong{font-weight:500;font-size:14px}.chathead small{margin-left:auto;color:#7c8898;font-size:11px}.agentlabel{font-size:11px;display:flex;gap:7px;align-items:center;color:#788799}.agentlabel .icon{width:13px;height:13px}.chat h2{font-size:20px;font-weight:500;color:#3b485b;letter-spacing:-.4px;margin:10px 0}.chat>p{font-size:11px;color:#7b899a;margin:0 0 10px}.message{font-size:12px;line-height:1.9;padding:15px 0;color:#68788c}.message.user{align-self:flex-end;background:#f2f5f9;border:1px solid #edf0f4;border-radius:11px 11px 3px 11px;max-width:85%;padding:10px 15px;margin:10px 0 12px;color:#6a788b}.checkcard{border:1px solid #e5eaf2;border-radius:9px;background:linear-gradient(#fff,#fcfdff);padding:16px 18px;margin-top:14px;font-size:11px}.checkcard>b{display:flex;align-items:center;gap:7px;font-weight:500;color:#5c718b;margin-bottom:8px}.checkcard>b .icon{color:#85a7d0;width:15px;height:15px}.checkline{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid #f0f3f7;color:#8390a2}.checkline:last-of-type{border:0}.checkline span:last-child{color:#5b8c70}.checkcard footer{margin-top:10px;color:#9ca7b5;font-size:11px;display:flex;align-items:center;gap:6px}.checkcard footer .icon{width:13px;height:13px}.chatinput{margin-top:auto;border:1px solid #dfe5ef;box-shadow:0 2px 9px #425b8005;border-radius:10px;padding:14px;background:#fff}.chatinput input{width:100%;border:0;padding:0;background:transparent;font-size:12px}.chatinput footer{display:flex;align-items:center;gap:7px;margin-top:22px;font-size:11px;color:#a1aab7}.chatinput footer>.icon{width:13px;height:13px;color:#9bb0ca}.chatinput button{margin-left:auto;width:27px;min-height:27px;height:27px;padding:5px;border-radius:7px}.chatinput button .icon{width:16px;height:16px}.chatdisclaimer{font-size:10px;text-align:center;margin-top:10px;color:#acb3be}.context{width:254px;flex-shrink:0;background:#fafbfd;border-left:1px solid #e9edf3;padding:29px 22px}.context h3{display:flex;gap:8px;align-items:center;margin:0 0 23px;font-size:12px;font-weight:500;color:#78879c}.context h3>.icon{width:16px;height:16px;color:#97abc4}.context .section{border-top:1px solid #e9eef5;padding:18px 0;line-height:1.9;font-size:11px;color:#7e8da2}.context .section small{display:block;font-size:11px;margin-bottom:8px;color:#a5adba}.context b{font-weight:500;font-size:12px;color:#5d728d}.context .mono{font-size:11px;color:#a0abbc;overflow-wrap:anywhere;margin:6px 0 9px}.context .badge{margin:5px 0}.context .muted{color:#95a2b4}.context button{width:100%;font-size:11px;margin-top:16px;color:#7f98b9;gap:7px}.context button .icon{width:14px;height:14px}
|
||||
.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);z-index:20;max-width:80%;padding:11px 16px;border:1px solid #d6dce7;border-radius:9px;background:#f9fbfff5;color:#56667e;box-shadow:0 6px 24px #344c6e22;backdrop-filter:blur(16px);font-size:12px}.inspector{position:absolute;z-index:9;right:18px;top:90px;bottom:88px;width:295px;max-width:calc(100% - 36px);background:#fffffff7;backdrop-filter:blur(20px);border:1px solid #dde5ef;border-radius:12px;box-shadow:0 12px 45px #2e507a26;padding:20px;overflow:auto}.inspector header{display:flex;align-items:center;gap:9px;margin-bottom:22px;color:#5289c7}.inspector header b{flex:1;font-weight:500}.inspector h4{font-size:11px;font-weight:400;color:#9aa6b5;margin:17px 0 7px}.inspector p{margin:0;font-size:12px;color:#596f8d;line-height:1.8}.inspector .rule{height:1px;background:#eef2f7;margin:18px 0}.inspector footer{font-size:11px;color:#a2adbb;line-height:1.8;margin-top:22px}.inspector .mono{overflow-wrap:anywhere}
|
||||
@media(max-width:1180px){.brandarea,.sidebar{width:218px}.main{padding:20px 20px 0}.scopebar{gap:14px;flex-wrap:wrap;padding:10px 0;margin-top:18px}.scopebar .policy{margin-left:auto}.topstatus{display:none}.toptools{padding:0 16px;gap:12px}.toolbar>.searchfield{width:235px}.toolbar{gap:5px}.toolbar button{padding:7px 9px}.context{width:220px;padding:24px 17px}.chat{padding:24px}.runarea{gap:7px}.runarea .quiet{padding:6px}.runarea button{font-size:11px}.runarea button .icon{width:14px;height:14px}.hint{font-size:11px}th,td{padding:0 8px}}
|
||||
@media(max-width:1020px){.brandarea,.sidebar{width:205px}.topnav button{padding:5px 13px}.main{padding:17px 17px 0}.scopebar .policy{margin-left:0}.scopebar{gap:11px}.toolbar>.searchfield{width:200px}.toolbar button{font-size:11px;padding:7px 8px}.toolbar button .icon{width:14px;height:14px}.runarea>.runicon{display:none}.runarea button{gap:5px;padding:7px 9px}.runarea .quiet{font-size:11px}.tablefoot{font-size:10px}.scopebar .key{font-size:11px}}
|
||||
@media(max-height:760px){.topbar{height:56px}.breadcrumb{margin-bottom:13px}.heading h1{font-size:21px}.projectart{width:39px;height:39px;border-radius:9px}.projectart .icon{width:25px;height:25px}.scopebar{margin-top:15px;padding:9px 0}.tabs{margin-top:5px}.tabs button{padding:10px 0}.toolbar{padding:12px 0}.hint{margin-bottom:9px}td{height:36px}.tablefoot{padding:8px 1px 12px}.runarea{min-height:72px;padding:13px 0}.sidebar{padding-top:18px;gap:16px}.task{padding:10px 9px;min-height:59px}.chathead{padding-bottom:13px;margin-bottom:15px}.chat h2{font-size:18px}.message{padding:8px 0}.checkline{padding:8px 0}.checkcard{padding:11px 14px}.context .section{padding:13px 0}}
|
||||
input[type=checkbox]:checked{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGQ9Im00IDggMi41IDIuNUwxMiA1Ii8+PC9zdmc+)}
|
||||
/* R4 glass: material belongs to chrome and transient controls; data stays opaque. */
|
||||
:root{--accent:#333c49;--soft:#e9edf2;--ink:#29313b;--muted:#727b88;--line:#dbe0e7;--glass:rgba(255,255,255,.52);--glass-edge:rgba(255,255,255,.86);--glass-shadow:0 8px 32px #3b465413,inset 0 1px 0 #ffffffdc;--tint:#64748b;--green:#3e725d;--red:#a54740}
|
||||
body{background:radial-gradient(ellipse at 4% 10%,#cdd5df 0,transparent 48%),radial-gradient(ellipse at 92% 82%,#d9d1d6 0,transparent 50%),linear-gradient(135deg,#e4e8ec 0%,#ecebed 48%,#dce3e9 100%);color:#303945}
|
||||
.review{height:30px;background:#e7ebef82;border-color:#ffffffa6;backdrop-filter:blur(24px);color:#737d8a;gap:16px}.review nav{margin-left:auto}.review button{color:#6c7888}.review button.active{color:#384758;background:#ffffffe6;box-shadow:0 1px 4px #2c3c4c10,inset 0 1px 0 white}.review>button{background:#ffffff8c;border:1px solid #ffffffab}.app{height:calc(100vh - 30px)}
|
||||
.topbar{height:68px;border-bottom:1px solid #ffffffbb;background:linear-gradient(#ffffff9c,#ffffff52);backdrop-filter:blur(32px) saturate(120%);box-shadow:0 1px 12px #45536b04;position:relative;z-index:4}.toptools{gap:18px}.brandarea{width:248px}.appmark{background:linear-gradient(145deg,#8795a7,#4a586d);border:1px solid #ffffffb8;box-shadow:0 2px 5px #40516a1d,inset 0 1px 0 #ffffffb0;border-radius:10px}.brand{color:#394757}.brandarea small{color:#8894a3}.topnav{background:#dce2e866;border:1px solid #ffffff94;border-radius:12px;padding:4px;box-shadow:inset 0 1px 3px #6573880a}.topnav button{border-radius:8px;color:#7c8796}.topnav button.active{background:linear-gradient(#fffffff5,#ffffffb5);box-shadow:0 2px 7px #3c4d6312,inset 0 1px 0 #fff;color:#3c4b60}.topstatus{color:#8b96a5}.topstatus .icon{color:#7d958a}.material-toggle{font-size:10px!important;color:#8d98a7!important}
|
||||
.sidebar{width:248px;padding-top:24px;background:linear-gradient(155deg,#ffffff42,#edf1f653);backdrop-filter:blur(32px) saturate(115%);border-right:1px solid #ffffffbd;gap:21px}.sidehead>b{color:#657284;font-weight:500}.searchfield{background:#ffffff69;border:1px solid #ffffffa8;box-shadow:inset 0 1px 3px #4a5e7504,0 1px 3px #60759004;border-radius:9px}.searchfield input{color:#58697e}.searchfield:focus-within{outline:3px solid #697c9521;border-color:#9dabbc}.searchfield input::placeholder{color:#97a1ae}.task{border-radius:11px;padding-top:13px;padding-bottom:13px;min-height:69px}.task.active{background:linear-gradient(110deg,#ffffffe6,#ffffff80);border:1px solid #fffffff2;box-shadow:0 4px 15px #5264800c,inset 0 1px 0 white}.task.active b{color:#40546e}.task.active>.icon{color:#637b9a}.task.active small{color:#8192a7}.task>.icon{color:#94a1b4}.task b{font-weight:500;color:#5b6c82}.task .order{color:#9da8b7}.dot.green{background:#7d9a8c}.batchaction p{color:#929ead}.batchaction button{background:#ffffff72;border-color:#ffffffd9;border-radius:9px;color:#70839a;box-shadow:inset 0 1px 0 white,0 2px 5px #55657d06}.sidebottom{border-color:#ffffffaa}.sidebottom .quiet{color:#8292a6}
|
||||
.main{padding:24px 30px 0;background:linear-gradient(150deg,#ffffffdb,#ffffffa6);backdrop-filter:blur(24px);border-left:1px solid #ffffff70}.breadcrumb{color:#a0abba;margin-bottom:18px}.breadcrumb span:last-child{color:#8593a5}.projectart{background:linear-gradient(150deg,#ffffffe8,#e7edf499);border:1px solid white;box-shadow:0 3px 12px #7487a30c,inset 0 1px 0 #fff;color:#758ba8;border-radius:12px}.heading h1{color:#3b4b61;font-size:23px;font-weight:500;letter-spacing:-.5px}.path{color:#a1abba}.badge{background:#ecf1f6c7;color:#7a8da6;border:1px solid #ffffffad;border-radius:6px}.badge.warning{background:#f6efe0b8;color:#9b8259}.badge.error{background:#f7eae6c9;color:#a56860}.scopebar{border-color:#e1e6edaa;margin-top:20px;padding:11px 0;gap:20px}.scopebar b{color:#596e87}.scopebar .key{color:#8c99aa}.scopebar .policy{color:#93a0b1}.scopebar .policy button{color:#94a4b8}
|
||||
.workflow{display:flex;align-items:center;gap:10px;padding:17px 0 4px;color:#a2acb9;font-size:10px}.flowstep{display:flex;align-items:center;gap:7px;white-space:nowrap}.flowstep i{font-style:normal;width:17px;height:17px;border:1px solid #d9e1ea;border-radius:50%;font-size:9px;display:grid;place-items:center;color:#a8b3c0;background:#ffffff45}.flowstep.current{color:#657e9c}.flowstep.current i{background:#e8eef6;border-color:#d8e2ef;color:#7088a8;box-shadow:inset 0 1px 0 white}.flowstep.done{color:#7c968d}.flowstep.done i{background:#edf2ef;color:#91a298}.workflow>b{width:36px;height:1px;background:#e0e7f0}.flow-caption{font-size:9px;color:#a7b0bd}
|
||||
.tabs{margin-top:8px;border-bottom-color:#e5eaf1;gap:25px}.tabs button{color:#99a5b5;padding:11px 0}.tabs button.active{color:#627c9f;border-bottom-color:#8ba4c5}.tabs button.active small{background:#e9eef5;color:#869bb6}.save-state>.icon{color:#8fa69c}.save-state{color:#a0acb9}.toolbar{padding:15px 0 12px;gap:7px}.toolbar>.searchfield{background:#f1f4f87d;border-color:#e7edf4;border-radius:8px}.toolbar button{border-radius:8px;background:linear-gradient(#ffffffed,#ffffffa3);border-color:#dce4efad;color:#7186a2;box-shadow:inset 0 1px 0 #fff,0 2px 4px #65789405}.toolbar button.subtle,.toolbar button.quiet{background:transparent;border-color:transparent;box-shadow:none;color:#96a5b9}.tooldivider{background:#e4ebf3}.hint{color:#9ba7b8}.hint .selection-count{color:#859abb}.hint strong{color:#8697af}.tablewrap{border-radius:10px;border:1px solid #dfe7f1;background:#fffffff2;box-shadow:0 3px 15px #8497b606}.tablewrap table{background:#fffffff8}th{background:#f7f9fc;color:#94a2b5;border-bottom:1px solid #e8eef6}td{color:#7b8da6;border-color:#eff3f8;height:37px}tr.chosen td{background:#edf2f8}.ref{color:#6e85a5}td.new{color:#7a95b7}.tag{color:#a5afbe}input[type=checkbox]:checked{background-color:#889fbe;border-color:#889fbe}input[type=checkbox]{border-color:#d4dfed}.row-detail{color:#a8b6c9}.row-detail:hover{background:#e9eef6;color:#7f98b7}.tablefoot{padding:10px 1px 11px;color:#a6b1bf}.tablefoot button{color:#a3b1c4}.notice{background:#f9f4e9c9;border-color:#eae0c9a6;color:#9e8a67;border-radius:10px;margin-top:11px}
|
||||
button.primary{background:linear-gradient(145deg,#586a81,#3d4b61);border:1px solid #64758c;color:#f4f7fb;box-shadow:inset 0 1px 0 #ffffff40,0 3px 9px #465a7920;border-radius:9px}button.primary:hover{background:linear-gradient(145deg,#657890,#485972)}button.primary:disabled{background:#dce2ea;color:#9ba9bc;border-color:#dce3ed;box-shadow:none}button:hover{background:#eef2f7}button:focus-visible{outline:3px solid #6c83a535;outline-offset:3px}
|
||||
.runarea{margin:0 -8px 15px;padding:12px 15px;min-height:76px;position:relative;border:1px solid #ffffffed;border-radius:15px;background:linear-gradient(125deg,#ffffffd9,#ffffff74);backdrop-filter:blur(28px) saturate(110%);box-shadow:0 7px 24px #60749110,inset 0 1px 0 #ffffff;gap:10px}.runarea>.runicon{background:#f6f9f7;border:1px solid #e6eeea;width:30px;height:30px;box-shadow:0 1px 3px #81948b05}.runinfo b{font-size:12px;color:#71859f;font-weight:500}.runinfo small{font-size:10px;color:#a1afc0}.runarea .quiet{color:#9caabe;padding:7px 5px;font-size:10px}.runarea #saveButton{background:#ffffff96;border:1px solid #e0e7f0;color:#9aacc3;border-radius:8px;font-size:10px;box-shadow:inset 0 1px 0 white}.runarea #saveButton:disabled{background:#ffffff55;color:#bbc4d0;border-color:#e9eef5}.runarea .primary{padding-left:13px;padding-right:13px;min-height:34px;font-size:11px}.runarea #secondary{max-width:150px}.stage-badge{font-size:9px;color:#a9b5c4;background:#f1f4f84d;border:1px solid #e9eef5;border-radius:5px;padding:3px 6px;white-space:nowrap}
|
||||
.assistantmain{padding:0;background:#ffffffbd}.context{background:linear-gradient(150deg,#ffffff72,#eff3f74a);backdrop-filter:blur(24px);border-left-color:#ffffffbf}.chathead{border-color:#e5ebf3}.chatinput,.checkcard{background:linear-gradient(140deg,#fffffff5,#ffffff96);border:1px solid #e0e8f3;box-shadow:inset 0 1px 0 white,0 3px 15px #7a90b008}.message.user{background:#edf2f7a8;border-color:#e6edf5}.chat h2{color:#768ba7;font-weight:400}.chathead strong{color:#7c8faa}.chathead>.icon{color:#91a7c5}.inspector{background:linear-gradient(135deg,#ffffffef,#f4f7fbcf);backdrop-filter:blur(36px) saturate(115%);border-color:white;box-shadow:0 12px 40px #49638420,inset 0 1px 0 white;border-radius:15px}.toast{background:#ffffffe8;backdrop-filter:blur(28px);border:1px solid white;color:#7a8ea9;box-shadow:0 8px 25px #526d9217}
|
||||
.review-dialog{width:570px;max-width:calc(100vw - 40px);max-height:calc(100vh - 60px);padding:0;border:1px solid #ffffffeb;border-radius:22px;color:#53657e;background:linear-gradient(140deg,#fffffff0,#f4f7fbe0);backdrop-filter:blur(42px) saturate(115%);box-shadow:0 30px 100px #34496630,inset 0 1px 0 white;overflow:auto}.review-dialog::backdrop{background:#7b8da72b;backdrop-filter:blur(5px)}.dialog-header{padding:25px 27px 19px;display:flex;align-items:center;gap:13px}.dialog-symbol{width:42px;height:42px;background:#ffffffa8;border:1px solid white;border-radius:12px;color:#7f98b9;display:grid;place-items:center;box-shadow:0 3px 10px #647fa30c}.dialog-symbol .icon{width:24px;height:24px}.dialog-header h2{font-size:18px;font-weight:500;margin:0 0 5px;color:#5f7695}.dialog-header p{font-size:10px;color:#a2afc0;margin:0}.dialog-header>.quiet{margin-left:auto}.dialog-content{padding:0 27px 22px}.scope-switch{display:flex;background:#dae3ee5e;border:1px solid #ffffffbd;border-radius:9px;padding:3px;margin-bottom:17px}.scope-switch button{width:50%;background:transparent;border:0;box-shadow:none;border-radius:6px;font-size:11px;color:#93a3b9}.scope-switch button.active{background:#ffffffcb;box-shadow:0 2px 5px #526e930e;color:#7e93b0}.review-project{display:flex;align-items:center;gap:10px;padding:14px 15px;background:#ffffffa6;border:1px solid #ffffffd6;border-radius:10px;margin-bottom:14px}.review-project>.icon{color:#8da2c0}.review-project b{display:block;font-size:12px;font-weight:500;color:#748aa8}.review-project small{display:block;font-size:10px;margin-top:5px;color:#a6b3c4}.review-project>span:last-child{margin-left:auto;color:#8ea6c5;font-size:10px}.review-items{border:1px solid #e1e8f2;border-radius:10px;overflow:auto;max-height:160px;background:#ffffffe0}.review-items th,.review-items td{height:32px;font-size:10px;padding:0 12px}.review-items .mono{font-size:11px}.review-totals{display:flex;gap:22px;margin:15px 0;color:#a0aec0;font-size:10px}.review-totals b{font-weight:500;color:#859dbc;margin-left:4px}.review-policy{padding-top:14px;border-top:1px solid #e1e8f2;display:flex;gap:8px;align-items:flex-start;font-size:10px;line-height:1.9;color:#9dacc0}.review-policy>.icon{width:14px;height:14px;margin-top:2px;color:#a5b6cd}.review-error{background:#f6efe6;border:1px solid #e8dcc7;border-radius:8px;color:#a68e66;padding:12px 13px;font-size:11px;line-height:1.8;margin-top:13px}.dialog-footer{display:flex;justify-content:flex-end;gap:9px;padding:16px 27px 21px;background:#ffffff35;border-top:1px solid #ffffffb8}.dialog-footer button{font-size:11px;border-radius:9px;min-height:33px}.dialog-footer>.quiet{margin-right:auto}.dialog-footer .primary{min-width:122px}.reduced-transparency .topbar,.reduced-transparency .sidebar,.reduced-transparency .main,.reduced-transparency .context{background:#f4f6f9;backdrop-filter:none}.reduced-transparency .main{background:#fff}.reduced-transparency .runarea,.reduced-transparency .review-dialog,.reduced-transparency .inspector{background:#f8fafc;backdrop-filter:none}.reduced-transparency .review-dialog::backdrop{backdrop-filter:none;background:#4b5a6c40}
|
||||
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
|
||||
@supports not (backdrop-filter:blur(1px)){.topbar,.sidebar{background:#f0f3f7}.main{background:#fff}.review-dialog,.runarea,.context,.inspector{background:#f7f9fc}}
|
||||
@media(max-width:1180px){.brandarea,.sidebar{width:218px}.main{padding:20px 21px 0}.toptools{gap:12px}.topstatus{display:none}.material-toggle{display:none}.scopebar .policy{margin-left:auto}.workflow{gap:8px}.workflow>b{width:22px}.flow-caption{display:none}.runarea{margin-left:-5px;margin-right:-5px;padding:11px 12px;gap:7px}.runarea .quiet{font-size:10px}.toolbar>.searchfield{width:220px}}
|
||||
@media(max-width:1020px){.brandarea,.sidebar{width:205px}.main{padding:17px 17px 0}.scopebar .policy{margin-left:0}.runarea>.runicon{display:none}.toolbar>.searchfield{width:195px}.runarea .primary{padding-left:10px;padding-right:10px}.stage-badge{display:none}.workflow{font-size:10px}.workflow>b{width:20px}}
|
||||
@media(max-height:760px){.topbar{height:55px}.main{padding-top:14px}.breadcrumb{margin-bottom:11px}.scopebar{margin-top:13px;padding:8px 0}.workflow{padding-top:12px;padding-bottom:0}.tabs{margin-top:3px}.tabs button{padding:9px 0}.toolbar{padding:11px 0 10px}.tablefoot{padding:8px 1px 10px}td{height:33px}.runarea{min-height:65px;padding:10px 12px;margin-bottom:11px}.sidebar{padding-top:18px;gap:17px}.task{min-height:59px;padding-top:10px;padding-bottom:10px}}
|
||||
|
||||
/* Keep working data legible above translucent chrome. */
|
||||
.heading h1{color:#354255}.brand{color:#354255}.sidehead>b{color:#5c697a}.task b{color:#52667f}.task.active b{color:#40546e}.task small{color:#7c8ba0}.task.active small{color:#73869f}.tablewrap td{color:#526780}.tablewrap .ref{color:#425e81}.tablewrap td.new{color:#5479a6}.tablewrap th{color:#74869f;font-size:11px}.tablewrap .tag{color:#8191a7}.tablewrap td.muted{color:#8391a5}.scopebar .key{color:#7d8a9e}.scopebar b{color:#4f6684}.scopebar .policy{color:#8695aa}.runinfo b{color:#536d90}.runinfo small{color:#8b9eb8}.tabs button.active{color:#536f95}.tabs button{color:#8a9ab0}.review-dialog h2{color:#506987}.review-project b{color:#5b789e}.review-items td{color:#5f799b}.review-policy{color:#8d9fb7}.dialog-header p{color:#93a3b9}.flow-caption{color:#98a7bc}
|
||||
</style><svg xmlns="http://www.w3.org/2000/svg" style="position:absolute;width:0;height:0;overflow:hidden" aria-hidden="true"><symbol id="icon-sidebar" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="2.5" y="3.5" width="15" height="13" rx="2"/><path d="M7 3.5v13M4.5 7h.1m-.1 3h.1"/></g></symbol><symbol id="icon-grid" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="5" height="5" rx="1"/><rect x="12" y="3" width="5" height="5" rx="1"/><rect x="3" y="12" width="5" height="5" rx="1"/><rect x="12" y="12" width="5" height="5" rx="1"/></g></symbol><symbol id="icon-chat" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M5 3.5h10a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H9l-4.5 3v-3a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2Z"/><path d="M6.5 7.5h7m-7 3h4"/></g></symbol><symbol id="icon-plus" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M10 4v12M4 10h12"/></g></symbol><symbol id="icon-search" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="8.5" cy="8.5" r="5.5"/><path d="m12.5 12.5 4.5 4.5"/></g></symbol><symbol id="icon-folder" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 6a2 2 0 0 1 2-2h4l2 2h5a2 2 0 0 1 2 2v6.5a2 2 0 0 1-2 2h-11a2 2 0 0 1-2-2Z"/></g></symbol><symbol id="icon-project" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="2.5" width="12" height="15" rx="2"/><path d="M7 6h6M7 10h3m0 0v4m0-4h3m-6 4h6"/></g></symbol><symbol id="icon-sort" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M6 4v12m-3-3 3 3 3-3M13 5h4m-4 5h3m-3 5h2"/></g></symbol><symbol id="icon-trash" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M3.5 5.5h13M7 5V3h6v2M5 5.5l.8 11h8.4l.8-11M8 8.5v5m4-5v5"/></g></symbol><symbol id="icon-more" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="4" cy="10" r=".9" fill="currentColor" stroke="none"/><circle cx="10" cy="10" r=".9" fill="currentColor" stroke="none"/><circle cx="16" cy="10" r=".9" fill="currentColor" stroke="none"/></g></symbol><symbol id="icon-sliders" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M3 5h3m4 0h7M3 10h8m4 0h2M3 15h2m4 0h8"/><circle cx="8" cy="5" r="2"/><circle cx="13" cy="10" r="2"/><circle cx="7" cy="15" r="2"/></g></symbol><symbol id="icon-copy" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="7" y="7" width="10" height="10" rx="2"/><path d="M12.5 4V3H3v9.5h1"/></g></symbol><symbol id="icon-table" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="2.5" y="3.5" width="15" height="13" rx="2"/><path d="M2.5 8h15M8 8v8.5m4-8.5v8.5"/></g></symbol><symbol id="icon-rules" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M7 5h10M7 10h10M7 15h10"/><circle cx="3.5" cy="5" r=".6"/><circle cx="3.5" cy="10" r=".6"/><circle cx="3.5" cy="15" r=".6"/></g></symbol><symbol id="icon-log" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M6 2.5h6l4 4v11H4v-15h2Zm6 0v4h4M7 10h6m-6 3.5h6"/></g></symbol><symbol id="icon-download" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M10 2.5v10m-3.5-3.5 3.5 3.5 3.5-3.5M3.5 13v4h13v-4"/></g></symbol><symbol id="icon-upload" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M10 12.5v-10M6.5 6 10 2.5 13.5 6M3.5 13v4h13v-4"/></g></symbol><symbol id="icon-scan" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M7 3H3v4m10-4h4v4M3 13v4h4m10-4v4h-4M6 10h8m-6-3v6m4-6v6"/></g></symbol><symbol id="icon-save" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3h12l2 2v12H3ZM6 3v5h7V3M6 17v-5h8v5"/></g></symbol><symbol id="icon-play" viewBox="0 0 20 20"><g fill="none" stroke="currentColor" stLine truncated
|
||||
<div class="review"><strong>界面预览 R4 · 示例数据 · 未连接 CAD</strong><button onclick="location.href='material-lab.html'">R5 毛玻璃机制实测</button><button id="advanceDemo" class="panelhidden" onclick="advanceDemo()">演示下一阶段</button><nav aria-label="预览状态"><button data-state="ready" onclick="setState('ready')">准备执行</button><button data-state="running" onclick="setState('running')">执行中</button><button data-state="recovery" onclick="setState('recovery')">待核验</button><button data-state="assistant" onclick="setState('assistant')">DSH 助手</button></nav></div>
|
||||
<div class="app"><header class="topbar"><div class="brandarea"><span class="appmark"><svg class="icon " aria-hidden="true"><use href="#icon-circuit"/></svg></span><div><span class="brand">DxPartReplace</span><small>DxDesigner 器件替换</small></div></div><div class="toptools"><button class="quiet icon-only" data-icon="sidebar" title="任务侧栏" aria-label="任务侧栏" onclick="toast('左侧显示当前批次的工程任务。')"><svg class="icon " aria-hidden="true"><use href="#icon-sidebar"/></svg><span></span></button>
|
||||
<nav class="topnav" aria-label="工作区"><button class="active" data-icon="grid" id="tasknav" onclick="setState(operationState)"><svg class="icon " aria-hidden="true"><use href="#icon-grid"/></svg><span>任务中心</span></button><button class="" data-icon="chat" id="ainav" onclick="setState('assistant')"><svg class="icon " aria-hidden="true"><use href="#icon-chat"/></svg><span>DSH 助手</span></button></nav><span class="spacer"></span><button class="quiet material-toggle" aria-pressed="false" onclick="toggleTransparency(this)">减少透明度</button><button class="quiet" data-icon="sliders" onclick="toast('设置:关闭时归档、布局与显示选项。')"><svg class="icon " aria-hidden="true"><use href="#icon-sliders"/></svg><span>设置</span></button></div></header>
|
||||
<div class="body"><aside class="sidebar"><div class="sidehead"><b>工程任务</b><button class="quiet icon-only" data-icon="plus" aria-label="新建任务" title="新建任务" onclick="toast('从目录选择工程并创建任务。')"><svg class="icon " aria-hidden="true"><use href="#icon-plus"/></svg><span></span></button></div><label class="searchfield"><svg class="icon " aria-hidden="true"><use href="#icon-search"/></svg><input id="tasksearch" placeholder="搜索工程" aria-label="搜索工程" oninput="filterTasks(this.value)"></label><div><div class="batchtitle"><span>当前批次 · 3 个工程</span><button class="" data-icon="sort" title="执行顺序" aria-label="执行顺序" onclick="toast('按真实执行顺序排列;搜索不改变执行范围。')"><svg class="icon " aria-hidden="true"><use href="#icon-sort"/></svg><span></span></button></div>
|
||||
<button class="task active" data-name="Audio_D2128" onclick="selectTask(this)"><svg class="icon " aria-hidden="true"><use href="#icon-project"/></svg><span><b>Audio_D2128</b><small><i class="dot green"></i><span id="taskStatus">待执行</span> · <span id="taskSelectionCount">1 个替换位号</span></small></span><span class="order">01</span></button>
|
||||
<button class="task" data-name="Audio_T605A" onclick="selectTask(this)"><svg class="icon " aria-hidden="true"><use href="#icon-project"/></svg><span><b>Audio_T605A</b><small><i class="dot"></i>待配置 · 计划未保存</small></span><span class="order">02</span></button>
|
||||
<button class="task" data-name="Power_B3100" onclick="selectTask(this)"><svg class="icon " aria-hidden="true"><use href="#icon-project"/></svg><span><b>Power_B3100</b><small><i class="dot"></i>待配置 · 尚未导入</small></span><span class="order">03</span></button>
|
||||
</div><div class="batchaction"><p>执行范围包含本批全部工程</p><button class="" data-icon="play" id="batchRun" onclick="toast('本批仍有 2 个未配置工程,请先完成配置。')"><svg class="icon " aria-hidden="true"><use href="#icon-play"/></svg><span>顺序执行本批 · 3</span></button></div><div class="sidebottom"><button class="quiet" data-icon="trash" onclick="toast('归档任务与恢复入口。')"><svg class="icon " aria-hidden="true"><use href="#icon-trash"/></svg><span>回收站</span></button><button class="quiet" data-icon="more" onclick="toast('编辑、调整执行顺序、删除任务。删除需确认。')"><svg class="icon " aria-hidden="true"><use href="#icon-more"/></svg><span>批次管理</span></button></div></aside>
|
||||
<main class="main" id="workmain"><div class="breadcrumb"><svg class="icon " aria-hidden="true"><use href="#icon-folder"/></svg><span>任务中心</span><svg class="icon " aria-hidden="true"><use href="#icon-chevron"/></svg><span>当前批次</span><svg class="icon " aria-hidden="true"><use href="#icon-chevron"/></svg><span>Audio_D2128</span></div>
|
||||
<div class="projectheader"><div class="projectart"><svg class="icon " aria-hidden="true"><use href="#icon-project"/></svg></div><div class="projectidentity"><div class="heading"><h1 id="projectName">Audio_D2128</h1><span class="badge" id="stateBadge">待执行</span></div><div class="path"><span class="mono" id="projectPath" title="D:\Projects\Audio_D2128\Audio_D2128.prj">D:\Projects\Audio_D2128\Audio_D2128.prj</span><button class="quiet icon-only" data-icon="copy" aria-label="复制工程路径" title="复制工程路径" onclick="toast('预览工程路径:D:\\Projects\\Audio_D2128\\Audio_D2128.prj')"><svg class="icon " aria-hidden="true"><use href="#icon-copy"/></svg><span></span></button></div></div><div class="projectmenu"><button class="quiet icon-only" data-icon="more" aria-label="工程更多操作" title="工程更多操作" onclick="document.getElementById('projectMenu').hidden=!document.getElementById('projectMenu').hidden"><svg class="icon " aria-hidden="true"><use href="#icon-more"/></svg><span></span></button><div id="projectMenu" hidden><button class="" data-icon="refresh" onclick="toast('预览:重新读取当前工程。')"><svg class="icon " aria-hidden="true"><use href="#icon-refresh"/></svg><span>重新读取工程</span></button><button class="" data-icon="log" onclick="toast('预览:查看轮次证据。')"><svg class="icon " aria-hidden="true"><use href="#icon-log"/></svg><span>查看轮次证据</span></button><button class="" data-icon="plus" onclick="toast('预览:保留旧证据,创建新一轮。')"><svg class="icon " aria-hidden="true"><use href="#icon-plus"/></svg><span>开始新一轮</span></button><button class="" data-icon="download" onclick="toast('预览:导出脱敏诊断包。')"><svg class="icon " aria-hidden="true"><use href="#icon-download"/></svg><span>导出诊断包</span></button></div></div></div>
|
||||
<div class="scopebar"><span><span class="key">当前工程</span><b>6</b> 个位号</span><span><span class="key">计划替换</span><b id="selectedCount">1</b></span><span><span class="key">保留</span><b id="retainedCount">5</b></span><span class="policy"><svg class="icon " aria-hidden="true"><use href="#icon-sliders"/></svg>Value:Part Label · 自定义优先<button class="quiet icon-only" data-icon="chevron" title="工程设置" aria-label="工程设置" onclick="secondaryAction()"><svg class="icon " aria-hidden="true"><use href="#icon-chevron"/></svg><span></span></button></span></div>
|
||||
<div class="workflow" aria-label="执行流程"><span class="flowstep current" data-step="plan"><i>1</i>配置计划</span><b></b><span class="flowstep" data-step="review"><i>2</i>核对范围</span><b></b><span class="flowstep" data-step="run"><i>3</i>替换与核验</span><span class="spacer"></span><span class="flow-caption">工程操作以保存核验结果为准</span></div><div class="tabs"><button class="active" data-icon="table" data-tab="plan" onclick="showTab('plan')"><svg class="icon " aria-hidden="true"><use href="#icon-table"/></svg><span>位号计划 <small>6</small></span></button><button class="" data-icon="rules" data-tab="rules" onclick="showTab('rules')"><svg class="icon " aria-hidden="true"><use href="#icon-rules"/></svg><span>本批料号规则 <small>1</small></span></button><button class="" data-icon="log" data-tab="results" onclick="showTab('results')"><svg class="icon " aria-hidden="true"><use href="#icon-log"/></svg><span>结果与日志</span></button><span class="spacer"></span><span class="save-state"><svg class="icon " aria-hidden="true"><use href="#icon-check-circle"/></svg><span id="saveStatus">计划已保存</span></span></div>
|
||||
<div id="notice" class="notice panelhidden"></div>
|
||||
<section class="workspace" id="planPanel"><div class="toolbar"><label class="searchfield"><svg class="icon " aria-hidden="true"><use href="#icon-search"/></svg><input id="rowsearch" placeholder="搜索位号、料号或图页" aria-label="查找位号" oninput="filterRows(this.value)"></label><span class="spacer"></span><button class="subtle" data-icon="download" onclick="toast('导出本批全部 3 个工程的 BOM 模板。')"><svg class="icon " aria-hidden="true"><use href="#icon-download"/></svg><span>BOM 模板</span></button><button class="" data-icon="upload" onclick="toast('本批 BOM 全部校验通过后显示预览,确认后保存。')"><svg class="icon " aria-hidden="true"><use href="#icon-upload"/></svg><span>导入 BOM</span></button><button class="" data-icon="scan" onclick="toast('按本批料号规则采集当前工程位号。')"><svg class="icon " aria-hidden="true"><use href="#icon-scan"/></svg><span>采集位号</span></button><span class="tooldivider"></span><button class="quiet icon-only" data-icon="columns" aria-label="表格列与批量操作" title="表格列与批量操作" onclick="toast('列设置、批量填写与选中行操作。')"><svg class="icon " aria-hidden="true"><use href="#icon-columns"/></svg><span></span></button></div>
|
||||
<div class="hint"><span>显示 <strong id="visibleCount">6</strong> 个位号</span><span>·</span><span id="selectionSummary" class="selection-count">替换 1 个,保留 5 个</span><span class="spacer"></span><svg class="icon " aria-hidden="true"><use href="#icon-info"/></svg><span>同步 NC 按行设置</span></div>
|
||||
<div class="tablewrap"><table><thead><tr><th>替换</th><th>位号</th><th>图页</th><th>旧料号</th><th>新料号</th><th>原 Value</th><th>自定义 Value</th><th>同步 NC</th><th aria-label="行详情"></th></tr></thead><tbody id="rows"></tbody></table><div class="empty panelhidden" id="empty">没有匹配位号</div></div><div class="tablefoot"><span>当前工程 · 6 个位号</span><button class="quiet" data-icon="columns" onclick="toast('预览:完整身份字段保留在行详情,可调整列。')"><svg class="icon " aria-hidden="true"><use href="#icon-columns"/></svg><span>列与批量操作</span></button></div></section>
|
||||
<section class="workspace panelhidden" id="rulesPanel"><div class="toolbar"><span style="font-size:12px;color:#7f8da0">本批共用规则</span><span class="spacer"></span><button class="" data-icon="plus" onclick="toast('预览:打开料号规则编辑器。')"><svg class="icon " aria-hidden="true"><use href="#icon-plus"/></svg><span>添加规则</span></button></div><div class="ruleshint">规则提供采集条件与默认值。执行以已保存的位号计划为准;修改规则保留逐行手动覆盖。</div><div class="tablewrap"><table><thead><tr><th>启用</th><th>旧料号</th><th>新料号</th><th>自定义 Value</th><th>同步 NC</th><th>目标封装</th></tr></thead><tbody><tr><td><svg class="icon muted" aria-hidden="true"><use href="#icon-check"/></svg></td><td class="mono">4100-CA0000-T7</td><td class="mono">4100-CA0000-T0</td><td>不写入</td><td>是</td><td>未指定</td></tr></tbody></table></div><div class="tablefoot">作用范围:本批 3 个工程。修改后需核对并保存各工程的位号计划。</div></section>
|
||||
<section class="workspace panelhidden" id="resultsPanel"><div class="resultview"><b>本轮尚无执行结果</b><p>执行后核对位号、实际回读料号和保存核验状态。<br>完整日志与轮次证据保留独立入口。</p><button class="" data-icon="log" onclick="toast('预览:完整日志按页加载。')"><svg class="icon " aria-hidden="true"><use href="#icon-log"/></svg><span>完整日志</span></button></div></section>
|
||||
<footer class="runarea"><span class="runicon"><svg class="icon " aria-hidden="true"><use href="#icon-check"/></svg></span><div class="runinfo"><b id="runTitle">当前工程待执行</b><small id="runDetail">替换 1 个,保留 5 个。</small><div class="progress panelhidden" id="progress"></div></div><button class="quiet" data-icon="log" onclick="showTab('results')"><svg class="icon " aria-hidden="true"><use href="#icon-log"/></svg><span>完整日志</span></button><button class="quiet" data-icon="sliders" id="secondary" onclick="secondaryAction()"><svg class="icon " aria-hidden="true"><use href="#icon-sliders"/></svg><span>计划设置</span></button><button class="" data-icon="save" id="saveButton" onclick="savePlan()"><svg class="icon " aria-hidden="true"><use href="#icon-save"/></svg><span>保存计划</span></button><button class="primary" data-icon="play" id="execute" onclick="primaryAction()"><svg class="icon " aria-hidden="true"><use href="#icon-play"/></svg><span>执行当前工程</span></button></footer>
|
||||
<aside id="rowInspector" class="inspector panelhidden" aria-label="位号详情"><header><svg class="icon " aria-hidden="true"><use href="#icon-info"/></svg><b>位号详情</b><button class="quiet icon-only" data-icon="close" aria-label="关闭详情" onclick="document.getElementById('rowInspector').classList.add('panelhidden')"><svg class="icon " aria-hidden="true"><use href="#icon-close"/></svg><span></span></button></header><h4>位号</h4><p id="detailRef" class="mono">RV05</p><h4>唯一标识 UID</h4><p id="detailUid" class="mono">demo-0</p><h4>原理图 / 图页</h4><p class="mono">MAIN / 1</p><div class="rule"></div><h4>旧料号</h4><p class="mono">4100-CA0000-T7</p><h4>新料号</h4><p class="mono">4100-CA0000-T0</p><h4>目标封装</h4><p>未指定 · 不主动覆写</p><footer>详情中的标识用于定位同名位号。实际执行以已保存的逐行计划为准。</footer></aside>
|
||||
</main>
|
||||
<main id="assistantmain" class="main assistantmain panelhidden"><section class="chat"><div class="chathead"><svg class="icon " aria-hidden="true"><use href="#icon-chat"/></svg><strong>DSH 助手</strong><small>会话范围:当前工程</small></div><span class="agentlabel"><svg class="icon " aria-hidden="true"><use href="#icon-project"/></svg>Audio_D2128</span><h2>计划检查记录</h2><p>读取来源:当前工程已保存的位号计划</p><div class="message user">检查当前工程的替换范围,不执行。</div><div class="message"><span class="agentlabel"><svg class="icon " aria-hidden="true"><use href="#icon-log"/></svg>DSH · 计划读取结果</span><p>当前页面计划:RV05;其余位号不替换。</p><div class="checkcard"><b><svg class="icon " aria-hidden="true"><use href="#icon-table"/></svg>当前计划摘要</b><div class="checkline"><span>替换范围</span><span>1 个替换 · 5 个保留</span></div><div class="checkline"><span class="mono">4100-CA0000-T7 → 4100-CA0000-T0</span><span>计划已保存</span></div><div class="checkline"><span>Part Label 写入 Value</span><span>开启 · 自定义优先</span></div><footer><svg class="icon " aria-hidden="true"><use href="#icon-info"/></svg>运行前 CAD 核验:未执行。工程写入:未执行。</footer></div></div><div class="chatinput"><input aria-label="发送给助手" placeholder="输入检查要求或任务指令…"><footer><svg class="icon " aria-hidden="true"><use href="#icon-project"/></svg><span>当前工程:Audio_D2128</span><span>· 读取计划</span><button class="primary" data-icon="arrow-up" aria-label="发送" title="发送" onclick="toast('预览未连接模型,指令未发送。')"><svg class="icon " aria-hidden="true"><use href="#icon-arrow-up"/></svg><span></span></button></footer></div><small class="chatdisclaimer">助手回复不作为保存核验结果,工程写入仍需确认执行范围。</small></section>
|
||||
<aside class="context"><h3><svg class="icon " aria-hidden="true"><use href="#icon-sidebar"/></svg>任务上下文</h3><div class="section"><small>当前工程</small><b>Audio_D2128</b><div class="mono">D:\Projects\Audio_D2128\Audio_D2128.prj</div><span class="badge">待执行</span></div><div class="section"><small>当前计划</small><b>替换 1 个 / 保留 5 个</b><br><span class="muted">Value:Part Label<br>同步 NC:按行配置</span></div><div class="section"><small>本次助手权限</small><b>读取计划</b><br><span class="muted">尚未执行工程写入</span><button class="" data-icon="table" onclick="setState(operationState)"><svg class="icon " aria-hidden="true"><use href="#icon-table"/></svg><span>返回位号计划</span></button></div></aside></main>
|
||||
</div></div><div id="toast" class="toast panelhidden" role="status"></div><dialog id="executionReview" class="review-dialog" aria-labelledby="reviewTitle"><header class="dialog-header"><span class="dialog-symbol"><svg class="icon"><use href="#icon-scan"/></svg></span><div><h2 id="reviewTitle">核对执行范围</h2><p>演示流程 · 不会修改工程文件</p></div><button class="quiet icon-only" aria-label="关闭执行确认" onclick="closeReview()"><svg class="icon"><use href="#icon-close"/></svg></button></header><section class="dialog-content"><div class="scope-switch" aria-label="执行范围"><button id="scopeCurrent" class="active" onclick="chooseScope('current')">当前工程</button><button id="scopeBatch" onclick="chooseScope('batch')">本批工程 · 3</button></div><div class="review-project"><svg class="icon"><use href="#icon-project"/></svg><span><b id="reviewProject">Audio_D2128</b><small id="reviewPath">D:\Projects\Audio_D2128\Audio_D2128.prj</small></span><span id="reviewPlanState">计划已保存</span></div><div class="review-items"><table><thead><tr><th>位号</th><th>旧料号</th><th>新料号</th><th>同步 NC</th></tr></thead><tbody id="reviewRows"></tbody></table></div><div class="review-totals"><span>工程<b id="reviewProjectCount">1</b></span><span>替换<b id="reviewReplaceCount">1</b></span><span>保留<b id="reviewKeepCount">5</b></span></div><div class="review-policy"><svg class="icon"><use href="#icon-info"/></svg><span id="reviewPolicy">执行后依次保存工程、重新打开并回读核验。显示过滤不改变执行范围。</span></div><div id="reviewError" class="review-error panelhidden"></div></section><footer class="dialog-footer"><button class="quiet" onclick="closeReview()">返回计划</button><button id="confirmExecution" class="primary" onclick="confirmExecution()"><svg class="icon"><use href="#icon-play"/></svg><span>确认演示执行</span></button></footer></dialog><script>
|
||||
let state='ready',operationState='ready',dirty=false,toastTimer;
|
||||
let runPhase=1,pauseRequested=false,reviewScope='current',reviewSnapshot='',reviewRecovery=false,completedRefs=[];
|
||||
const refs=['RV05','RV11','C103','C104','C105','C106'];
|
||||
const phaseNames=['准备环境','替换位号','保存工程','重新打开并回读核验'];
|
||||
const rowsElement=document.getElementById('rows');
|
||||
function svgIcon(name){return '<svg class="icon" aria-hidden="true"><use href="#icon-'+name+'"/></svg>'}
|
||||
rowsElement.innerHTML=refs.map((ref,i)=>`<tr class="${i===0?'chosen':''}"><td><input type="checkbox" ${i===0?'checked':''} aria-label="替换 ${ref}" onchange="markDirty(this)"></td><td class="ref mono">${ref}</td><td><span class="tag">MAIN / 1</span></td><td class="mono">4100-CA0000-T7</td><td class="mono new">4100-CA0000-T0</td><td class="mono">100nF / 50V</td><td class="muted">—</td><td><input type="checkbox" checked aria-label="${ref} 同步 NC" onchange="markDirty(this)"></td><td><button class="row-detail" aria-label="${ref} 位号详情" onclick="openRowDetail(${i})">${svgIcon('info')}</button></td></tr>`).join('');
|
||||
function currentPlan(){return [...rowsElement.rows].map((tr,i)=>({ref:refs[i],enabled:tr.querySelectorAll('input')[0].checked,nc:tr.querySelectorAll('input')[1].checked}))}
|
||||
let savedPlan=JSON.stringify(currentPlan());
|
||||
function selectedRows(){return currentPlan().filter(row=>row.enabled)}
|
||||
function countSelected(){return selectedRows().length}
|
||||
function isLocked(){return operationState!=='ready'}
|
||||
function toast(message){const box=document.getElementById('toast');box.textContent=message;box.classList.remove('panelhidden');clearTimeout(toastTimer);toastTimer=setTimeout(()=>box.classList.add('panelhidden'),3500)}
|
||||
function labelButton(id,label,icon){const button=document.getElementById(id);button.innerHTML=svgIcon(icon)+'<span>'+label+'</span>';button.dataset.icon=icon}
|
||||
function updateCounts(){const n=countSelected();document.getElementById('selectedCount').textContent=n;document.getElementById('retainedCount').textContent=6-n;document.getElementById('selectionSummary').textContent='替换 '+n+' 个,保留 '+(6-n)+' 个';document.getElementById('taskSelectionCount').textContent=n+' 个替换位号';return n}
|
||||
function markDirty(box){if(isLocked())return;box.closest('tr').classList.toggle('chosen',box.closest('tr').querySelector('input').checked);dirty=JSON.stringify(currentPlan())!==savedPlan;refreshStatus()}
|
||||
function savePlan(){if(isLocked()||!dirty)return;dirty=false;savedPlan=JSON.stringify(currentPlan());refreshStatus();toast('演示计划已保存至当前页面,未写入工程或数据库。')}
|
||||
function showTab(tab){document.querySelectorAll('[data-tab]').forEach(b=>b.classList.toggle('active',b.dataset.tab===tab));['plan','rules','results'].forEach(t=>document.getElementById(t+'Panel').classList.toggle('panelhidden',t!==tab))}
|
||||
function filterTasks(query){document.querySelectorAll('.task').forEach(e=>e.classList.toggle('panelhidden',!e.dataset.name.toLowerCase().includes(query.toLowerCase())))}
|
||||
function filterRows(query){let count=0;[...rowsElement.rows].forEach(row=>{const match=row.textContent.toLowerCase().includes(query.toLowerCase());row.classList.toggle('panelhidden',!match);if(match)count++});document.getElementById('visibleCount').textContent=count;document.getElementById('empty').classList.toggle('panelhidden',count!==0)}
|
||||
function selectTask(button){if(!button.classList.contains('active'))toast('预览聚焦 Audio_D2128;其他工程仅展示状态。')}
|
||||
function toggleTransparency(button){const reduced=document.body.classList.toggle('reduced-transparency');button.setAttribute('aria-pressed',String(reduced));button.textContent=reduced?'恢复透明效果':'减少透明度'}
|
||||
function openRowDetail(index){document.getElementById('detailRef').textContent=refs[index];document.getElementById('detailUid').textContent='demo-'+index;document.getElementById('rowInspector').classList.remove('panelhidden')}
|
||||
function setState(next){closeReview();document.getElementById('rowInspector').classList.add('panelhidden');document.getElementById('projectMenu').hidden=true;
|
||||
if(next!=='assistant'){operationState=next;if(next==='running'){runPhase=1;pauseRequested=false}if(next==='ready'){pauseRequested=false;completedRefs=[]}state=next;}else state='assistant';
|
||||
const assistant=state==='assistant';document.getElementById('workmain').classList.toggle('panelhidden',assistant);document.getElementById('assistantmain').classList.toggle('panelhidden',!assistant);document.getElementById('tasknav').classList.toggle('active',!assistant);document.getElementById('ainav').classList.toggle('active',assistant);document.querySelectorAll('[data-state]').forEach(b=>b.classList.toggle('active',b.dataset.state===state));showTab('plan');refreshStatus();
|
||||
}
|
||||
function refreshStatus(){const n=updateCounts(),locked=isLocked(),running=operationState==='running',recover=operationState==='recovery',paused=operationState==='paused',complete=operationState==='completed';
|
||||
document.querySelectorAll('#rows input,#planPanel .toolbar button').forEach(e=>e.disabled=locked);document.getElementById('batchRun').disabled=locked;
|
||||
document.getElementById('saveButton').classList.toggle('panelhidden',locked);document.getElementById('saveButton').disabled=!dirty;
|
||||
const status=recover?'需核验':running?'执行中':paused?'已暂停':complete?'演示已核验':dirty?'未保存':n?'待执行':'未配置';
|
||||
['stateBadge'].forEach(id=>{const badge=document.getElementById(id);badge.className='badge'+(recover?' error':running||paused?' warning':'');badge.innerHTML=svgIcon(recover?'warning':complete?'check-circle':'clock')+'<span>'+status+'</span>'});
|
||||
document.getElementById('taskStatus').textContent=status;document.querySelector('.task.active .dot').style.background=recover?'var(--red)':running||paused?'#ad956c':'#8aa094';const contextBadge=document.querySelector('.context .badge');contextBadge.textContent=status;contextBadge.className='badge'+(recover?' error':running||paused?' warning':'');
|
||||
document.getElementById('saveStatus').textContent=dirty?'计划未保存':'计划已保存';document.getElementById('saveStatus').style.color=dirty?'#ac9169':'#a0acb9';document.querySelector('.save-state use').setAttribute('href',dirty?'#icon-clock':'#icon-check-circle');
|
||||
labelButton('execute',recover?'核验并恢复':running?(pauseRequested?'已请求安全暂停':'完成当前项后暂停'):paused?'查看本轮记录':complete?'查看核验结果':'核对执行范围',recover?'refresh':running?'pause':paused||complete?'log':'play');document.getElementById('execute').disabled=running&&pauseRequested||!locked&&(dirty||n===0);
|
||||
labelButton('secondary',recover?'导出诊断包':running?'异常操作':paused||complete?'轮次证据':'计划设置',recover?'download':running?'warning':paused||complete?'folder':'sliders');
|
||||
let title=recover?'工程状态待核验':running?phaseNames[runPhase]+(pauseRequested?' · 暂停已请求':''):paused?'当前项已核验,演示已安全暂停':complete?'演示完成 · 已保存并核验':dirty?'位号计划有未保存修改':n?'计划已保存,等待核对':'没有待替换位号';
|
||||
document.getElementById('runTitle').textContent=title;document.getElementById('runDetail').textContent=recover?'上次保存或核验未确认,禁止直接重复替换。':running?'演示阶段 '+(runPhase+1)+' / 4 · 未调用 CAD,未修改工程':paused||complete?'演示结果仅来自页面状态,不代表真实 CAD 核验。':dirty?'先保存修改,再核对完整执行范围。':'Audio_D2128 · 替换 '+n+' 个,保留 '+(6-n)+' 个';
|
||||
const icon=document.querySelector('.runicon');icon.innerHTML=svgIcon(recover?'warning':running?'clock':complete?'check-circle':'check');icon.style.color=recover?'#a8786b':running?'#8b9eb8':'#8ea69a';
|
||||
const notice=document.getElementById('notice');notice.classList.toggle('panelhidden',!recover);notice.innerHTML=svgIcon('warning')+'<span>保存或回读核验尚未确认。当前工程已锁定,请先核验并恢复。</span>';
|
||||
document.getElementById('advanceDemo').classList.toggle('panelhidden',!running);
|
||||
document.querySelectorAll('.flowstep').forEach(el=>{let active=running||recover||paused||complete?'run':'plan';el.classList.toggle('current',el.dataset.step===active);el.classList.toggle('done',active==='run'&&el.dataset.step!=='run')});
|
||||
document.querySelectorAll('.checkline')[0].lastElementChild.textContent=n+' 个替换 · '+(6-n)+' 个保留';document.querySelectorAll('.checkline')[1].lastElementChild.textContent=dirty?'未保存':'计划已保存';document.querySelector('.context .section:nth-of-type(2) b').textContent='替换 '+n+' 个 / 保留 '+(6-n)+' 个';document.querySelector('.chat .message:not(.user)>p').textContent=dirty?'计划存在未保存修改,请先保存后检查。':'当前页面计划:'+(n?selectedRows().map(x=>x.ref).join('、'):'无待替换位号')+';其余位号不替换。';
|
||||
}
|
||||
function decorateControls(){refreshStatus()}
|
||||
function primaryAction(){if(operationState==='running'){pauseRequested=true;refreshStatus();toast('已请求暂停。当前项仍将完成保存与回读核验,之后才停止。');return}if(operationState==='completed'||operationState==='paused'){showResults();return}openReview(operationState==='recovery')}
|
||||
function secondaryAction(){toast(operationState==='running'?'异常操作:导出诊断包、资源检查、强制结束。强制结束须确认,之后必须核验。':operationState==='recovery'?'预览:导出脱敏诊断包,保留中断证据。':operationState==='completed'||operationState==='paused'?'预览:本轮证据与完整日志。':'当前工程:Part Label 写入 Value;自定义优先,NC 按行设置。')}
|
||||
function openReview(recovery=false){if(!recovery&&(isLocked()||dirty||countSelected()===0))return;reviewRecovery=recovery;reviewScope='current';reviewSnapshot=JSON.stringify(currentPlan());document.getElementById('reviewTitle').textContent=recovery?'核验中断状态':'核对执行范围';document.querySelector('.scope-switch').classList.toggle('panelhidden',recovery);document.getElementById('reviewPolicy').textContent=recovery?'先回读工程并核对实际结果,确认后再决定恢复或重试。本演示不会调用 CAD。':'替换后依次保存、重新打开并回读核验。搜索与过滤不改变本次执行范围。';chooseScope('current');document.getElementById('executionReview').showModal();document.querySelectorAll('.flowstep').forEach(el=>el.classList.toggle('current',el.dataset.step==='review'))}
|
||||
function chooseScope(scope){reviewScope=scope;const batch=scope==='batch',selected=selectedRows();document.getElementById('scopeCurrent').classList.toggle('active',!batch);document.getElementById('scopeBatch').classList.toggle('active',batch);document.getElementById('reviewProject').textContent=batch?'当前批次 · 3 个工程':'Audio_D2128';document.getElementById('reviewPath').textContent=batch?'Audio_D2128 / Audio_T605A / Power_B3100':'D:\\Projects\\Audio_D2128\\Audio_D2128.prj';document.getElementById('reviewPlanState').textContent=batch?'2 个工程未就绪':'计划已保存';document.getElementById('reviewProjectCount').textContent=batch?'3':'1';document.getElementById('reviewReplaceCount').textContent=batch?'待核对':selected.length;document.getElementById('reviewKeepCount').textContent=batch?'待核对':6-selected.length;document.getElementById('reviewRows').innerHTML=selected.map(row=>'<tr><td class="mono">'+row.ref+'</td><td class="mono">4100-CA0000-T7</td><td class="mono">4100-CA0000-T0</td><td>'+ (row.nc?'是':'否')+'</td></tr>').join('');const error=document.getElementById('reviewError');error.classList.toggle('panelhidden',!batch);error.textContent=batch?'Audio_T605A 的计划未保存;Power_B3100 尚未配置。本批不能执行,请先完成全部工程的配置。':'';document.getElementById('confirmExecution').disabled=batch;labelButton('confirmExecution',reviewRecovery?'开始演示核验':'确认演示执行 · '+selected.length+' 项',reviewRecovery?'refresh':'play')}
|
||||
function closeReview(){const dialog=document.getElementById('executionReview');if(dialog&&dialog.open)dialog.close()}
|
||||
function confirmExecution(){if(reviewScope!=='current'||document.getElementById('confirmExecution').disabled)return;if(!reviewRecovery&&(dirty||isLocked()||reviewSnapshot!==JSON.stringify(currentPlan()))){document.getElementById('reviewError').textContent='计划已变化,请返回重新保存并核对。';document.getElementById('reviewError').classList.remove('panelhidden');document.getElementById('confirmExecution').disabled=true;return}const recovery=reviewRecovery;closeReview();setState('running');runPhase=recovery?3:0;refreshStatus()}
|
||||
function advanceDemo(){if(operationState!=='running')return;if(runPhase<3){runPhase++;refreshStatus();return}completedRefs=selectedRows().map(row=>row.ref);operationState=pauseRequested?'paused':'completed';state=operationState;refreshStatus();showResults()}
|
||||
function showResults(){showTab('results');const names=completedRefs.length?completedRefs:selectedRows().map(row=>row.ref);document.getElementById('resultsPanel').innerHTML='<div class="toolbar"><span style="font-size:12px;color:#8a9cb5">本轮演示记录</span><span class="spacer"></span><span class="badge">页面模拟 · 未调用 CAD</span></div><div class="tablewrap"><table><thead><tr><th>位号</th><th>计划新料号</th><th>核验状态</th></tr></thead><tbody>'+names.map(ref=>'<tr><td class="mono">'+ref+'</td><td class="mono">4100-CA0000-T0</td><td>演示:已保存并核验</td></tr>').join('')+'</tbody></table></div><div class="tablefoot">实际执行时,状态和回读料号必须来自 CAD 后端核验结果。</div>'}
|
||||
document.getElementById('batchRun').onclick=()=>{if(isLocked())return;openReview();if(document.getElementById('executionReview').open)chooseScope('batch')};
|
||||
document.getElementById('executionReview').addEventListener('close',()=>{if(operationState==='ready')document.querySelectorAll('.flowstep').forEach(el=>el.classList.toggle('current',el.dataset.step==='plan'))});
|
||||
document.addEventListener('keydown',event=>{if(event.key==='Escape'){document.getElementById('rowInspector').classList.add('panelhidden');document.getElementById('projectMenu').hidden=true}});
|
||||
setState(new URLSearchParams(location.search).get('state')||'ready');
|
||||
|
||||
</script></html>
|
||||
@@ -0,0 +1,60 @@
|
||||
# R4:透明玻璃材质与执行流程
|
||||
|
||||
> 正式界面现已继续完成 [按钮、布局与右侧磨砂补全](layout-refinement.md),当前截图与验收数值以该记录为准。
|
||||
|
||||
> 当前毛玻璃实现结论已更新为 R5,见 [8 个 GitHub 项目调研与原生实测](github-material-research.md)。下文保留 R4 及更早的布局探索,不作为原生材质已落地的证明。
|
||||
|
||||
2026-10-30。按用户反馈,将 R3 的系统蓝界面调整为低饱和银灰玻璃材质,并重做执行交互。本文件为当前方案说明,替代之前 R1–R3 的视觉参数与执行预览说明。
|
||||
|
||||
## 材质规范
|
||||
|
||||
| 层级 | 规则 | 应用 |
|
||||
| --- | --- | --- |
|
||||
| 背景 | 低饱和银灰、蓝灰和极轻暖灰色偏;提供透射参照,不使用艳色光斑。 | 应用画布 |
|
||||
| 导航材质 | 白色半透明表面约 32%–62%,24–32px 背景模糊,轻微饱和度提升,细白边缘。 | 顶栏、任务侧栏、分段导航 |
|
||||
| 内容材质 | 主区以高不透明度白色隔离背景;表格接近实白,避免料号受背景干扰。 | 工程标题、规则和位号数据 |
|
||||
| 浮动材质 | 约 45%–85% 白色表面,28–36px 模糊,内侧高光与低强度柔和投影。 | 底部执行栏、位号详情 |
|
||||
| 确认材质 | 近白的清晰玻璃,42px 模糊,较深而宽的投影;背景遮罩轻度模糊,集中注意力。 | 核对执行范围面板 |
|
||||
| 操作色 | 主动作使用石墨蓝灰渐变,不再采用大块高饱和蓝色。状态用文字、图标和浅色底共同表达。 | 执行、恢复、保存、运行状态 |
|
||||
| 图标 | 保留 32 个原创 SVG,20×20 坐标,1.6 单位线宽,继承前景色。 | 导航、表格、工具栏与状态 |
|
||||
|
||||
透明度作用于面板背景,不能对整组控件设置透明度,以免文字一起变淡。玻璃主要承载导航和浮层,不应让每一行数据都参与复杂背景合成。
|
||||
|
||||
提供“减少透明度”切换;不支持背景模糊时回退到实色。减少动态效果的系统偏好也有对应处理。此方案借鉴 Apple 玻璃材质的层次原则,是 Windows 工程工具的原创原型,不声称实现了 Apple 原生 Liquid Glass 渲染器。
|
||||
|
||||
## 执行流程
|
||||
|
||||
1. **配置计划**:修改勾选后显示未保存,必须先保存;没有待替换项时禁用执行。
|
||||
2. **核对范围**:主动作改为“核对执行范围”。面板列明工程、完整已选位号、旧新料号、同步 NC 与数量。搜索隐藏的已选项仍会纳入。
|
||||
3. **检查批次**:当前工程 / 本批工程作用范围明确。本批有未保存或未配置工程时阻止确认,并指出具体工程,不能偷偷改为部分执行。
|
||||
4. **确认执行**:确认时重新比对计划快照;计划变化使确认失效,要求返回重新保存核对。取消或 Escape 关闭不会进入执行态。
|
||||
5. **阶段显示**:准备环境 → 替换位号 → 保存工程 → 重新打开并回读核验。展示阶段而不是装饰性的百分比。
|
||||
6. **安全暂停**:按钮表达“完成当前项后暂停”;请求后仍保持运行,直至当前项保存并回读核验完成后再显示已暂停。
|
||||
7. **完成 / 恢复**:保存结束不直接表示成功。只有演示核验阶段完成才显示演示完成;不确定状态先核验恢复,不能直接重复替换。
|
||||
|
||||
预览中点击确认后,使用最上方“演示下一阶段”按钮手动推进,清楚区分交互模拟与真实工程执行。各项结果明确标记“演示 / 页面模拟”,没有调用 CAD,也没有写入真实任务数据库。
|
||||
|
||||
## 当前交付
|
||||
|
||||
- [交互预览](preview.html):玻璃材质、范围确认、批次拦截、手动阶段推进、安全暂停、恢复和结果视图。
|
||||
- [SVG 图标总览](icon-sheet.svg) 与 [独立 SVG 说明](icons/README.md)。
|
||||
- [Qt WebEngine 的 26 项交互检查](preview-verification.json)。
|
||||
- [Chrome 的 14 项浏览器复核](browser-verification.json)。
|
||||
|
||||
检查覆盖图标引用、四种状态、行详情、范围确认、批次未就绪、过滤不改变执行范围、未保存拦截、快照变化、阶段顺序、安全暂停、待核验锁、减少透明度及 980×700 布局。
|
||||
|
||||
Qt 离屏模式的截图在启用多层背景模糊后出现了合成延迟,DOM 检查通过但画面可能落后或为空白。最终 PNG 改由本机 Chrome 的截图接口等待合成后生成,已人工检查主界面与范围确认面板。交付截图是浏览器渲染结果,不是正式 Qt 应用截图。
|
||||
|
||||
## 正式实施边界
|
||||
|
||||
正式 PySide6 UI 尚未替换。执行服务、后端状态机和 CAD 逻辑没有改动;以上是交互方案和可操作的页面模拟,不能据此声称生产流程已通过验收。
|
||||
|
||||
原生实现时,Windows 的真实背景模糊应验证 DWM / 平台合成方案及版本支持,不能只把 CSS 的 backdrop-filter 翻译成 QSS,也不能用全窗口透明度代替。没有可靠合成能力时使用实色材质,优先保证读数与输入响应。
|
||||
|
||||
正式执行阶段必须来自服务端事件和 CAD 实际保存回读结果。UID 绑定、跨工程草稿、BOM 全量校验、真实批次范围、暂停与强制结束确认、证据和恢复门禁继续使用现有机制。DSH 官方嵌入前端的主题扩展仍需单独验证。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
After Width: | Height: | Size: 295 KiB |
|
After Width: | Height: | Size: 332 KiB |
|
After Width: | Height: | Size: 215 KiB |
|
After Width: | Height: | Size: 237 KiB |
|
After Width: | Height: | Size: 366 KiB |
|
After Width: | Height: | Size: 268 KiB |
|
After Width: | Height: | Size: 274 KiB |
|
After Width: | Height: | Size: 334 KiB |
|
After Width: | Height: | Size: 268 KiB |
|
After Width: | Height: | Size: 122 KiB |
@@ -0,0 +1,123 @@
|
||||
# 当前 UI 审查与设计建议
|
||||
|
||||
> 当前毛玻璃实现结论已更新为 R5,见 [8 个 GitHub 项目调研与原生实测](github-material-research.md)。下文保留 R4 及更早的布局探索,不作为原生材质已落地的证明。
|
||||
|
||||
> 当前方案已按反馈修订为 R4:透明玻璃材质与执行流程,详见 [当前修订说明](production-refinement.md)。本文件保留初版审查依据和开源参考;视觉参数、执行交互与验证数量以 R4 为准,下方预览图已更新。
|
||||
|
||||
日期:2026-10-30。工作分支:`codex/ui-update`,创建自 `codex/dsh` 的 `be382a1`。
|
||||
|
||||
本轮交付为代码与真实窗口审查、开源参考调研、可交互概念预览。未修改正式应用 UI 或 CAD 执行逻辑。预览使用示例工程和料号,不连接真实任务、模型或 CAD。
|
||||
|
||||
## 建议采用的方向
|
||||
|
||||
采用“暖色工程工作台”:Claude 风格的暖白、陶土色强调、克制的边框与留白,加上工程表格所需的紧凑布局、明确作用范围和可追溯状态。这是对用户所述审美的设计解释,并非 Claude 官方视觉规范。
|
||||
|
||||
当前问题主要在信息结构和操作层级,单改配色收益有限。先让用户一眼确认“哪个工程、改哪些位号、计划是否保存、现在能做什么”,再精修颜色和组件。
|
||||
|
||||
## 当前窗口证据
|
||||
|
||||
截图从现有 `TrialTaskCenterWindow` 实例采集,窗口客户区为 1440 × 900。使用临时数据库和模拟工程目录;位号表的六行是直接填入视图的示例数据,未作为真实计划持久化。因此底部执行统计与示例表行不一致属于采集夹具的限制,**不作为产品缺陷报告**。没有启动 CAD,也没有读取用户工程。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 按影响排序的发现
|
||||
|
||||
以下 P1/P2 为设计改进优先级,不表示已证明存在运行错误。
|
||||
|
||||
| 优先级 | 观察与证据 | 建议 | 预期改善 |
|
||||
| --- | --- | --- | --- |
|
||||
| P1 | 工程名称、路径和状态放在表格下面。`main_window.py` 的 `_build_layout()` 先放 `mapping_tabs`,再在下半区放 `project_summary`。 | 将当前工程名称、状态、可复制完整路径置于主区顶部。 | 核对工程无需上下寻找,减少多工程操作中的范围混淆。 |
|
||||
| P1 | 当前导航两项等分整条顶部宽度,缺少稳定的产品身份和页面锚点。两个导航按钮使用 Expanding。 | 增加紧凑品牌区,两个局部导航靠左;激活状态采用下划线与字重。 | 导航、任务和操作区域各有明确层级。 |
|
||||
| P1 | 左侧默认约 240px;任务使用“序号 + 名称 + 换行状态”的同一列表项,长名称被截断。截图可见 `Audio_D2128/Audio_D21…`。 | 定制绘制任务项:工程名、文字状态、批次顺序分层;路径放 tooltip/详情;完整任务标题仍可查询。 | 保留身份信息与状态,避免只见长名称前半截。 |
|
||||
| P1 | `RunPanel` 在同一横排定义执行、重试、恢复、资源清理、诊断、新一轮、历史、暂停、强制结束,再加日志、布局按钮。现有门禁会隐藏部分按钮,并非所有按钮始终同时出现。 | 把执行区改为状态驱动:常驻状态摘要和 1 个主动作;按状态提供辅助动作;低频维护操作放明确命名的菜单。 | 缩短决策路径,保护小窗口空间。 |
|
||||
| P1 | 本批料号规则、当前工程的位号数据、当前工程执行和本批执行共同出现;教程明确说明批次执行不受搜索影响。 | 料号规则保留“本批”标签;位号表始终标记“当前工程”;两个执行入口写出范围和数量;确认框列明真实任务清单。 | 视觉与实际作用范围一致,不能把筛选结果误解为执行清单。 |
|
||||
| P2 | Value 策略与“关闭时归档清空列表”两个长复选框位于主编辑区最上方。 | Value 保留短摘要和工程设置入口;关闭归档移到应用设置,并保留原来默认关闭及安全任务筛选语义。 | 主工作区优先显示当前工程与位号。 |
|
||||
| P2 | 搜索由输入框、查找、下一条、清空四个常驻控件组成;左侧还有搜索、排序、回收站与多行管理按钮。 | 保留回车搜索/下一条能力,提供清空图标;低频管理进入菜单。右侧批量编辑仅在选中行时展开。 | 保留能力,同时减少工具条密度。 |
|
||||
| P2 | 表头、列表、输入框、按钮普遍有较强蓝灰边框;大面积区域字体统一为 13px,层级较弱。 | 使用一套颜色与字号 token;靠字重、间距和分隔线划分区域;将强色集中于主动作、编辑变化与状态。 | 视觉更安静,状态更容易扫读。 |
|
||||
| P2 | `target_table.py` 默认十列,料号、Value、图页和多个复选列并列;实际窗口可能出现长编码换行。 | 料号、位号使用等宽字体且不折行;支持列宽持久化与横向滚动;原理图/UID/封装提供详情入口。完整身份字段不能从数据模型中删除。 | 长编码便于比对,保留工程身份与排错能力。 |
|
||||
|
||||
## 检索到的开源参考
|
||||
|
||||
使用 GitHub 搜索 API 查找 Qt Fluent、桌面数据库工具、AppFlowy 等方向,再获取以下仓库元数据和 README 核对描述、界面示例入口与许可说明。检索日期为 2026-10-30。下表为参考模式的建议,不是对这些项目的现场可用性测试。
|
||||
|
||||
| 项目与来源 | 可借鉴的部分 | 与本项目的关系 |
|
||||
| --- | --- | --- |
|
||||
| [PyQt-Fluent-Widgets](https://github.com/zhiyiYo/PyQt-Fluent-Widgets) · [官方组件文档](https://qfluentwidgets.com/) | 桌面导航、任务卡片、状态反馈、组件一致性。 | 与现有 PySide6 最接近,可研究 QSS、delegate 和控件层次的落地方式。仓库说明为 GPLv3 / 商业许可;本轮未引入其依赖或代码。 |
|
||||
| [Beekeeper Studio](https://github.com/beekeeper-studio/beekeeper-studio) | 侧栏定位对象、主区承载密集表格、标签区分工作上下文。 | 重点参考“数据工作台”而非普通宣传页。README 区分 GPLv3 社区代码与商业功能。 |
|
||||
| [AppFlowy](https://github.com/AppFlowy-IO/AppFlowy) | 工作空间侧栏、页面标题层级、任务/数据库视图,以及 AI 与项目上下文的结合。 | 借鉴工作台信息结构;Flutter 组件不直接适用于 Qt。AGPLv3。 |
|
||||
| [shadcn/ui](https://github.com/shadcn-ui/ui) · [Data Table](https://ui.shadcn.com/docs/components/data-table) | 工具条、数据表、徽标、菜单、对话框的主次关系与组件细节。 | 是网页组件参考,不作为把 PySide6 重写为 React 的理由。MIT。 |
|
||||
|
||||
## 三种可选路线
|
||||
|
||||
| 路线 | 设计与改动 | 优势 | 代价 / 局限 |
|
||||
| --- | --- | --- | --- |
|
||||
| **A · 暖色工程工作台(推荐,已做预览)** | 暖白与陶土色;重排工程标题、侧栏、表格和状态执行区;继续使用 PySide6。 | 符合所需审美,能直接解决身份与范围层级问题,业务流程保持可追溯。 | 需要调整 widget 布局、任务绘制和若干菜单,不能只换一份 QSS。 |
|
||||
| B · Windows Fluent 原生感 | 中性色、蓝色强调、原生导航和命令区;可先自行实现。 | 熟悉、适合 Windows 工程工具,与当前风格距离较小。 | Claude 式暖感较弱;若采用第三方 Fluent 控件,需要额外依赖与许可评估。 |
|
||||
| C · AI 优先的双栏工作台 | 助手与任务表长期并排,并强化对话中的计划确认卡。 | 对自然语言建任务、诊断异常更直接。 | 小窗口表格宽度不足;依赖官方 DSH 前端扩展能力,改造范围最大。 |
|
||||
|
||||
推荐先实施 A;DSH 保持独立导航页,按需展示上下文。无需因为 UI 参考来自 Web 就替换现有桌面框架。
|
||||
|
||||
## 可交互预览
|
||||
|
||||
打开同目录 [preview.html](preview.html)。顶部浅色栏可切换四种状态;还可切换规则/位号/结果标签、过滤位号、过滤任务、修改勾选观察保存与执行门禁。
|
||||
|
||||
这是一份设计原型。菜单展示提示,不执行业务;勾选修改后的计数仍为初始示例值,界面提示说明这一点;保存会恢复初始样例。它不替代真实状态机与 UI 回归测试。
|
||||
|
||||
### 准备执行
|
||||
|
||||

|
||||
|
||||
顶部先展示工程身份与数量,主区集中处理位号,底部只保留相关动作。保留 BOM 模板、导入、采集与保存的入口,说明按工程执行与按批次执行的差别。
|
||||
|
||||
### 执行中
|
||||
|
||||

|
||||
|
||||
编辑和批次启动锁定;底部显示当前位号与实际阶段,主动作变成“完成当前项后暂停”。示意进度条不代表真实运行比例,也不推断已保存成功。正式实现应只展示后端能够确认的阶段与计数。
|
||||
|
||||
### 待核验
|
||||
|
||||

|
||||
|
||||
顶部状态和警告文字共同表达“未确认”,编辑保持锁定,主动作明确指向“核验并恢复”,旁边保留诊断包。强制结束放在运行态的“诊断与异常操作”菜单里,仍需原有确认和恢复门禁。
|
||||
|
||||
### DSH 助手
|
||||
|
||||

|
||||
|
||||
保持任务侧栏,用右侧上下文解释“当前哪个工程、计划是什么、本次是否授权写入”。聊天区把计划摘要与实际执行结果区分开,避免模型文字等同于已核验事实。
|
||||
|
||||
**实现边界:** 当前 DSH 是 `NativeHarnessView` 嵌入的官方 Harness Web 前端,并不是本项目自有聊天页面。此图为期望的交互与视觉方向,未验证官方前端具备相应主题、卡片或侧栏扩展点。近期可以先统一 Qt 外壳与加载/错误态;聊天区深度改造应先验证官方扩展能力和升级兼容性,不能把效果图当作现成实现。
|
||||
|
||||
## 建议的视觉规格
|
||||
|
||||
| 项目 | 建议 |
|
||||
| --- | --- |
|
||||
| 页面 / 侧栏 / 内容面 | `#FAF9F6` / `#F0EEE7` / `#FFFEFA` |
|
||||
| 主文字 / 次文字 / 分隔线 | `#302F2A` / `#747169` / `#E4E1D8` |
|
||||
| 主动作 / 选中浅底 | `#A74E34` / `#F1E4DA` |
|
||||
| 成功 / 警告 / 错误文字 | `#426648` / `#805916` / `#9C3D35`;始终配合文字或符号表达状态 |
|
||||
| 字体 | 中文使用微软雅黑 UI 等系统无衬线;料号、位号使用 Consolas;只在助手引导标题考虑衬线感 |
|
||||
| 尺寸 | 正文 13–14px,主标题 24–26px,默认表格行高 36–40px,可提供紧凑模式;原型展示行高 44px |
|
||||
| 形状 | 控件圆角 6–8px,弱化边框;选中任务允许非常轻的阴影,避免大量卡片叠加 |
|
||||
|
||||
## 正式改造的建议顺序
|
||||
|
||||
1. **工程标题与视觉 token**:`ui/main_window.py`、`project_summary.py`、`styles.py`。保持窗口、对象名和服务接口兼容。
|
||||
2. **任务导航与操作层级**:`task_list.py` 定制 delegate;完整任务名与 tooltip 保留;区分真实顺序与显示排序。不要用每项大量子 widget 破坏现有列表性能。
|
||||
3. **状态执行区**:`run_panel.py` 配合 `execution_state.py` 与现有门禁,收拢低频维护操作;不能以菜单可见性替代后端权限/状态检查。
|
||||
4. **表格工具条与范围标注**:`project_plan.py`、`target_table.py`、`mapping_table.py`;保留代理排序/过滤、UID 绑定、隐藏行不被误改、跨任务草稿等现有约束。
|
||||
5. **DSH 外壳统一**:先处理 `dsh_native.py` 的启动、加载、失败与返回任务体验,深度聊天改造另作能力验证。
|
||||
|
||||
正式实施后应运行已有 `tests/ui` 与 `tests/v1_1` 中相关 UI/状态用例,并截图核对空任务、未保存草稿、BOM 校验失败、运行、安全暂停、待核验、完成与回收站。至少覆盖 980×700、1280×880 和 1440×900,并实测 Windows 125%/150% 缩放;预览截图不代表已经完成这些桌面验收。
|
||||
|
||||
## 本轮验证记录
|
||||
|
||||
- 现有窗口成功创建并采集规则页、位号页;仅使用临时数据。
|
||||
- 自包含 HTML 经 Qt WebEngine 渲染,四种状态各生成一张 1440×900 PNG;页面无外部字体、CDN 或框架依赖。
|
||||
- 检查四种状态的页面根节点均无横向或纵向溢出;表格容器允许自身滚动。
|
||||
- 在 1100×800 检查页面无横向溢出;位号搜索 `RV05` 仅保留 1 行;修改勾选禁用执行;恢复示例计划后重新允许执行。
|
||||
- 原始结果见 [preview-verification.json](preview-verification.json)。未改动生产代码,因此本轮未运行 CAD 或全量业务测试。
|
||||
- 工作期间工作区出现并行的 DSH 生命周期相关修改。本轮交付文件集中在此审查目录,不包含那些源代码改动,也没有替它们做验证或提交。
|
||||
@@ -0,0 +1,62 @@
|
||||
# Safe User Stop Implementation Plan
|
||||
|
||||
> **For agentic workers:** use superpowers:subagent-driven-development or executing-plans; continue within the user-approved scope without another approval round.
|
||||
|
||||
**Goal:** 用户停止只在安全边界收尾;写入中的无进度不自动杀进程;明确强制中断有保护证据和恢复入口。
|
||||
|
||||
**Architecture:** 保留现有 Event/队列边界和独立监督进程,加入独立的强制停止意图、等待状态反馈;退出正常性与物理资源复核分开。使用既有任务保护与批次记录,不新增数据库版本。
|
||||
|
||||
**Tech Stack:** Python 3.12、Windows pywin32、PySide6、VBScript、pytest。
|
||||
|
||||
**Spec:** `docs/superpowers/specs/2026-10-26-safe-user-stop.md`
|
||||
|
||||
## Global Constraints
|
||||
|
||||
- 不修改原工程、中心库或未跟踪 feedback;真实测试只复制 fixture。
|
||||
- 不放宽身份、写前保护、禁止不确定重放的门禁。
|
||||
- 普通停止与强制结束独立,确认前不得产生强制意图。
|
||||
- 不通过无限创建桌面或删除旧保护绕过异常。
|
||||
- 不发布、不推送;本地分支 `codex/day0-safe-stop`。
|
||||
|
||||
## Task 1: 退出协议与后代进程
|
||||
|
||||
Files: `isolated_cad.py`, `isolated_desktop.py`, `tests/v1_1/test_isolated_cad.py`, `test_isolated_desktop.py`.
|
||||
|
||||
- [x] 先复现 closing 记录失败跳过 Quit、父进程自然退出后仍立即终止子进程的测试。
|
||||
- [x] 诊断写入失败不跳过满足身份/空工程条件的 Quit;将记录失败独立保留并报告,禁止伪报 clean。
|
||||
- [x] 根进程正常退出时,给 Job 后代 2 秒有界自然退出窗口;到期再强制并记录 `forced_termination`, `termination_reason`, `forced_descendant_pids`。根进程仍活着的异常清理仍有界。
|
||||
- [x] 保留所有权和退出确认,测试自然退出与强制升级两条路径。
|
||||
|
||||
## Task 2: 停止、等待与强制中断
|
||||
|
||||
Files: new `stop_control.py`; `worker_monitor.py`, `project_session.py`, `batch_runtime.py`, `batch_supervisor.py`, `execution_feedback.py`; associated tests.
|
||||
|
||||
Interface:
|
||||
```python
|
||||
class StopControl(Event):
|
||||
force_event: Event
|
||||
def request_force(self):
|
||||
self.set()
|
||||
self.force_event.set()
|
||||
```
|
||||
- [x] 首先测试 unsafe 保存阶段超时仍保留 worker,安全阶段仍有 watchdog,显式 force 才结束并产生 uncertain。
|
||||
- [x] `ProgressWatch` 提供 `waiting_for_safe_completion`;新进度可清除提示,不把心跳当作写入推进。
|
||||
- [x] 监督父进程持久化停止意图;force 先写保护与中断记录,再只终止已拥有的监督进程 Job,不使用名字或不可信 PID 清理。
|
||||
- [x] 业务完成但退出异常仍通过独立错误返回,附带已核验业务结果;纯桌面延迟且退出正常可继续使用现有复核恢复。
|
||||
- [x] 普通停止在当前项收尾后暂停;会话 close 不得因普通等待超时反向强杀仍在写入的 worker。
|
||||
|
||||
## Task 3: 保存边界与界面
|
||||
|
||||
Files: `QuickPartReplace.vbs`, `ui/run_panel.py`, `ui/main_window.py`, `ui/execution_feedback.py`, protocol serializer if required; VBS/UI tests.
|
||||
|
||||
- [x] VBS 用真实函数的失败先行测试覆盖保存已发出但工程关闭失败;保存请求前设置“可能保存”状态,独立记录保存返回/回读/关闭,不再声称未保存。
|
||||
- [x] 正常停止显示等待当前项收尾;unsafe 超时显示保存/核验尚未确认。
|
||||
- [x] 提供与普通暂停分离的强制结束按钮,确认文案明确结果待核验;取消确认没有副作用。
|
||||
- [x] 关闭窗口在运行/等待期间保持打开;任务失败后取消自动关闭,让用户看见恢复信息。
|
||||
|
||||
## Task 4: 集成验证与审查
|
||||
|
||||
- [x] 运行相关 VBS、monitor、supervisor、queue、UI、资源测试及完整发布门禁范围。
|
||||
- [x] 实机空 CAD 自然退出、两工程副本正常保存及独立回读;停止/强制结束采用受控替身或独立进程,明确验证边界。
|
||||
- [x] 独立审查关注:不确定写入重放、等待时 GUI 退出杀进程、force 身份校验与持久化失败、结果错误被吞、已完成项保留。
|
||||
- [x] 更新操作文档和验收记录,交付本地可审查修改及测试证据。
|
||||
@@ -0,0 +1,54 @@
|
||||
# DSH AI Supervision Implementation Plan
|
||||
|
||||
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||
|
||||
**Goal:** Add a tool-first AI supervision layer with deterministic auto-remediation and optional human chat to the task center.
|
||||
|
||||
**Architecture:** Keep all mutation in the existing service. Add small Python modules for snapshots, rules, action validation, and an OpenAI-compatible client; connect them to a Qt dialog and the existing error path.
|
||||
|
||||
**Tech Stack:** Python 3.12, dataclasses, urllib, PySide6, pytest.
|
||||
|
||||
**Spec:** `docs/superpowers/specs/2026-10-30-dsh-ai-supervision-design.md`
|
||||
|
||||
## Global Constraints
|
||||
|
||||
- Model output is advisory JSON and never execution evidence.
|
||||
- Only fixed allowlisted actions may reach the service.
|
||||
- Missing model configuration must not disable deterministic supervision.
|
||||
|
||||
---
|
||||
|
||||
### Task 1: DSH core contracts
|
||||
|
||||
**Files:** Create `src/dx_productivity/dsh/__init__.py`, `snapshot.py`, `rules.py`, `actions.py`, `client.py`, `supervisor.py`; Test `tests/dsh/test_core.py`.
|
||||
|
||||
- [ ] Define immutable `TaskSnapshot`, `Issue`, `ActionProposal`, and `ChatReply` records.
|
||||
- [ ] Implement redaction and issue classification with stable JSON-safe dictionaries.
|
||||
- [ ] Implement allowlisted action validation and idempotency keys.
|
||||
- [ ] Implement an OpenAI-compatible HTTP client with strict JSON parsing and a disabled configuration path.
|
||||
- [ ] Implement supervisor event handling that invokes only injected handlers.
|
||||
- [ ] Add tests for redaction, classification, malformed JSON, unknown actions, and retry idempotency.
|
||||
|
||||
### Task 2: Service adapter and automatic remediation
|
||||
|
||||
**Files:** Create `src/dx_productivity/dsh/service_adapter.py`; Modify `src/dx_productivity/trial_task_center/ui/main_window.py`; Test `tests/dsh/test_service_adapter.py`.
|
||||
|
||||
- [ ] Adapt `prepare_failed_quick_run`, `pause_task`, and read-only feedback behind fixed action names.
|
||||
- [ ] Connect UI error reporting to supervisor observation without changing existing error messages.
|
||||
- [ ] Auto-run only retryable failures and record outcomes.
|
||||
- [ ] Add tests using a fake service and verify duplicate events do not repeat actions.
|
||||
|
||||
### Task 3: Human assistant panel
|
||||
|
||||
**Files:** Create `src/dx_productivity/trial_task_center/ui/dsh_panel.py`; Modify `main_window.py`; Test `tests/ui/test_dsh_panel.py`.
|
||||
|
||||
- [ ] Add a compact Qt dialog with issue summary, action cards, chat input, send/stop state, and local audit list.
|
||||
- [ ] Display an explicit unconfigured-model state and keep local actions usable.
|
||||
- [ ] Require confirmation for proposals marked `requires_confirmation`.
|
||||
- [ ] Cover offscreen rendering and send/response state with fake client.
|
||||
|
||||
### Task 4: Documentation and regression verification
|
||||
|
||||
- [ ] Document configuration and limits in `docs/user/dsh-ai-supervision.md`.
|
||||
- [ ] Run DSH tests and the existing UI/service regression suites.
|
||||
- [ ] Run `python -m compileall src` and record results.
|
||||