chore(tasks): start T-306 migrate V2 UI Walk->Gio

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ila
2026-07-23 14:20:54 +08:00
co-authored by Claude Opus 4.8
parent 8d71889d9c
commit 18e1331f8f
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -550,3 +550,12 @@
- 阻塞:无。
- 决策:**V2 UI 从 Walk 迁移到 Gio**。理由:Gio 从根上不用 Win32 common controls,规避 comctl/manifest 一类问题;`internal/render` 已出 `*image.RGBA`,Gio 直接 `paint.NewImageOp` 贴,UI 层薄;纯 Go 单 exe 符合"无 Go 环境运行"且不带 WebView2。已更新架构文档 `internal/ui` 为 Gio;新增迁移任务 T-306。
- 下一步:T-306 用 Gio 重写 `internal/ui`,保持 `NewWindow/Run/Present/PresentAlert/ReportIssue` 接口不变。
## 【2026-07-23】T-306 V2 UI 从 Walk 迁移到 Gio
- 状态:DOING
- 变更:任务落 DOING;将用 Gio 重写 `v2/internal/ui/window.go`,保持 `Window` 公开接口(`NewWindow/Run/Present/PresentAlert/ReportIssue`)与 `spec.go` 的 `ViewModel`/`MonitorWindowSpec` 不变;`cmd/silver-pose`、`monitor`、`alert` 等不动。
- 验证:开始前 `GOOS=windows CGO_ENABLED=0 go build ./cmd/gio-spike` 通过。迁移每步以 `GOOS=windows` 交叉编译验证(本环境无法运行 Gio)。
- 阻塞:真实窗口/声音/弹窗目视需 Windows。
- 决策:后台 `Present/PresentAlert/ReportIssue` 只在带锁共享区更新最新帧/状态/待弹窗并 `Invalidate()`,Gio 事件循环在独立 goroutine 只渲染最新帧(取代 Walk 的 `main.Synchronize`);声音用 Windows `MessageBeep` syscall(`sound_windows.go` + 非 Windows 空实现),弹窗自绘遮罩。`ViewModel` 逻辑复用、`spec_test.go` 不受影响。
- 下一步:写 Gio `window.go` + sound 文件,交叉编译通过后接 `cmd/silver-pose` 验证。