docs: define instance refresh and edit task

This commit is contained in:
QiuSW
2026-07-25 16:21:38 +08:00
parent 4063b851eb
commit 1a453cf8f0
9 changed files with 120 additions and 15 deletions
+4 -1
View File
@@ -13,7 +13,8 @@ Platform Windows
├─ Job Object
└─ profile occupancy inspector
├─ loopback CDP endpoint inspector
└─ remote-debug port allocator
├─ remote-debug port allocator
└─ instance status refresher
↓
Chrome / Edge processes
```
@@ -36,6 +37,8 @@ UI/CLI 不直接操作 `exec.Cmd`、Win32 handle 或数据库。Application 层
- Force stop:使用实例 Job Object 或已校验进程树,不按名称全局终止。
- Restart:旧实例退出或完成超时处理后重新执行同一配置。
- App shutdown:取消监控,不默认终止用户浏览器。
- Refresh:以 UI 传入的保存实例快照为范围,在后台读取 Chub registry、对应 profile 占用证据与已知 loopback CDP 端点,返回状态 DTO。刷新不按浏览器进程名或端口范围枚举;结果以实例 ID 与快照版本关联,UI 丢弃已删除或已编辑行的过期结果。
- Edit:UI 只提交可持久化的实例配置 DTO;运行时 PID、关联端口、占用来源和状态由刷新/启动结果返回,不作为编辑表单保存字段。编辑时保留未公开的非敏感启动选项,活跃或外部关联实例的身份约束字段保持只读。
Chrome 和 Edge 共用大部分 Chromium 参数,但 executable 默认路径、进程名称和安装方式不同,通过 `BrowserDefinition` 封装差异。CDP 端点只绑定 `127.0.0.1`;端口号和 `/json/version` 是诊断数据,WebSocket URL 不进入持久化、事件或普通 UI 文案。