Fix/修复ui editor选择逻辑 #270
Reference in New Issue
Block a user
Delete Branch "fix/ui-editor-enexpected-select"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
close #266
当前实现: 按下就重新选择
实际上应该: 松开而且没有发生拖动才重新选择
before:

after:

当前 head 的 UI 选择改动定向测试已通过,但不能合并:该分支相对最新 master 回退了 PR273 已修复的 Codex CLI BrokenPipe 处理。请先同步最新 master,保留 codex_cli.rs 的容错与退出码/stderr 采集逻辑,重新跑四项必需 CI 后再申请复审。
@@ -665,5 +665,5 @@let executable = temp.path().join("fake-codex");std::fs::write(&executable,r#"#!/bin/shprompt="$(cat)"这里把 PR273 的 BrokenPipe 容错回退成 write_all/shutdown 直接失败。Codex CLI 可能在 prompt 写完前退出;直接返回会跳过 child.wait() 以及脱敏 stderr 摘要采集,重新引入失败状态竞态。请保留 master 上的继续等待与错误汇总逻辑。
[PR270 review] head sha:
708421259aRequest changes:该 head 的定向 UI 测试当前无法通过。
tests/uiEditorPreview.test.tsx中前一测试遗留的ExclusiveChildrenTabs导致后续getByRole命中多个元素;请修复测试清理后再合并。[PR270 review] head sha: 708421259a69ab591fd8c47eb2adcd1b4d1c84a7\n\n阻塞合并(P1):新增的 tests/uiEditorPreview.test.tsx 测试会污染后续测试的 DOM。uses a highlighted tab bar 测试在第 307 行渲染 ExclusiveChildrenTabs 后没有 unmount;随后 keeps exclusive tab pointer gestures 测试使用 screen.getByRole(tab, name=child-b) 时会同时命中前一个测试遗留的 tab 和本测试的 tab,导致 Vitest 失败(实测 2 个测试失败,18 个中 16 个通过)。请在该测试中 unmount,或确保每个测试后 cleanup,并重新运行该测试文件。
[PR270 review] head sha: 708421259a69ab591fd8c47eb2adcd1b4d1c84a7\n\n阻塞合并(P1):新增的 tests/uiEditorPreview.test.tsx 测试会污染后续测试的 DOM。uses a highlighted tab bar 测试在第 307 行渲染 ExclusiveChildrenTabs 后没有 unmount;随后 keeps exclusive tab pointer gestures 测试使用 screen.getByRole(tab, name=child-b) 时会同时命中前一个测试遗留的 tab 和本测试的 tab,导致 Vitest 失败(实测 2 个测试失败,18 个中 16 个通过)。请在该测试中 unmount,或确保每个测试后 cleanup,并重新运行该测试文件。
[PR270 review] head sha:
55907efcdeP1(阻塞合并):该 head 的定向 UI 测试无法通过。新增的
disables native text selection...测试调用renderTree()后没有unmount();紧接着新增的does not use click alone...测试也没有清理。该 Vitest 文件未配置自动 cleanup,渲染树会留在 document.body,导致后续shows final-preview...的screen.getByText("child")匹配多个元素,且keeps exclusive tab...的getByRole("tab", {name: "child-b"})也匹配多个元素。实际运行该 head 的定向测试结果为 2 failed / 22 passed。建议每个测试结束时 unmount,或统一配置afterEach(cleanup)。问题位置:apps/ai-game-creator-shell/tests/uiEditorPreview.test.tsx:94。[PR270 review] head sha:
55907efcdeRequest changes:定向测试当前失败(2 failed / 22 passed),详见总评论 3389。
当前 head 的 UI 测试清理问题和 codex_cli.rs 回退问题已修复,但仍有一个会造成预览状态残留的阻塞问题,另有一项交互契约回归。请修复后重新运行四项必需 CI,并在同步最新 master 后再申请复审。
@@ -224,3 +275,3 @@kind: 'drag',treeId: activeImageId,nodeId: node.id,nodeId: dragNode.id,这里将实际拖动目标改为按下前已选中的节点,但下面的 previewNodeIds 仍按命中的 node.id 计算。开启“保持子节点位置”并选中父节点、从某个子节点开始拖动时,emitPreviewTransforms 会写入选中父节点及其全部子节点;cancelGesture 却只清理命中子树,其他子节点的临时变换会在取消/失焦后残留并覆盖真实布局。请按 dragNode.id 计算并补充该场景的取消清理回归测试。
[PR270 review] head sha:
ff599a1b09结论:未发现明确问题。已审查实际 base/head diff;定向 UI 测试 21/21 通过,ai-game-creator-shell typecheck 通过。